You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

8 months ago
  1. namespace Mirle.Component.MPLC.MCProtocol
  2. {
  3. /// <summary>
  4. /// 設備
  5. /// </summary>
  6. public class Device
  7. {
  8. /// <summary>
  9. /// 建構式
  10. /// </summary>
  11. /// <param name="dataType">資料類別</param>
  12. /// <param name="asciiCode">ASCII編碼</param>
  13. /// <param name="binaryCode">二進位編碼</param>
  14. /// <param name="addressType">位置類別</param>
  15. public Device(string dataType, string asciiCode, byte binaryCode, string addressType)
  16. {
  17. DataType = dataType;
  18. AsciiCode = asciiCode;
  19. BinaryCode = binaryCode;
  20. AddressType = addressType;
  21. }
  22. /// <summary>
  23. /// 位元類別
  24. /// </summary>
  25. public const string TypeBit = "BIT";
  26. /// <summary>
  27. /// 字元類別
  28. /// </summary>
  29. public const string TypeWord = "WORD";
  30. /// <summary>
  31. /// 十六進位位置
  32. /// </summary>
  33. public const string AddressHexadecimal = "HEX";
  34. /// <summary>
  35. /// 十進位位置
  36. /// </summary>
  37. public const string AddressDecimal = "DEC";
  38. /// <summary>
  39. /// 資料類別
  40. /// </summary>
  41. public string DataType { get; }
  42. /// <summary>
  43. /// ASCII編碼
  44. /// </summary>
  45. public string AsciiCode { get; }
  46. /// <summary>
  47. /// 二進位編碼
  48. /// </summary>
  49. public byte BinaryCode { get; }
  50. /// <summary>
  51. /// 位置類別
  52. /// </summary>
  53. public string AddressType { get; }
  54. }
  55. }