Class ApiBuffer

Class Documentation

class ApiBuffer

This class contains API buffer functions.

Public Functions

ApiBuffer(WMX3Api *f)

Constructor to initialize an object of this class. The device created by the WMX3Api object passed to this constructor is used to execute API functions. Also see Devices.

ApiBuffer(const ApiBuffer &src)

Copy constructor to initialize an object of this class based on an existing object of this class. Also see Copy Operators.

ApiBuffer &operator=(const ApiBuffer &src)

Copy assignment operator to initialize an object of this class based on an existing object of this class. Also see Copy Operators.

ApiBuffer()

Constructor to initialize an object of this class with a self device. Also see Self Devices.

~ApiBuffer()

Destructor for this class.

bool IsDeviceValid()

Return TRUE if this class object has access to a device, and FALSE otherwise. A device is required to execute most functions in this class. If this function returns FALSE, a device can be created by calling the CreateDevice function from the WMX3Api object that was passed to the constructor of this class.

Return TRUE if this class object has access to a device, and FALSE otherwise. A device is required to execute most functions in this class. If this function returns FALSE, a device can be created by calling the CreateDevice function from the WMX3Api object that was passed to the constructor of this class.

WMX3APIFUNC GetVersion(int *pMajorVersion, int *pMinorVersion, int *pRevisionVersion, int *pFixVersion)

Get the version of the module rtdll.

Get the version of the module rtdll.

Parameters:
  • pMajorVersion[out] The major version number.

  • pMinorVersion[out] The minor version number.

  • pRevisionVersion[out] The revision version number.

  • pFixVersion[out] The fix version number.

WMX3APIFUNC CreateApiBuffer(unsigned int channel, unsigned int size)

Create a memory space for use with the API buffer. This function must be called before the API buffer functions can be used.

Create a memory space for use with the API buffer. This function must be called before the API buffer functions can be used.

This function creates a memory space for use with the API buffer. The API buffer stores data such as the API type and API arguments in this space. An API with large function arguments will require more space in the API buffer to store. The CommandQueueIsFull error will be returned when attempting to add an API to the buffer when there is not enough space. As API functions in the API buffer are executed, the memory space they occupied will be freed.

Remark

A larger memory space will allow more APIs to be stored in the API buffer.

The minimum size of the memory space is 262216 bytes. Specifying a smaller size will cause this function to return the RequestedBufferTooSmall error.

The maximum size of the memory space is 2GB-1Byte (2147483647 bytes). Specifying a larger size will cause this function to return the RequestedBufferTooLarge error.

The created memory space can be closed using FreeApiBuffer. It is not necessary to call the FreeApiBuffer function when closing the engine, as any open API buffer memory spaces are automatically closed when the engine closes.

See also

API Buffer

Parameters:
  • channel[in] The API buffer channel. This value must be between 0 and maxApiBufferChannel-1.

  • size[in] The size of the API buffer channel memory space in bytes.

WMX3APIFUNC CreateApiBuffer(unsigned int channel)

Create a memory space for use with the API buffer using the default memory size.

Create a memory space for use with the API buffer using the default memory size.

This function creates a memory space for use with the API buffer. See CreateApiBuffer for more information regarding the memory space of an API buffer channel.

Remark

Compared to CreateApiBuffer, this function creates a memory space with size equal to maxDefaultApiBufferSize.

Parameters:

channel[in] The API buffer channel. This value must be between 0 and maxApiBufferChannel-1.

WMX3APIFUNC CreateApiBuffer(unsigned int channel, unsigned int size, SizeUnit::T sizeUnit)

Create a memory space for use with the API buffer. The size of the memory space can be specified in one of several units.

Create a memory space for use with the API buffer. The size of the memory space can be specified in one of several units.

This function creates a memory space for use with the API buffer. See CreateApiBuffer for more information regarding the memory space of an API buffer channel.

Remark

Compared to CreateApiBuffer, the size of the memory space can be specified in one of several units. The units of the memory space has no effect on the API buffer operation. The minimum size of the memory space is 262144 bytes (or the equivalent in kilobytes or megabytes).

Parameters:
  • channel[in] The API buffer channel. This value must be between 0 and maxApiBufferChannel-1.

  • size[in] The size of the API buffer channel memory space. The units of the size is specified by the sizeUnit argument.

  • sizeUnit[in] The units of the size argument. The available options are Byte, Kilobyte, and Megabyte.

WMX3APIFUNC FreeApiBuffer(unsigned int channel)

Close an API buffer memory space.

Close an API buffer memory space.

This function closes an API buffer memory space created by CreateApiBuffer. API buffer memory spaces that remain open when the engine is closed will automatically be closed. An error will be returned if this function is called while the API buffer is executing.

Remark

WMX3APIFUNC StartRecordBufferChannel(unsigned int channel)

Start recording APIs to the API buffer channel.

Start recording APIs to the API buffer channel.

After calling this function, subsequent calls to WMX3 APIs (from any WMX3 library) from the device calling this function will cause the API to be stored in the API buffer instead of being executed immediately. The recorded API sequence can be executed using the Execute function.

Remark

WMX3 APIs related to API buffer control will not be stored in the API buffer. These APIs include:

Certain WMX3 APIs related to engine control or using a different data flow channel will not be stored in the API buffer while recording. These APIs include:

Some WMX3 APIs in the ApiBuffer class can only be added to the API buffer and cannot be executed directly. These APIs include:

Function arguments that return a value are ignored during API buffer execution. The API buffer is not suitable for functions with a main purpose of returning a value.

The buffer channel must have been allocated a memory space using the CreateApiBuffer beforehand.

The device information is stored in the WMX3Api class and not the ApiBuffer class. If multiple ApiBuffer objects are created passing in the same WMX3Api object, they will share the same device (and the same API buffer recording state).

If other threads are using the same device, API functions called by the other threads will also be appended to the API buffer instead of being executed. To prevent this, create a separate device that will be used to append API functions to the API buffer. A new device can be created using the CreateDevice function.

To stop recording APIs to the API buffer channel for this device, call the EndRecordBufferChannel function.

If this function is called while already recording API functions to the specified API buffer channel, this function will return the AlreadyRecordingForSpecifiedChannel error. If this function is called while recording API functions to a different API buffer channel, this function will change the recording channel to the specified channel.

See also

API Buffer

Parameters:

channel[in] The API buffer channel. This value must be between 0 and maxApiBufferChannel-1.

WMX3APIFUNC EndRecordBufferChannel()

End recording APIs to the API buffer channel.

End recording APIs to the API buffer channel.

After calling this function, subsequent calls to WMX3 APIs (from any WMX3 library) from the device calling this function will be executed normally.

Remark

To resume recording APIs to the API buffer channel for this device, call the StartRecordBufferChannel function.

If this function is called while not recording API functions to an API buffer channel, this function will return the NotRecording error.

WMX3APIFUNC GetRecordingBufferChannel(int *channel, unsigned char *enable)

Get the currently recording API buffer channel, if any.

Get the currently recording API buffer channel, if any.

This function can be used to obtain whether a device is currently recording APIs to the API buffer or executing them normally.

Remark

Parameters:
  • channel[out] A pointer to an int that will contain the API buffer channel that is currently recording APIs through the device calling this function. This will contain -1 if this device is not recording APIs to an API buffer channel.

  • enable[out] A pointer to an unsigned char that will contain 1 if the device calling this function is currently recording APIs to an API buffer channel and 0 if not.

WMX3APIFUNC Execute(unsigned int channel)

Execute an API buffer.

Execute an API buffer.

This function starts the execution an API buffer channel. APIs in the API buffer channel will be executed in the order that they were added to the buffer. Functions such as Wait can delay the execution of APIs, which may be useful if the API buffer contains several motions that must be executed one after the other after each motion completes.

Remark

It is possible to dynamically add more APIs to the API buffer as it executes. As long as there is a steady flow of new APIs, the API buffer can continue executing indefinitely. As the memory used to store APIs in the API buffer is limited, dynamically adding API functions to the API buffer can cause older APIs that have already executed to be overwritten. If this occurs, the API buffer cannot be rewound with Rewind.

