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

📄 ml_typw.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 5 页
字号:
/*+MHDR*/
/*
# clearcase: CmicroPatchRel2.3.3
+------------------------------------------------------------------------------+
|  Headerfile : ML_TYP.H                                                       |
|  Author       : S&P Media GmbH Germany                                       |
+------------------------------------------------------------------------------+
|                                                                              |
|  Description :                                                               |
|  This Header-file is to be included from SDL-Applications and handwritten    |
|  Code by the user. Furthermore, the Cmicro Kernel includes the file.         |
|                                                                              |
|  For more information, see next pages.                                       |
|  For detailed description, see manual.                                       |
|                                                                              |
+------------------------------------------------------------------------------+
|                                                                              |
|  Copyright by Telelogic AB 1993 - 1998                                       |
|  Copyright by S&P Media GmbH Germany 1993 - 1998                             |
|                                                                              |
|  This Program is owned by Telelogic and is protected by national             |
|  copyright laws and international copyright treaties. Telelogic              |
|  grants you the right to use this Program on one computer or in              |
|  one local computer network at any one time.                                 |
|  Under this License you may only modify the source code for the purpose      |
|  of adapting it to your environment. You must reproduce and include          |
|  any copyright and trademark notices on all copies of the source code.       |
|  You may not use, copy, merge, modify or transfer the Program except as      |
|  provided in this License.                                                   |
|  Telelogic does not warrant that the Program will meet your                  |
|  requirements or that the operation of the Program will be                   |
|  uninterrupted and error free. You are solely responsible that the           |
|  selection of the Program and the modification of the source code            |
|  will achieve your intended results and that the results are actually        |
|  obtained.                                                                   |
|                                                                              |
+------------------------------------------------------------------------------+
*/


#ifndef __ML_TYP_H_
#define __ML_TYP_H_

/*
FILE INDEX
SS0  User Section    - User - scaling facilities
AA0  Automatic scaling facilities
00   Utility macros
01   Main User oriented ifdef's
02   Dependent ifdef 's
03   C Library
03a  C Compiler section 
03b  Final setting 
04   SDL Model macro expansions
05   Utility ifdef 's
06   Constants
07   Forward Declarations
08   SDL predefined types (except SDL_PId)
09   SDL_PId
10   Signal Set
11   Procedure ( = Prd )
12   Process ( = Prs )
13   Timer
14   Signal
15   Symbol Table
16   Global Data Structure
221  _sche
222  _queu
223  _time
224  _stim
225  _err
226  _outp
227  _user
228  _main
229  Cmicro Tester
*/


/****+***************************************************************
SS0  User Section - User - scaling facilities
********************************************************************/
/* The following file is to be filled up by the users.       */
/* Do your manual scalings here ...                          */
#include "ml_mcfw.h"

/****+***************************************************************
AA0  Automatic scaling facilities
********************************************************************/
/* The following file is automatically generated by          */
/* the Cmicro-C-Codegenerator                                */
/*                                                           */
/* CAUTION :                                                 */
/* ----------                                                */
/* Be sure, that you use the correct sdl_cfg.h, because this */
/* File has the same name for all possible SDL-Systems.      */


#if !defined(SDTMT) && !defined(SDTGATE)
  #include "sdl_cfgw.h"
#endif



#ifdef XMK_USE_NO_AUTO_SCALING
  #ifdef   XMK_USED_ONLY_X_1
    /*
    ** Setting this flag cause the Cmicro Tester
    ** to produce erroneus outputs (type xPID) ...
    */
    #undef XMK_USED_ONLY_X_1
  #endif

  #define XMK_USED_TIMER
  #define XMK_USED_DYNAMIC_CREATE
  #define XMK_USED_DYNAMIC_STOP
  #define XMK_USED_SAVE
  #define XMK_USED_SIGNAL_WITH_PARAMS
  /* NOT #define XMK_USED_TIMER_WITH_PARAMS */
  #define XMK_USED_SENDER
  #define XMK_USED_OFFSPRING
  #define XMK_USED_PARENT
  #define XMK_USED_SELF
#endif

#ifdef XMK_USED_TIMER
  #define XMK_USE_TIMER_MODEL1
#endif

#ifndef XSCT_CMICRO
/*
** This define is necessary to distinguish between
** the codegenerators, especially for predefined sorts
** in the files sctpred*
*/
#define XSCT_CMICRO
#endif

/*
** The standard duration and time algorithm from Cadvanced cannot be used
** for Cmicro because limitations in timer module.
*/
#ifdef  XMK_USE_STANDARD_DURATION
#undef  XMK_USE_STANDARD_DURATION
#endif
#ifdef  XMK_USE_STANDARD_TIME
#undef  XMK_USE_STANDARD_TIME
#endif

/****+***************************************************************
00   Utility macros
********************************************************************/

#define COMMENT(P)
   /* to be used for inserting comments in in-line C-code in SDL. */
   /* the syntax is:  COMMENT(( your free format comment text ))   */

/*
** General purpose ....
*/
#ifndef XMK_OKAY
  #define XMK_OKAY      0
#endif

#ifndef XMK_ERROR
  #define XMK_ERROR     1
#endif

#ifndef XMK_AMBIGOUS 
  #define XMK_AMBIGOUS  2
#endif

#ifndef XMK_EMPTY 
  #define XMK_EMPTY     3
#endif

#define XMK_NO_PROCESS xNULLPID

#define XMK_NO_SIGNAL  0xff

#define XMK_NO_STATE   0xff


/*
** Switches
*/
#define XMK_ON     1
#define XMK_OFF    0

/*
** Modes for the Cmicro Recorder
**
** The user can use these values to set the
** appropriate recorder mode in xmk_SetRecorderMode ()
*/
#define XMK_RECORDER_OFF     0        /* no activity from Cmicro Recorder   */
#define XMK_RECORDER_RECORD  1        /* Record mode of the Cmicro Recorder */
#define XMK_RECORDER_PLAY    2        /* Play   mode of the Cmicro Recorder */

/*
** Mapping of IO (only for Cmicro Tester)
*/
#define STDERR    stderr
#define STDOUT    stdout

/*
** Host side definitions (only for Cmicro Tester)
*/
#define XMK_WAS_PRINTED_ASCII  0x0008

/*
** New macros needed for later versions of Cmicro Tester
*/
#ifdef XMK_ADD_SDLE_TRACE
  #define XAT_FIRST_SYMBOL(SYMB_NO1, SYMB_NO2) \
          xmk_TSDL_InputID( SYMB_NO2 );
  #define XBETWEEN_SYMBOLS(SYMB_NO1,SYMB_NO2,C_LINE_NO) \
          xmk_TSDL_SymbolID( SYMB_NO2 );
  #define XBETWEEN_SYMBOLS_PRD(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XBETWEEN_STMTS(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XBETWEEN_STMTS_PRD(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XAT_LAST_SYMBOL
  #define XDEBUG_LABEL(LABEL_NAME)
#else
  #define XAT_FIRST_SYMBOL(SYMB_NO1, SYMB_NO2)
  #define XBETWEEN_SYMBOLS(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XBETWEEN_SYMBOLS_PRD(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XBETWEEN_STMTS(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XBETWEEN_STMTS_PRD(SYMB_NO1,SYMB_NO2,C_LINE_NO)
  #define XAT_LAST_SYMBOL
  #define XDEBUG_LABEL(LABEL_NAME)
#endif

/*
** New macros needed for ADT support
*/
#define XCHECK_UNION_TAG(TAG,VALUE,ASSTAG,NEQTAG,COMPNAME,CURR_VALUE) \
   if (NEQTAG(TAG,VALUE)) { \
     ASSTAG(TAG,VALUE,XASS); \
   }

#define XCHECK_UNION_TAG_FREE(TAG,VALUE,ASSTAG,NEQTAG,FREEFUNC,COMPNAME,CURR_VALUE) \
   if (NEQTAG(TAG,VALUE)) { \
     FREEFUNC((void **)&(TAG)); \
     ASSTAG(TAG,VALUE,XASS); \
   }

#define XCHECK_UNION_TAG_USAGE(TAG,VALUE,NEQTAG,COMPNAME,CURR_VALUE)

#define XCHECK_OPTIONAL_USAGE(PRESENT_VAR,COMPNAME)

#define XSET_CHOICE_TAG(TAG,VALUE,ASSTAG,NEQTAG,COMPNAME,CURR_VALUE) \
   if (NEQTAG(TAG,VALUE)) { \
     ASSTAG(TAG,VALUE,XASS); \
   }

#define XSET_CHOICE_TAG_FREE(TAG,VALUE,ASSTAG,NEQTAG,FREEFUNC,COMPNAME,CURR_VALUE) \
   if (NEQTAG(TAG,VALUE)) { \
     FREEFUNC((void **)&(TAG)); \
     ASSTAG(TAG,VALUE,XASS); \
   }

#define XCHECK_CHOICE_USAGE(TAG,VALUE,NEQTAG,COMPNAME,CURR_VALUE)

#ifdef XMK_USE_MAX_ERR_CHECK
  #define XCHECK_REF(VALUE,SORTIDNODE,REF_SORT) \
    xmk_CheckNullPointerValue ( (void *) VALUE );

  #define XCHECK_OREF(VALUE,SORTIDNODE,REF_SORT) \
    xmk_CheckNullPointerValue ( (void *) VALUE );

  #define XCHECK_OREF2(VALUE) \
    xmk_CheckNullPointerValue ( (void *) VALUE );

  #define XCHECK_OWN(VALUE,SORTIDNODE,REF_SORT) \
    xmk_CheckNullPointerValue ( (void *) VALUE );

