RayComposer Device API Documentation  1.6
Public API for RayComposer laser show DAC interfaces.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Device Enumeration

Detect devices and query their IDs. More...

Typedefs

typedef int(RCCALLTRCEnumerateDevices )()
 
typedef int(RCCALLTRCDeviceID )(unsigned int, char *, unsigned int)
 

Functions

int RCAPI RCEnumerateDevices ()
 Find devices. More...
 
int RCAPI RCDeviceID (unsigned int index, char *deviceId, unsigned int maxLength)
 Read Device ID. More...
 

Detailed Description

Detect devices and query their IDs.

Typedef Documentation

typedef int(RCCALL * TRCEnumerateDevices)()

Function type definition for RCEnumerateDevices()

typedef int(RCCALL * TRCDeviceID)(unsigned int, char *, unsigned int)

Function type definition for RCEnumerateDevices()

Function Documentation

int RCAPI RCEnumerateDevices ( )

Find devices.

Looks for RayComposer devices and update the internal device list. The number of devices in the device list is returned. Use RCDeviceID() afterwards to query the device list.

For RayComposer NET devices please allow a small amount of time to pass after RCInit() and before calling RCEnumerateDevices(). Usually a delay of 10ms is sufficient for devices to be discovered on the network.

Returns
The number of devices found. If an error occured, a negative value indicating one of the RCReturnCode error codes is returned.
int RCAPI RCDeviceID ( unsigned int  index,
char *  deviceId,
unsigned int  maxLength 
)

Read Device ID.

Read the device ID string for the device list entry specified by index. RCEnumerateDevices() must have been called before this function can be used.

Parameters
indexThe device list index. Range is 0 to the number reported by RCEnumerateDevices() - 1.
deviceIdPointer to a buffer where the device ID will be stored. The Device ID is an UTF-8 encoded printable string like "RayComposer USB 1234"
maxLengthSize of buffer passed for deviceId. At most deviceIdMaxLength bytes will be written to the buffer, including terminating nul character. If deviceIdMaxLength is 0 the required buffer length will be returned, but nothing will be written to the deviceId buffer.
Returns
The number of charactes written to deviceId, including terminating nul character. If an error occured, a negative value indicating one of the RCReturnCode error codes is returned.