LsHardDevKit.h
Go to the documentation of this file.
27 #define DHDK_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
34 #define DHDK_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
62 typedef uintptr_t DHDK_UINT;//32 bits integer on 32 bits machine, 64bits integer on 64bits machine
145 DHDK_PUBLIC bool WINAPI DHDK_getDeviceTypeName(DHDK_DEVICE_HANDLE fhDevice, char *buffer, DHDK_UINT size);
154 DHDK_PUBLIC bool WINAPI DHDK_getDeviceName(DHDK_DEVICE_HANDLE hDevice, char *buffer, DHDK_UINT size);
163 DHDK_PUBLIC bool WINAPI DHDK_getProductName(DHDK_DEVICE_HANDLE fhDevice, char *productName, DHDK_UINT size);
207 DHDK_PUBLIC DHDK_UINT WINAPI DHDK_getButtonState(DHDK_DEVICE_HANDLE hDevice, DHDK_UINT iButton);
217 DHDK_PUBLIC bool WINAPI DHDK_getButtonName(DHDK_DEVICE_HANDLE hDevice, DHDK_UINT iButton, char *buttonName, DHDK_UINT size);
234 DHDK_PUBLIC DHDK_DMX_UNIVERSE_HANDLE WINAPI DHDK_getDmxUniverse(DHDK_DEVICE_HANDLE hDevice, DHDK_UINT universeNumber);
252 DHDK_PUBLIC DHDK_UINT WINAPI DHDK_getDmxUniverseFeatures(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse);
260 DHDK_PUBLIC bool WINAPI DHDK_configureDmxUniverse(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, DHDK_UINT mode);
277 DHDK_PUBLIC bool WINAPI DHDK_sendDmx(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, const unsigned char *dmxBuffer, DHDK_UINT size = 512);
287 DHDK_PUBLIC DHDK_UINT WINAPI DHDK_receiveDmx(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, unsigned char *dmxBuffer, DHDK_UINT size = 512);
306 DHDK_PUBLIC DHDK_SHOW_HANDLE WINAPI DHDK_createCsaShow(DHDK_UINT nbChannels, DHDK_DEVICE_HANDLE hDevice);
323 DHDK_PUBLIC DHDK_SCENE_HANDLE WINAPI DHDK_createCsaStep(DHDK_SHOW_HANDLE hShow, DHDK_SCENE_HANDLE scene);
402 DHDK_PUBLIC bool WINAPI DHDK_getEnglishNameForSceneCounter(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex, char *sceneName, DHDK_UINT size);
411 DHDK_PUBLIC DHDK_SCENE_HANDLE WINAPI DHDK_getSceneFromCounter(DHDK_SHOW_HANDLE hShow, DHDK_UINT counter);
437 DHDK_PUBLIC bool WINAPI DHDK_setValueChannel(DHDK_UINT aIndex, uint8_t aValue, DHDK_STEP_HANDLE hStep);
446 DHDK_PUBLIC bool WINAPI DHDK_setFadeTransitionChannel(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex, bool aFade);
455 DHDK_PUBLIC bool WINAPI DHDK_hasFadeTransitionChannel(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex);
536 DHDK_PUBLIC bool WINAPI DHDK_setTriggerAddressToScene(DHDK_SCENE_HANDLE hScene, DHDK_UINT address);
562 DHDK_PUBLIC bool WINAPI DHDK_addTimeTrigger(DHDK_SHOW_HANDLE hShow, DHDK_SCENE_HANDLE hScene, DHDK_TIME_TRIGGER_HANDLE hTimeTrigger);
578 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_createTimeTriggerPeriodDayPeriodHour(DHDK_UINT fromMonth, DHDK_UINT fromDay, DHDK_UINT fromHour, DHDK_UINT fromMinute, DHDK_UINT toMonth, DHDK_UINT toDay, DHDK_UINT toHour, DHDK_UINT toMinute, DHDK_UINT repeatHour, DHDK_UINT repeatMinute);
592 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_createTimeTriggerSpecificDayPeriodHour(DHDK_UINT month, DHDK_UINT day, DHDK_UINT fromHour, DHDK_UINT fromMinute, DHDK_UINT toHour, DHDK_UINT toMinute, DHDK_UINT eachHour, DHDK_UINT eachMinute);
604 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_createTimeTriggerPeriodDaySpecificHour(DHDK_UINT fromMonth, DHDK_UINT fromDay, DHDK_UINT toMonth, DHDK_UINT toDay, DHDK_UINT hour, DHDK_UINT minute);
614 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_createTimeTriggerSpecificDaySpecificHour(DHDK_UINT month, DHDK_UINT day, DHDK_UINT hour, DHDK_UINT minute);
626 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_createTimeTriggerEveryDayPeriodHour(DHDK_UINT fromHour, DHDK_UINT fromMinute, DHDK_UINT toHour, DHDK_UINT toMinute, DHDK_UINT eachHour, DHDK_UINT eachMinute);
634 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_createTimeTriggerEveryDayEveryHour(DHDK_UINT hour, DHDK_UINT minute);
643 DHDK_PUBLIC bool WINAPI DHDK_getTimeTriggerDescription(DHDK_TIME_TRIGGER_HANDLE hTimeTrigger, char *timeTriggerString, DHDK_UINT size);
652 DHDK_PUBLIC DHDK_TIME_TRIGGER_HANDLE WINAPI DHDK_getTimeTrigger(DHDK_UINT aIndex, DHDK_SCENE_HANDLE hScene);
DHDK_UINT DHDK_getMaxStandAloneChannels(DHDK_DEVICE_HANDLE hDevice)
Returns the max channels for a device in stand alone mode.
bool DHDK_deleteCsaStep(DHDK_UINT aIndex, DHDK_SCENE_HANDLE hScene)
Deletes a step from the given scene.
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerSpecificDayPeriodHour(DHDK_UINT month, DHDK_UINT day, DHDK_UINT fromHour, DHDK_UINT fromMinute, DHDK_UINT toHour, DHDK_UINT toMinute, DHDK_UINT eachHour, DHDK_UINT eachMinute)
Creates a time trigger for a specific day and a period hour.
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerEveryDayEveryHour(DHDK_UINT hour, DHDK_UINT minute)
Creates a time trigger for every day and every hour.
DHDK_DEVICE_HANDLE DHDK_getDevice(DHDK_UINT iDevice)
Returns the handle for the given device index.
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerPeriodDayPeriodHour(DHDK_UINT fromMonth, DHDK_UINT fromDay, DHDK_UINT fromHour, DHDK_UINT fromMinute, DHDK_UINT toMonth, DHDK_UINT toDay, DHDK_UINT toHour, DHDK_UINT toMinute, DHDK_UINT repeatHour, DHDK_UINT repeatMinute)
Creates a time trigger for period day and period hour.
DHDK_UINT DHDK_getDeviceSerial(DHDK_DEVICE_HANDLE hDevice)
Returns the device serial.
DHDK_UINT DHDK_getMaxSceneCount(DHDK_DEVICE_HANDLE hDevice)
Get the maximum number of scenes that the device can handle.
bool DHDK_setFadeTransitionChannel(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex, bool aFade)
DHDK_setFadeTransitionChannel.
DHDK_UINT DHDK_ChannelsCount(DHDK_STEP_HANDLE hStep)
Get the number of channels computed in a step.
DHDK_UINT DHDK_getCountTimeTrigger(DHDK_SCENE_HANDLE hScene)
Returns the number of time triggers of a scene.
bool DHDK_hasFadeTransitionChannel(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex)
Tells whether or not the show hShow has a fading transition for the channel aIndex.
DHDK_TIME_TRIGGER_HANDLE DHDK_getTimeTrigger(DHDK_UINT aIndex, DHDK_SCENE_HANDLE hScene)
Returns the handle of time trigger index for a specific scene.
DHDK_UINT DHDK_getDmxUniverseFeatures(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse)
Give support of Dmx universe as bitfield.
void DHDK_closeDevice(DHDK_DEVICE_HANDLE hDevice)
Stops the communication with the device.
DHDK_UINT DHDK_getDeviceProtocol(DHDK_DEVICE_HANDLE hDevice)
Returns the protocol of the device.
DHDK_SCENE_HANDLE DHDK_createCsaScene(DHDK_SHOW_HANDLE hShow)
Creates a scene for the given show and returns the handle of the scene.
DHDK_UINT DHDK_getButtonState(DHDK_DEVICE_HANDLE hDevice, DHDK_UINT iButton)
Returns the state of button on the device.
DHDK_UINT DHDK_getButtonCount(DHDK_DEVICE_HANDLE hDevice)
Returns number of buttons on the device.
DHDK_UINT DHDK_getLiveChannelsCount(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse)
Returns the number of channels the given universe can output/input in live mode.
DHDK_UINT DHDK_getDeviceCount()
Returns the number of devices enumerated on your system.
bool DHDK_getDeviceTypeName(DHDK_DEVICE_HANDLE fhDevice, char *buffer, DHDK_UINT size)
Gets the name of the type of the device (Hardware Name)
DHDK_SCENE_HANDLE DHDK_getSceneFromCounter(DHDK_SHOW_HANDLE hShow, DHDK_UINT counter)
Get a particular scene handle with a counter.
DHDK_HANDLE DHDK_DMX_UNIVERSE_HANDLE
DMX universe handle.
Definition: LsHardDevKit.h:69
bool DHDK_openDevice(DHDK_DEVICE_HANDLE hDevice)
Opens the communication with the device.
bool DHDK_addTriggerPortToScene(DHDK_SCENE_HANDLE hScene, DHDK_UINT port)
Set the port trigger to the scene hScene.
DHDK_UINT DHDK_getMaxChannels(DHDK_DEVICE_HANDLE hDevice)
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerSpecificDaySpecificHour(DHDK_UINT month, DHDK_UINT day, DHDK_UINT hour, DHDK_UINT minute)
Creates a time trigger for a specific day and a specific hour.
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerPeriodDaySpecificHour(DHDK_UINT fromMonth, DHDK_UINT fromDay, DHDK_UINT toMonth, DHDK_UINT toDay, DHDK_UINT hour, DHDK_UINT minute)
Creates a time trigger for a period day and specific hour.
void DHDK_init(DHDK_UINT protocol, const char *aSoftwareName)
First function to call on start up.
bool DHDK_getButtonName(DHDK_DEVICE_HANDLE hDevice, DHDK_UINT iButton, char *buttonName, DHDK_UINT size)
Gets the button's name.
bool DHDK_setTriggerAddressToScene(DHDK_SCENE_HANDLE hScene, DHDK_UINT address)
Set the port trigger address to the scene hScene.
bool DHDK_getEnglishNameForSceneCounter(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex, char *sceneName, DHDK_UINT size)
Gets the english name of a scene.
bool DHDK_getDeviceName(DHDK_DEVICE_HANDLE hDevice, char *buffer, DHDK_UINT size)
Gets the name of the device.
DHDK_UINT DHDK_getCountStep(DHDK_SCENE_HANDLE hScene)
Get steps count for the given scene.
DHDK_UINT DHDK_getAddressTrigger(DHDK_SCENE_HANDLE hScene)
Returns the address for the trigger.
bool DHDK_sendDmx(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, const unsigned char *dmxBuffer, DHDK_UINT size=512)
Sends DMX signal.
DHDK_UINT DHDK_getValueChannel(DHDK_UINT aIndex, DHDK_STEP_HANDLE hStep)
Get channel for a step.
DHDK_SCENE_HANDLE DHDK_createCsaStep(DHDK_SHOW_HANDLE hShow, DHDK_SCENE_HANDLE scene)
Creates a step for a specific scene.
DHDK_SHOW_HANDLE DHDK_createCsaShow(DHDK_UINT nbChannels, DHDK_DEVICE_HANDLE hDevice)
Creates a show with a number of channels specified.
bool DHDK_isStandAloneSupported(DHDK_DEVICE_HANDLE hDevice)
Tells whether the device supports standalone mode or not.
DHDK_UINT DHDK_getMaxSceneIndex(DHDK_SHOW_HANDLE hShow)
Get the max scene index.
DHDK_SCENE_HANDLE DHDK_getScene(DHDK_SHOW_HANDLE hShow, DHDK_UINT index)
Returns the scene at index from the show hShow.
DHDK_STEP_HANDLE DHDK_getStep(DHDK_UINT index, DHDK_SCENE_HANDLE hScene)
Get a step from a scene.
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerEveryDayPeriodHour(DHDK_UINT fromHour, DHDK_UINT fromMinute, DHDK_UINT toHour, DHDK_UINT toMinute, DHDK_UINT eachHour, DHDK_UINT eachMinute)
Creates a time trigger for every day and period hour.
bool DHDK_setHoldTime(DHDK_STEP_HANDLE hStep, DHDK_UINT holdTime)
Set hold time for a step.
bool DHDK_setValueChannel(DHDK_UINT aIndex, uint8_t aValue, DHDK_STEP_HANDLE hStep)
Set channel for a step.
DHDK_HANDLE DHDK_TIME_TRIGGER_HANDLE
Time trigger handle.
Definition: LsHardDevKit.h:72
DHDK_UINT DHDK_getMaxPortTriggerCount(DHDK_DEVICE_HANDLE hDevice)
Returns the max port triggers count that the device can handle.
bool DHDK_getTimeTriggerDescription(DHDK_TIME_TRIGGER_HANDLE hTimeTrigger, char *timeTriggerString, DHDK_UINT size)
Retrieve the description of time trigger.
bool DHDK_setFadeTime(DHDK_STEP_HANDLE hStep, DHDK_UINT fadeTime)
Set fade time for a step.
DHDK_UINT DHDK_receiveDmx(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, unsigned char *dmxBuffer, DHDK_UINT size=512)
Pool dmx receive buffer.
bool DHDK_deleteCsaScene(DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex)
Deletes a scene represented by its index.
bool DHDK_addTimeTrigger(DHDK_SHOW_HANDLE hShow, DHDK_SCENE_HANDLE hScene, DHDK_TIME_TRIGGER_HANDLE hTimeTrigger)
Add a time trigger.
bool DHDK_getProductName(DHDK_DEVICE_HANDLE fhDevice, char *productName, DHDK_UINT size)
Gets the name of commercial product used.
DHDK_DMX_UNIVERSE_HANDLE DHDK_getDmxUniverse(DHDK_DEVICE_HANDLE hDevice, DHDK_UINT universeNumber)
Returns the handle for the given universe number.
DHDK_UINT DHDK_getDmxUniverseCount(DHDK_DEVICE_HANDLE hDdevice)
Returns the device's DMX universes count.
bool DHDK_configureDmxUniverse(DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, DHDK_UINT mode)
Configures a DMX universe as output or input.