BxCmdCode.go 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. package bx
  2. type CmdCode struct {
  3. name string
  4. group byte
  5. code byte
  6. }
  7. var (
  8. CMD_ACK = CmdCode{"ack", 0xa0, 0x00}
  9. CMD_NACK = CmdCode{"nack", 0xa0, 0x01}
  10. CMD_DEL_FILE = CmdCode{"delete file", 0xa1, 0x01}
  11. CMD_SYSTEM_STATE = CmdCode{"system state", 0xa1, 0x02}
  12. CMD_SYSTEM_PING = CmdCode{"ping", 0xa2, 0x00}
  13. CMD_SYSTEM_HEARTBEAT = CmdCode{"system heartbeat", 0xa4, 0x07}
  14. CMD_START_WRITE_FILE = CmdCode{"start write file", 0xa1, 0x05}
  15. CMD_WRITE_FILE = CmdCode{"write file", 0xa1, 0x06}
  16. CMD_WRITE_TRANS_START = CmdCode{"start write trans", 0xa1, 0x07}
  17. CMD_WRITE_TRANS_STOP = CmdCode{"stop the write trans", 0xa1, 0x08}
  18. CMD_WRITE_CUSTOMER_INFO = CmdCode{"write customer information", 0xa1, 0x09}
  19. CMD_GET_FILE_INTO = CmdCode{"get file information", 0xa1, 0x0a}
  20. CMD_GET_FILE_CONTENT = CmdCode{"get file content", 0xa1, 0x0b}
  21. CMD_SYSTEM_CLOCK_CORRECT = CmdCode{"system clock correct", 0xa2, 0x03}
  22. CMD_READ_PARAMS = CmdCode{"read params", 0xa2, 0x0a}
  23. CMD_SOUND = CmdCode{"add sound", 0xa2, 0x0e}
  24. CMD_TURN_ON_OFF = CmdCode{"turn on/off screen", 0xa3, 0x00}
  25. CMD_TIMING_SWITCH = CmdCode{"auto turn on/off screen", 0xa3, 0x01}
  26. CMD_LOCK_UNLOCK = CmdCode{"lock or unlock program", 0xa3, 0x04}
  27. CMD_SEND_DYNAMIC_AREA = CmdCode{"send dynamic area", 0xa3, 0x06}
  28. CMD_DEL_DYNAMIC_AREA = CmdCode{"delete dynamic area", 0xa3, 0x07}
  29. CMD_CANCEL_TIMING_SWITCH = CmdCode{"cancel auto turn on/off screen", 0xa3, 0x08}
  30. CMD_CLEAR_SCREEN = CmdCode{"clear the screen", 0xa3, 0x10}
  31. )