|
@@ -118,6 +118,22 @@ Error_manager StoreProcessTask::back_locate_step()
|
|
|
return SUCCESS;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * 检验结果
|
|
|
+ */
|
|
|
+Error_manager StoreProcessTask::compare_step()
|
|
|
+{
|
|
|
+
|
|
|
+ return SUCCESS;
|
|
|
+}
|
|
|
+/*
|
|
|
+ * 回退检验
|
|
|
+ */
|
|
|
+Error_manager StoreProcessTask::back_compare_step()
|
|
|
+{
|
|
|
+ return SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* 调度
|
|
|
*/
|
|
@@ -354,7 +370,16 @@ void StoreProcessTask::Main()
|
|
|
usleep(1000 * 1000 * (rand() % 5 + 1));
|
|
|
|
|
|
LOG_IF(ERROR, code != SUCCESS) << "测量失败:" << code.get_error_description();
|
|
|
- m_step_statu = (code != SUCCESS) ? eStoring_step::eBackMeasure_step : eStoring_step::eDispatch_step;
|
|
|
+ m_step_statu = (code != SUCCESS) ? eStoring_step::eBackMeasure_step : eStoring_step::eCompare_step;
|
|
|
+ }
|
|
|
+ if(m_step_statu==eStoring_step::eCompare_step)
|
|
|
+ {
|
|
|
+ code=compare_step();
|
|
|
+ usleep(500*1000);
|
|
|
+
|
|
|
+ LOG_IF(ERROR, code != SUCCESS) << "检验失败:" << code.get_error_description();
|
|
|
+ m_step_statu = (code != SUCCESS) ? eStoring_step::eBack_compare_step : eStoring_step::eDispatch_step;
|
|
|
+
|
|
|
}
|
|
|
//第二步,调度
|
|
|
if (m_step_statu == eStoring_step::eDispatch_step)
|
|
@@ -409,10 +434,25 @@ void StoreProcessTask::Main()
|
|
|
break;
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
+ m_step_statu=eStoring_step::eBack_compare_step;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(m_step_statu==eStoring_step::eBack_compare_step)
|
|
|
+ {
|
|
|
+ code=back_compare_step();
|
|
|
+ if(code!=SUCCESS)
|
|
|
+ {
|
|
|
+ //提升错误等级为四级
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
m_step_statu=eStoring_step::eBackMeasure_step;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if(m_step_statu==eStoring_step::eBackMeasure_step)
|
|
|
{
|
|
|
code=back_locate_step();
|
|
@@ -517,6 +557,13 @@ Error_manager StoreProcessTask::updata_step_statu_msg()
|
|
|
{
|
|
|
m_process_msg.mutable_alloc_space_step()->set_step_statu(message::eComplete);
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ message::Alloc_space_step_statu alloc_step_statu;
|
|
|
+ alloc_step_statu.set_step_statu(message::eComplete);
|
|
|
+ alloc_step_statu.mutable_car_info()->CopyFrom(m_car_info);
|
|
|
+ m_process_msg.mutable_alloc_space_step()->CopyFrom(alloc_step_statu);
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
case eStoring_step::eCompare_step:{
|
|
@@ -550,6 +597,8 @@ Error_manager StoreProcessTask::updata_step_statu_msg()
|
|
|
break;
|
|
|
}
|
|
|
case eStoring_step::eComplete: {
|
|
|
+ if(m_process_msg.has_confirm_space_step())
|
|
|
+ m_process_msg.mutable_confirm_space_step()->set_step_statu(message::eComplete);
|
|
|
m_process_msg.set_completed(true);
|
|
|
break;
|
|
|
}
|