|
@@ -304,7 +304,8 @@ void Dispatch_plc::execute_thread_fun()
|
|
|
else if( m_dispatch_request_msg.dispatch_motion_direction() == message::Dispatch_motion_direction::E_PICKUP_CAR )
|
|
|
{
|
|
|
std::unique_lock<std::mutex> t_lock(Dispatch_manager::get_instance_references().m_lock);
|
|
|
- Dispatch_manager::get_instance_references().m_dispatch_response_pickup_map[m_outlet_id] = m_dispatch_response_msg;
|
|
|
+ int t_terminal_id = m_dispatch_request_msg.id_struct().terminal_id();
|
|
|
+ Dispatch_manager::get_instance_references().m_dispatch_response_pickup_map[t_terminal_id] = m_dispatch_response_msg;
|
|
|
Dispatch_manager::get_instance_references().m_pickup_updata_time = std::chrono::system_clock::now();
|
|
|
}
|
|
|
//流程正常结束, 恢复到待机状态.
|
|
@@ -339,7 +340,8 @@ void Dispatch_plc::execute_thread_fun()
|
|
|
else if( m_dispatch_request_msg.dispatch_motion_direction() == message::Dispatch_motion_direction::E_PICKUP_CAR )
|
|
|
{
|
|
|
std::unique_lock<std::mutex> t_lock(Dispatch_manager::get_instance_references().m_lock);
|
|
|
- Dispatch_manager::get_instance_references().m_dispatch_response_pickup_map[m_outlet_id] = m_dispatch_response_msg;
|
|
|
+ int t_terminal_id = m_dispatch_request_msg.id_struct().terminal_id();
|
|
|
+ Dispatch_manager::get_instance_references().m_dispatch_response_pickup_map[t_terminal_id] = m_dispatch_response_msg;
|
|
|
Dispatch_manager::get_instance_references().m_pickup_updata_time = std::chrono::system_clock::now();
|
|
|
}
|
|
|
//20211209 huli //流程异常结束, 进入到 ready.
|
|
@@ -668,24 +670,11 @@ Error_manager Dispatch_plc::send_dispatch_response_to_main_control()
|
|
|
m_dispatch_response_msg.mutable_base_info()->set_timeout_ms(m_dispatch_request_msg.base_info().timeout_ms());
|
|
|
m_dispatch_response_msg.mutable_base_info()->set_sender(message::Communicator::eDispatch_manager);
|
|
|
m_dispatch_response_msg.mutable_base_info()->set_receiver(message::Communicator::eMain);
|
|
|
- m_dispatch_response_msg.set_command_key(m_dispatch_request_msg.command_key());
|
|
|
|
|
|
+ m_dispatch_response_msg.set_command_key(m_dispatch_request_msg.command_key());
|
|
|
m_dispatch_response_msg.set_dispatch_motion_direction(m_dispatch_request_msg.dispatch_motion_direction());
|
|
|
-
|
|
|
- //need,need
|
|
|
- if ( m_dispatch_request_msg.dispatch_motion_direction() == message::Dispatch_motion_direction::E_STORE_CAR )
|
|
|
- {
|
|
|
- m_dispatch_response_msg.mutable_id_struct()->set_terminal_id(m_dispatch_request_msg.mutable_id_struct()->terminal_id());
|
|
|
- m_dispatch_response_msg.mutable_id_struct()->set_unit_id(m_dispatch_request_msg.mutable_id_struct()->terminal_id()/2);
|
|
|
-
|
|
|
- }
|
|
|
- else if( m_dispatch_request_msg.dispatch_motion_direction() == message::Dispatch_motion_direction::E_PICKUP_CAR )
|
|
|
- {
|
|
|
- m_dispatch_response_msg.mutable_id_struct()->set_terminal_id(m_dispatch_request_msg.mutable_id_struct()->unit_id()*2+m_outlet_id);
|
|
|
- m_dispatch_response_msg.mutable_id_struct()->set_unit_id(m_dispatch_request_msg.mutable_id_struct()->unit_id());
|
|
|
- }
|
|
|
-
|
|
|
-// m_dispatch_response_msg.set_terminal_id(m_dispatch_request_msg.terminal_id());
|
|
|
+ m_dispatch_response_msg.mutable_id_struct()->set_terminal_id(m_dispatch_request_msg.mutable_id_struct()->terminal_id());
|
|
|
+ m_dispatch_response_msg.mutable_id_struct()->set_unit_id(m_dispatch_request_msg.mutable_id_struct()->unit_id());
|
|
|
m_dispatch_response_msg.mutable_locate_information()->CopyFrom(m_dispatch_request_msg.locate_information());
|
|
|
m_dispatch_response_msg.mutable_parkspace_info_ex()->CopyFrom(m_dispatch_request_msg.parkspace_info_ex());
|
|
|
m_dispatch_response_msg.set_car_type(m_dispatch_request_msg.car_type());
|