⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 liftcomponents.c

📁 UML语言构建的电梯管理系统
💻 C
📖 第 1 页 / 共 5 页
字号:
    PROCEDURE_ALLOC_ERROR
    CALL_PROCEDURE(z_LiftComponents_01_add, yPrdN_z_LiftComponents_01_add, 0, 6)
    PROCEDURE_ALLOC_ERROR_END
    XBETWEEN_SYMBOLS(6, 287)

/* ----- OUTPUT confirmAdd ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#c1VICE4f2TAL2Iva2LLE4szE|pos(1,17)") */
#ifdef XCASEAFTERPRDLABELS
  case 6:
#endif
    ALLOC_SIGNAL(confirmAdd, ySigN_z_Interfaces_4_confirmAdd, xNotDefPId,
      XSIGNALHEADERTYPE)
    SIGNAL_ALLOC_ERROR
    SDL_2OUTPUT_NO_TO(xDefaultPrioSignal, (xIdNode *)0, confirmAdd,
      ySigN_z_Interfaces_4_confirmAdd, xNotDefPId, 0, "confirmAdd")
    SIGNAL_ALLOC_ERROR_END
    XBETWEEN_SYMBOLS(10, 300)

/* ----- NEXTSTATE - ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#WISYWVVpWlAL-fc6SIw9FQAE|pos(1,17)") */
#ifdef XCASELABELS
  case 10:
#endif
    XAT_LAST_SYMBOL
    SDL_DASH_NEXTSTATE

/* ----- TRIGGER requestLift in STATE * ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#jRCH9E6TcSCLT6699EeWlOmL|pos(1,13)") */
  case 2:
    XDEBUG_LABEL(ASTERISK_requestLift)
    XAT_FIRST_SYMBOL(2)
    XOS_TRACE_INPUT("requestLift")
    XCHECK_REF(yVarP->z_LiftComponents_06_newRequest,
      &ySDL_z_Interfaces_U_ptr_Request, z_Interfaces_U_ptr_Request)
    yAssF_SDL_Integer((*(yVarP->z_LiftComponents_06_newRequest)).targetFloor,
      ((ySignalPar_z_Interfaces_0_requestLift *)ySVarP)->Param1,
      XASS_AR_ASS_FR);
    XCHECK_REF(yVarP->z_LiftComponents_06_newRequest,
      &ySDL_z_Interfaces_U_ptr_Request, z_Interfaces_U_ptr_Request)
    yAssF_z_Interfaces_O_DirectionKind((*(yVarP->
      z_LiftComponents_06_newRequest)).direction,
      ((ySignalPar_z_Interfaces_0_requestLift *)ySVarP)->Param2,
      XASS_AR_ASS_FR);
    XBETWEEN_SYMBOLS(11, 327)

/* ----- OUTPUT directionLight ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#3W3IzLDxK0DLn0pZLElVSRVV|pos(1,17)") */
#ifdef XCASELABELS
  case 11:
#endif
    XCHECK_REF(yVarP->z_LiftComponents_06_newRequest,
      &ySDL_z_Interfaces_U_ptr_Request, z_Interfaces_U_ptr_Request)
    ALLOC_SIGNAL_PAR(directionLight, ySigN_z_Interfaces_3_directionLight,
      xNotDefPId, ySignalPar_z_Interfaces_3_directionLight)
    SIGNAL_ALLOC_ERROR
    yAssF_z_Interfaces_O_DirectionKind(((ySignalPar_z_Interfaces_3_directionLight *)
      OUTSIGNAL_DATA_PTR)->Param1, (*(yVarP->z_LiftComponents_06_newRequest)).
      direction, XASS_MR_ASS_NF);
    SDL_2OUTPUT_NO_TO(xDefaultPrioSignal, (xIdNode *)0, directionLight,
      ySigN_z_Interfaces_3_directionLight, xNotDefPId,
      sizeof(ySignalPar_z_Interfaces_3_directionLight), "directionLight")
    SIGNAL_ALLOC_ERROR_END
    XBETWEEN_SYMBOLS(12, 346)

/* ----- ASSIGNMENT ctrlIndex := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#EsCi*I2R*O5LCgBkXEqhdZCE|pos(1,17)") */
#ifdef XCASELABELS
  case 12:
#endif
    yAssF_SDL_Integer(yVarP->z_LiftComponents_08_ctrlIndex, 1, XASS_MR_ASS_FR);
    #ifdef XTRACE
    xTraceAssign("ctrlIndex := ", &(yVarP->z_LiftComponents_08_ctrlIndex),
      (tSDLTypeInfo *)&ySDL_SDL_Integer);
  #endif
#ifdef XMSCE
  xMSCEAssign(VarP, "ctrlIndex := ", &(yVarP->z_LiftComponents_08_ctrlIndex),
    (tSDLTypeInfo *)&ySDL_SDL_Integer);
#endif

  case 3:
  L_GEN_zPb9WEGXoLvLvWJgeEe4X9dL:;
    XBETWEEN_SYMBOLS(13, 365)

