Context Management Functions
Context initialization functions handle the allocation, initialization, and destruction of context variables (variables of type OSCTXT). More...Classes | |
| struct | OSRTErrLocn |
| Run-time error location structure. More... | |
| struct | OSRTErrInfo |
| Run-time error information structure. More... | |
| struct | OSRTErrInfoList |
| struct | OSRTBuffer |
| Run-time message buffer structure. More... | |
| struct | OSRTBufSave |
| Structure to save the current message buffer state. More... | |
| struct | OSCTXT |
| Run-time context structure. More... | |
| struct | OSRTErrLocn |
| Run-time error location structure. More... | |
| struct | OSRTErrInfo |
| Run-time error information structure. More... | |
| struct | OSRTBuffer |
| Run-time message buffer structure. More... | |
| struct | OSRTBufSave |
| Structure to save the current message buffer state. More... | |
| struct | OSCTXT |
| Run-time context structure. More... | |
Defines | |
| #define | OSRTERRSTKSIZ 8 |
| #define | OSRTMAXERRPRM 5 |
| #define | OSDIAG 0x80000000 |
| #define | OSTRACE 0x40000000 |
| #define | OSDISSTRM 0x20000000 |
| #define | OSSAVEBUF 0x10000000 |
| #define | OSNOSTRMBACKOFF 0x8000000 |
| #define | OSRT_GET_FIRST_ERROR_INFO(pctxt) |
| #define | OSRT_GET_LAST_ERROR_INFO(pctxt) |
| #define | rtxCtxtGetMsgPtr(pctxt) (pctxt)->buffer.data |
| This macro returns the start address of an encoded message. | |
| #define | rtxCtxtGetMsgLen(pctxt) (pctxt)->buffer.byteIndex |
| This macro returns the length of an encoded message. | |
| #define | rtxCtxtTestFlag(pctxt, mask) ((pctxt->flags & mask) != 0) |
| This macro tests if the given bit flag is set in the context. | |
Typedefs | |
| typedef OSUINT32 | OSRTFLAGS |
| typedef int(* | OSFreeCtxtAppInfoPtr )(OSCTXT *pctxt) |
| typedef int(* | OSResetCtxtAppInfoPtr )(OSCTXT *pctxt) |
Functions | |
| EXTERNRT int | rtxInitContext (OSCTXT *pctxt) |
| This function initializes an OSCTXT block. | |
| EXTERNRT int | rtxInitContextBuffer (OSCTXT *pctxt, OSOCTET *bufaddr, size_t bufsiz) |
| This function assigns a message buffer to a context block. | |
| EXTERNRT int | rtxCtxtSetBufPtr (OSCTXT *pctxt, OSOCTET *bufaddr, size_t bufsiz) |
| This function is used to set the internal buffer pointer for in-memory encoding or decoding. | |
| EXTERNRT int | rtxCheckContext (OSCTXT *pctxt) |
| This function verifies that the given context structure is initialized and ready for use. | |
| EXTERNRT void | rtxFreeContext (OSCTXT *pctxt) |
| This function frees all dynamic memory associated with a context. | |
| EXTERNRT void | rtxCtxtSetFlag (OSCTXT *pctxt, OSUINT32 mask) |
| This function is used to set a processing flag within the context structure. | |
| EXTERNRT void | rtxCtxtClearFlag (OSCTXT *pctxt, OSUINT32 mask) |
| This function is used to clear a processing flag within the context structure. | |
Detailed Description
Context initialization functions handle the allocation, initialization, and destruction of context variables (variables of type OSCTXT).These variables hold all of the working data used during the process of encoding or decoding a message. The context provides thread safe operation by isolating what would otherwise be global variables within this structure. The context variable is passed from function to function as a message is encoded or decoded and maintains state information on the encoding or decoding process.
Define Documentation
|
|
This macro returns the length of an encoded message. Note that this macro will not work with ASN.1 BER in-memory encoding. In this case, the BER-specific version of the function must be used.
Definition at line 287 of file rtxContext.h. |
|
|
This macro returns the start address of an encoded message. If a static buffer was used, this is simply the start address of the buffer. If dynamic encoding was done, this will return the start address of the dynamic buffer allocated by the encoder. Note that this macro will not work with ASN.1 BER in-memory encoding. In this case, the BER-specific version of the function must be used.
Definition at line 277 of file rtxContext.h. |
|
|
This macro tests if the given bit flag is set in the context.
Definition at line 343 of file rtxContext.h. |
Function Documentation
|
|
This function verifies that the given context structure is initialized and ready for use.
|
|
||||||||||||
|
This function is used to clear a processing flag within the context structure.
|
|
||||||||||||||||
|
This function is used to set the internal buffer pointer for in-memory encoding or decoding. It must be called after the context variable is initialized before any other compiler generated or run-time library encode function.
|
|
||||||||||||
|
This function is used to set a processing flag within the context structure.
|
|
|
This function frees all dynamic memory associated with a context. This includes all memory allocated using the rtxMem functions using the given context parameter.
|
|
|
This function initializes an OSCTXT block. It sets all key working parameters to their correct initial state values. It is required that this function be invoked before using a context variable.
|
|
||||||||||||||||
|
This function assigns a message buffer to a context block. The block should have been previously initialized by rtxInitContext.
|
