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

📄 interfaces.c

📁 UML语言构建的电梯管理系统
💻 C
📖 第 1 页 / 共 4 页
字号:

/* Program generated by Cbasic 2.2.20  */
#define XSCT_CBASIC

#define C_TRANSLATOR_2_2
#define XENABLE_VERSION_CHECK

#include "scttypes.h"
#include "U2ExtraOps.h"
#include "U2ctypes.h"
#include "Interfaces.h"
#ifdef XINCLUDE_HS_FILE
#include "LiftSystem.hs"
#endif
#ifdef XCTRACE
static char  xFileName[] = "Interfaces.c";
#endif


/*************************************************************************
**                  #CODE directives, #BODY sections                    **
*************************************************************************/

/*************************************************************************
**                  SECTION Variables and Functions                     **
*************************************************************************/

/*****
* PACKAGE Interfaces
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#zRvkSLRMT7FLqUDaHEv9jjGE|pos(1,9)")
******/
XCONST struct xPackageIdStruct yPacR_z_Interfaces__Interfaces = {xPackageEC ,
  (xIdNode)0, (xIdNode)0, (xIdNode)&xSymbolTableIdRec,
  "Interfaces" xIdNumber(0) XCOMMON_EXTRAS xIdNames(0) XPAC_EXTRAS};

/*****
* SYNONYM MAX_TIME
* <<PACKAGE Interfaces>>
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#tIclqI6Jr10LSs6foEEk1F0I|pos(1,13)")
******/
#ifdef XUSESYNONYMIDNODES
XCONST struct xSynonymIdStruct ySynR_z_Interfaces_W_MAX_TIME = {xSynonymEC ,
  (xIdNode)0, (xIdNode)0, (xIdNode)&yPacR_z_Interfaces__Interfaces,
  "MAX_TIME" xIdNumber(0) XCOMMON_EXTRAS, xSrtN_SDL_Integer XSYN_EXTRAS};
#endif

/*****
* NEWTYPE Request  (BODY section)
* <<PACKAGE Interfaces>>
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#IMptNVSqh-5LL2ibAVpdV-RL|pos(1,13)")
******/
static tSDLFieldInfo fSDL_z_Interfaces_M_Request[] = {
  {(tSDLTypeInfo *)&ySDL_z_Interfaces_O_DirectionKind
    T_SDL_Names("direction"), xOffsetOf(z_Interfaces_M_Request, direction), 0},
  {(tSDLTypeInfo *)&ySDL_SDL_Integer  T_SDL_Names("targetFloor"),
    xOffsetOf(z_Interfaces_M_Request, targetFloor), 0}
};
tSDLStructInfo ySDL_z_Interfaces_M_Request = {type_SDL_Struct, 0,
  (xptrint)sizeof(z_Interfaces_M_Request) T_SDL_OPFUNCS(0) T_SDL_EXTRA_VALUE
  T_SDL_Names("Request") xRaWF((xIdNode)&yPacR_z_Interfaces__Interfaces)
  xRaWF(&ySrtR_z_Interfaces_M_Request), fSDL_z_Interfaces_M_Request, 2};
#ifndef XOPTSORT
XCONST struct xSortIdStruct ySrtR_z_Interfaces_M_Request = {xSortEC ,
  (xIdNode)0, (xIdNode)0, (xIdNode)&yPacR_z_Interfaces__Interfaces,
  "Request" xIdNumber(0) XCOMMON_EXTRAS xFreF(0) xAssF(0)
  xEqF(yEq_z_Interfaces_M_Request) xTestF(0),
  (xptrint)sizeof(z_Interfaces_M_Request), xStruct, (xSortIdNode)0,
  (xSortIdNode)0, 0, 0, 0, 0
  xRaWF((tSDLTypeInfo *)&ySDL_z_Interfaces_M_Request) XSRT_EXTRAS};
#endif
#ifndef XOPTSTRUCT
/*---------------COMPONENTS----------------*/
static XCONST struct xVarIdStruct yVarR_z_Interfaces_MA_direction =
  {xVariableEC , (xIdNode)0, (xIdNode)0,
  (xIdNode)&ySrtR_z_Interfaces_M_Request, "direction" xIdNumber(0)
  XCOMMON_EXTRAS, &ySrtR_z_Interfaces_O_DirectionKind,
  (tSDLTypeInfo *)&ySDL_z_Interfaces_O_DirectionKind,
  xOffsetOf(z_Interfaces_M_Request, direction), (xptrint)0, 0 XVAR_EXTRAS};
