General Information about Sending Encoded OC's


For a list of related topics and functions, see Sending Encoded Output Commands.

Some applications have access to encoded output commands, such as for archives or client-side data storage obtained via PEXEncodeOCs or PEXFetchElements. The functions described in this section provide a way for the application to send this data directly instead of decoding the data and calling the appropriate output primitive or attribute functions.

There are two ways provided for sending encoded output commands. The first is PEXSendOCs which is useful if the application has the complete list of encoded output commands available in contiguous memory. The second is a set of functions:

These are useful if the application has data which is already encoded or which the application wishes to encode "on-the-fly", but which is not in contiguous memory. You can invoke PEXCopyBytesToOC to have PEXlib copy individual pieces which are in contiguous memory. Invoke PEXGetOCAddr to get an address where the application can copy data on its own. Both of these functions copy data directly into the transport buffer, possibly avoiding one data copy from the application data into a format necessary to directly call the PEXlib output command functions.

None of these functions will convert floating-point formats. It is up to the application to determine which formats are supported by the PEX implementation and do any necessary conversion on the data. For example, if the PEX implementation does not support the floating-point format native to the application's machine, then the application must convert any native float values into a format supported by the PEX implementation.

For complete information on protocol format, see the PEX Protocol Specification.