This function will block until the API buffer channel starts (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that the API buffer channel has started executing APIs.

See also

API Buffer

Parameters:

channel[in] The API buffer channel to execute.

WMX3APIFUNC Halt(unsigned int channel)

Halt an API buffer.

Halt an API buffer.

Stops the execution of an API buffer. This function will stop the API buffer from further calling API functions from the buffer, but it will not stop the effects of APIs that have already been executed. For example, if this function is called after a motion API is executed from the API buffer, the motion will run to completion and will not stop.

Remark

After stopping an API buffer using this function, execution can be resumed from the next API function in the API buffer by calling the Execute API function again.

This function will block until the API buffer channel stops (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that the API buffer channel has stopped executing APIs.

If this function is called for an API buffer that is executing the Motion::Wait function, the API buffer will be stopped after the wait completes. For more information, see Halting Execution.

Parameters:

channel[in] The API buffer channel to halt.

WMX3APIFUNC Clear(unsigned int channel)

Clear an API buffer.

Clear an API buffer.

This function clears all APIs in the API buffer.

Remark

This function will block until the API buffer channel is cleared (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that the API buffer channel has been cleared.

Parameters:

channel[in] The API buffer channel to clear.

WMX3APIFUNC Rewind(unsigned int channel)

Rewind an API buffer.

Rewind an API buffer.

If ApiBufferState is Active, this function rewinds the API buffer to the beginning and executes it as if Execute had been called.

Remark

If ApiBufferState is Stop, this function rewinds the API buffer to the beginning so that it may be executed again using Execute.

Also see API Buffer Statuses section for state transitions.

If APIs are dynamically added to the buffer as the buffer executes, it is possible for older API commands to become overwritten by new commands if the old command has already executed and the buffer has run out of space to add the new command. If this occurs, the buffer cannot be rewound to the first command and the RewindFailedFirstCommandOverwritten error will be returned. The API buffer cannot be rewound until the buffer is cleared and a new API sequence recorded.

This function will block until the API buffer channel is rewound (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that the API buffer channel has been rewound.

Parameters:

channel[in] The API buffer channel to rewind.

WMX3APIFUNC ExecuteMultipleChannel(ApiBufferChannelSelection *pChannelSelection)

Execute multiple API buffer channels.

Execute multiple API buffer channels.

This function is similar to Execute, except it executes multiple API buffer channels at once.

Remark

When multiple API buffer channels should be started at the same time, this function should be used instead of calling Execute for each channel, as Execute is blocking and there will be an approximately 1ms delay between when subsequent API buffer channels start. When this function is used, all the specified API buffer channels will start typically within one cycle of each other. However, this function does not guarantee that all the specified API buffer channels start in the same cycle.

This function will block until all the specified API buffer channels start (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that all the specified API buffer channels have started executing APIs.

Parameters:

pChannelSelection[in] A pointer to a ApiBufferChannelSelection object that specifies the API buffer channels to execute.

WMX3APIFUNC HaltMultipleChannel(ApiBufferChannelSelection *pChannelSelection)

Halt multiple API buffer channels.

Halt multiple API buffer channels.

This function is similar to Halt, except it halts multiple API buffer channels at once.

Remark

When multiple API buffer channels should be stopped at the same time, this function should be used instead of calling Halt for each channel, as Halt is blocking and there will be an approximately 1ms delay between when subsequent API buffer channels stop. When this function is used, all the specified API buffer channels will stop typically within one cycle of each other. However, this function does not guarantee that all the specified API buffer channels stop in the same cycle.

This function will block until all the specified API buffer channels stop (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that all the specified API buffer channels have stopped executing APIs.

Parameters:

pChannelSelection[in] A pointer to a ApiBufferChannelSelection object that specifies the API buffer channels to halt.

WMX3APIFUNC ClearMultipleChannel(ApiBufferChannelSelection *pChannelSelection)

Clear multiple API buffer channels.

Clear multiple API buffer channels.

This function is similar to Clear, except it clears multiple API buffer channels at once.

Remark

When multiple API buffer channels should be cleared at the same time, this function should be used instead of calling Clear for each channel, as Clear is blocking and there will be an approximately 1ms delay between when subsequent API buffer channels are cleared. When this function is used, all the specified API buffer channels will be cleared typically within one cycle of each other. However, this function does not guarantee that all the specified API buffer channels are cleared in the same cycle.

This function will block until all the specified API buffer channels are cleared (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that all the specified API buffer channels have been cleared.

Parameters:

pChannelSelection[in] A pointer to a ApiBufferChannelSelection object that specifies the API buffer channels to clear.

WMX3APIFUNC RewindMultipleChannel(ApiBufferChannelSelection *pChannelSelection)

Rewind multiple API buffer channels.

Rewind multiple API buffer channels.

This function is similar to Rewind, except it rewinds multiple API buffer channels at once.

Remark

When multiple API buffer channels should be rewound at the same time, this function should be used instead of calling Rewind for each channel, as Rewind is blocking and there will be an approximately 1ms delay between when subsequent API buffer channels are rewound. When this function is used, all the specified API buffer channels will be rewound typically within one cycle of each other. However, this function does not guarantee that all the specified API buffer channels are rewound in the same cycle.

This function will block until all the specified API buffer channels are rewound (typically for 1ms). At the time that this function returns without any errors, any other function in this class can be called assuming that all the specified API buffer channels have been rewound.

Parameters:

pChannelSelection[in] A pointer to a ApiBufferChannelSelection object that specifies the API buffer channels to rewind.

WMX3APIFUNC GetStatus(unsigned int channel, ApiBufferStatus *pStatus)

Get the current status of an API buffer.

Get the current status of an API buffer.

This function will obtain the current status of an API buffer channel. This function should be called cyclically to continuously check the operation of the API buffer channel.

Remark

Parameters:
  • channel[in] The API buffer channel to get the status.

  • pStatus[out] A pointer to a ApiBufferStatus that will contain the current status of the API buffer.

WMX3APIFUNC SetOptions(unsigned int channel, ApiBufferOptions *pOptions)

Set options for an API buffer.

Set options for an API buffer.

This function will set the execution options of an API buffer channel. The execution options affect how the API buffer will be executed. See ApiBufferOptions for additional information regarding each available option.

Remark

If this function is not called, the default execution options will be used.

Parameters:
  • channel[in] The API buffer channel to set the options.

  • pOptions[in] A pointer to an object of the ApiBufferOptions class that contains execution options for the API buffer.

WMX3APIFUNC GetOptions(unsigned int channel, ApiBufferOptions *pOptions)

Get the currently applied options for an API buffer.

Get the currently applied options for an API buffer.

This function will get the currently applied execution options of an API buffer channel. The execution options are set using the SetOptions function.

Remark

If this function is called before calling the SetOptions function, the default execution options will be returned.

Parameters:
  • channel[in] The API buffer channel to get the options.

  • pOptions[out] A pointer to an object of the ApiBufferOptions class that will contain the execution options for the API buffer.

WMX3APIFUNC SetWatch(unsigned int channel, ApiBufferWatch *pWatch)

Set watch options for an API buffer. The watch function will stop the buffer execution when an error is detected.

Set watch options for an API buffer. The watch function will stop the buffer execution when an error is detected.

This function will set the watch options of an API buffer channel. When the watch function is enabled, the API buffer will stop execution of API functions in the buffer when one of the watched axes are in the servo off, offline, amp alarm, or limit switch triggered states. The watched axes are checked for these states every communication cycle.

Remark

When an watch error occurs, the API buffer will stop executing additional API functions, but the motion from API functions that have already been executed will not stop.

The watch options can be configured to execute another API buffer channel when an watch error occurs. The API buffer channel that is executed this way typically contains an error handling routine, such as stopping all axes or generating an emergency stop.

Watch function statuses, such as whether the watch error has occurred, the error code of the watch error, and the axis that triggered the watch error, can be obtained using the GetStatus function.

The watch function is disabled by default.

Parameters:
  • channel[in] The API buffer channel to set the watch options.

  • pWatch[in] A pointer to an object of the ApiBufferWatch that contains the watch options for the API buffer.

WMX3APIFUNC GetWatch(unsigned int channel, ApiBufferWatch *pWatch)

Get watch options for an API buffer. The watch function will stop the buffer execution when an error is detected.

Get watch options for an API buffer. The watch function will stop the buffer execution when an error is detected.

This function will get the currently applied watch options of an API buffer channel. The watch options are set using the SetWatch function.

Remark

If this function is called before calling the SetWatch function, the default watch options will be returned.

Parameters:
  • channel[in] The API buffer channel to get the watch options.

  • pWatch[out] A pointer to an object of the ApiBufferWatch that will contain the watch options for the API buffer.

WMX3APIFUNC Sleep(unsigned int milliseconds)

Add a sleep command to an API buffer.

Add a sleep command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

When this function is executed from inside an API buffer, the execution of the API buffer will stop for the specified amount of time.

This function can add delays in between API functions in the API buffer.

Parameters:

milliseconds[in] The length of the sleep command in milliseconds.

WMX3APIFUNC USleep(unsigned int microseconds)

Add a sleep command to an API buffer.

Add a sleep command to an API buffer.

This function is similar to the Sleep function, except the sleep time is specified in units of microseconds.

Remark

Parameters:

microseconds[in] The length of the sleep command in microseconds.

WMX3APIFUNC Wait(int axis)

Add a wait command to an API buffer.

Add a wait command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

When this function is executed from inside an API buffer, the execution of APIs will stop until the specified axis is in the Idle operation state.

This function can delay the execution of the next API in the API buffer until the motion command of an axis completes.

This function has the same effect as when the Wait(ApiBufferCondition* condition) function is called with the AxisIdle condition with the specified axis.

If the specified axis goes offline, generates an amp alarm, triggers a limit switch, or changes to servo off state, an ServoOffline, AxisAmpAlarm, AxisSoftLimit, AxisNearLimit, AxisExternalLimit, AxisHardLimit, or ServoOff error code will be generated and logged in the ApiBufferStatus. If the stopOnError option was set to 1 when calling the Execute function, the API buffer execution will stop when this occurs.

Parameters:

axis[in] The axis to wait to for.

WMX3APIFUNC Wait(AxisSelection *pAxisSelection)

Add a wait command to an API buffer.

Add a wait command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

When this function is executed from inside an API buffer, the execution of APIs will stop until all the axes in the specified set of axes are in the Idle operation state.

This function can delay the execution of the next API in the API buffer until the motion commands of multiple axes complete.

This function has the same effect as when the Wait(ApiBufferCondition* condition) function is called with the AxisIdle condition with the specified set of axes.

If any specified axis goes offline, generates an amp alarm, triggers a limit switch, or changes to servo off state, an ServoOffline, AxisAmpAlarm, AxisSoftLimit, AxisNearLimit, AxisExternalLimit, AxisHardLimit, or ServoOff error code will be generated and logged in the ApiBufferStatus. If the stopOnError option was set to 1 when calling the Execute function, the API buffer execution will stop when this occurs.

Parameters:

pAxisSelection[in] A set of axes to wait for.

WMX3APIFUNC Wait(ApiBufferCondition *condition)

Add a wait command to an API buffer.

Add a wait command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

When this function is executed from inside an API buffer, the execution of APIs will stop until the specified condition is satisfied.

This function can add variable length delays in between API functions in the API buffer. For example, the API buffer can be programmed to execute the next API in the buffer when the motion command of an axis completes.

For ApiBufferCondition types with one or more axis parameters, this function will monitor the specified axes for errors. If any specified axis goes offline, generates an amp alarm, triggers a limit switch, or changes to servo off state, an ServoOffline, AxisAmpAlarm, AxisSoftLimit, AxisNearLimit, AxisExternalLimit, AxisHardLimit, or ServoOff error code will be generated and logged in the ApiBufferStatus. If the stopOnError option is set to 1 and passed to the Execute function, the API buffer execution will stop when this occurs.

Parameters:

condition[in] A pointer to a ApiBufferCondition that specifies the wait condition.

WMX3APIFUNC FlowIf(ApiBufferCondition *condition, ApiBufferCondition *wait = NULL)

Add an “If” command to an API buffer.

Add an “If” command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

When this function is executed from inside an API buffer, the specified condition will be evaluated. If the condition evaluates to FALSE, all APIs in the API buffer sequence until the next “Else”, “Else If”, or “End If” command will be skipped. If the condition evaluates to TRUE, all APIs in the API buffer sequence until the next “Else”, “Else If”, or “End If” command will be executed normally.

“If” commands may be nested up to 100 levels. For example, the following sequence is allowed:

If If If Else EndIf Else If Else EndIf EndIf EndIf

An additional “wait” condition may be specified. If a “wait” condition is specified, the condition for the “If” command is only evaluated when the “wait” condition becomes TRUE. While the “wait” condition is FALSE, the execution of the API buffer sequence will stop and the evaluation of the “If” condition will be deferred.

Parameters:
  • condition[in] A pointer to a ApiBufferCondition that specifies the “If” condition.

  • wait[in] An optional parameter that specifies the condition at which the “If” condition is evaluated. If not specified, or if set to the default value of NULL, the condition will be evaluated immediately when the “If” command is encountered during the execution of the API buffer.

WMX3APIFUNC FlowElseIf(ApiBufferCondition *condition)

Add an “Else If” command to an API buffer.

Add an “Else If” command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

This command can be added between an “If” command and an “End If” command, and before any “Else” commands.

When this function is executed from inside an API buffer, the specified condition will be evaluated. If the condition evaluates to FALSE, all APIs in the API buffer sequence until the next “Else” or “End If” command will be skipped. If the condition evaluates to TRUE, all APIs in the API buffer sequence until the next “Else” or “End If” command will be executed normally.

Parameters:

condition[in] A pointer to a ApiBufferCondition that specifies the “Else If” condition.

WMX3APIFUNC FlowElse()

Add an “Else” command to an API buffer.

Add an “Else” command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

This command can be added between an “If” command and an “End If” command.

When this function is executed from inside an API buffer, all APIs between this command and the next “End If” command will be executed only if the preceding “If” or “Else If” command evaluates to FALSE. If the preceding “If” or “Else If” command evaluates to TRUE, then all APIs between this command and the next “End If” command will be skipped.

WMX3APIFUNC FlowEndIf()

Add an “End If” command to an API buffer.

Add an “End If” command to an API buffer.

This API may be added to an API buffer that is recording. This API will not have any effect when called while the device is not recording to an API buffer channel.

Remark

This command designates the end of an “If”…”Else If”…”Else”…”End If” sequence. APIs in the API buffer after this command will be executed normally.

Public Static Functions

static WMX3APIFUNC ErrorToString(int errCode, char *pString, unsigned int size)

Get a string representation of the specified error code.

Get a string representation of the specified error code.

This function returns a string representation of the specified error code. The error code must be defined in the ApiBufferErrorCode enum or the ErrorCode enum in the WMX3Api.h header. All errors returned by functions in class ApiBuffer will be defined in one of these enums. Errors returned by functions in other classes may not be defined in one of these enums, and when such errors are passed to this function, an ErrorCodeNotDefined error will be returned and pString will contain the string representation of this error.

Remark

If pString is too small to contain the entire string representation of the error code, pString will be set to an empty string. An array size of 256 characters will be enough to hold all string representations.

This function is static, and may be called without declaring an instance of the ApiBuffer class or creating a device.

Parameters:
  • errCode[in] The error code to get the string representation of.

  • pString[in] A char array that will contain the string representation of the error.

  • size[in] The size of the char array in number of characters.

static WMX3APIFUNC ErrorToString(int errCode, wchar_t *pString, unsigned int size)

Get a string representation of the specified error code.

Get a string representation of the specified error code.

This function is a variation of ErrorToString that accepts a wchar_t array. Use this function when using Unicode character sets.

Remark

Parameters:
  • errCode[in] The error code to get the string representation of.

  • pString[in] A wchar_t array that will contain the string representation of the error.

  • size[in] The size of the wchar_t array in number of characters.

static WMX3APIFUNC ApiLogToString(unsigned char *pLogData, unsigned int logDataSize, char *pString, unsigned int size)

Get a string representation of the raw data of an API log.

Get a string representation of the raw data of an API log.

This function converts the raw data for one API function call that was extracted from the API log with the GetApiLogData function.

Remark

Parameters:
  • pLogData[in] A char array containing the raw data.

  • logDataSize[in] The size of the pLogData char array. This size must be equal to or greater than the size of the raw data.

  • pString[out] A char array that will contain the string representation of the raw data of the API log.

  • size[in] The size of the pString char array in number of characters.

static WMX3APIFUNC ApiLogToString(unsigned char *pLogData, unsigned int logDataSize, wchar_t *pString, unsigned int size)

Get a string representation of the raw data of an API log.

Get a string representation of the raw data of an API log.

This function is a variation of ApiLogToString that accepts a wchar_t array. Use this function when using Unicode character sets.

Remark

Parameters:
  • pLogData[in] A char array containing the raw data.

  • logDataSize[in] The size of the char array. This size must be equal to or greater than the size of the raw data.

  • pString[out] A wchar_t array that will contain the string representation of the raw data of the API log.

  • size[out] The size of the pString wchar_t array in number of characters.

static WMX3APIFUNC GetLibVersion(int *pMajorVersion, int *pMinorVersion, int *pRevisionVersion, int *pFixVersion)

Get the version of the module library.

Get the version of the module library.

This function is static, and may be called without declaring an instance of this class or creating a device.

Remark

Parameters:
  • pMajorVersion[out] The major version number.

  • pMinorVersion[out] The minor version number.

  • pRevisionVersion[out] The revision version number.

  • pFixVersion[out] The fix version number.