|
@@ -18,9 +18,6 @@ Error_manager Parkspace_allocation_communicator::send_response(Communication_mes
|
|
|
return encapsulate_msg(message);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
//************************************* 内部函数 ****************************************
|
|
|
//封装反馈消息自动发送
|
|
|
Error_manager Parkspace_allocation_communicator::encapsulate_msg(Communication_message *message)
|
|
@@ -115,43 +112,9 @@ Error_manager Parkspace_allocation_communicator::check_executer(Communication_me
|
|
|
}
|
|
|
return Error_code::SUCCESS;
|
|
|
}
|
|
|
-
|
|
|
-class AAA
|
|
|
-{
|
|
|
-public:
|
|
|
- message::Parkspace_allocation_status_msg mmm;
|
|
|
-
|
|
|
- message::Parkspace_allocation_status_msg & get()
|
|
|
- {
|
|
|
- return mmm;
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-
|
|
|
//重载心跳与车位状态发送函数
|
|
|
Error_manager Parkspace_allocation_communicator::encapsulate_send_data()
|
|
|
{
|
|
|
-// AAA aaa;
|
|
|
-// message::Parkspace_allocation_status_msg & m_parkspace_status_msg3 = aaa.get();
|
|
|
-// std::string str3;
|
|
|
-// m_parkspace_status_msg3.SerializeToString(&str3);
|
|
|
-//
|
|
|
-// return Error_code::SUCCESS;
|
|
|
-
|
|
|
-// message::Parkspace_allocation_status_msg m_parkspace_status_msg;
|
|
|
-// Communication_socket_base::encapsulate_msg(m_parkspace_status_msg.SerializeAsString());
|
|
|
-// return Error_code::SUCCESS;
|
|
|
-
|
|
|
-
|
|
|
- Parkspace_allocator & parkspace_allocator = Parkspace_allocator::get_instance_references();
|
|
|
- message::Parkspace_allocation_status_msg & m_parkspace_status_msg2 = parkspace_allocator.get_parkspace_status_msg();
|
|
|
- std::string str;
|
|
|
- m_parkspace_status_msg2.SerializeToString(&str);
|
|
|
-// Communication_socket_base::encapsulate_msg(str);
|
|
|
-return Error_code::SUCCESS;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
std::lock_guard<std::mutex> lck(Parkspace_allocator::get_instance_references().get_status_mutex());
|
|
|
Communication_socket_base::encapsulate_msg( Parkspace_allocator::get_instance_references().get_parkspace_status_msg().SerializeAsString() );
|
|
|
return Error_code::SUCCESS;
|