q931iefmt.hpp

来自「ABis无线接口全套资料」· HPP 代码 · 共 1,125 行 · 第 1/3 页

HPP
1,125
字号
//// Q931iefmt.hpp// Q931 IE format, declare all Q931 IE structure.//#ifndef _Q931IEFMT_HPP#define _Q931IEFMT_HPP#ifndef _DATATYPE_HPP#include "datatype.hpp"#endif#define MAX_CALLID			8		// Maximum Call identity#define MAX_DIGITS			32		// Maximum Number digits (IA5 characters)#define MAX_SDINFO			20		// Maximum Subaddress information#define MAX_DIAGNOSIS		27		// Maximum diagnosis#define MAX_CHANNEL			30		// Maximum CHANNEL Number	#define MAX_Display			80		// Maximum Display  information#define MAX_KEYINF			32 		// Maximum Keypad facility information (IA5 characters)#pragma pack(1)						 // Pack the stucture, no leave holl./* *  Q.931 IE format, declare all Q.931 IE structure. */                                                 struct SQ931BcB3 // Structure of byte 3.{	UINT8 itc			: 5;		// byte 3, Information transfer capability, default 00000=speech	UINT8 codeStand		: 2;		// byte 3, Coding standard, default 00=ITU-T coding standard	UINT8 b3ext			: 1;		// byte 3, default 1};struct SQ931BcB4 // Structure of byte 4.{	UINT8 itr			: 5;		// byte 4, Information transfer rate, default 10000=64kbit/s	UINT8 transMode		: 2;		// byte 4, Transfer mode, default 00=circuit mode	UINT8 b4ext			: 1;		// byte 4, default 1};struct SQ931BcB4_1 // Structure of byte 4.1{	UINT8 rm			: 7; 		// byte 4.1, Rate multiplier	UINT8 b41ext		: 1;		// byte 4.1, default 1   };struct SQ931BcB5 // Structure of byte 5, not include byte 5a~5d.{	UINT8 uip			: 5;		// byte 5, User information layer 1 protocol,default 00011=Recommendation G.711 A-law	UINT8 l1ident 		: 2;		// byte 5, Layer 1 ident,default 01	UINT8 b5ext			: 1;		// byte 5, 0/1 ext};struct SQ931BcB5a // Structure of byte 5, include byte 5a.{	UINT8 uip			: 5;		// byte 5, User information layer 1 protocol,default 00011=Recommendation G.711 A-law	UINT8 l1ident 		: 2;		// byte 5, Layer 1 ident,default 01	UINT8 b5ext			: 1;		// byte 5, 0/1 ext	                                	UINT8 userRate		: 5;		// byte 5a, User rate	UINT8 negot			: 1;		// byte 5a, Negot	UINT8 SyOrAsy		: 1;		// byte 5a, Synch or asynch	UINT8 b5aext		: 1;		// byte 5a, 0/1 ext };struct SQ931BcB5b // Structure of byte 5, include byte 5a~5b.{	UINT8 uip			: 5;		// byte 5, User information layer 1 protocol,default 00011=Recommendation G.711 A-law	UINT8 l1ident 		: 2;		// byte 5, Layer 1 ident,default 01	UINT8 b5ext			: 1;		// byte 5, 0/1 ext	                                	UINT8 userRate		: 5;		// byte 5a, User rate	UINT8 negot			: 1;		// byte 5a, Negot	UINT8 SyOrAsy		: 1;		// byte 5a, Synch or asynch	UINT8 b5aext		: 1;		// byte 5a, 0/1 ext 	union	{		struct		{			UINT8 spare			: 1;         // byte 5b, Spare, default 0   			UINT8 flowCtrlRx	: 1;         // byte 5b, Flow control on Rx	   		UINT8 flowCtrlTx 	: 1;         // byte 5b, Flow control on Tx			UINT8 bNICRx		: 1;         // byte 5b, NIC on Rx                 			UINT8 bNICTx		: 1;         // byte 5b, NIC on Tx                 			UINT8 intmdRate		: 2;         // byte 5b, Intermediate rate         			UINT8 ext			: 1;         // byte 5b, 0/1 ext       		} byte5bo1;		struct		{			UINT8 spare			: 1;         // byte 5b2,default 0        			UINT8 inBankNeg  	: 1;		 // byte 5b2, In-band neg        			UINT8 asgorOrasgee	: 1;         // byte 5b2, Assignor/ee        			UINT8 lliNeg		: 1;         // byte 5b2, LLI negot         			UINT8 mode			: 1;         // byte 5b2, Mode              			UINT8 multoFr		: 1;         // byte 5b2, Multi frame       			UINT8 hdrOrON		: 1;         // byte 5b2, Hdr/ no Hdr         		  	UINT8 ext			: 1;         // byte 5b2, 0/1 ext   		} byte5bo2;	};};struct SQ931BcB5c // Structure of byte 5, include byte 5a~5c.{	UINT8 uip			: 5;		// byte 5, User information layer 1 protocol,default 00011=Recommendation G.711 A-law	UINT8 l1ident 		: 2;		// byte 5, Layer 1 ident,default 01	UINT8 b5ext			: 1;		// byte 5, 0/1 ext	                                	UINT8 userRate		: 5;		// byte 5a, User rate	UINT8 negot			: 1;		// byte 5a, Negot	UINT8 SyOrAsy		: 1;		// byte 5a, Synch or asynch	UINT8 b5aext		: 1;		// byte 5a, 0/1 ext 	union	{		struct		{			UINT8 spare			: 1;         // byte 5b, Spare, default 0   			UINT8 flowCtrlRx	: 1;         // byte 5b, Flow control on Rx	   		UINT8 flowCtrlTx 	: 1;         // byte 5b, Flow control on Tx			UINT8 bNICRx		: 1;         // byte 5b, NIC on Rx                 			UINT8 bNICTx		: 1;         // byte 5b, NIC on Tx                 			UINT8 intmdRate		: 2;         // byte 5b, Intermediate rate         			UINT8 ext			: 1;         // byte 5b, 0/1 ext       		} byte5bo1;		struct		{			UINT8 spare			: 1;         // byte 5b2,default 0        			UINT8 inBankNeg  	: 1;		 // byte 5b2, In-band neg        			UINT8 asgorOrasgee	: 1;         // byte 5b2, Assignor/ee        			UINT8 lliNeg		: 1;         // byte 5b2, LLI negot         			UINT8 mode			: 1;         // byte 5b2, Mode              			UINT8 multoFr		: 1;         // byte 5b2, Multi frame       			UINT8 hdrOrON		: 1;         // byte 5b2, Hdr/ no Hdr         		  	UINT8 ext			: 1;         // byte 5b2, 0/1 ext   		} byte5bo2;	}; 	UINT8 parity		: 3;         // byte 5c, Parity     	 	UINT8 numDataBits	: 2;         // byte 5c, Number of data bits     	   	UINT8 numStopBits	: 2;         // byte 5c, Number of stop bits   	    UINT8 b5cext		: 1;         // byte 5c, 0/1 ext 	};struct SQ931BcB5d // Structure of byte 5, include byte 5a~5d.{	UINT8 uip			: 5;		// byte 5, User information layer 1 protocol,default 00011=Recommendation G.711 A-law	UINT8 l1ident 		: 2;		// byte 5, Layer 1 ident,default 01	UINT8 b5ext			: 1;		// byte 5, 0/1 ext	                                	UINT8 userRate		: 5;		// byte 5a, User rate	UINT8 negot			: 1;		// byte 5a, Negot	UINT8 SyOrAsy		: 1;		// byte 5a, Synch or asynch	UINT8 b5aext		: 1;		// byte 5a, 0/1 ext 	union	{		struct		{			UINT8 spare			: 1;         // byte 5b, Spare, default 0   			UINT8 flowCtrlRx	: 1;         // byte 5b, Flow control on Rx	   		UINT8 flowCtrlTx 	: 1;         // byte 5b, Flow control on Tx			UINT8 bNICRx		: 1;         // byte 5b, NIC on Rx                 			UINT8 bNICTx		: 1;         // byte 5b, NIC on Tx                 			UINT8 intmdRate		: 2;         // byte 5b, Intermediate rate         			UINT8 ext			: 1;         // byte 5b, 0/1 ext       		} byte5bo1;		struct		{			UINT8 spare			: 1;         // byte 5b2,default 0        			UINT8 inBankNeg  	: 1;		 // byte 5b2, In-band neg        			UINT8 asgorOrasgee	: 1;         // byte 5b2, Assignor/ee        			UINT8 lliNeg		: 1;         // byte 5b2, LLI negot         			UINT8 mode			: 1;         // byte 5b2, Mode              			UINT8 multoFr		: 1;         // byte 5b2, Multi frame       			UINT8 hdrOrON		: 1;         // byte 5b2, Hdr/ no Hdr         		  	UINT8 ext			: 1;         // byte 5b2, 0/1 ext   		} byte5bo2;	}; 	UINT8 parity		: 3;         // byte 5c, Parity     	 	UINT8 numDataBits	: 2;         // byte 5c, Number of data bits     	   	UINT8 numStopBits	: 2;         // byte 5c, Number of stop bits   	    UINT8 b5cext		: 1;         // byte 5c, 0/1 ext 	   	UINT8 nodermType	: 6;         // byte 5d, Modem type   	UINT8 duplexMode	: 1;         // byte 5d, Duplex mode  	   	UINT8 b5dext		: 1;         // byte 5d, default 1	};struct SQ931BcB6B7 // Structure of byte 6 and byte 7.{	UINT8 userInfoLxPtl	: 5;         // byte 6/7, User information layer 2 or 3 protocol  	UINT8 idLx			: 2;         // byte 6/7, Layer 2 or 3 ident         	UINT8 ext			: 1;         // byte 6/7, default 1     };/*struct  SQ931BearerCapability           {                                      	// UINT8 id;						// byte 1	// UINT8 len;						// byte 2                             	           	UINT8 itc			: 5;		// byte 3, Information transfer capability, default 00000=speech	UINT8 codeStand		: 2;		// byte 3, Coding standard, default 00=ITU-T coding standard	UINT8 b3ext			: 1;		// byte 3, default 1                                        	UINT8 itr			: 5;		// byte 4, Information transfer rate, default 10000=64kbit/s	UINT8 transMode		: 2;		// byte 4, Transfer mode, default 00=circuit mode	UINT8 b4ext			: 1;		// byte 4, default 1                                        	UINT8 rm			: 7; 		// byte 4.1, Rate multiplier	UINT8 b41ext		: 1;		// byte 4.1, default 1   	struct SQ931BearerCapability_UserInformationL1	{		UINT8 uip			: 5;		// byte 5, User information layer 1 protocol,default 00011=Recommendation G.711 A-law		UINT8 l1ident 		: 2;		// byte 5, Layer 1 ident,default 01		UINT8 b5ext			: 1;		// byte 5, 0/1 ext	                                		UINT8 userRate		: 5;		// byte 5a, User rate		UINT8 negot			: 1;		// byte 5a, Negot		UINT8 SyOrAsy		: 1;		// byte 5a, Synch or asynch		UINT8 b5aext		: 1;		// byte 5a, 0/1 ext                                         		UINT8 spare1		: 1;         // byte 5b, Spare, default 0    	UINT8 flowCtrlRx	: 1;         // byte 5b, Flow control on Rx    	UINT8 flowCtrlTx 	: 1;         // byte 5b, Flow control on Tx		UINT8 bNICRx		: 1;         // byte 5b, NIC on Rx                 		UINT8 bNICTx		: 1;         // byte 5b, NIC on Tx                 		UINT8 intmdRate		: 2;         // byte 5b, Intermediate rate          		UINT8 b5bext		: 1;         // byte 5b, 0/1 ext                                               		UINT8 spare2		: 1;         // byte 5b2,default 0        		UINT8 inBankNeg  	: 1;		 // byte 5b2, In-band neg        		UINT8 asgorOrasgee	: 1;         // byte 5b2, Assignor/ee        		UINT8 lliNeg		: 1;         // byte 5b2, LLI negot         		UINT8 mode			: 1;         // byte 5b2, Mode              		UINT8 multoFr		: 1;         // byte 5b2, Multi frame       		UINT8 hdrOrON		: 1;         // byte 5b2, Hdr/ no Hdr            	UINT8 b5b2ext		: 1;         // byte 5b2, 0/1 ext         	                                 		UINT8 parity		: 3;         // byte 5c, Parity     	 		UINT8 numDataBits	: 2;         // byte 5c, Number of data bits     	   		UINT8 numStopBits	: 2;         // byte 5c, Number of stop bits   	    	UINT8 b5cext		: 1;         // byte 5c, 0/1 ext 	      	                                    	UINT8 nodermType	: 6;         // byte 5d, Modem type    	UINT8 duplexMode	: 1;         // byte 5d, Duplex mode  	    	UINT8 b5dext		: 1;         // byte 5d, default 1		};	UINT8 userInfoL2Ptl	: 5;         // byte 6, User information layer 2 protocol  	UINT8 idL2			: 2;         // byte 6, Layer 2 ident         	UINT8 b6ext			: 1;         // byte 6, default 1                                                 UINT8 userInfoL3Ptl	: 5;	     // byte 7, User information layer 3 protocol	      UINT8 idL3			: 2;         // byte 7, Layer 3 ident                        	UINT8 b7ext			: 1;         // byte 7, default 1 };                                     */ struct SQ931CallIdentity                 {                                      	// UINT8 id 	;					// byte 1     	// UINT8 len	;					// byte 2 	char CallId[MAX_CALLID];		// Call identityCall identity };                                                                                    struct SQ931CallState                       {                                         	// UINT8 id			;			// byte 1	// UINT8 len			;			// byte 2                  	                         	UINT8 CallOrGlbSV	: 6;        // byte 3 ,Call state value / global interface state value	UINT8 codeStand		: 2;        // byte 3 ,Coding standard, default 00=ITU-T coding standard      };                                                                                   struct SQ931CalledPartyNumber               {                                         	// UINT8 id;						// byte 1        	// UINT8 len;						// byte 2                                           	UINT8 numPlan		: 4;        // byte 3,Numbering plan id	UINT8 typeOfNum		: 3;        // byte 3,Type of number           	UINT8 b3ext			: 1;        // byte 3,default 1                                           	char digits[MAX_DIGITS]	;		// Number digits (IA5 characters)                                            };                                                                                    struct SQ931CalledPartySubaddress           {                                         	// UINT8 id			;			// byte 1  	// UINT8 len			;		// byte 2                                            	UINT8 spare			: 3;		// byte 3,default 000 	UINT8 OddOrEvenI	: 1;        // byte 3,0: Even number of address signals , 1 :Odd number of address signals	UINT8 TypeOfSD		: 3;        // byte 3,Type of subaddress  	UINT8 b3ext			: 1;        // byte 3,default 1                                            	char si[MAX_SDINFO];			// Subaddress information  };                                                                                   struct SQ931CallingPartyNumber // Not include byte 3a.{	// UINT8 id;					// byte 1	// UINT8 len;					// byte 2	UINT8 numPlan		: 4;		// byte 3, default 0001=ISDN/telephony numbering plan (Recommendation E.164 [19])	UINT8 typeOfNum		: 3;		// byte 3, default 010=National number	UINT8 b3ext			: 1;		// byte 3, default 0                                        	char digits[MAX_DIGITS];		// Number digits (IA5 characters)};struct SQ931CallingPartyNumber3a // Include the byte 3a.{	// UINT8 id;					// byte 1	// UINT8 len;					// byte 2	UINT8 numPlan		: 4;		// byte 3, default 0001=ISDN/telephony numbering plan (Recommendation E.164 [19])	UINT8 typeOfNum		: 3;		// byte 3, default 010=National number	UINT8 b3ext			: 1;		// byte 3, default 0                                        	UINT8 scrInd		: 2;		// byte 3a, default 00=User-provided, not screened	UINT8 spare			: 3;		// byte 3a, default 000	UINT8 pi			: 2;		// byte 3a, default 00=Presentation allowed	UINT8 b4ext			: 1;		// byte 3a, default 1		char digits[MAX_DIGITS];		// Number digits (IA5 characters)};      struct SQ931CallingPartySubaddress     {	// UINT8 id;						// byte 1        	// UINT8 len;						// byte 2                                       	UINT8 spare			: 3;		// byte 3,default 000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     	UINT8 OddOrEvenI	: 1;		// byte 3,0: Even number of address signals , 1 :Odd number of address signals                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            	UINT8 TypeOfSD		: 3;		// byte 3,Type of subaddress                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              	UINT8 b3ext			: 1;		// byte 3,default 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	char si[MAX_SDINFO]		;		// Subaddress information                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        };                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     struct SQ931Cause   { // Modify 2005-10-27, by Wujianjin.	// UINT8 id;						// byte 1                  	// UINT8 len;						// byte 2     	// struct SQ931Cause_bity3 	// { 		UINT8 location		: 4;		// byte 3, default 0000             		UINT8 spare			: 1;		// byte 3, default 0                		UINT8 codeStand		: 2;		// byte 3, default 00               		UINT8 b3ext 		: 1;		// byte 3, default 1;                                                                             		// UINT8 suggestion    : 7;		// byte 3a,suggestion		// UINT8 b3aext		: 1;		// byte 3a,default 1	// };	 	UINT8 cause         : 7;		// byte 4, release cause              	UINT8 b4ext			: 1;		// byte 4, default 1    	 	// UINT8 diagnosis[MAX_DIAGNOSIS];	// byte 5, diagnosis       };                                                                   struct SQ931CiB3 // Channel identification byte 3{ // Add 2005-10-29, by Wujianjin.

⌨️ 快捷键说明

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