/* ----- DECISION ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#IT8yPL-ntwVLPLt6nLl-vjMI|pos(1,26)") */
#ifdef XCASELABELS
  case 13:
#endif
    #ifdef XTRACE
      yAssF_SDL_Boolean(yDcn_SDL_Boolean, xLE_SDL_Integer(yVarP->
        z_LiftComponents_08_ctrlIndex,
        yLength_z_LiftComponents_02_AKReferenceControllerList(&(yVarP->
        z_LiftComponents_07_controllers))), 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 (xLE_SDL_Integer(yVarP->z_LiftComponents_08_ctrlIndex,
      yLength_z_LiftComponents_02_AKReferenceControllerList(&(yVarP->
      z_LiftComponents_07_controllers)))) {
    #endif
      XBETWEEN_SYMBOLS(14, 388)

/* ----- ASSIGNMENT tmpCtrl := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#5pjjCEUZKvVLBNQaaLvoLZnV|pos(1,25)") */
#ifdef XCASELABELS
    case 14:
#endif
      yAssF_SDL_PId(yVarP->z_LiftComponents_09_tmpCtrl,
        *(SDL_PId *)(yExtr_z_LiftComponents_02_AKReferenceControllerList(
        &(yVarP->z_LiftComponents_07_controllers), yVarP->
        z_LiftComponents_08_ctrlIndex)), XASS_MR_ASS_FR);
      #ifdef XTRACE
      xTraceAssign("tmpCtrl := ", &(yVarP->z_LiftComponents_09_tmpCtrl),
        (tSDLTypeInfo *)&ySDL_SDL_PId);
    #endif
#ifdef XMSCE
    xMSCEAssign(VarP, "tmpCtrl := ", &(yVarP->z_LiftComponents_09_tmpCtrl),
      (tSDLTypeInfo *)&ySDL_SDL_PId);
#endif
      XBETWEEN_SYMBOLS(15, 407)

/* ----- ASSIGNMENT ctrlIndex := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#DGruzE7e6LCL65vhnLNQy2*L|pos(1,25)") */
#ifdef XCASELABELS
    case 15:
#endif
      yAssF_SDL_Integer(yVarP->z_LiftComponents_08_ctrlIndex,
        xPlus_SDL_Integer(yVarP->z_LiftComponents_08_ctrlIndex, 1),
        XASS_MR_ASS_FR);
      #ifdef XTRACE
      xTraceAssign("ctrlIndex := ", &(yVarP->z_LiftComponents_08_ctrlIndex),
        (tSDLTypeInfo *)&ySDL_SDL_Integer);
    #endif
#ifdef XMSCE
    xMSCEAssign(VarP, "ctrlIndex := ", &(yVarP->z_LiftComponents_08_ctrlIndex),
      (tSDLTypeInfo *)&ySDL_SDL_Integer);
#endif
      XBETWEEN_SYMBOLS(16, 425)

/* ----- OUTPUT requestServiceTime ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#UgtHMLqs05DLim8drInZfsiI|pos(1,25)") */
#ifdef XCASELABELS
    case 16:
#endif
      ALLOC_SIGNAL_PAR(requestServiceTime,
        ySigN_z_Interfaces_A_requestServiceTime, yVarP->
        z_LiftComponents_09_tmpCtrl,
        ySignalPar_z_Interfaces_A_requestServiceTime)
      SIGNAL_ALLOC_ERROR
      yAssF_z_Interfaces_U_ptr_Request(((ySignalPar_z_Interfaces_A_requestServiceTime *)
        OUTSIGNAL_DATA_PTR)->Param1, yVarP->z_LiftComponents_06_newRequest,
        XASS_MR_ASS_NF);
      SDL_2OUTPUT(xDefaultPrioSignal, (xIdNode *)0, requestServiceTime,
        ySigN_z_Interfaces_A_requestServiceTime, yVarP->
        z_LiftComponents_09_tmpCtrl,
        sizeof(ySignalPar_z_Interfaces_A_requestServiceTime),
        "requestServiceTime")
      SIGNAL_ALLOC_ERROR_END

/* ----- JOIN GEN_zPb9WEGXoLvLvWJgeEe4X9dL ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#AojXRIE*5mFLVSUdnVW9TsGE|pos(1,25)") */
      goto L_GEN_zPb9WEGXoLvLvWJgeEe4X9dL;
    } else {
      XBETWEEN_SYMBOLS(17, 451)

/* ----- ASSIGNMENT respondedCtrl := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#xteJZLtLVo0L3HXg9Ef9gMOI|pos(1,25)") */
#ifdef XCASELABELS
    case 17:
#endif
      yAssF_SDL_Integer(yVarP->z_LiftComponents_0A_respondedCtrl, 0,
        XASS_MR_ASS_FR);
      #ifdef XTRACE
      xTraceAssign("respondedCtrl := ", &(yVarP->
        z_LiftComponents_0A_respondedCtrl), (tSDLTypeInfo *)&ySDL_SDL_Integer);
    #endif
#ifdef XMSCE
    xMSCEAssign(VarP, "respondedCtrl := ", &(yVarP->
      z_LiftComponents_0A_respondedCtrl), (tSDLTypeInfo *)&ySDL_SDL_Integer);
#endif
      XBETWEEN_SYMBOLS(18, 468)

/* ----- ASSIGNMENT minimalEffort := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#7pJm7V-3GaiLKLKY1LmsOlBI|pos(1,25)") */
#ifdef XCASELABELS
    case 18:
#endif
      yAssF_SDL_PId(yVarP->z_LiftComponents_0B_minimalEffort, SDL_NULL,
        XASS_MR_ASS_FR);
      #ifdef XTRACE
      xTraceAssign("minimalEffort := ", &(yVarP->
        z_LiftComponents_0B_minimalEffort), (tSDLTypeInfo *)&ySDL_SDL_PId);
    #endif
#ifdef XMSCE
    xMSCEAssign(VarP, "minimalEffort := ", &(yVarP->
      z_LiftComponents_0B_minimalEffort), (tSDLTypeInfo *)&ySDL_SDL_PId);
#endif
      XBETWEEN_SYMBOLS(19, 485)

/* ----- ASSIGNMENT leastEffort := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#NTILsIfJr*VLF7RgYE8bdXKL|pos(1,25)") */
#ifdef XCASELABELS
    case 19:
#endif
      yAssF_z_Interfaces_V_ServiceTime(yVarP->z_LiftComponents_0C_leastEffort,
        yTstA_z_Interfaces_V_ServiceTime(z_Interfaces_W_MAX_TIME),
        XASS_MR_ASS_FR);
      #ifdef XTRACE
      xTraceAssign("leastEffort := ", &(yVarP->
        z_LiftComponents_0C_leastEffort),
        (tSDLTypeInfo *)&ySDL_z_Interfaces_V_ServiceTime);
    #endif
#ifdef XMSCE
    xMSCEAssign(VarP, "leastEffort := ", &(yVarP->
      z_LiftComponents_0C_leastEffort),
      (tSDLTypeInfo *)&ySDL_z_Interfaces_V_ServiceTime);
#endif
      XBETWEEN_SYMBOLS(20, 505)

/* ----- NEXTSTATE WaitEstimation ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#wSJ-0VD3ubFLqqwgPI0hSe8V|pos(1,25)") */
#ifdef XCASELABELS
    case 20:
#endif
      XAT_LAST_SYMBOL
      SDL_NEXTSTATE(WaitEstimation, z_LiftComponents_05_WaitEstimation,
        "WaitEstimation")
    }

/* ----- TRIGGER serviceTime in STATE WaitEstimation ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#iYDqzIHl5*BLF7X7cLOv9pLI|pos(1,13)") */
  case 4:
    XDEBUG_LABEL(WaitEstimation_serviceTime)
    XAT_FIRST_SYMBOL(4)
    XOS_TRACE_INPUT("serviceTime")
    yAssF_z_Interfaces_V_ServiceTime(yVarP->z_LiftComponents_0D_tmpEffort,
      yTstA_z_Interfaces_V_ServiceTime(
      ((ySignalPar_z_Interfaces_9_serviceTime *)ySVarP)->Param1),
      XASS_AR_ASS_FR);
    XBETWEEN_SYMBOLS(21, 527)

/* ----- ASSIGNMENT respondedCtrl := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#l7A0zVl56HELBRAZ4LZ6jnkL|pos(1,17)") */
#ifdef XCASELABELS
  case 21:
#endif
    yAssF_SDL_Integer(yVarP->z_LiftComponents_0A_respondedCtrl,
      xPlus_SDL_Integer(yVarP->z_LiftComponents_0A_respondedCtrl, 1),
      XASS_MR_ASS_FR);
    #ifdef XTRACE
    xTraceAssign("respondedCtrl := ", &(yVarP->
      z_LiftComponents_0A_respondedCtrl), (tSDLTypeInfo *)&ySDL_SDL_Integer);
  #endif
#ifdef XMSCE
  xMSCEAssign(VarP, "respondedCtrl := ", &(yVarP->
    z_LiftComponents_0A_respondedCtrl), (tSDLTypeInfo *)&ySDL_SDL_Integer);
#endif
    XBETWEEN_SYMBOLS(22, 545)

/* ----- IF ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#RUSfHEz7*LELQI4kGL3wbCQV|pos(1,21)") */
#ifdef XCASELABELS
  case 22:
#endif
    if (xLT_SDL_Integer(yVarP->z_LiftComponents_0D_tmpEffort, yVarP->
      z_LiftComponents_0C_leastEffort)) {
      #ifdef XTRACE
        xTraceAlg("IF (true)");
      #endif
      XBETWEEN_STMTS(23, 557)

/* ----- ASSIGNMENT leastEffort := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#GuDgdLIsoL0Ljt16oIgehgWE|pos(1,29)") */
#ifdef XCASELABELS
    case 23:
#endif
      yAssF_z_Interfaces_V_ServiceTime(yVarP->z_LiftComponents_0C_leastEffort,
        yTstA_z_Interfaces_V_ServiceTime(yVarP->z_LiftComponents_0D_tmpEffort),
        XASS_MR_ASS_FR);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -