INTERNAL: Package - Protocol - Reference


Data Structures

union  HdrBdyIU
 integer representation of a BODYITEM size More...
union  HdrIU
 integer representation More...
struct  HdrS
 The protocol HEADER mapped to a struct. More...
struct  BdyS
 The protocol HEADER-BODY part mapped to a struct. More...
struct  HdrSendS
 the entire HEADER More...

Defines

#define HDR_HDL_LEN   4
 max size of a native handle (Type: MQ_INT - 4 byte)
#define HDR_INT_LEN   8
 max size of an hex integer in characters (Type: MQ_INT)
#define HDR_TOK_LEN   4
 max size of an pToken (Type: char[4])
#define HDR_RET_LEN   1
 size of the return code (N)othing, (O)k, (W)arning, (E)rror (Type: char)
#define HDR_CtxId_S   (3 + 1)
 4 : "HDR" string[3]
#define HDR_BdySize_S   (HDR_CtxId_S + HDR_INT_LEN + 1)
 13 : "CONTEXT" integer
#define HDR_Token_S   (HDR_BdySize_S + HDR_INT_LEN + 1)
 22 : "BODYSIZE" integer
#define HDR_Trans_S   (HDR_Token_S + HDR_TOK_LEN + 1)
 27 : "TOKEN" string[4]
#define HDR_Code_S   (HDR_Trans_S + HDR_HDL_LEN + 1)
 32 : "TRANSACTION" pointer
#define HDR_SIZE   (HDR_Code_S + HDR_RET_LEN + 1)
 34 : "RETURNCODE" char
#define BDY_NumItems_S   (3 + 1)
 4 : "BDY" string[3]
#define BDY_SIZE   (BDY_NumItems_S + HDR_INT_LEN)
 12 : "BODY_ITEM_SIZE" integer
#define RET_Num_S   (0 )
 0 : Start of the "RETURNITEM"
#define RET_NumItems_S   (RET_Num_S + HDR_INT_LEN + 1)
 9 : "RETURM_NUMBER" integer
#define RET_SIZE   (RET_NumItems_S + HDR_INT_LEN )
 17 : "RETURN_MASSAGE_SIZE" integer
#define BUFFER_P2_PRENUM   (1 + 1 + 1 + HDR_INT_LEN + 1 )
 the HEADER size of an BODYITEM
#define BUFFER_P2_NATIVE   (1 + 1 + 1 )
#define validateHDR(buf)

Detailed Description

Every data-package send from a client to the server and back is a combination of a fix size HEADER and a variable size BODY.

The fix size HEADER (defined in HdrS) was defined as:

HDR+CONTEXT+BODYSIZE+TOKEN+TRANSACTION+RETURNCODE+

If "BODYSIZE > 0" the BODY_ITEM_HEADER (defined in BdyS) is appended to HEADER:

BDY+BODY_ITEM_SIZE+BODY_ITEM_LIST

with BODY_ITEM_SIZE as the number of items in the BODY_ITEM_LIST.

If "BODY_ITEM_SIZE > 0" the BODY_ITEM_SIZE * BODY_DATA_HEADER are appended to BODY_ITEM_HEADER

BODY_DATA_TYPE+BODY_DATA_SIZE+BODY_DATA

with BODY_DATA_SIZE as the number of bytes in BODY_DATA.

If RETURNCODE == MQ_RETURN_ERROR (defined in MqReturnE) the last BODYITEM is defined as RETURNITEM with a RETURNITEM_HEADER:

RETURN_NUMBER+RETURN_MESSAGE_SIZE+...data...

Define Documentation

#define BDY_NumItems_S   (3 + 1)

4 : "BDY" string[3]

Definition at line 150 of file msgque_private.h.

Referenced by pSendCreate(), and pSwapBDY().

#define BDY_SIZE   (BDY_NumItems_S + HDR_INT_LEN)

12 : "BODY_ITEM_SIZE" integer

Definition at line 151 of file msgque_private.h.

Referenced by pLogBDY(), pMqSendEND(), and pReadHDR().

#define BUFFER_P2_NATIVE   (1 + 1 + 1 )

Definition at line 171 of file msgque_private.h.

Referenced by sSendA1(), sSendA2(), sSendA4(), and sSendA8().

