Context Management Functions
Context management 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.
- rtxInitContext - This is the first function that must be called to initialize a context block structure before it can be used as an argument in subsequent function calls. This function initializes all internal variables within the context to their start values.
- rtxInitContextBuffer - This function associates a memory buffer with a context. This memory buffer can be used to as the target for encoding an XML message or as the source to read from for decoding a message.
- rtxFreeContext - This function is used to free all working memory held within the context. All memory allocation done using memory management functions are tracked within the context. All of this memory can be released at once by calling this function. It should be the last function called when all work using a particular context variable is complete.
Copyright © Objective Systems 2002-2008 This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included. |
Objective Systems, Inc.55 Dowlin Forge RoadExton, Pennsylvania 19341 http://www.obj-sys.com Phone: (484) 875-9841 Toll-free: (877) 307-6855 (US only) Fax: (484) 875-9830 info@obj-sys.com |