#else
  #define XCHECK_REF(VALUE,SORTIDNODE,REF_SORT)
  #define XCHECK_OREF(VALUE,SORTIDNODE,REF_SORT)
  #define XCHECK_OREF2(VALUE)
  #define XCHECK_OWN(VALUE,SORTIDNODE,REF_SORT)
#endif

/****+***************************************************************
01   Main User oriented #ifdef
********************************************************************/

/****+***************************************************************
02   Dependent #ifdef
********************************************************************/
/*---+---------------------------------------------------------------
     Check automatically generated #ifdef
-------------------------------------------------------------------*/
#if defined(XMK_IFC_TIME) && defined(XMK_C_TIME)
  #if XMK_IFC_TIME != XMK_C_TIME
    /*
    ** If the following line is compiled/leads to an error during  
    ** compilation, then the generated systemname.ifc file does not match with
    ** the generated systemname.c file. You should newly generate C code
    ** and be sure that each of the generated C files and the symbolfile
    ** is used appropriately
    */
    #error "ERROR_IllegalFileConfiguration_ifc_and_c_file_See_ml_typ.h"
  #endif
#endif

#if defined(XMK_C_TIME) && defined(XMK_CFG_TIME)
  #if XMK_C_TIME != XMK_CFG_TIME
    /*
    ** If the following line is compiled/leads to an error during  
    ** compilation, then the generated systemname.c file does not match with
    ** the generated sdl_cfg.h file. You should newly generate C code
    ** and be sure that each of the generated C files and the symbolfile
    ** is used appropriately
    */
    #error "ERROR_IllegalFileConfiguration_c_and_sdl_cfg_file_See_ml_typ.h"
  #endif
#endif

#if defined(XMK_IFC_TIME) && defined(XMK_CFG_TIME)
  #if XMK_IFC_TIME != XMK_CFG_TIME
    /*
    ** If the following line is compiled/leads to an error during  
    ** compilation, then the generated systemname.ifc file does not match with
    ** the generated sdl_cfg.h file. You should newly generate C code
    ** and be sure that each of the generated C files and the symbolfile
    ** is used appropriately
    */
    #error "ERROR_IllegalFileConfiguration_ifc_and_sdl_cfg_file_See_ml_typ.h"
  #endif
#endif

#if defined(XMK_HIGHEST_SIGNAL_NR) && !defined(XMK_USE_MORE_THAN_250_SIGNALS)
  #if XMK_HIGHEST_SIGNAL_NR > 250
    /*
    ** If the following line is compiled/leads to an error during
    ** compilation, then the amount of signals in the SDL system
    ** exceeds 250 and the define XMK_USE_MORE_THAN_250_SIGNALS should
    ** be set. Otherwise there would be runtime errors because
    ** more than 250 signals cannot be represented with an char 
    ** value (the last values are reserved for internal purposes),
    ** but must be represented with an int value.
    */
    #error "ERROR_IllegalCodingOfSignalIdentification_See_ml_typ.h"
  #endif
#endif

#if defined(XMK_USED_PWOS) && defined(XMK_USE_KERNEL_INIT)
  /*
  ** Variables, that are local in an SDL procedure need
  ** to be initialized by setting an default value.
  ** (using xDef_SDL_<typename> macros.
  ** If XMK_USE_KERNEL_INIT is defined, then process variables
  ** are set appropriately to their default values, because
  ** the Cmicro Kernel does handle initialization of data during
  ** process creation.  But, if procedures are used, then the 
  ** defaultsetting of variable cannot be ensured, because the 
  ** variables are initialized at procedure startup with 
  ** the same method as process variables are initialized.
  ** In general, XMK_USE_KERNEL_INIT is more efficient than explicitely
  ** setting default values variable per variable.
  ** On the other hand, difficulties may arise if variables in an SDL
  ** procedure are not initialized before using them.
  */
  #define XMK_USE_PROCEDURE_INIT /* or set to #undef */

  #ifdef XMK_USE_PROCEDURE_INIT
    /*
    ** The most safest way is however to undefine XMK_USE_KERNEL_INIT
    ** when procedures are used.
    */
    #undef XMK_USE_KERNEL_INIT
  #else
    /*
    ** Remove this error message below if you don't need Default
    ** Setting in procedures.
    */
    #error "ERROR_NoDefaultValueForVariablesInProcedures_See_ml_typ.h"
  #endif
#endif /* ... defined(XMK_USE_PWOS) && defined(XMK_USE_KERNEL_INIT) */

/*---+---------------------------------------------------------------
     Dependent user oriented #ifdef
-------------------------------------------------------------------*/

#if !defined(SDTMT) && !defined(SDTGATE)
#ifndef  XMK_USE_SENDER_PID_IN_SIGNAL
  #ifdef   XMK_USED_SENDER
     #error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_01"
  #endif

  #ifdef   XMK_USED_PARENT
     #error "ERROR_in_ml_typ.h\IllegalCombinationOfDefines_02"

⌨️ 快捷键说明

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