#define BUFFER_P2_PRENUM   (1 + 1 + 1 + HDR_INT_LEN + 1 )

the HEADER size of an BODYITEM

Definition at line 168 of file msgque_private.h.

Referenced by MqSendB(), MqSendC(), MqSendL_START(), MqSendVL(), sSend_RET_START(), sSendA1(), sSendA2(), sSendA4(), sSendA8(), and sSendLen().

#define HDR_BdySize_S   (HDR_CtxId_S + HDR_INT_LEN + 1)

13 : "CONTEXT" integer

Definition at line 140 of file msgque_private.h.

Referenced by pLogHDR(), and pSendCreate().

#define HDR_Code_S   (HDR_Trans_S + HDR_HDL_LEN + 1)

32 : "TRANSACTION" pointer

Definition at line 143 of file msgque_private.h.

Referenced by pLogHDR(), pSendCreate(), and sSend_RET_START().

#define HDR_CtxId_S   (3 + 1)

4 : "HDR" string[3]

Definition at line 139 of file msgque_private.h.

Referenced by pLogHDR(), pSendCreate(), and sReadFIX().

#define HDR_HDL_LEN   4

max size of a native handle (Type: MQ_INT - 4 byte)

Definition at line 127 of file msgque_private.h.

#define HDR_INT_LEN   8

max size of an hex integer in characters (Type: MQ_INT)

Definition at line 129 of file msgque_private.h.

Referenced by MqReadL_START(), MqReadUndo(), MqSendL_START(), MqSendSTART(), pLogHDR(), pMqSendEND(), pRead_RET_START(), sLogDynList(), sSend_RET_START(), sSwapDYN(), and sSwapRET().

#define HDR_RET_LEN   1

size of the return code (N)othing, (O)k, (W)arning, (E)rror (Type: char)

Definition at line 133 of file msgque_private.h.

#define HDR_SIZE   (HDR_Code_S + HDR_RET_LEN + 1)

34 : "RETURNCODE" char

Definition at line 144 of file msgque_private.h.

Referenced by pLogHDR(), pMqSendEND(), pReadCreate(), and pSendCreate().

#define HDR_TOK_LEN   4

max size of an pToken (Type: char[4])

Definition at line 131 of file msgque_private.h.

Referenced by MqServiceCreate(), pMqSendEND(), pTokenSetCurrent(), and sTokenSpaceDelItem().

#define HDR_Token_S   (HDR_BdySize_S + HDR_INT_LEN + 1)

22 : "BODYSIZE" integer

Definition at line 141 of file msgque_private.h.

Referenced by pLogHDR(), and pSendCreate().

#define HDR_Trans_S   (HDR_Token_S + HDR_TOK_LEN + 1)

27 : "TOKEN" string[4]

Definition at line 142 of file msgque_private.h.

Referenced by pLogHDR(), and pSendCreate().

#define RET_Num_S   (0 )

0 : Start of the "RETURNITEM"

Definition at line 157 of file msgque_private.h.

Referenced by sLogRET(), and sSwapRET().

#define RET_NumItems_S   (RET_Num_S + HDR_INT_LEN + 1)

9 : "RETURM_NUMBER" integer

Definition at line 158 of file msgque_private.h.

Referenced by sLogRET(), and sSend_RET_END().

#define RET_SIZE   (RET_NumItems_S + HDR_INT_LEN )

17 : "RETURN_MASSAGE_SIZE" integer

Definition at line 159 of file msgque_private.h.

Referenced by sLogRET(), and sSend_RET_START().

#define validateHDR ( buf   ) 

Value:

printf("VALIDATE(HDR) : %c%c%c %c ctxId %c size %c token %c transptr %c\n", \
        buf->data[0], buf->data[1], buf->data[2], \
        buf->data[HDR_CtxId_S - 1], \
        buf->data[HDR_BdySize_S - 1], buf->data[HDR_Token_S - 1], \
        buf->data[HDR_Trans_S - 1], buf->data[HDR_SIZE - 1])

Definition at line 177 of file msgque_private.h.


libmsgque project on SF: Get libmsgque at SourceForge.net. Fast, secure and Free Open Source software downloads    Generated on Mon Nov 9 16:57:15 2009 by doxygen 1.5.8