|
@@ -52,10 +52,20 @@ Error_manager System_executor::check_msg(Communication_message* p_msg)
|
|
|
//针对消息类型, 对消息进行二次解析
|
|
|
if (t_dispatch_request_msg.ParseFromString(p_msg->get_message_buf()))
|
|
|
{
|
|
|
- if ( t_dispatch_request_msg.terminal_id() == Dispatch_manager::get_instance_references().get_dispatch_manager_id()*2 ||
|
|
|
- t_dispatch_request_msg.terminal_id() == Dispatch_manager::get_instance_references().get_dispatch_manager_id()*2+1)
|
|
|
+ if ( t_dispatch_request_msg.dispatch_motion_direction() == message::Dispatch_motion_direction::E_STORE_CAR )
|
|
|
{
|
|
|
- return Error_code::SUCCESS;
|
|
|
+ if ( t_dispatch_request_msg.terminal_id() == Dispatch_manager::get_instance_references().get_dispatch_manager_id()*2 ||
|
|
|
+ t_dispatch_request_msg.terminal_id() == Dispatch_manager::get_instance_references().get_dispatch_manager_id()*2+1)
|
|
|
+ {
|
|
|
+ return Error_code::SUCCESS;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if ( t_dispatch_request_msg.dispatch_motion_direction() == message::Dispatch_motion_direction::E_PICKUP_CAR )
|
|
|
+ {
|
|
|
+ if ( t_dispatch_request_msg.terminal_id() == Dispatch_manager::get_instance_references().get_dispatch_manager_id() )
|
|
|
+ {
|
|
|
+ return Error_code::SUCCESS;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|