📄 ncitms.h
字号:
/*
* Copyright 1997-2005 NComm, Inc. All rights reserved.
*
*
* *** Important Notice ***
* The software contained in this file may only be used within a
* valid license agreement between your company and NComm, Inc.
* The license agreement includes the definition of a PROJECT which
* defines the scope that this software can be used in. Any use outside of
* the definition of the PROJECT is prohibited without executing an additional
* agreement with NComm, Inc. Please refer to you license agreement for
* the definition of the PROJECT.
*
* Verification of your company's license agreement and copies of
* that agreement also may be obtained from:
*
* NComm, Inc.
* 254 N Broadway
* Suite 106
* Salem, NH 03079
* (603) 893-6186
* sales@ncomm.com
*
*/
#ifndef NCITMS_H
#define NCITMS_H
/*
* These are used at all levels of the various NComm TMS packages, regardless
* of T1/E1/DS3/SONET/LIU etc., including the drivers.
*/
/*--------------------------------------------------------------------------*/
/* used for the xxxxCTRL_TXCLOCK fcodes
*/
typedef enum {
LOCALOSC = 100,
RXCLOCK,
SYSCLOCK,
OTHERCLK
} CLOCK_TYPE;
/*--------------------------------------------------------------------------*/
/* used to access programmable timing parameters of various items, mostly
* alarm and loopback integration times.
*/
typedef struct _unitTime {
int unitID; /* identifier */
int pretime; /* time in milliSecs in TMS_TIC increments */
int posttime; /* time in milliSecs in TMS_TIC increments */
} UNIT_TIME;
/* used to return the static-state of integrated values in the GetState calls.
*/
typedef struct _unitState {
int detected;
int declared;
} UNIT_STATE;
/*--------------------------------------------------------------------------*/
/* Action codes for registering TMS activity in regards to codes and packet
* processing. 'PROC' means that the TMS package will automatically respond
* to the code or packet, and 'PASS' means that the TMS will pass the code
* or packet up to the App. There are also combinations of the two.
*/
typedef enum {
ACTION_NONE = 100, /* don't process and don't pass to app
*/
ACTION_PROC, /* process but don't pass to app (default)
*/
ACTION_PASS, /* don't process; DO pass to app
*/
ACTION_PROCPASS, /* process THEN pass to app
*/
ACTION_PASSPROC /* pass to app then process ONLY IF
* app callback returns with nonzero
*/
} ACTION_CODE;
/*--------------------------------------------------------------------------*/
/* To flag where a fatal error came from in the FATALERROR callback.
*/
typedef enum {
FATALERROR_TMS = 100,
FATALERROR_DRV
} FATALERROR_TYPE;
/*--------------------------------------------------------------------------*/
/* Common directional indicators
*/
typedef enum {
TMS_RX = 100,
TMS_TX
} TMS_RXTX;
/*--------------------------------------------------------------------------*/
/* Used in both the TE1 (PTID Msgs as per T1.403 Annex-A) and TE3 (PMDL Msgs
* as per T1.107-1995) TMS packages.
*/
/* Minus 5 due to the LAPD overhead bytes. If you try to send PTIDRAW packets
* that are larger than this value, it will return an error.
*/
#define MAX_PTIDPKT (256-5)
/* Used to identify the "type" of a standard message and all the data fields
* within the message. Use PTID_RAW to transmit non-standard messages.
*/
typedef enum {
PTID_RAW = 0x00,
PTID_PATHID = 0x38,
PTID_IDLESIG = 0x34,
PTID_TESTSIG = 0x32,
PTID_DS3ITUT = 0x3F
} PTID_TYPE;
typedef enum { /* PTID ID message fields */
PTID_EIC,
PTID_LIC,
PTID_FIC,
PTID_UNIT,
PTID_FI,
PTID_PORT,
PTID_GEN,
PTID_ITU
} PTID_FIELD;
/*--------------------------------------------------------------------------*/
/* Used for Loopback parameters and functionality.
* Not all are used in all packages.
*/
#define LOOP_CODE 0x40000000 /* don't touch the sign-bit */
#define LOOP_SWITCH 0x20000000
/* onoff codeSet */
#define LOOP_REMSWITCH 0x20000001 /* X */
#define LOOP_LOCSWITCH 0x20000002 /* X */
#define LOOP_PAYSWITCH 0x20000004 /* X */
#define LOOP_FRMSWITCH 0x20000008 /* X */
#define LOOP_REMTXUPCODE 0x40000010 /* X X */
#define LOOP_REMTXDNCODE 0x40000020 /* X X */
#define LOOP_REMRXUPCODE 0x40000040 /* X */
#define LOOP_REMRXDNCODE 0x40000080 /* X */
/*--------------------------------------------------------------------------*/
/* Used for Alarm parameters and functionality.
* Not all are used in all packages.
*/
#define TMS_TXALARM 0x40000000 /* don't touch the sign-bit */
#define TMS_RXALARM 0x20000000
#define TMS_RXLOS 0x20000001 /* the various Alarm Types */
#define TMS_RXOOF 0x20000002
#define TMS_RXAIS 0x20000004
#define TMS_RXRAI 0x20000008
#define TMS_RXRFI 0x20000010
#define TMS_RXBSF 0x20000020
#define TMS_RXBSD 0x20000040
#define TMS_RXLOP 0x20000080
#define TMS_RXTIM 0x20000100
#define TMS_RXUNEQ 0x20000200
#define TMS_RXPLM 0x20000400
#define TMS_RXRFIS 0x20000800
#define TMS_RXRFIC 0x20001000
#define TMS_RXRFIP 0x20002000
#define TMS_RXIDLE 0x20004000
#define TMS_RXOOFDL 0x20008000 /* TR008 alarm */
#define TMS_RXRED 0x20010000
#define TMS_TXRAI 0x40000001
#define TMS_TXAIS 0x40000002
#define TMS_TXRFI 0x40000004
#define TMS_TXRFIS 0x40000008
#define TMS_TXRFIC 0x40000010
#define TMS_TXRFIP 0x40000020
#define TMS_TXIDLE 0x40000040
/*--------------------------------------------------------------------------*/
/* Used for GetSyncSize, GetSync, and PutSync module bitmap parameters
* in the TE1, TE3, and LIU packages.
*/
#define TMS_SYNCSIGNL 0x00000001
#define TMS_SYNCT1403 0x00000002
#define TMS_SYNCTR54016 0x00000004
#define TMS_SYNCT1231 0x00000008
#define TMS_SYNCG826 0x00000010
#define TMS_SYNCSASI 0x00000020
#define TMS_SYNCFEAC 0x00000040
#define TMS_SYNCPMDL 0x00000080
#define TMS_SYNCTR008 0x00000100
#define TMS_SYNCALARMS 0x00004000
#define TMS_SYNCLOOPS 0x00008000
#define TMS_SYNCALL 0xFFFFFFFF
/*--------------------------------------------------------------------------*/
/* Used for the return-value of Tx-Complete callbacks.
*/
typedef enum {
TX_DONE = 100,
TX_FAIL
} TX_RETVAL;
/*--------------------------------------------------------------------------*/
/* General binary values used as parameters in API calls.
*/
#undef SET
#define SET 1
#undef CLEAR
#define CLEAR 0
#undef ENABLE
#define ENABLE 1
#undef DISABLE
#define DISABLE 0
#undef USR_SIDE
#define USR_SIDE 0
#undef NET_SIDE
#define NET_SIDE 1
/*--------------------------------------------------------------------------*/
/* API call return-codes.
*/
#undef SUCCESS
#define SUCCESS 1
#undef ERR_FAILURE
#define ERR_FAILURE 0
#undef ERR_NOLINE
#define ERR_NOLINE -1
#endif /* NCITMS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -