|
- //using ModbusDemo.Enum;
-
- namespace ModbusTest
- {
- public class Tests
- {
- [SetUp]
- public void Setup()
- {
- }
-
- [Test]
- public void Test1()
- {
- byte[] byteStream = new byte[] { 0x01, 0x81, 0x01, 0x10, 0x00, 0x00, 0xAB, 0x17 };
- byte errorCodeByte = byteStream[2]; // 0x01
- //ErrorCode errorCode = (ErrorCode)errorCodeByte; // ת»»Îª ErrorCode.FunctionCodeError
- //string message = errorCode.GetMessage();
- }
- }
- }
|