12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /*
- * Module_CabinetParallel.h
- *
- * Created on: 2021年9月28日
- * Author: 7978
- */
- #ifndef MODULE_CABINETPARALLEL_H_
- #define MODULE_CABINETPARALLEL_H_
- #define MASTER_SLAVE_CABINET_TIMEOUT 10
- #define SLAVE_RECONNECT_TIME 5 // unit: 1s
- #define MASTER_TCP_LISTEN_PORT 63000
- #define DISCONNECT_PROMPT 300 // unit: 1s
- #define MAX_DATA_BUFFER_LEN 4096
- #define MAX_PACKET_BUFFER_LEN 10
- #define PARALLEL_CABINET_REG_QUANTITY 9
- #define REG_RSEND_TIME_NONE 0 // unit: 1ms
- #define REG_RSEND_TIME_MODELNAME 3000 // unit: 1ms
- #define REG_RSEND_TIME_ID 3000 // unit: 1ms
- #define REG_RSEND_TIME_REG03 0 // unit: 1ms
- #define REG_RSEND_TIME_STATUS 1000 // unit: 1ms
- #define REG_RSEND_TIME_OUTPUT_RELAY 500 // unit: 1ms
- #define REG_RSEND_TIME_AC_CONTACTOR 500 // unit: 1ms
- #define REG_RSEND_TIME_UPDATE 10000 // unit: 1ms
- #define REG_RSEND_TIME_PARALLEL_RELAY 5000 // unit: 1ms
- #define REG_REQ_LEN_NONE 0
- #define REG_REQ_LEN_MODELNAME 0
- #define REG_REQ_LEN_ID 1
- #define REG_REQ_LEN_REG03 0
- #define REG_REQ_LEN_STATUS 0
- #define REG_REQ_LEN_OUTPUT_RELAY 5
- #define REG_REQ_LEN_AC_CONTACTOR 2
- #define REG_REQ_LEN_UPDATE 2
- #define REG_REQ_LEN_PARALLEL_RELAY 5
- #define REG_RES_LEN_NONE 0
- #define REG_RES_LEN_MODELNAME 2
- #define REG_RES_LEN_ID 3
- #define REG_RES_LEN_REG03 0
- #define REG_RES_LEN_STATUS 2
- #define REG_RES_LEN_OUTPUT_RELAY 6
- #define REG_RES_LEN_AC_CONTACTOR 3
- #define REG_RES_LEN_UPDATE 3
- #define REG_RES_LEN_PARALLEL_RELAY 6
- enum PARALLEL_CABINET_PAYLOAD_REGISTER
- {
- _Reg_SCabinet_None = 0x00,
- _Reg_SCabinet_Model_Name = 0x01,
- _Reg_SCabinet_ID = 0x02,
- _Reg_SCabinet_Reg03 = 0x03,
- _Reg_SCabinet_Status = 0x04,
- _Reg_OutputRelay_Status = 0x05,
- _Reg_AcContactor_Status = 0x06,
- _Reg_SCabinet_FwUpdate = 0x07,
- _Reg_ParallelRelay_Status = 0x08,
- };
- enum RELAY_STATUS
- {
- Relay_OFF = 0x00,
- Relay_ON = 0x01,
- };
- enum UPDATE_STATUS
- {
- Not_Update = 0x00,
- Updating = 0x01,
- Updated = 0x02,
- };
- #endif /* MODULE_CABINETPARALLEL_H_ */
|