ConnectionType.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. namespace PLC.Siemens.Protocol.Common
  2. {
  3. public enum ConnectionType
  4. {
  5. // ReSharper disable once InconsistentNaming
  6. PG = 1,
  7. // ReSharper disable once InconsistentNaming
  8. OP = 2,
  9. // ReSharper disable once InconsistentNaming
  10. S7BASIC = 3,
  11. }
  12. /// <summary>
  13. /// 读写等级
  14. /// </summary>
  15. // ReSharper disable once InconsistentNaming
  16. public enum RWLevel
  17. {
  18. Unknown = 0x00,
  19. // ReSharper disable once InconsistentNaming
  20. RW = 0x01,
  21. R = 0x02,
  22. }
  23. public enum ProtectionLevel
  24. {
  25. NoPassword = 0x00,
  26. SelectorPassword = 0x01,
  27. WritePassword = 0x02,
  28. ReadWritePasswod = 0x03
  29. }
  30. public enum CpuLevel
  31. {
  32. Unknown = 0x00,
  33. AccessGrant = 0x01,
  34. ReadOnly = 0x02,
  35. ReadWritePasswod = 0x03
  36. }
  37. public enum RunStatus
  38. {
  39. Unknown = 0x00,
  40. Run = 0x01,
  41. RunP = 0x02,
  42. Stop = 0x03,
  43. Mres = 0x04,
  44. }
  45. public enum StartupSwitch
  46. {
  47. Unknown = 0x00,
  48. Crst = 0x01,
  49. Wrst = 0x02
  50. }
  51. public enum BlockType
  52. {
  53. OB = 0x38,
  54. DB = 0x41,
  55. SDB = 0x42,
  56. FC = 0x43,
  57. SFC = 0x44,
  58. FB = 0x45,
  59. SFB = 0x46,
  60. }
  61. public enum SubBlockType
  62. {
  63. OB = 0x08,
  64. DB = 0x0A,
  65. SDB = 0x0B,
  66. FC = 0x0C,
  67. SFC = 0x0D,
  68. FB = 0x0E,
  69. SFB = 0x0F
  70. }
  71. public enum BlockLangType
  72. {
  73. // Block languages
  74. AWL = 0x01,
  75. KOP = 0x02,
  76. FUP = 0x03,
  77. SCL = 0x04,
  78. DB = 0x05,
  79. GRAPH = 0x06,
  80. }
  81. }