1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // Created by huli on 2020/6/29.
- //
- #ifndef NNXX_TESTS_COMMUNICATION_MESSAGE_H
- #define NNXX_TESTS_COMMUNICATION_MESSAGE_H
- #include <time.h>
- #include <sys/time.h>
- #include <chrono>
- class Communication_message
- {
- //消息类型定义,每个在网络上传输的消息必须含有这个属性
- enum Message_type
- {
- COMMAND_MESSAGE = 0X01, //指令消息
- SENSING_STATUS_MESSAGE = 0X11, //定位模块状态消息
- SENSING_REQUEST_MESSAGE = 0X12, //定位请求消息
- SENSING_RESPONSE_MESSAGE = 0X13, //定位反馈消息
- HARWARE_STATU_MESSAGE = 0X21, //调度模块硬件状态消息
- EXECUTE_REQUEST_MESSAGE = 0X22, //请求调度消息
- EXECUTE_RESPONSE_MESSAGE = 0X23, //调度结果反馈消息
- };
- public:
- Communication_message();
- Communication_message(const Communication_message& other)= default;
- Communication_message& operator =(const Communication_message& other)= default;
- ~Communication_message();
- public://API functions
- public://get or set member variable
- protected://member variable
- Message_type m_message_type; //消息类型
- std::chrono::system_clock::time_point m_receive_time; //接收时间
- private:
- };
- #endif //NNXX_TESTS_COMMUNICATION_MESSAGE_H
|