static XCONST struct xVarIdStruct yVarR_z_Interfaces_MB_targetFloor =
  {xVariableEC , (xIdNode)0, (xIdNode)0,
  (xIdNode)&ySrtR_z_Interfaces_M_Request, "targetFloor" xIdNumber(0)
  XCOMMON_EXTRAS, &xSrtR_SDL_Integer, (tSDLTypeInfo *)&ySDL_SDL_Integer,
  xOffsetOf(z_Interfaces_M_Request, targetFloor), (xptrint)0, 0 XVAR_EXTRAS};
#endif

/*****
* OPERATOR @NewRequest
* <<PACKAGE Interfaces/TYPE Request>>
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#hXIfBVDsc1CLkPpaGIF-VICL|pos(1,18)")
******/
#ifdef XCOVERAGE
long int yPrdC_z_Interfaces_MC_NewRequest[ySym_z_Interfaces_MC_NewRequest+1];
#endif
static XCONST XSIGTYPE yPrdS_z_Interfaces_MC_NewRequest[] = {(XSIGTYPE)0};
static XCONST xStateIdNode yPrdT_z_Interfaces_MC_NewRequest[] =
  {&xStartStateIdRec};
static xPrdNode yPrdA_z_Interfaces_MC_NewRequest = (xPrdNode)0;
XCONST struct xPrdIdStruct yPrdR_z_Interfaces_MC_NewRequest = {xOperatorEC ,
  (xIdNode)0, (xIdNode)0, (xIdNode)&yPacR_z_Interfaces__Interfaces,
  "@NewRequest" xIdNumber(0) XCOMMON_EXTRAS, yPrdT_z_Interfaces_MC_NewRequest,
  yPrdS_z_Interfaces_MC_NewRequest, z_Interfaces_MC_NewRequest,
  yFree_z_Interfaces_MC_NewRequest,
  (xptrint)sizeof(yVDef_z_Interfaces_MC_NewRequest),
  &yPrdA_z_Interfaces_MC_NewRequest xBreakB(yRef_z_Interfaces_MC_NewRequest)
  xBreakB(ySym_z_Interfaces_MC_NewRequest) xBreakB(0)
  xCoverage(yPrdC_z_Interfaces_MC_NewRequest), (xPrdIdNode)0, (xPrdIdNode *)0
  XPRD_EXTRAS};
void yFree_z_Interfaces_MC_NewRequest(void *yVarP)
{
}

/*+++++
* GR ref function for operator @NewRequest
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#3Om0TV439gELT0F6PI5QzNlI|pos(1,13)")
++++++*/
#ifdef XBREAKBEFORE
char * yRef_z_Interfaces_MC_NewRequest (int SymbolNo, xSymbolType *SymbolType)
{
  switch (SymbolNo) {
    case 0: *SymbolType = xsStart;
      return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#3Om0TV439gELT0F6PI5QzNlI|pos(1,13)\")";
    case 1: *SymbolType = xsAssignmentStatement;
      return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#Y6anTEsRNECLidWaULalpDiL|pos(1,22)\")";
    case 2: *SymbolType = xsReturn;
      return "#SDTREF(U2,\"u2:F:\\UML\\LiftManagement20\\SystemDesign\\LiftManagement.u2#BIISrVvDfbVLgvegREi9hbOL|pos(1,17)\")";
    default : *SymbolType = xsNoSuchSymbolType; return "";
  }
}
#endif

