📄 liftcomponents.c
字号:
case 5: *SymbolType = xsInput;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#qTRIZLg3K3BLUtnWcIdvFqeE|pos(1,13)\")";
case 6: *SymbolType = xsInput;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#pEGn-LowFJFLUaB6CIX7HGDI|pos(1,13)\")";
case 7: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#W1iP4EfZi9LLmbEWXL7GTMrL|pos(1,17)\")";
case 8: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#CI1dWE56F*ALGrrYgLi5R8yV|pos(1,17)\")";
case 9: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#Fzpu8IbroSLL8a46qE28mdlV|pos(1,17)\")";
case 10: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#XhWi0Ldt6oCLrPNdLLYxtoMI|pos(1,17)\")";
case 11: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#M-JQTE*ozaeLbCsasLNk2vtE|pos(1,13)\")";
case 12: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#zueVoIYzxvFLL7NjtELha9PE|pos(1,17)\")";
case 13: *SymbolType = xsValueReturningProcedureCall;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#W1iP4EfZi9LLmbEWXL7GTMrL|pos(1,34)\")";
case 14: *SymbolType = xsOutput;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#mjz*NIz2p-CLWaIbtLip6wTL|pos(1,17)\")";
case 15: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#coNmLE-sr0BL86wZ2VTJZRKL|pos(1,17)\")";
case 16: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#ThhlaLIt77iL-JU7RVH*0kfV|pos(1,17)\")";
case 17: *SymbolType = xsOutput;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#t3gl7IEdpgBLKDuaWV2lQyGL|pos(1,17)\")";
case 18: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#L7skzVjP4XILW6QhzVrUnNBL|pos(1,22)\")";
case 19: *SymbolType = xsDecision;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#Z2dEEEw76YAL0RPccLSPxNVI|pos(1,26)\")";
case 20: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#ChuX6IuywfDLouvXKVNAv5aI|pos(1,25)\")";
case 21: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#1Ck5zVfGtm5LSqLd*La0-RTV|pos(1,25)\")";
case 22: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#CK7DwIihsTILuwvZNIoJucNI|pos(1,25)\")";
case 23: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#dG2oNI4waAlLimL7nIMYC5IV|pos(1,25)\")";
case 24: *SymbolType = xsDecision;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#g13czV9NTMLLiG9gOIGtTKCE|pos(1,26)\")";
case 25: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#4epAbLdla3BL7VwfuI9fL5gV|pos(1,25)\")";
case 26: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#d4RuFLJKhK0LhlpYrVJz*TzI|pos(1,25)\")";
case 27: *SymbolType = xsOutput;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#n0TxrVTRfXvLij49pESfnhnV|pos(1,17)\")";
case 28: *SymbolType = xsValueReturningProcedureCall;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#CI1dWE56F*ALGrrYgLi5R8yV|pos(1,24)\")";
case 29: *SymbolType = xsAssignmentStatement;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#LtqcLIoBGliLCXZYjELe9yQV|pos(1,17)\")";
case 30: *SymbolType = xsProcedureCall;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#LdMgbIk-oJSLEFZ9hVfnli9V|pos(1,17)\")";
case 31: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#cFhw6I1WSWILf9sggEQtxpWL|pos(1,17)\")";
case 32: *SymbolType = xsProcedureCall;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#8HMmULtrBRBLhxskVV2ncAEL|pos(1,17)\")";
case 33: *SymbolType = xsNextstate;
return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#WZuPcE7HdJCLkElcsV7NtFRV|pos(1,17)\")";
default : *SymbolType = xsNoSuchSymbolType; return "";
}
}
#endif
/*+++++
* Function for process LiftController
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#wNLWBEjFLEVLvDrjVLhovX1V|pos(1,32)")
++++++*/
YPAD_FUNCTION(yPAD_z_LiftComponents_1_LiftController)
{
YPAD_YSVARP
YPAD_YVARP(yVDef_z_LiftComponents_1_LiftController)
YPAD_TEMP_VARS
#ifdef XTRACE
SDL_Boolean yDcn_SDL_Boolean;
#endif
YPRSNAME_VAR("LiftController")
BEGIN_PAD(yVDef_z_LiftComponents_1_LiftController)
#ifndef XNOPROCATSTARTUP
while (yVarP->ActivePrd != (xPrdNode)0 ) {
CALL_PROCEDURE_STARTUP
#ifdef XBREAKBEFORE
if (yVarP->ActivePrd != (xPrdNode)0 ) {
XBETWEEN_SYMBOLS(yVarP->ActivePrd->RestartAddress, 1216)
} else {
XBETWEEN_SYMBOLS(yVarP->RestartAddress, 1218)
}
#endif
}
#endif
LOOP_LABEL
switch (yVarP->RestartAddress) {
/* ----- START ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#zRkOcIOVrpVLGW8hSVMfsRFE|pos(1,9)") */
case 0:
BEGIN_START_TRANSITION(ySignalPar_z_LiftComponents_1_LiftController)
XAT_FIRST_SYMBOL(0)
GenericDefault((void *)&yVarP->z_LiftComponents_16_requests,
(tSDLTypeInfo *)&ySDL_z_Interfaces_Q_AKReferenceRequestList);
yAssF_z_Interfaces_U_ptr_Request(yVarP->z_LiftComponents_17_req,
z_Interfaces_U0_Null(), XASS_MR_ASS_NF);
yAssF_z_Interfaces_T_ptr_LiftInfo(yVarP->z_LiftComponents_18_currentInfo,
z_Interfaces_T0_Null(), XASS_MR_ASS_NF);
yAssF_SDL_PId(yVarP->z_LiftComponents_19_theLift, SDL_NULL, XASS_MR_ASS_NF);
yAssF_z_Interfaces_U_ptr_Request(yVarP->z_LiftComponents_1D_req1,
z_Interfaces_U0_Null(), XASS_MR_ASS_NF);
XBETWEEN_SYMBOLS(11, 1241)
/* ----- NEXTSTATE Idle ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#M-JQTE*ozaeLbCsasLNk2vtE|pos(1,13)") */
#ifdef XCASELABELS
case 11:
#endif
XAT_LAST_SYMBOL
SDL_NEXTSTATE(Idle, z_LiftComponents_12_Idle, "Idle")
/* ----- TRIGGER associate in STATE Idle ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#ILuiqIfwLfSL*PHfVLtTsEyV|pos(1,13)") */
case 1:
XDEBUG_LABEL(Idle_associate)
XAT_FIRST_SYMBOL(1)
XOS_TRACE_INPUT("associate")
yAssF_SDL_PId(yVarP->z_LiftComponents_19_theLift,
((ySignalPar_z_Interfaces_7_associate *)ySVarP)->Param1, XASS_AR_ASS_FR);
XBETWEEN_SYMBOLS(12, 1259)
/* ----- NEXTSTATE Idle ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#zueVoIYzxvFLL7NjtELha9PE|pos(1,17)") */
#ifdef XCASELABELS
case 12:
#endif
XAT_LAST_SYMBOL
SDL_NEXTSTATE(Idle, z_LiftComponents_12_Idle, "Idle")
/* ----- TRIGGER requestServiceTime in STATE * ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#sdfWpVzWggvLDBQ7fIEyma4I|pos(1,13)") */
case 2:
XDEBUG_LABEL(ASTERISK_requestServiceTime)
XAT_FIRST_SYMBOL(2)
XOS_TRACE_INPUT("requestServiceTime")
yAssF_z_Interfaces_U_ptr_Request(yVarP->z_LiftComponents_17_req,
((ySignalPar_z_Interfaces_A_requestServiceTime *)ySVarP)->Param1,
XASS_AR_ASS_FR);
XBETWEEN_SYMBOLS(13, 1278)
/* ----- CALL calculateEffort (from EXPRESSION in next symbol) ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#W1iP4EfZi9LLmbEWXL7GTMrL|pos(1,34)") */
#ifdef XCASELABELS
case 13:
#endif
ALLOC_PROCEDURE(z_LiftComponents_11_calculateEffort,
yPrdN_z_LiftComponents_11_calculateEffort,
sizeof(yVDef_z_LiftComponents_11_calculateEffort))
PROCEDURE_ALLOC_ERROR
yAssF_z_Interfaces_U_ptr_Request(((yVDef_z_LiftComponents_11_calculateEffort *)PROC_DATA_PTR)->z_LiftComponents_110_r,
yVarP->z_LiftComponents_17_req, XASS_MR_ASS_NF);
((yVDef_z_LiftComponents_11_calculateEffort *)PROC_DATA_PTR)->z_LiftComponents_11_ProcedureResult =
&yVarP->xPrdCallRes1_z_Interfaces_V_ServiceTime;
CALL_PROCEDURE(z_LiftComponents_11_calculateEffort,
yPrdN_z_LiftComponents_11_calculateEffort, 0, 7)
PROCEDURE_ALLOC_ERROR_END
XAFTER_VALUE_RET_PRDCALL(7)
/* ----- ASSIGNMENT service_time := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#W1iP4EfZi9LLmbEWXL7GTMrL|pos(1,17)") */
#ifdef XCASEAFTERPRDLABELS
case 7:
#endif
yAssF_z_Interfaces_V_ServiceTime(yVarP->z_LiftComponents_1A_service_time,
yTstA_z_Interfaces_V_ServiceTime(yVarP->xPrdCallRes1_z_Interfaces_V_ServiceTime),
XASS_MR_ASS_FR);
#ifdef XTRACE
xTraceAssign("service_time := ", &(yVarP->
z_LiftComponents_1A_service_time),
(tSDLTypeInfo *)&ySDL_z_Interfaces_V_ServiceTime);
#endif
#ifdef XMSCE
xMSCEAssign(VarP, "service_time := ", &(yVarP->
z_LiftComponents_1A_service_time),
(tSDLTypeInfo *)&ySDL_z_Interfaces_V_ServiceTime);
#endif
XBETWEEN_SYMBOLS(14, 1316)
/* ----- OUTPUT serviceTime ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#mjz*NIz2p-CLWaIbtLip6wTL|pos(1,17)") */
#ifdef XCASELABELS
case 14:
#endif
ALLOC_SIGNAL_PAR(serviceTime, ySigN_z_Interfaces_9_serviceTime, SDL_SENDER,
ySignalPar_z_Interfaces_9_serviceTime)
SIGNAL_ALLOC_ERROR
yAssF_z_Interfaces_V_ServiceTime(((ySignalPar_z_Interfaces_9_serviceTime *)
OUTSIGNAL_DATA_PTR)->Param1, yTstA_z_Interfaces_V_ServiceTime(yVarP->
z_LiftComponents_1A_service_time), XASS_MR_ASS_NF);
SDL_2OUTPUT(xDefaultPrioSignal, (xIdNode *)0, serviceTime,
ySigN_z_Interfaces_9_serviceTime, SDL_SENDER,
sizeof(ySignalPar_z_Interfaces_9_serviceTime), "serviceTime")
SIGNAL_ALLOC_ERROR_END
XBETWEEN_SYMBOLS(15, 1333)
/* ----- NEXTSTATE HandlingRequest ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#coNmLE-sr0BL86wZ2VTJZRKL|pos(1,17)") */
#ifdef XCASELABELS
case 15:
#endif
XAT_LAST_SYMBOL
SDL_NEXTSTATE(HandlingRequest, z_LiftComponents_14_HandlingRequest,
"HandlingRequest")
/* ----- CONTINUOUS SIGNAL ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#coNmLE-sr0BL86wZ2VTJZRKL|pos(4,13)") */
case 3:
XAT_FIRST_SYMBOL(3)
XBETWEEN_SYMBOLS(16, 1348)
/* ----- ASSIGNMENT req := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#ThhlaLIt77iL-JU7RVH*0kfV|pos(1,17)") */
#ifdef XCASELABELS
case 16:
#endif
yAssF_z_Interfaces_U_ptr_Request(yVarP->z_LiftComponents_17_req,
*(z_Interfaces_U_ptr_Request *)(yExtr_z_Interfaces_Q_AKReferenceRequestList(
&(yVarP->z_LiftComponents_16_requests), 1)), XASS_MR_ASS_FR);
#ifdef XTRACE
xTraceAssign("req := ", &(yVarP->z_LiftComponents_17_req),
(tSDLTypeInfo *)&ySDL_z_Interfaces_U_ptr_Request);
#endif
#ifdef XMSCE
xMSCEAssign(VarP, "req := ", &(yVarP->z_LiftComponents_17_req),
(tSDLTypeInfo *)&ySDL_z_Interfaces_U_ptr_Request);
#endif
XBETWEEN_SYMBOLS(17, 1366)
/* ----- OUTPUT moveToFloor ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#t3gl7IEdpgBLKDuaWV2lQyGL|pos(1,17)") */
#ifdef XCASELABELS
case 17:
#endif
XCHECK_REF(yVarP->z_LiftComponents_17_req,
&ySDL_z_Interfaces_U_ptr_Request, z_Interfaces_U_ptr_Request)
ALLOC_SIGNAL_PAR(moveToFloor, ySigN_z_Interfaces_8_moveToFloor, yVarP->
z_LiftComponents_19_theLift, ySignalPar_z_Interfaces_8_moveToFloor)
SIGNAL_ALLOC_ERROR
yAssF_SDL_Integer(((ySignalPar_z_Interfaces_8_moveToFloor *)
OUTSIGNAL_DATA_PTR)->Param1, (*(yVarP->z_LiftComponents_17_req)).
targetFloor, XASS_MR_ASS_NF);
SDL_2OUTPUT(xDefaultPrioSignal, (xIdNode *)0, moveToFloor,
ySigN_z_Interfaces_8_moveToFloor, yVarP->z_LiftComponents_19_theLift,
sizeof(ySignalPar_z_Interfaces_8_moveToFloor), "moveToFloor")
SIGNAL_ALLOC_ERROR_END
XBETWEEN_SYMBOLS(18, 1385)
/* ----- ASSIGNMENT remove := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#L7skzVjP4XILW6QhzVrUnNBL|pos(1,22)") */
#ifdef XCASELABELS
case 18:
#endif
#ifdef XTRACE
xTraceAlg("CALL OPERATOR remove");
#endif
yRemove_z_Interfaces_Q_AKReferenceRequestList(&(yVarP->
z_LiftComponents_16_requests), 1);
XBETWEEN_SYMBOLS(19, 1397)
/* ----- DECISION ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#Z2dEEEw76YAL0RPccLSPxNVI|pos(1,26)") */
#ifdef XCASELABELS
case 19:
#endif
#ifdef XTRACE
yAssF_SDL_Boolean(yDcn_SDL_Boolean,
xGT_SDL_Integer(yLength_z_Interfaces_Q_AKReferenceRequestList(&(yVarP->
z_LiftComponents_16_requests)), 0), XASS_MR_ASS_FR);
xTraceDecision(&(yDcn_SDL_Boolean), (tSDLTypeInfo *)&ySDL_SDL_Boolean);
#ifdef XMSCE
xMSCEDecision(VarP, &(yDcn_SDL_Boolean),
(tSDLTypeInfo *)&ySDL_SDL_Boolean);
#endif
if (yDcn_SDL_Boolean) {
#else
if (xGT_SDL_Integer(yLength_z_Interfaces_Q_AKReferenceR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -