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
rcdev.h
Go to the documentation of this file.
1 #ifndef RAYCOMPOSER_DEVICE_API_H
2 #define RAYCOMPOSER_DEVICE_API_H
3 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
45 #define RCAPI_VERSION 0x0106
46 
47 #if defined(_MSC_VER) || defined(__MINGW32__)
48 
49  #define RCCALL __stdcall
50  // Microsoft
51  #ifdef RCAPI_BUILD
52 
53  #define RCAPI __declspec(dllexport) __stdcall
54  #else
55 
56  #define RCAPI __declspec(dllimport) __stdcall
57  #endif
58 #else
59 
60  #define RCCALL
61  #if __GNUC__ >= 4
62 
63  #define RCAPI __attribute__ ((visibility ("default")))
64  #else
65 
66  #define RCAPI
67  #endif
68 #endif
69 
77  RCOk = 0,
87  RCErrorIO = -5,
92 };
93 
101  RCOutput = 0,
104 };
105 
114 struct RCPoint {
116  signed short x;
118  signed short y;
120  unsigned short red;
122  unsigned short green;
124  unsigned short blue;
126  unsigned short intensity;
128  unsigned short user1;
130  unsigned short user2;
131 };
132 
149 int RCAPI RCInit();
151 typedef int (RCCALL *TRCInit)();
152 
158 int RCAPI RCExit();
160 typedef int (RCCALL *TRCExit)();
161 
187 typedef int (RCCALL *TRCEnumerateDevices)();
188 
208 int RCAPI RCDeviceID(unsigned int index, char *deviceId, unsigned int maxLength);
210 typedef int (RCCALL *TRCDeviceID)(unsigned int, char *, unsigned int);
211 
234 int RCAPI RCOpenDevice(const char *deviceId);
236 typedef int (RCCALL *TRCOpenDevice)(const char *);
237 
238 
248 int RCAPI RCCloseDevice(int handle);
250 typedef int (RCCALL *TRCCloseDevice)(int);
251 
268 int RCAPI RCDeviceLabel(int handle, char *deviceLabel, unsigned int maxLength);
270 typedef int (RCCALL *TRCDeviceLabel)(int, char *, unsigned int);
271 
284 int RCAPI RCSetDeviceLabel(int handle, const char *deviceLabel);
286 typedef int (RCCALL *TRCSetDeviceLabel)(int, const char *);
287 
307 int RCAPI RCStartOutput(int handle);
309 typedef int (RCCALL *TRCStartOutput)(int);
310 
319 int RCAPI RCStopOutput(int handle);
321 typedef int (RCCALL *TRCStopOutput)(int);
322 
339 int RCAPI RCWaitForReady(int handle, int timeout);
341 typedef int (RCCALL *TRCWaitForReady)(int, int);
342 
350 int RCAPI RCMaxSpeed(int handle);
352 typedef int (RCCALL *TRCMaxSpeed)(int);
353 
369 int RCAPI RCWriteFrame(int handle, const struct RCPoint *points, unsigned int count, unsigned int speed, unsigned int repeat);
371 typedef int (RCCALL *TRCWriteFrame)(int, const struct RCPoint *, unsigned int, unsigned int, unsigned int);
372 
393 int RCAPI RCUniverseCount(int handle);
395 typedef int (RCCALL *TRCUniverseCount)(int);
396 
397 
418 int RCAPI RCUniverseQuery(int handle, unsigned int universeIndex, char *universeName, unsigned int maxLength, enum RCUniverseDirection *pUniverseDirection, unsigned int *pChannelCount);
420 typedef int (RCCALL *TRCUniverseQuery)(int, unsigned int, char *, unsigned int, enum RCUniverseDirection *, unsigned int *);
421 
434 int RCAPI RCUniverseWrite(int handle, unsigned int universeIndex, unsigned int startChannel, const unsigned char *data, unsigned int count);
436 typedef int (RCCALL *TRCUniverseWrite)(int, unsigned int, unsigned int, const unsigned char *, unsigned int);
437 
450 int RCAPI RCUniverseRead(int handle, unsigned int universeIndex, unsigned int startChannel, unsigned char *data, unsigned int count);
452 typedef int (RCCALL *TRCUniverseRead)(int, unsigned int, unsigned int, unsigned char *, unsigned int);
453 
463 int RCAPI RCUniverseUpdate(int handle, unsigned int universeIndex);
465 typedef int (RCCALL *TRCUniverseUpdate)(int, unsigned int);
466 
469 #ifdef __cplusplus
470 }
471 #endif
472 
473 #endif /* RAYCOMPOSER_DEVICE_API_H */
Vector Data Structure.
Definition: rcdev.h:114
int(RCCALL * TRCDeviceLabel)(int, char *, unsigned int)
Definition: rcdev.h:270
unsigned short intensity
Definition: rcdev.h:126
int(RCCALL * TRCCloseDevice)(int)
Definition: rcdev.h:250
signed short x
Definition: rcdev.h:116
#define RCCALL
Definition: rcdev.h:60
int(RCCALL * TRCUniverseRead)(int, unsigned int, unsigned int, unsigned char *, unsigned int)
Definition: rcdev.h:452
int RCAPI RCDeviceID(unsigned int index, char *deviceId, unsigned int maxLength)
Read Device ID.
int RCAPI RCSetDeviceLabel(int handle, const char *deviceLabel)
Set the device label.
Definition: rcdev.h:103
signed short y
Definition: rcdev.h:118
Definition: rcdev.h:101
int RCAPI RCStartOutput(int handle)
Start Laser Output.
int(RCCALL * TRCUniverseUpdate)(int, unsigned int)
Definition: rcdev.h:465
unsigned short red
Definition: rcdev.h:120
RCReturnCode
Error Codes.
Definition: rcdev.h:75
int(RCCALL * TRCWriteFrame)(int, const struct RCPoint *, unsigned int, unsigned int, unsigned int)
Definition: rcdev.h:371
int RCAPI RCUniverseRead(int handle, unsigned int universeIndex, unsigned int startChannel, unsigned char *data, unsigned int count)
Read from input universe.
Definition: rcdev.h:79
int(RCCALL * TRCUniverseCount)(int)
Definition: rcdev.h:395
int(RCCALL * TRCEnumerateDevices)()
Definition: rcdev.h:187
int RCAPI RCUniverseCount(int handle)
Query universe count of device.
int(RCCALL * TRCExit)()
Definition: rcdev.h:160
int(RCCALL * TRCWaitForReady)(int, int)
Definition: rcdev.h:341
int RCAPI RCUniverseUpdate(int handle, unsigned int universeIndex)
Flush Universe.
int RCAPI RCMaxSpeed(int handle)
Query maximum sampling rate of the device.
unsigned short green
Definition: rcdev.h:122
int(RCCALL * TRCUniverseQuery)(int, unsigned int, char *, unsigned int, enum RCUniverseDirection *, unsigned int *)
Definition: rcdev.h:420
int RCAPI RCExit()
De-Initialise DLL.
int RCAPI RCDeviceLabel(int handle, char *deviceLabel, unsigned int maxLength)
Read the device label.
int(RCCALL * TRCInit)()
Definition: rcdev.h:151
int RCAPI RCCloseDevice(int handle)
Close Device.
#define RCAPI
Definition: rcdev.h:66
Definition: rcdev.h:81
int(RCCALL * TRCStopOutput)(int)
Definition: rcdev.h:321
int RCAPI RCWriteFrame(int handle, const struct RCPoint *points, unsigned int count, unsigned int speed, unsigned int repeat)
Write Frame.
int(RCCALL * TRCStartOutput)(int)
Definition: rcdev.h:309
unsigned short user2
Definition: rcdev.h:130
int RCAPI RCOpenDevice(const char *deviceId)
Open Device.
int(RCCALL * TRCSetDeviceLabel)(int, const char *)
Definition: rcdev.h:286
Definition: rcdev.h:91
unsigned short blue
Definition: rcdev.h:124
int RCAPI RCStopOutput(int handle)
Stop Laser Output.
int RCAPI RCEnumerateDevices()
Find devices.
int RCAPI RCUniverseQuery(int handle, unsigned int universeIndex, char *universeName, unsigned int maxLength, enum RCUniverseDirection *pUniverseDirection, unsigned int *pChannelCount)
Query universe information.
Definition: rcdev.h:87
int RCAPI RCInit()
Initialise DLL.
RCUniverseDirection
Universe Direction.
Definition: rcdev.h:99
Definition: rcdev.h:77
int RCAPI RCUniverseWrite(int handle, unsigned int universeIndex, unsigned int startChannel, const unsigned char *data, unsigned int count)
Write to output universe.
Definition: rcdev.h:83
Definition: rcdev.h:89
int RCAPI RCWaitForReady(int handle, int timeout)
Wait for Buffer.
int(RCCALL * TRCMaxSpeed)(int)
Definition: rcdev.h:352
unsigned short user1
Definition: rcdev.h:128
int(RCCALL * TRCDeviceID)(unsigned int, char *, unsigned int)
Definition: rcdev.h:210
int(RCCALL * TRCUniverseWrite)(int, unsigned int, unsigned int, const unsigned char *, unsigned int)
Definition: rcdev.h:436
int(RCCALL * TRCOpenDevice)(const char *)
Definition: rcdev.h:236
Definition: rcdev.h:85