/*+++++
* Function for procedure @NewRequest
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#3Om0TV439gELT0F6PI5QzNlI|pos(1,13)")
++++++*/
YPRD_FUNCTION(z_Interfaces_MC_NewRequest)
{
  YPAD_YSVARP
  YGLOBALPRD_YVARP
  yVDef_z_Interfaces_MC_NewRequest * yPrdVarP;
  YPRD_TEMP_VARS
  YPRDNAME_VAR("@NewRequest")
#ifndef XNOUSEOFSERVICE
  if (yVarP->ActiveSrv != (xSrvNode)0)
    yPrdVarP = (yVDef_z_Interfaces_MC_NewRequest *)yVarP->ActiveSrv->ActivePrd;
  else
#endif
    yPrdVarP = (yVDef_z_Interfaces_MC_NewRequest *)yVarP->ActivePrd;

  LOOP_LABEL_PRD_NOSTATE
  switch (yPrdVarP->RestartAddress) {

/* ----- START ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#3Om0TV439gELT0F6PI5QzNlI|pos(1,13)") */
  case 0:
    XAT_FIRST_SYMBOL(0)
    yAssF_z_Interfaces_U_ptr_Request(*yPrdVarP->z_Interfaces_MC0_result,
      z_Interfaces_U0_Null(), XASS_MR_ASS_NF);
    XBETWEEN_SYMBOLS_PRD(1, 158)

/* ----- ASSIGNMENT result := ... ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#Y6anTEsRNECLidWaULalpDiL|pos(1,22)") */
#ifdef XCASELABELS
  case 1:
#endif
    yAssF_z_Interfaces_U_ptr_Request((*(yPrdVarP->z_Interfaces_MC0_result)),
      z_Interfaces_U1_Alloc(), XASS_MR_ASS_FR);
    #ifdef XTRACE
    xTraceAssign("result := ", &((*(yPrdVarP->z_Interfaces_MC0_result))),
      (tSDLTypeInfo *)&ySDL_z_Interfaces_U_ptr_Request);
  #endif
#ifdef XMSCE
  xMSCEAssign(VarP, "result := ", &((*(yPrdVarP->z_Interfaces_MC0_result))),
    (tSDLTypeInfo *)&ySDL_z_Interfaces_U_ptr_Request);
#endif
    XBETWEEN_SYMBOLS_PRD(2, 175)

/* ----- RETURN ----- */
/* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#BIISrVvDfbVLgvegREi9hbOL|pos(1,17)") */
#ifdef XCASELABELS
  case 2:
#endif
    SDL_RETURN
  }
  XEND_PRD
}

/*****
* FPAR result
* <<PACKAGE Interfaces/TYPE Request/OPERATOR @NewRequest>>
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#WThZ7EIifDlLAMGYbEkqutjV|pos(1,9)")
******/
#ifndef XOPTFPAR
XCONST struct xVarIdStruct yVarR_z_Interfaces_MC0_result = {xFormalParEC ,
  (xIdNode)0, (xIdNode)0, (xIdNode)&yPrdR_z_Interfaces_MC_NewRequest,
  "result" xIdNumber(0) XCOMMON_EXTRAS, &ySrtR_z_Interfaces_U_ptr_Request,
  (tSDLTypeInfo *)&ySDL_z_Interfaces_U_ptr_Request,
  xOffsetOf(yVDef_z_Interfaces_MC_NewRequest, z_Interfaces_MC0_result),
  (xptrint)0, 5 XVAR_EXTRAS};
#endif

/*****
* NEWTYPE LiftInfo  (BODY section)
* <<PACKAGE Interfaces>>
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#wL2KUVZy-jiLcbOhPEnpl2AE|pos(1,13)")
******/
static tSDLFieldInfo fSDL_z_Interfaces_N_LiftInfo[] = {
  {(tSDLTypeInfo *)&ySDL_SDL_Integer  T_SDL_Names("currentFloor"),
    xOffsetOf(z_Interfaces_N_LiftInfo, currentFloor), 0},
  {(tSDLTypeInfo *)&ySDL_z_Interfaces_P_DoorStatus  T_SDL_Names("doorStatus"),
    xOffsetOf(z_Interfaces_N_LiftInfo, doorStatus), 0},
  {(tSDLTypeInfo *)&ySDL_SDL_Boolean  T_SDL_Names("isMoving"),
    xOffsetOf(z_Interfaces_N_LiftInfo, isMoving), 0},
  {(tSDLTypeInfo *)&ySDL_z_Interfaces_O_DirectionKind
    T_SDL_Names("direction"), xOffsetOf(z_Interfaces_N_LiftInfo, direction), 0}
};
tSDLStructInfo ySDL_z_Interfaces_N_LiftInfo = {type_SDL_Struct, 0,
  (xptrint)sizeof(z_Interfaces_N_LiftInfo) T_SDL_OPFUNCS(0) T_SDL_EXTRA_VALUE
  T_SDL_Names("LiftInfo") xRaWF((xIdNode)&yPacR_z_Interfaces__Interfaces)
  xRaWF(&ySrtR_z_Interfaces_N_LiftInfo), fSDL_z_Interfaces_N_LiftInfo, 4};
