|
@@ -100,8 +100,6 @@ int RecipeContext::Moniter()
|
|
|
//TODO:命令执行过程中
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
updateTime(FALSE);
|
|
|
//2.依次执行RecipeChecker列表中每个检查器的check函数
|
|
|
// i.如果有AlarmRecipeChecker被触发,则进行alarm condition相关处理并返回
|
|
@@ -1250,6 +1248,7 @@ void RecipeContext::executeNextStep()
|
|
|
recipeExecuteStatus = recipeExecuteStatusValue::ExecStep;
|
|
|
//数据上报,本步开始
|
|
|
ReportRuningState(RunningStateValue::RunningRecipe);
|
|
|
+ ReportStepNotify();
|
|
|
char jumpRecipeCmd[32];
|
|
|
sprintf(jumpRecipeCmd, "%s.Recipe.Command", MODULE_NAME);
|
|
|
SC->setStringValue(jumpRecipeCmd, "");
|
|
@@ -1369,10 +1368,10 @@ void RecipeContext::ReoprtStepCompleted()
|
|
|
ret.mainStepNumber = currentStepNo;
|
|
|
ret.stepNumber = currentStepNo;
|
|
|
|
|
|
- static BYTE rawdata[16];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteRecipeStepFinishNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteRecipeStepFinishNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[16 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteRecipeStepFinishNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1392,10 +1391,10 @@ void RecipeContext::ReoprtStepCompleted()
|
|
|
ret.loopTotal = mainStepList.get(currentStepNo)->loopCount;
|
|
|
ret.subStepNumber = currentOtherStepNo;
|
|
|
|
|
|
- static BYTE rawdata[16];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteSubStepFinishNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteSubStepFinishNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[16 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteSubStepFinishNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1416,10 +1415,10 @@ void RecipeContext::ReoprtStepCompleted()
|
|
|
ret.loopTotal = mainStepList.get(currentStepNo)->loopCount;
|
|
|
ret.alarmStepNumber = currentOtherStepNo;
|
|
|
|
|
|
- static BYTE rawdata[16];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteAlarmStepFinishNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteAlarmStepFinishNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[16 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteAlarmStepFinishNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1445,13 +1444,13 @@ void RecipeContext::ReportRuningState(RunningStateValue state)
|
|
|
ret.runningState = state;
|
|
|
|
|
|
|
|
|
- static BYTE rawdata[4];
|
|
|
+ static BYTE rawdata[sizeof(OnRunningStatusNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnRunningStatusNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
|
|
|
- static BYTE sendata[4 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnRunningStatusNotifyMsgContext) + 2];
|
|
|
|
|
|
- memcpy(&sendata + 2, rawdata, lenData);
|
|
|
+ memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
|
int tagid = 52;
|
|
|
|
|
@@ -1472,10 +1471,10 @@ void RecipeContext::ReportStepNotify()
|
|
|
ret.loopTotal = mainStepList.get(currentStepNo)->loopCount;
|
|
|
ret.stepNumber = currentStepNo;
|
|
|
|
|
|
- static BYTE rawdata[12];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteRecipeStepNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteRecipeStepNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[12 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteRecipeStepNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1498,10 +1497,10 @@ void RecipeContext::ReportStepNotify()
|
|
|
ret.loopTotal = mainStepList.get(currentStepNo)->loopCount;
|
|
|
ret.subStepNumber = currentOtherStepNo;
|
|
|
|
|
|
- static BYTE rawdata[24];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteSubStepNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteSubStepNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[24 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteSubStepNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1521,10 +1520,10 @@ void RecipeContext::ReportStepNotify()
|
|
|
ret.loopTotal = mainStepList.get(currentStepNo)->loopCount;
|
|
|
ret.alarmStepNumber = currentOtherStepNo;
|
|
|
|
|
|
- static BYTE rawdata[16];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteAlarmStepNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteAlarmStepNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[16 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteAlarmStepNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1549,10 +1548,10 @@ void RecipeContext::ReportAlarm( char * alarmNUmber, char * mesg)
|
|
|
strcpy(ret.alarmNumber, alarmNUmber);
|
|
|
strcpy(ret.message, mesg);
|
|
|
|
|
|
- static BYTE rawdata[200];
|
|
|
+ static BYTE rawdata[sizeof(OnAlarmNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnAlarmNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[200 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnAlarmNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|
|
@@ -1576,10 +1575,10 @@ void RecipeContext::ReportAbort(char* AbortStepName, char* MainStepName)
|
|
|
strcpy(ret.abortStepName, AbortStepName);
|
|
|
strcpy(ret.mainStepName, MainStepName);
|
|
|
|
|
|
- static BYTE rawdata[200];
|
|
|
+ static BYTE rawdata[sizeof(OnExecuteAbortStepNotifyMsgContext)];
|
|
|
int lenData = StructToBytes<OnExecuteAbortStepNotifyMsgContext>::ToBytes(ret, rawdata);
|
|
|
ConvertLittleEndianToBigEndian_(rawdata, lenData);
|
|
|
- static BYTE sendata[200 + 2];
|
|
|
+ static BYTE sendata[sizeof(OnExecuteAbortStepNotifyMsgContext) + 2];
|
|
|
|
|
|
memcpy(sendata + 2, rawdata, lenData);
|
|
|
|