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

📄 gen.x

📁 中国石油二期加油站IC系统后台通讯软件
💻 X
📖 第 1 页 / 共 5 页
字号:
/********************************************************************20**
  
     Name:     general layer
  
     Type:     C include file
  
     Desc:     Structures, variables and typedefs required by two
               or more layer service user interfaces.
   
     File:     gen.x
  
     Sid:      gen.x@@/main/78 - Thu Apr  5 13:06:21 2001
  
     Prg:      na
  
*********************************************************************21*/

#ifndef __GENX__
#define __GENX__

#ifdef __cplusplus
extern "C" {
#endif
 
  
/*
*     The structures and variables declared in this file
*     correspond to structures and variables used by
*     the following TRILLIUM software:
*
*     part no.                      description
*     --------    ----------------------------------------------
*     1000001     Physical Layer - SCC
*     1000002     Data Link Layer - LAPB
*     1000003     Data Link Layer - LAPD
*     1000005     Data Link Layer - LAPB & LAPD
*     1000006     Network Layer - X.25 Intermediate System
*     1000007     Network Layer - X.25 End System
*     1000008     Network Layer - X.75
*     1000009     Network Layer - Q.930/Q.931
*     1000010     Application Layer - Asynchronous PAD
*     1000011     Multiprocessor Operating System (MOS)
*     1000014     Network Layer - X.25 End & Intermediate System
*     1000017     Data Link Layer - Basic Frame Relay
*     1000018     Data Link Layer - Extended Frame Relay
*     1000019     Data Link Layer - Logical Link Control 1
*     1000020     Data Link Layer - Logical Link Control 2
*     1000021     Data Link Layer - Logical Link Control 3
*     1000023     Network Layer - X.31
*     1000024     Signalling System 7
*     1000025     SDLC
*     1000026     TCP/IP
*     1000027     Signalling System 7 - MTP Level 2
*     1000028     Signalling System 7 - MTP Level 3
*     1000029     Signalling System 7 - ISUP
*     1000031     Signalling System 7 - TCAP
*     1000033     Data Link Layer - ADCCP-NRM
*     1000034     Physical Layer - ISAC-S
*     1000035     68302 MOS/SCC
*     1000036     SNMP Agent
*     1000037     SNMP Tools
*     1000038     SNMP Package
*     1000039     Physical Layer - SCARF
*     1000040     UDP/IP
*     1000041     ESCC
*
*/
  
/*
*     This software may be combined with the following TRILLIUM
*     software:
*
*     part no.                      description
*     --------    ----------------------------------------------
*     1000001     Physical Layer - SCC
*     1000002     Data Link Layer - LAPB
*     1000003     Data Link Layer - LAPD
*     1000005     Data Link Layer - LAPB & LAPD
*     1000006     Network Layer - X.25 Intermediate System
*     1000007     Network Layer - X.25 End System
*     1000008     Network Layer - X.75
*     1000009     Network Layer - Q.930/Q.931
*     1000010     Application Layer - Asynchronous PAD
*     1000011     Multiprocessor Operating System (MOS)
*     1000014     Network Layer - X.25 End & Intermediate System
*     1000017     Data Link Layer - Basic Frame Relay
*     1000018     Data Link Layer - Extended Frame Relay
*     1000019     Data Link Layer - Logical Link Control 1
*     1000020     Data Link Layer - Logical Link Control 2
*     1000021     Data Link Layer - Logical Link Control 3
*     1000023     Network Layer - X.31
*     1000024     Signalling System 7
*     1000025     SDLC
*     1000026     TCP/IP
*     1000027     Signalling System 7 - MTP Level 2
*     1000028     Signalling System 7 - MTP Level 3
*     1000029     Signalling System 7 - ISUP
*     1000031     Signalling System 7 - TCAP
*     1000033     Data Link Layer - ADCCP-NRM
*     1000034     Physical Layer - ISAC-S
*     1000035     68302 MOS/SCC
*     1000036     SNMP Agent
*     1000037     SNMP Tools
*     1000038     SNMP Package
*     1000039     Physical Layer - SCARF
*     1000040     UDP/IP
*     1000041     ESCC
*
*/


/* typedefs */

typedef S8 Txt;                   /* text */

typedef U8 Ent;                   /* entity */

typedef U8 Inst;                  /* instance */

typedef struct entityId           /* entity id */
{
   Ent ent;                       /* entity */
   Inst inst;                     /* instance */
} EntityId;

/* element id */
 
typedef S16 Elmnt;                /* element */
 
typedef S16 ElmntInst1;           /* element instance 1 */
 
typedef S16 ElmntInst2;           /* element instance 2 */
 
typedef S16 ElmntInst3;           /* element instance 3 */
  
typedef struct elmntId            /* element id */
{
   Elmnt elmnt;                   /* element */
   ElmntInst1 elmntInst1;         /* element instance 1 */
   ElmntInst2 elmntInst2;         /* element instance 2 */
   ElmntInst3 elmntInst3;         /* element instance 3 */
} ElmntId;

typedef U8 Region;                /* region */

typedef U8 Pool;                  /* pool */

typedef U8 Prior;                 /* priority */

typedef Prior Priority;           /* priority */

typedef U8 Route;                 /* route */

typedef U8 Data;                  /* data */

typedef U8 Selector;              /* selector */

typedef S16 Reason;               /* reason */

typedef U16 ProcId;               /* processor id */

typedef U8 Event;                 /* event */

typedef U32 TranId;               /* transaction Id */

typedef S16 IntNum;               /* Interface Number */

typedef U16 TranNum;              /* Transaction Number */

/* post structure *** ALIGNED & ORDERED *** */
typedef struct pst                /* parameters for SPstTsk */
{
   ProcId dstProcId;              /* destination processor id (U16) */
   ProcId srcProcId;              /* source processor id      (U16) */

   Ent dstEnt;                    /* destination entity       (U8)  */
   Inst dstInst;                  /* destination instance     (U8)  */
   Ent srcEnt;                    /* source entity            (U8)  */
   Inst srcInst;                  /* source instance          (U8)  */

   Prior prior;                   /* priority                 (U8)  */   
   Route route;                   /* route                    (U8)  */
   Event event;                   /* event                    (U8)  */
   Region region;                 /* region                   (U8)  */

   Pool pool;                     /* pool                     (U8)  */
   Selector selector;             /* selector                 (U8)  */
   U16 spare1;                    /* spare 1                  (U16) */
} Pst;

/* systemId structure */
  
typedef struct systemId           /* system id */
{
   S16 mVer;                      /* main version */
   S16 mRev;                      /* main revision */
   S16 bVer;                      /* branch version */
   S16 bRev;                      /* branch revision */
   Txt *ptNmb;                    /* part number */
} SystemId;

/* Protocol Address Structure */
/* Note: The Order of variables should not be changed as it breaks MPC/MPS
 *       code in PLOA
 */
typedef struct protAddr
{
   U16      protType;                  /* Protocol Type */
   U8       len;                       /* Protocol Address Length in bytes */
   U8       preLen;                    /* prefix length in bits */
   U8       address[MAX_PROTADDR_LEN]; /* Protocol Address */ 
#ifdef CM_ARI2
   Bool     autoSysIdPres;         /* Is Autonomous System Id Present */
   U32      autoSysId;                 /* Autonomous System Id */
#endif /* CM_ARI2 */

}ProtAddr;

typedef struct protAddrTbl
{
   U8         count;                 /* Number of addresses */
   ProtAddr   addr[MAX_PROT_ADDRS];  /* Protocol Address List */
}ProtAddrTbl;

/* addrs structure */

typedef struct addrs              /* address */
{
   U8 length;                     /* length (bytes or nibbles) */
   U8 strg[ADRLEN];               /* address */
} Addrs;

typedef struct shrtAddr           /* short address */
{
   U8 length;                     /* length bytes */
   U8 strg[SHRTADRLEN];           /* address */
} ShrtAddrs;

typedef struct lngAddr            /* long address */
{
   U8 length;                     /* length bytes */
   U8 strg[LNGADRLEN];            /* address */
} LngAddrs;

/* bndCfg structure */

typedef struct bndCfg             /* bind configuration */
{
   Txt *usrId;                    /* user id */
   U8 bufOwnshp;                  /* buffer ownership */
   U8 flcTyp;                     /* flow control type */
   U8 wdw;                        /* window */
   Ent ent;                       /* entity */
   Inst inst;                     /* instance */
   Region region;                 /* region */
   Pool pool;                     /* pool */
   Prior prior;                   /* priority */
   Route route;                   /* route */
   Addrs sapAdr;                  /* SAP Address */
   Selector selector;             /* selector */
} BndCfg;

/* tskInit structure */

typedef struct tskInit            /* task initialization */
{
   Ent ent;                       /* entity */
   Inst inst;                     /* instance */
   Region region;                 /* static region */
   Pool pool;                     /* static pool */
   Reason reason;                 /* reason */
   Bool cfgDone;                  /* configuration done */
   Bool acnt;                     /* accounting */ 
   Bool usta;                     /* unsolicited status */
   Bool trc;                      /* trace */
#ifdef DEBUGP
   U32 dbgMask;                   /* debug mask */
   Txt prntBuf[PRNTSZE];          /* print buffer */
#endif
   BndCfg lmBnd;                  /* layer management bind */
   ProcId procId;                 /* processor id */
   Pst lmPst;                     /* layer management post */
} TskInit;


typedef S32 Cntr;                 /* counter */
 
typedef U32 StsCntr;              /* Statistics counter */

typedef S16 LnkNmb;               /* link number */

typedef S16 SuId;                 /* service user sap id */

typedef S16 SpId;                 /* service provider sap id */

typedef S16 SuInstId;             /* service user instance id */

typedef S16 SpInstId;             /* service provider instance id */

typedef U16 PortId;               /* port id */

typedef U8 Sapi;                  /* service access point id */
 
typedef U8 Tei;                   /* terminal endpoint id */

typedef U8 Ces;                   /* connection endpoint suffix */

typedef U32 Dlci;                 /* data link control identifier */ 

typedef U16 CalRef;               /* call Reference */

typedef S16 Origin;               /* origin */

typedef U16 NwId;                 /* Network Identifier */

typedef S16 Swtch;                /* switch */

typedef U8 Cause;                 /* cause code */

typedef U8 Dgn;                   /* diagnostic code */

typedef S16 Action;               /* action */

typedef S16 SeqS16;               /* signed 16 bit sequence number */
 
typedef U16 SeqU16;               /* unsigned 16 bit sequence number */
 
typedef S32 SeqS24;               /* signed 24 bit sequence number */

⌨️ 快捷键说明

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