PEXDecodeOCs - Decode Output Commands


Synopsis

 
   PEXOCData *PEXDecodeOCs(
         int float_format,
         unsigned long oc_count,
         unsigned long length,
         char *encoded_ocs
   )
 

Arguments

float_format
The floating-point format of the encoded output commands (PEXIEEE_754_32, PEXDEC_F_Floating, PEXIEEE_754_64 or PEXDEC_D_Floating).

oc_count
The number of output commands represented in the encoded output commands.

length
The length, in bytes, of the encoded output commands.

encoded_ocs
A pointer to the encoded output commands.

Returns

A pointer to the decoded output commands; a null pointer if unsuccessful or if zero output commands are specified.

Description

Invoke PEXDecodeOCs to convert an encoded stream of output commands into an array of PEXOCData data structures.

This function has no visible effect.

The data typically passed as parameters to output attribute or primitive functions is returned in memory allocated by PEXlib. Invoke PEXFreeOCData to deallocate the memory.

If your implementation does not support the specified floating-point format, then this function returns a null pointer.

The PEXDecodeOCs function builds PEXOCData data structures based on the protocol output command type. You should decode the rest of the output command based on its type and not the PEXlib function that originally created the output command. Many output commands are generated by more than one PEXlib function.

Invoke PEXCountOCs to determine the number of output commands in the encoded list if that information is not already available.

Errors

None.

See Also

For a list of PEXlib Encode and Decode functions and related topics, see Output Command Encode and Decode.