diff options
Diffstat (limited to 'ofxHelios/libs/libheliosdac')
| -rw-r--r-- | ofxHelios/libs/libheliosdac/.DS_Store | bin | 0 -> 6148 bytes | |||
| -rw-r--r-- | ofxHelios/libs/libheliosdac/includes/HeliosDac.h | 169 | ||||
| -rw-r--r-- | ofxHelios/libs/libheliosdac/includes/HeliosDacAPI.h | 99 | ||||
| -rw-r--r-- | ofxHelios/libs/libheliosdac/includes/OpenLaserShowController.def | 21 | ||||
| -rw-r--r-- | ofxHelios/libs/libheliosdac/includes/OpenLaserShowControllerV1.0.0-Mod.h | 335 | ||||
| -rw-r--r-- | ofxHelios/libs/libheliosdac/lib/.DS_Store | bin | 0 -> 6148 bytes | |||
| -rwxr-xr-x | ofxHelios/libs/libheliosdac/lib/osx/libHeliosDacAPI.dylib | bin | 0 -> 24208 bytes |
7 files changed, 624 insertions, 0 deletions
diff --git a/ofxHelios/libs/libheliosdac/.DS_Store b/ofxHelios/libs/libheliosdac/.DS_Store Binary files differnew file mode 100644 index 0000000..38e1f0d --- /dev/null +++ b/ofxHelios/libs/libheliosdac/.DS_Store diff --git a/ofxHelios/libs/libheliosdac/includes/HeliosDac.h b/ofxHelios/libs/libheliosdac/includes/HeliosDac.h new file mode 100644 index 0000000..ed1c5fc --- /dev/null +++ b/ofxHelios/libs/libheliosdac/includes/HeliosDac.h @@ -0,0 +1,169 @@ +/* +SDK for Helios Laser DAC class, HEADER +By Gitle Mikkelsen +gitlem@gmail.com + +Dependencies: +Libusb 1.0 (GNU Lesser General Public License, see libusb.h) + +Standard: C++14 +git repo: https://github.com/Grix/helios_dac.git + +BASIC USAGE: +1. Call OpenDevices() to open devices, returns number of available devices. +2. To send a frame to the DAC, first call GetStatus(). If the function returns ready (1), + then you can call WriteFrame(). The status should be polled until it returns ready. + It can and sometimes will fail to return ready on the first try. +3. To stop output, use Stop(). To restart output you must send a new frame as described above. +4. When the DAC is no longer needed, destroy the instance (destructors will free everything and close the connection) + +The DAC is double-buffered. When it receives its first frame, it starts outputting it. When a second frame is sent to +the DAC while the first frame is being played, the second frame is stored in the DACs memory until the first frame +finishes playback, at which point the second, buffered frame will start playing. If the DAC finished playback of a frame +without having received and buffered a second frame, it will by default loop the first frame until a new frame is +received (but the flag HELIOS_FLAG_SINGLE_MODE will make it stop playback instead). +The GetStatus() function actually checks whether or not the buffer on the DAC is empty or full. If it is full, the DAC +cannot receive a new frame until the currently playing frame finishes, freeing up the buffer. +*/ + +#pragma once + +#include "libusb.h" +#include <cstring> +#include <cstdint> +#include <thread> +#include <mutex> +#include <vector> +#include <memory> +#include <chrono> + +#define HELIOS_SDK_VERSION 6 + +#define HELIOS_MAX_POINTS 0x1000 +#define HELIOS_MAX_RATE 0xFFFF +#define HELIOS_MIN_RATE 7 + +#define HELIOS_SUCCESS 1 +#define HELIOS_ERROR -1 //functions return this if something went wrong + +#define HELIOS_FLAGS_DEFAULT 0 +#define HELIOS_FLAGS_START_IMMEDIATELY (1 << 0) +#define HELIOS_FLAGS_SINGLE_MODE (1 << 1) +#define HELIOS_FLAGS_DONT_BLOCK (1 << 2) + +//usb properties +#define HELIOS_VID 0x1209 +#define HELIOS_PID 0xE500 +#define EP_BULK_OUT 0x02 +#define EP_BULK_IN 0x81 +#define EP_INT_OUT 0x06 +#define EP_INT_IN 0x83 + +#ifdef _DEBUG +#define LIBUSB_LOG_LEVEL LIBUSB_LOG_LEVEL_WARNING +#else +#define LIBUSB_LOG_LEVEL LIBUSB_LOG_LEVEL_NONE +#endif + +//point data structure +typedef struct +{ + std::uint16_t x; //12 bit (from 0 to 0xFFF) + std::uint16_t y; //12 bit (from 0 to 0xFFF) + std::uint8_t r; //8 bit (from 0 to 0xFF) + std::uint8_t g; //8 bit (from 0 to 0xFF) + std::uint8_t b; //8 bit (from 0 to 0xFF) + std::uint8_t i; //8 bit (from 0 to 0xFF) +} HeliosPoint; + +class HeliosDac +{ +public: + + HeliosDac(); + ~HeliosDac(); + + //unless otherwise specified, functions return HELIOS_SUCCESS if OK, and HELIOS_ERROR if something went wrong. + + //initializes drivers, opens connection to all devices. + //Returns number of available devices. + //NB: To re-scan for newly connected DACs after this function has once been called before, you must first call CloseDevices() + int OpenDevices(); + + //closes and frees all devices + int CloseDevices(); + + //writes and outputs a frame to the speficied dac + //devNum: dac number (0 to n where n+1 is the return value from OpenDevices() ) + //pps: rate of output in points per second + //flags: (default is 0) + // Bit 0 (LSB) = if 1, start output immediately, instead of waiting for current frame (if there is one) to finish playing + // Bit 1 = if 1, play frame only once, instead of repeating until another frame is written + // Bit 2 = if 1, don't let WriteFrame() block execution while waiting for the transfer to finish + // (NB: then the function might return 1 even if it fails) + // Bit 3-7 = reserved + //points: pointer to point data. See point structure declaration earlier in this document + //numOfPoints: number of points in the frame + int WriteFrame(unsigned int devNum, unsigned int pps, std::uint8_t flags, HeliosPoint* points, unsigned int numOfPoints); + + //Gets status of DAC, 1 means DAC is ready to receive frame, 0 means it is not + int GetStatus(unsigned int devNum); + + //Returns firmware version of DAC + int GetFirmwareVersion(unsigned int devNum); + + //Gets name of DAC (populates name with max 32 characters) + int GetName(unsigned int devNum, char* name); + + //Sets name of DAC (name must be max 31 characters incl. null terminator) + int SetName(unsigned int devNum, char* name); + + //Stops output of DAC until new frame is written (NB: blocks for 100ms) + int Stop(unsigned int devNum); + + //Sets shutter level of DAC + int SetShutter(unsigned int devNum, bool level); + + //Erase the firmware of the DAC, allowing it to be updated by accessing the SAM-BA bootloader + int EraseFirmware(unsigned int devNum); + +private: + + class HeliosDacDevice //individual dac, interal use + { + public: + + HeliosDacDevice(libusb_device_handle*); + ~HeliosDacDevice(); + int SendFrame(unsigned int pps, std::uint8_t flags, HeliosPoint* points, unsigned int numOfPoints); + int GetStatus(); + int GetFirmwareVersion(); + int GetName(char* name); + int SetName(char* name); + int SetShutter(bool level); + int Stop(); + int EraseFirmware(); + + private: + + int DoFrame(); + void FrameHandler(); + int SendControl(std::uint8_t* buffer, unsigned int bufferSize); + + struct libusb_transfer* interruptTransfer = NULL; + struct libusb_device_handle* usbHandle; + std::mutex frameLock; + bool frameReady = false; + int firmwareVersion = 0; + char name[32]; + bool closed = true; + std::uint8_t* frameBuffer; + unsigned int frameBufferSize; + int frameResult = -1; + + }; + + std::vector<std::unique_ptr<HeliosDacDevice>> deviceList; + std::mutex threadLock; + bool inited = false; +}; diff --git a/ofxHelios/libs/libheliosdac/includes/HeliosDacAPI.h b/ofxHelios/libs/libheliosdac/includes/HeliosDacAPI.h new file mode 100644 index 0000000..abf762d --- /dev/null +++ b/ofxHelios/libs/libheliosdac/includes/HeliosDacAPI.h @@ -0,0 +1,99 @@ +/* +Helios Laser DAC SDK shared library, HEADER +By Gitle Mikkelsen +gitlem@gmail.com + +Dependencies: +Libusb 1.0 (GNU Lesser General Public License, see libusb.h) +HeliosDAC class +OpenLaserShowControllerV1.0.0 header and .def file (only on windows) + +Standard: C++14 + +BASIC USAGE: +1. Call OpenDevices() or OLSC_Initialize() to open devices, returns number of available devices +2. To send a new frame, first call GetStatus() or OLSC_GetStatus(). If the function returns ready + (1 for GetStatus, OLSC_STATUS_BUFFER_EMPTY for OLSC_GetStatus), then you can call WriteFrame() + or OLSC_WriteFrame() / OLSC_WriteFrameEx(). + The status should be polled until it returns ready. It can and sometimes will fail to return ready on the first try. +3. To stop output, use Stop() or OLSC_Pause(). To restart output you must send a new frame as described above. +4. When the DAC is no longer needed, free it using CloseDevices() or OLSC_Shutdown() +See OpenLaserShowControllerV1.0.0-Mod.h for documentation on OLSC_* functions. Not recommended for cross-platform apps + +The DAC is double-buffered. When it receives its first frame, it starts outputting it. When a second frame is sent to +the DAC while the first frame is being played, the second frame is stored in the DACs memory until the first frame +finishes playback, at which point the second, buffered frame will start playing. If the DAC finished playback of a frame +without having received and buffered a second frame, it will by default loop the first frame until a new frame is +received (but the flag HELIOS_FLAG_SINGLE_MODE will make it stop playback instead). +The GetStatus() function actually checks whether or not the buffer on the DAC is empty or full. If it is full, the DAC +cannot receive a new frame until the currently playing frame finishes, freeing up the buffer. +*/ + +#pragma once + +#include "HeliosDac.h" + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + #include "OpenLaserShowControllerV1.0.0-Mod.h" + #define HELIOS_EXPORT extern "C" __declspec (dllexport) +#else + #define HELIOS_EXPORT extern "C" +#endif + +bool inited = false; +bool flipX = true; + +HeliosDac* dacController; + +//initializes drivers, opens connection to all devices. +//Returns number of available devices. +//NB: To re-scan for newly connected DACs after this function has once been called before, you must first call CloseDevices() +HELIOS_EXPORT int OpenDevices(); + +//Gets status from the specified dac. +//Return 1 if ready to receive new frame, 0 if not, -1 if communcation failed +HELIOS_EXPORT int GetStatus(unsigned int dacNum); + +//writes and outputs a frame to the speficied dac +//dacNum: dac number (0 to n where n+1 is the return value from OpenDevices() ) +//pps: rate of output in points per second +//flags: (default is 0) +// Bit 0 (LSB) = if true, start output immediately, instead of waiting for current frame (if there is one) to finish playing +// Bit 1 = if true, play frame only once, instead of repeating until another frame is written +// Bit 2-7 = reserved +//points: pointer to point data. See point structure documentation in HeliosDac.h +//numOfPoints: number of points in the frame +//returns 1 if successful +HELIOS_EXPORT int WriteFrame(unsigned int dacNum, int pps, std::uint8_t flags, HeliosPoint* points, int numOfPoints); + +//sets the shutter of the specified dac. +//value 1 = shutter open, value 0 = shutter closed +//returns 1 if successful +HELIOS_EXPORT int SetShutter(unsigned int dacNum, bool shutterValue); + +//Returns the firmware version number. Returns -1 if communcation failed. +HELIOS_EXPORT int GetFirmwareVersion(unsigned int dacNum); + +//gets a descriptive name of the specified dac +//name is max 32 bytes long, char needs to be able to hold 32 bytes +//returns 1 if successful, return 0 if the proper name couldn't be fetched from the DAC, but name is +//still populated with a fallback numbered name based on order of discovery by the library +//return -1 if unsuccessful and name is not populated. +HELIOS_EXPORT int GetName(unsigned int dacNum, char* name); + +//gets a descriptive name of the specified dac +//name is max 31 bytes long including null terminator +//returns 1 if successful, return 0 if the transfer failed +HELIOS_EXPORT int SetName(unsigned int dacNum, char* name); + +//stops, blanks and centers output on the specified dac +//returns 1 if successful +HELIOS_EXPORT int Stop(unsigned int dacNum); + +//closes connection to all dacs and frees resources +//should be called when library is no longer needed (program exit for example) +HELIOS_EXPORT int CloseDevices(); + +//Clears the GPNVM1 bit on the DACs microcontroller. This will cause the DAC to boot into SAM-BA bootloader +//which allows new firmware to be uploaded over USB. +HELIOS_EXPORT int EraseFirmware(unsigned int dacNum); diff --git a/ofxHelios/libs/libheliosdac/includes/OpenLaserShowController.def b/ofxHelios/libs/libheliosdac/includes/OpenLaserShowController.def new file mode 100644 index 0000000..f4b2882 --- /dev/null +++ b/ofxHelios/libs/libheliosdac/includes/OpenLaserShowController.def @@ -0,0 +1,21 @@ +LIBRARY HeliosLaserDAC +EXPORTS + OLSC_GetAPIVersion + OLSC_GetDeviceCapabilities + OLSC_GetDeviceCount + OLSC_GetInterfaceName + OLSC_GetLastErrorNumber + OLSC_GetStatus + OLSC_Initialize + OLSC_Pause + OLSC_Play + OLSC_ReadDMX + OLSC_ReadTTL + OLSC_SetCallback + OLSC_Shutdown + OLSC_Shutter + OLSC_WriteDMX + OLSC_WriteFrame + OLSC_WriteFrameEx + OLSC_WriteTTL + diff --git a/ofxHelios/libs/libheliosdac/includes/OpenLaserShowControllerV1.0.0-Mod.h b/ofxHelios/libs/libheliosdac/includes/OpenLaserShowControllerV1.0.0-Mod.h new file mode 100644 index 0000000..6249b93 --- /dev/null +++ b/ofxHelios/libs/libheliosdac/includes/OpenLaserShowControllerV1.0.0-Mod.h @@ -0,0 +1,335 @@ +/* + +OpenLaserShowController.h : main header file for the OpenLaserShowController DLL + +[!! Slightly modified for Helios] +-> Changes: + - Not dependent on windows.h + - stdint types + - OLSC_SetCallback removed + - OPEN_LASER_SHOW_DEVICE_API_VERSION defined + +Copyright (c) 2009 Dennis Kromhout, Chris Favreau, Andreas Unger + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +*/ + +// **************************************************************************************************************** +// ** Open Laser Show Controler Version 1 API +// **************************************************************************************************************** + +#ifndef __OPENLASERSHOWCONTROLLER_H__ +#define __OPENLASERSHOWCONTROLLER_H__ + +#include <stdint.h> + +#pragma pack(1) + +// **************************************************************************************************************** +// ** Constants +// **************************************************************************************************************** + +#define OPEN_LASER_SHOW_DEVICE_API_VERSION 1 + +// Shutter State +#define LASER_SHOW_DEVICE_SHUTTER_STATE_ON 0 +#define LASER_SHOW_DEVICE_SHUTTER_STATE_OFF 1 + +// Standard Errors +// TODO - add errors to this list so we can be more verbose in describing the particular error that occurred. +#define OLSC_ERROR_SUCCESS 1 +#define OLSC_ERROR_NONE 0 +#define OLSC_ERROR_INVALID_PARAMETER -1 +#define OLSC_ERROR_FAILED -2 + +// Status Bits +// Status Clear +#define OLSC_STATUS_NONE 0x00000000 +// Bit 0 = Buffer Full +#define OLSC_STATUS_BUFFER_FULL 0x00000001 +// Bit 1 = Buffer Empty +#define OLSC_STATUS_BUFFER_EMPTY 0x00000002 +// Bit 2 = DMX Out Complete +#define OLSC_STATUS_DMX_OUT_COMPLETE 0x00000004 +// Bit 3 = DMX In Ready +#define OLSC_STATUS_DMX_IN_READY 0x00000008 +// Bit 4 = TTL Out Complete +#define OLSC_STATUS_TTL_OUT_COMPLETE 0x00000010 +// Bit 5 = TLL In Ready +#define OLSC_STATUS_TTL_IN_READY 0x00000020 +// Bit 6 = Resreved +// Bit 7 = Reserved +// Bit 8 = Reserved +// Bit 9-30 = Reserved +// Bit 31 = An Error Occured +#define OLSC_STATUS_ERROR 0x80000000 + +// **************************************************************************************************************** +// ** Data Structures +// **************************************************************************************************************** + +struct LASER_SHOW_DEVICE_CAPABILITIES +{ + // Device Name + char name[1024]; + // Device Version + int version_major; + int version_minor; + // Min Speed/Max Speed + int min_speed; + int max_speed; + // Min Frame Size/Max Frame Size + int min_frame_size; + int max_frame_size; + // DMX In/Out? + bool has_dmx_in; + bool has_dmx_out; + // TTL In/Out? + bool has_ttl_in; + bool has_ttl_out; + // X/Y Resolution (8 to 16 bits) + int xy_resolution; + // Color Resolution (1 to 16 bits) + int color_resolution; + // Uses callbacks? + bool uses_callbacks; +}; + + +struct LASER_SHOW_DEVICE_POINT +{ + std::uint16_t x; //16bit + std::uint16_t y; //16bit + std::uint16_t r; //8bit !! + std::uint16_t g; //8bit !! + std::uint16_t b; //8bit !! + std::uint16_t i; //8bit !! +}; + + +struct LASER_SHOW_DEVICE_FRAME +{ + int display_speed; + int point_count; + struct LASER_SHOW_DEVICE_POINT *points; +}; + +// **************************************************************************************************************** +// ** Function Prototypes +// **************************************************************************************************************** + +// Comment out if this .H file is part of an application +// This needs to be defined if this .H file is part of a driver DLL +// *** BE SURE TO DEFINE OLSC_EXPORTS if you are writing an OLSC Driver DLL +#define OLSC_EXPORTS 1 + +#ifdef OLSC_EXPORTS +#define OLSC_API __declspec(dllexport) +#else +#define OLSC_API __declspec(dllimport) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// OLSC_GetAPIVersion +// Inputs: None +// Outputs: Returns a single integer that represents the version number +// Description: Returns the version of the OpenDAC API +// so we don't make any critical errors when using this DLL +OLSC_API int WINAPI OLSC_GetAPIVersion(void); + +// OLSC_GetInterfaceName +// Inputs: Pointer to a string at least 64 characters in length +// Outputs: Returns success or failure +// Description: Returns the string name of the OpenDC Interface +OLSC_API int WINAPI OLSC_GetInterfaceName(char *pString); + +// OLSC_Initialize +// Inputs: None +// Outputs: Returns the number of available devices. +// Description: Initializes the hardware +OLSC_API int WINAPI OLSC_Initialize(void); + +// OLSC_Shutdown +// Inputs: None +// Outputs: Returns success or failure +// Description: Shuts down all devices +OLSC_API int WINAPI OLSC_Shutdown(void); + +// OLSC_GetDeviceCount +// Inputs: None +// Outputs: Returns the number of available devices +// Description: Has to be called AFTER Intialize has been called. Thsi function +// is to be used to query the number of available devices without calling +// intialize again and again +OLSC_API int WINAPI OLSC_GetDeviceCount(void); + +// OLSC_GetCapabilities +// Inputs: device Number, device capabilties structure to be filled in +// Outputs: Returns success or failure +// Description: Gets the capabilties of each device attached +// Caps: +// Device Name +// Device Version +// Min Speed/Max Speed +// Min Frame Size/Max Frame Size +// DMX In/Out? +// TTL In/Out? +// X/Y Resolution (8 to 16 bits) +// Color Resolution (1 to 16 bits) +// Uses callbacks? +// Some reserved space for future use +OLSC_API int WINAPI OLSC_GetDeviceCapabilities(int device_number, struct LASER_SHOW_DEVICE_CAPABILITIES &device_capabilities); + +// OLSC_GetLastErrorNumber +// Inputs: device number, error string pointer, and string length max. +// Outputs: error number, and actual error string +// Description: Get the string and/or number associated with the last error +OLSC_API int WINAPI OLSC_GetLastErrorNumber(int device_number, int &number, char *string_pointer, int string_length); + +// OLSC_Play +// Inputs: device number +// Outputs: Returns success or failure +// Description: Starts the output on a particular device or all devices +OLSC_API int WINAPI OLSC_Play(int device_number); + +// OLSC_Pause +// Inputs: device number +// Outputs: Returns success or failure +// Description: Stops the output on a particular device or all devices +OLSC_API int WINAPI OLSC_Pause(int device_number); + +// OLSC_Shutter +// Inputs: device number, shutter state (LASER_SHOW_DEVICE_SHUTTER_STATE) +// Outputs: Returns success or failure +// Description: Turns the laser show device's shutter On/Off +OLSC_API int WINAPI OLSC_Shutter(int device_number, int state); + +// OLSC_WriteFrameEx +// Inputs: device number, display speed (pps), point count, point to array of LASER_SHOW_DEVICE_POINTs +// Outputs: Returns success or failure +// Description: +// Writes a frame to a particular device or all devices +// Point Array: +// X 16 bit unsigned +// Y 16 bit unsigned +// R 16 bit unsigned +// G 16 bit unsigned +// B 16 bit unsigned +// I 16 bit unsigned +// +// ** Any frame that is written will be displayed until another frame is written to take its place or the Output is Paused +// +OLSC_API int WINAPI OLSC_WriteFrameEx(int device_number, int display_speed, int point_count, struct LASER_SHOW_DEVICE_POINT *points); + +// OLSC_WriteFrame +// Inputs: device number, frame structure (LASER_SHOW_DEIVCE_FRAME) +// Outputs: Returns success or failure +// Description: +// Writes a frame to a particular device or all devices +// Pass in a frame: +// Point Count +// Display Speed PPS +// Point Array: +// X 16 bit unsigned +// Y 16 bit unsigned +// R 16 bit unsigned +// G 16 bit unsigned +// B 16 bit unsigned +// I 16 bit unsigned +// +// ** Any frame that is written will be displayed until another frame is written to take its place or the Output is Paused +// +OLSC_API int WINAPI OLSC_WriteFrame(int device_number, struct LASER_SHOW_DEVICE_FRAME frame); + +// OLSC_GetStatus() +// Inputs: device number, status DWORD +// Outputs: Returns success or failure +// Description: +// Gets the status of a particular device +// Can be used for polling or in conjunction with Windows Message Callback +// Status Structure or Bit Mask: +// Bit 0 = Buffer Full +// Bit 1 = Buffer Empty +// Bit 2 = DMX Out Complete +// Bit 3 = DMX In Ready +// Bit 4 = TTL Out Complete +// Bit 5 = TLL In Ready +// Bit 6 = Resreved +// Bit 7 = Reserved +// Bit 8 = Reserved +// Bit 9-30 = Reserved +// Bit 31 = An Error Occured +OLSC_API int WINAPI OLSC_GetStatus(int device_number, uint32_t &status); + + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + #include <Windows.h> + // OLSC_SetCallback() + // Inputs: device number, parent window handle (for SendMessage), message DWORD + // Outputs: Returns success or failure + // Description: + // Sets the call back window parent handle and windows message to send to run the callback + // and set the call back notification mask bits per the GetStatus mask. The Callback message + // will return the Device Number in the wParam and the Status mask in the lParam. + // We all work in windows right? + // This interface is optional in the DLL and in the application. The DLL writers should take this into account. + // So if you use the callback ... be able to function without it... it is used for efficiency. + OLSC_API int WINAPI OLSC_SetCallback(int device_number, HWND parent_window_handle, uint32_t message); +#endif + +// OLSC_WriteDMX() +// Inputs: device number, start address, data pointer, data length +// Outputs: Returns success or failure +// Description: +// Writes DMX data to a particular device + OLSC_API int WINAPI OLSC_WriteDMX(int device_number, int start_address, std::uint8_t *data_pointer, int length); + +// OLSC_ReadDMX() +// Inputs: device number, start address, data pointer, data length +// Outputs: Returns success or failure +// Description: +// Reads DMX data from a particular device + OLSC_API int WINAPI OLSC_ReadDMX(int device_number, int start_address, std::uint8_t *data_pointer, int length); + +// OLSC_WriteTTL() +// Inputs: device number, data DWORD (up to 32 bits of TTL outputs) +// Outputs: Returns success or failure +// Description: +// Writes TTL data from a particular device +OLSC_API int WINAPI OLSC_WriteTTL(int device_number, uint32_t data); + +// OLSC_ReadTTL() +// Inputs: device number, data DWORD (up to 32 bits of TTL inputs) +// Outputs: Returns success or failure +// Description: +// Reads TTL data from a particular device +OLSC_API int WINAPI OLSC_ReadTTL(int device_number, uint32_t &data); + +#ifdef __cplusplus +} +#endif + +#endif // __OPENLASERSHOWCONTROLLER_H__ diff --git a/ofxHelios/libs/libheliosdac/lib/.DS_Store b/ofxHelios/libs/libheliosdac/lib/.DS_Store Binary files differnew file mode 100644 index 0000000..eb14d43 --- /dev/null +++ b/ofxHelios/libs/libheliosdac/lib/.DS_Store diff --git a/ofxHelios/libs/libheliosdac/lib/osx/libHeliosDacAPI.dylib b/ofxHelios/libs/libheliosdac/lib/osx/libHeliosDacAPI.dylib Binary files differnew file mode 100755 index 0000000..2544dff --- /dev/null +++ b/ofxHelios/libs/libheliosdac/lib/osx/libHeliosDacAPI.dylib |