#ifndef XOPTSORT
XCONST struct xSortIdStruct ySrtR_z_Interfaces_N_LiftInfo = {xSortEC ,
  (xIdNode)0, (xIdNode)0, (xIdNode)&yPacR_z_Interfaces__Interfaces,
  "LiftInfo" xIdNumber(0) XCOMMON_EXTRAS xFreF(0) xAssF(0)
  xEqF(yEq_z_Interfaces_N_LiftInfo) xTestF(0),
  (xptrint)sizeof(z_Interfaces_N_LiftInfo), xStruct, (xSortIdNode)0,
  (xSortIdNode)0, 0, 0, 0, 0
  xRaWF((tSDLTypeInfo *)&ySDL_z_Interfaces_N_LiftInfo) XSRT_EXTRAS};
#endif
#ifndef XOPTSTRUCT
/*---------------COMPONENTS----------------*/
static XCONST struct xVarIdStruct yVarR_z_Interfaces_NF_currentFloor =
  {xVariableEC , (xIdNode)0, (xIdNode)0,
  (xIdNode)&ySrtR_z_Interfaces_N_LiftInfo, "currentFloor" xIdNumber(0)
  XCOMMON_EXTRAS, &xSrtR_SDL_Integer, (tSDLTypeInfo *)&ySDL_SDL_Integer,
  xOffsetOf(z_Interfaces_N_LiftInfo, currentFloor), (xptrint)0, 0 XVAR_EXTRAS};
static XCONST struct xVarIdStruct yVarR_z_Interfaces_NG_doorStatus =
  {xVariableEC , (xIdNode)0, (xIdNode)0,
  (xIdNode)&ySrtR_z_Interfaces_N_LiftInfo, "doorStatus" xIdNumber(0)
  XCOMMON_EXTRAS, &ySrtR_z_Interfaces_P_DoorStatus,
  (tSDLTypeInfo *)&ySDL_z_Interfaces_P_DoorStatus,
  xOffsetOf(z_Interfaces_N_LiftInfo, doorStatus), (xptrint)0, 0 XVAR_EXTRAS};
static XCONST struct xVarIdStruct yVarR_z_Interfaces_NH_isMoving = {xVariableEC
  , (xIdNode)0, (xIdNode)0, (xIdNode)&ySrtR_z_Interfaces_N_LiftInfo,
  "isMoving" xIdNumber(0) XCOMMON_EXTRAS, &xSrtR_SDL_Boolean,
  (tSDLTypeInfo *)&ySDL_SDL_Boolean, xOffsetOf(z_Interfaces_N_LiftInfo,
  isMoving), (xptrint)0, 0 XVAR_EXTRAS};
static XCONST struct xVarIdStruct yVarR_z_Interfaces_NI_direction =
  {xVariableEC , (xIdNode)0, (xIdNode)0,
  (xIdNode)&ySrtR_z_Interfaces_N_LiftInfo, "direction" xIdNumber(0)
  XCOMMON_EXTRAS, &ySrtR_z_Interfaces_O_DirectionKind,
  (tSDLTypeInfo *)&ySDL_z_Interfaces_O_DirectionKind,
  xOffsetOf(z_Interfaces_N_LiftInfo, direction), (xptrint)0, 0 XVAR_EXTRAS};
#endif

/*****
* OPERATOR LiftInfo
* <<PACKAGE Interfaces/TYPE LiftInfo>>
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#wL2KUVZy-jiLcbOhPEnpl2AE|pos(1,18)")
******/

/*+++++
* Function for procedure/operator LiftInfo
* #SDTREF(U2,"u2:F:\UML\LiftManagement20\SystemDesign\LiftManagement.u2#wL2KUVZy-jiLcbOhPEnpl2AE|pos(1,13)")
++++++*/

void z_Interfaces_NJ_LiftInfo (z_Interfaces_N_LiftInfo *z_Interfaces_NJ0_itself)

⌨️ 快捷键说明

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