123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // Created by huli on 2020/6/28.
- //
- #include "system_communicator.h"
- System_communicator::System_communicator()
- {
- }
- System_communicator::~System_communicator()
- {
- }
- //定时封装发送消息, 一般为心跳和状态信息, 需要子类重载
- Error_manager System_communicator::encapsulate_send_data()
- {
- return Error_code::SUCCESS;
- }
- /*
- * 发送消息函数
- */
- Error_manager System_communicator::encapsulate_msg(Communication_message* message)
- {
- switch(message->get_message_type())
- {
- default:break;
- }
- }
- /*
- * 检测消息是否合法
- */
- Error_manager System_communicator::check_msg(Communication_message* p_msg)
- {
- return SUCCESS;
- }
- //检查消息是否可以被处理, 需要重载
- Error_manager System_communicator::check_executer(Communication_message* p_msg)
- {
- return SUCCESS;
- }
- /*
- * 处理接收到的消息
- */
- Error_manager System_communicator::execute_msg(Communication_message* p_msg)
- {
- /*
- * 接收终端指令, 生成流程
- */
- }
|