|
@@ -195,7 +195,7 @@ void PickupProcessTask::Main()
|
|
|
{
|
|
|
updata_step_statu(message::eWorking);
|
|
|
code=dispatch_step();
|
|
|
- usleep(1000*1000);
|
|
|
+ usleep(1000*500);
|
|
|
code!=SUCCESS?updata_step_statu(message::eError):updata_step_statu(message::eFinished);
|
|
|
LOG_IF(ERROR, code != SUCCESS) << "------- 取 -------取车调度失败,取车终端:"<<m_terminor_id
|
|
|
<<", 车位id:"<<m_search_response_msg.car_position().parkspace_id()
|
|
@@ -218,14 +218,23 @@ void PickupProcessTask::Main()
|
|
|
updata_step_statu(message::eWorking);
|
|
|
code=release_space_step();
|
|
|
code!=SUCCESS?updata_step_statu(message::eError):updata_step_statu(message::eFinished);
|
|
|
- LOG_IF(ERROR, code != SUCCESS) << "------- 取 -------取车释放车位失败,取车终端:"<<m_terminor_id
|
|
|
- <<", 车牌号:"<<m_car_info.license();
|
|
|
+
|
|
|
+ if(code!=SUCCESS)
|
|
|
+ {
|
|
|
+ //提升错误等级为三级
|
|
|
+ LOG(ERROR)<<"------- 取 ------- 释放车位失败 ------进入异常处理, 车牌号:"<<m_car_info.license();
|
|
|
+ Exception_solver::get_instance_pointer()->solve_exception(Error_manager(code.get_error_code(),MAJOR_ERROR,code.get_error_description()),this);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
if(m_current_step_type==message::eComplete) {
|
|
|
//流程结束前,保证至少发送一次流程完成状态
|
|
|
updata_step_statu(message::eFinished);
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+ // ----------------------------------------华丽的分割线 ----------------------------------------
|
|
|
+
|
|
|
if(m_current_step_type== message::eBackWait_step)
|
|
|
{
|
|
|
updata_step_statu(message::eWorking);
|
|
@@ -281,21 +290,21 @@ void PickupProcessTask::Main()
|
|
|
if(m_cancel_condition.wait_for_millisecond(1)==true) {
|
|
|
LOG(ERROR) << "------- 取 -------取车任务被强制取消,车牌号:" << m_car_info.license()
|
|
|
<< ", 终端号:" << m_terminor_id;
|
|
|
- usleep(1000*200);
|
|
|
+ usleep(1000*500);
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
if(m_current_step_type== message::eBackComplete)
|
|
|
{
|
|
|
//异常结束
|
|
|
- usleep(1000*200);
|
|
|
+ usleep(1000*500);
|
|
|
LOG(ERROR)<<"------- 取 -------异常取车,回退结束"<<"车牌号:"<<m_car_info.license()
|
|
|
<<",xxxxxxxxxxxxxx 终端:"<<m_terminor_id<<" xxxxxxxxxxxxxx";
|
|
|
}
|
|
|
if(m_current_step_type== message::eComplete)
|
|
|
{
|
|
|
//正常结束
|
|
|
- usleep(1000*200);
|
|
|
+ usleep(1000*500);
|
|
|
LOG(INFO)<<"------- 取 -------取车结束,"<<"车牌号:"<<m_car_info.license()
|
|
|
<<",-------------- 终端:"<<m_terminor_id<<" --------------";
|
|
|
}
|
|
@@ -351,7 +360,10 @@ Error_manager PickupProcessTask::back_dispatch_step()
|
|
|
/*
|
|
|
* 关门,搬运将车从出口抓回去
|
|
|
*/
|
|
|
- usleep(1000*2000);
|
|
|
+ /*usleep(1000*1000);
|
|
|
+ int k=rand()%10;
|
|
|
+ if(k==0)
|
|
|
+ return Error_manager(ERROR,MINOR_ERROR,"手动制造错误");*/
|
|
|
return SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -360,9 +372,13 @@ Error_manager PickupProcessTask::back_dispatch_step()
|
|
|
*/
|
|
|
Error_manager PickupProcessTask::wait_for_leave_step()
|
|
|
{
|
|
|
- usleep(1000*1000);
|
|
|
+ usleep(1000*200);
|
|
|
+ /*int k=rand()%10;
|
|
|
+ if(k==0)
|
|
|
+ return Error_manager(ERROR,MINOR_ERROR,"手动制造错误");*/
|
|
|
return SUCCESS;
|
|
|
}
|
|
|
+
|
|
|
/*
|
|
|
* 回退等待车辆离开
|
|
|
*/
|
|
@@ -376,6 +392,9 @@ Error_manager PickupProcessTask::back_wait_for_leave_step()
|
|
|
*/
|
|
|
Error_manager PickupProcessTask::release_space_step()
|
|
|
{
|
|
|
+ /*int k=rand()%10;
|
|
|
+ if(k==0)
|
|
|
+ return Error_manager(ERROR,MINOR_ERROR,"手动制造错误");*/
|
|
|
/*
|
|
|
* 检查是否曾经分配过车位
|
|
|
*/
|