LsHardDevKit.h File Reference

LsHardDevKit header file. More...

#include "DHDK_ErrorCode.h"
#include <stdint.h>
Include dependency graph for LsHardDevKit.h:

Go to the source code of this file.

Macros

#define WINAPI
 
#define DHDK_PUBLIC
 
#define DHDK_API_VERSION   1
 
#define DHDK_UINT_ERROR   ((DHDK_UINT)((unsigned long)-1))
 
#define DHDK_INVALID_HANDLE   ((DHDK_HANDLE)((unsigned long)-1))
 
#define DHDK_DASUSB   ((DHDK_UINT)1)
 
#define DHDK_DASNET   ((DHDK_UINT)2)
 
#define DHDK_ALL   ((DHDK_UINT)((unsigned long)-1))
 
#define DHDK_DMXOUT   ((DHDK_UINT)1)
 
#define DHDK_DMXIN   ((DHDK_UINT)2)
 

Typedefs

typedef uintptr_t DHDK_UINT
 
typedef DHDK_UINT DHDK_HANDLE
 
typedef DHDK_HANDLE DHDK_DEVICE_HANDLE
 Device handle. More...
 
typedef DHDK_HANDLE DHDK_DMX_UNIVERSE_HANDLE
 DMX universe handle. More...
 
typedef DHDK_HANDLE DHDK_SHOW_HANDLE
 Show handle. More...
 
typedef DHDK_HANDLE DHDK_SCENE_HANDLE
 Scene handle. More...
 
typedef DHDK_HANDLE DHDK_TIME_TRIGGER_HANDLE
 Time trigger handle. More...
 
typedef DHDK_HANDLE DHDK_STEP_HANDLE
 Step handle. More...
 

Functions

void DHDK_init (DHDK_UINT protocol, const char *aSoftwareName)
 First function to call on start up. More...
 
void DHDK_deinit ()
 To call when your application is leaving. More...
 
bool DHDK_enumerate ()
 Lists the devices available on your system. More...
 
DHDK_UINT DHDK_getDeviceCount ()
 Returns the number of devices enumerated on your system. More...
 
DHDK_DEVICE_HANDLE DHDK_getDevice (DHDK_UINT iDevice)
 Returns the handle for the given device index. More...
 
bool DHDK_openDevice (DHDK_DEVICE_HANDLE hDevice)
 Opens the communication with the device. More...
 
void DHDK_closeDevice (DHDK_DEVICE_HANDLE hDevice)
 Stops the communication with the device. More...
 
DHDK_UINT DHDK_getDeviceProtocol (DHDK_DEVICE_HANDLE hDevice)
 Returns the protocol of the device. More...
 
bool DHDK_getDeviceTypeName (DHDK_DEVICE_HANDLE fhDevice, char *buffer, DHDK_UINT size)
 Gets the name of the type of the device (Hardware Name) More...
 
bool DHDK_getDeviceName (DHDK_DEVICE_HANDLE hDevice, char *buffer, DHDK_UINT size)
 Gets the name of the device. More...
 
bool DHDK_getProductName (DHDK_DEVICE_HANDLE fhDevice, char *productName, DHDK_UINT size)
 Gets the name of commercial product used. More...
 
DHDK_UINT DHDK_getDeviceSerial (DHDK_DEVICE_HANDLE hDevice)
 Returns the device serial. More...
 
DHDK_UINT DHDK_getPort (DHDK_DEVICE_HANDLE hDevice)
 Returns bitfield for active ports. More...
 
DHDK_UINT DHDK_getButtonCount (DHDK_DEVICE_HANDLE hDevice)
 Returns number of buttons on the device. More...
 
DHDK_UINT DHDK_getMaxPortTriggerCount (DHDK_DEVICE_HANDLE hDevice)
 Returns the max port triggers count that the device can handle. More...
 
DHDK_UINT DHDK_getButtonState (DHDK_DEVICE_HANDLE hDevice, DHDK_UINT iButton)
 Returns the state of button on the device. More...
 
bool DHDK_getButtonName (DHDK_DEVICE_HANDLE hDevice, DHDK_UINT iButton, char *buttonName, DHDK_UINT size)
 Gets the button's name. More...
 
DHDK_UINT DHDK_getDmxUniverseCount (DHDK_DEVICE_HANDLE hDdevice)
 Returns the device's DMX universes count. More...
 
DHDK_DMX_UNIVERSE_HANDLE DHDK_getDmxUniverse (DHDK_DEVICE_HANDLE hDevice, DHDK_UINT universeNumber)
 Returns the handle for the given universe number. More...
 
DHDK_UINT DHDK_getDmxUniverseFeatures (DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse)
 Give support of Dmx universe as bitfield. More...
 
bool DHDK_configureDmxUniverse (DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, DHDK_UINT mode)
 Configures a DMX universe as output or input. More...
 
DHDK_UINT DHDK_getLiveChannelsCount (DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse)
 Returns the number of channels the given universe can output/input in live mode. More...
 
bool DHDK_sendDmx (DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, const unsigned char *dmxBuffer, DHDK_UINT size=512)
 Sends DMX signal. More...
 
DHDK_UINT DHDK_receiveDmx (DHDK_DMX_UNIVERSE_HANDLE hDmxUniverse, unsigned char *dmxBuffer, DHDK_UINT size=512)
 Pool dmx receive buffer. More...
 
bool DHDK_isStandAloneSupported (DHDK_DEVICE_HANDLE hDevice)
 Tells whether the device supports standalone mode or not. More...
 
DHDK_SHOW_HANDLE DHDK_createCsaShow (DHDK_UINT nbChannels, DHDK_DEVICE_HANDLE hDevice)
 Creates a show with a number of channels specified. More...
 
DHDK_SCENE_HANDLE DHDK_createCsaScene (DHDK_SHOW_HANDLE hShow)
 Creates a scene for the given show and returns the handle of the scene. More...
 
DHDK_SCENE_HANDLE DHDK_createCsaStep (DHDK_SHOW_HANDLE hShow, DHDK_SCENE_HANDLE scene)
 Creates a step for a specific scene. More...
 
bool DHDK_deleteCsaScene (DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex)
 Deletes a scene represented by its index. More...
 
bool DHDK_deleteCsaStep (DHDK_UINT aIndex, DHDK_SCENE_HANDLE hScene)
 Deletes a step from the given scene. More...
 
DHDK_UINT DHDK_getMaxChannels (DHDK_DEVICE_HANDLE hDevice)
 
DHDK_UINT DHDK_getMaxStandAloneChannels (DHDK_DEVICE_HANDLE hDevice)
 Returns the max channels for a device in stand alone mode. More...
 
bool DHDK_writeDemoShow (DHDK_DEVICE_HANDLE hDevice)
 Writes the demo show. More...
 
DHDK_UINT DHDK_getCountStep (DHDK_SCENE_HANDLE hScene)
 Get steps count for the given scene. More...
 
DHDK_UINT DHDK_getSceneCount (DHDK_SHOW_HANDLE hShow)
 Get scenes count. More...
 
DHDK_UINT DHDK_getMaxSceneIndex (DHDK_SHOW_HANDLE hShow)
 Get the max scene index. More...
 
DHDK_SCENE_HANDLE DHDK_getScene (DHDK_SHOW_HANDLE hShow, DHDK_UINT index)
 Returns the scene at index from the show hShow. More...
 
bool DHDK_getEnglishNameForSceneCounter (DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex, char *sceneName, DHDK_UINT size)
 Gets the english name of a scene. More...
 
DHDK_SCENE_HANDLE DHDK_getSceneFromCounter (DHDK_SHOW_HANDLE hShow, DHDK_UINT counter)
 Get a particular scene handle with a counter. More...
 
DHDK_STEP_HANDLE DHDK_getStep (DHDK_UINT index, DHDK_SCENE_HANDLE hScene)
 Get a step from a scene. More...
 
DHDK_UINT DHDK_getMaxSceneCount (DHDK_DEVICE_HANDLE hDevice)
 Get the maximum number of scenes that the device can handle. More...
 
bool DHDK_setValueChannel (DHDK_UINT aIndex, uint8_t aValue, DHDK_STEP_HANDLE hStep)
 Set channel for a step. More...
 
bool DHDK_setFadeTransitionChannel (DHDK_SHOW_HANDLE hShow, DHDK_UINT aIndex, bool aFade)
 DHDK_setFadeTransitionChannel. More...
 
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. More...
 
DHDK_UINT DHDK_getValueChannel (DHDK_UINT aIndex, DHDK_STEP_HANDLE hStep)
 Get channel for a step. More...
 
DHDK_UINT DHDK_ChannelsCount (DHDK_STEP_HANDLE hStep)
 Get the number of channels computed in a step. More...
 
bool DHDK_deleteShow (DHDK_SHOW_HANDLE hShow)
 Delete the current show. More...
 
bool DHDK_setFadeTime (DHDK_STEP_HANDLE hStep, DHDK_UINT fadeTime)
 Set fade time for a step. More...
 
DHDK_UINT DHDK_getFadeTime (DHDK_STEP_HANDLE hStep)
 Get fade time for a step. More...
 
bool DHDK_setHoldTime (DHDK_STEP_HANDLE hStep, DHDK_UINT holdTime)
 Set hold time for a step. More...
 
DHDK_UINT DHDK_getHoldTime (DHDK_STEP_HANDLE hStep)
 Get wait time for a step. More...
 
bool DHDK_writeShow (DHDK_SHOW_HANDLE hShow, DHDK_DEVICE_HANDLE hDevice)
 Write a show. More...
 
bool DHDK_addTriggerPortToScene (DHDK_SCENE_HANDLE hScene, DHDK_UINT port)
 Set the port trigger to the scene hScene. More...
 
bool DHDK_setTriggerAddressToScene (DHDK_SCENE_HANDLE hScene, DHDK_UINT address)
 Set the port trigger address to the scene hScene. More...
 
DHDK_UINT DHDK_getAddressTrigger (DHDK_SCENE_HANDLE hScene)
 Returns the address for the trigger. More...
 
bool DHDK_addTimeTrigger (DHDK_SHOW_HANDLE hShow, DHDK_SCENE_HANDLE hScene, DHDK_TIME_TRIGGER_HANDLE hTimeTrigger)
 Add a time trigger. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerEveryDayEveryHour (DHDK_UINT hour, DHDK_UINT minute)
 Creates a time trigger for every day and every hour. More...
 
bool DHDK_getTimeTriggerDescription (DHDK_TIME_TRIGGER_HANDLE hTimeTrigger, char *timeTriggerString, DHDK_UINT size)
 Retrieve the description of time trigger. More...
 
DHDK_TIME_TRIGGER_HANDLE DHDK_getTimeTrigger (DHDK_UINT aIndex, DHDK_SCENE_HANDLE hScene)
 Returns the handle of time trigger index for a specific scene. More...
 
DHDK_UINT DHDK_getCountTimeTrigger (DHDK_SCENE_HANDLE hScene)
 Returns the number of time triggers of a scene. More...
 
DHDK_UINT DHDK_getLastError ()
 Returns the last error raised. More...
 

Detailed Description

LsHardDevKit header file.

CALLING CONVENTION:

  • on WINDOWS STDCALL is used (like all Microsoft Win32 API)
  • on other operating systems, the default CDECL calling convention is used

THREADING
All functions are thread-safe except initialisation function DHDK_init and finalization function DHDK_deinit

Macro Definition Documentation

◆ DHDK_ALL

#define DHDK_ALL   ((DHDK_UINT)((unsigned long)-1))

Enumerate both USB and network devices

◆ DHDK_API_VERSION

#define DHDK_API_VERSION   1

◆ DHDK_DASNET

#define DHDK_DASNET   ((DHDK_UINT)2)

Enumerate network devices

◆ DHDK_DASUSB

#define DHDK_DASUSB   ((DHDK_UINT)1)

Enumerate USB devices

◆ DHDK_DMXIN

#define DHDK_DMXIN   ((DHDK_UINT)2)

DMX in mode

◆ DHDK_DMXOUT

#define DHDK_DMXOUT   ((DHDK_UINT)1)

DMX out mode

◆ DHDK_INVALID_HANDLE

#define DHDK_INVALID_HANDLE   ((DHDK_HANDLE)((unsigned long)-1))

◆ DHDK_PUBLIC

#define DHDK_PUBLIC

◆ DHDK_UINT_ERROR

#define DHDK_UINT_ERROR   ((DHDK_UINT)((unsigned long)-1))

◆ WINAPI

#define WINAPI

Typedef Documentation

◆ DHDK_DEVICE_HANDLE

Device handle.

◆ DHDK_DMX_UNIVERSE_HANDLE

DMX universe handle.

◆ DHDK_HANDLE

◆ DHDK_SCENE_HANDLE

Scene handle.

◆ DHDK_SHOW_HANDLE

Show handle.

◆ DHDK_STEP_HANDLE

Step handle.

◆ DHDK_TIME_TRIGGER_HANDLE

Time trigger handle.

◆ DHDK_UINT

typedef uintptr_t DHDK_UINT

Function Documentation

◆ DHDK_addTimeTrigger()

bool DHDK_addTimeTrigger ( DHDK_SHOW_HANDLE  hShow,
DHDK_SCENE_HANDLE  hScene,
DHDK_TIME_TRIGGER_HANDLE  hTimeTrigger 
)

Add a time trigger.

Parameters
hShow
hScene
hTimeTrigger
Returns
true if succeeded; false otherwise

◆ DHDK_addTriggerPortToScene()

bool DHDK_addTriggerPortToScene ( DHDK_SCENE_HANDLE  hScene,
DHDK_UINT  port 
)

Set the port trigger to the scene hScene.

Parameters
hScene
portcan be 1,2,3,4,5...maxPort (example 8); 0 for disabled
Returns
true if succeeded; false otherwise

◆ DHDK_ChannelsCount()

DHDK_UINT DHDK_ChannelsCount ( DHDK_STEP_HANDLE  hStep)

Get the number of channels computed in a step.

Parameters
hStep
Returns
channels count
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_closeDevice()

void DHDK_closeDevice ( DHDK_DEVICE_HANDLE  hDevice)

Stops the communication with the device.

Parameters
hDevice

◆ DHDK_configureDmxUniverse()

bool DHDK_configureDmxUniverse ( DHDK_DMX_UNIVERSE_HANDLE  hDmxUniverse,
DHDK_UINT  mode 
)

Configures a DMX universe as output or input.

Parameters
hDmxUniversea universe handle
modevalue can be DHDK_DMXOUT, DHDK_DMXIN
Returns
true if succeeded; false otherwise

◆ DHDK_createCsaScene()

DHDK_SCENE_HANDLE DHDK_createCsaScene ( DHDK_SHOW_HANDLE  hShow)

Creates a scene for the given show and returns the handle of the scene.

Parameters
hShow
Returns
created scene's handle
Return values
DHDK_INVALID_HANDLEin case of failure

◆ DHDK_createCsaShow()

DHDK_SHOW_HANDLE DHDK_createCsaShow ( DHDK_UINT  nbChannels,
DHDK_DEVICE_HANDLE  hDevice 
)

Creates a show with a number of channels specified.

Parameters
nbChannels
hDevice
Returns
created show
Return values
DHDK_INVALID_HANDLEin case of failure

◆ DHDK_createCsaStep()

DHDK_SCENE_HANDLE DHDK_createCsaStep ( DHDK_SHOW_HANDLE  hShow,
DHDK_SCENE_HANDLE  scene 
)

Creates a step for a specific scene.

Parameters
hShow
scene
Returns
DHDK_SCENE_HANDLE
Return values
DHDK_INVALID_HANDLEin case of failure

◆ DHDK_createTimeTriggerEveryDayEveryHour()

DHDK_TIME_TRIGGER_HANDLE DHDK_createTimeTriggerEveryDayEveryHour ( DHDK_UINT  hour,
DHDK_UINT  minute 
)

Creates a time trigger for every day and every hour.

Parameters
hour
minute
Returns
the created time trigger

◆ DHDK_createTimeTriggerEveryDayPeriodHour()

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.

Parameters
fromHour
fromMinute
toHour
toMinute
eachHour
eachMinute
Returns
the created time trigger

◆ DHDK_createTimeTriggerPeriodDayPeriodHour()

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.

Parameters
fromMonth
fromDay
fromHour
fromMinute
toMonth
toDay
toHour
toMinute
repeatHour
repeatMinute
Returns
the created time trigger

◆ DHDK_createTimeTriggerPeriodDaySpecificHour()

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.

Parameters
fromMonth
fromDay
toMonth
toDay
hour
minute
Returns
the created time trigger

◆ DHDK_createTimeTriggerSpecificDayPeriodHour()

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.

Parameters
month
day
fromHour
fromMinute
toHour
toMinute
eachHour
eachMinute
Returns
the created time trigger

◆ DHDK_createTimeTriggerSpecificDaySpecificHour()

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.

Parameters
month
day
hour
minute
Returns
the created time trigger

◆ DHDK_deinit()

void DHDK_deinit ( )

To call when your application is leaving.

Warning
this function is not treadsafe, and should not be called during any other function can be accessed

◆ DHDK_deleteCsaScene()

bool DHDK_deleteCsaScene ( DHDK_SHOW_HANDLE  hShow,
DHDK_UINT  aIndex 
)

Deletes a scene represented by its index.

Parameters
hShow
aIndex
Returns
true if the scene was successfully deleted from the show; false otherwise

◆ DHDK_deleteCsaStep()

bool DHDK_deleteCsaStep ( DHDK_UINT  aIndex,
DHDK_SCENE_HANDLE  hScene 
)

Deletes a step from the given scene.

Parameters
aIndex
hScene
Returns
true if succeeded; false otherwise

◆ DHDK_deleteShow()

bool DHDK_deleteShow ( DHDK_SHOW_HANDLE  hShow)

Delete the current show.

Parameters
hShow
Returns
true if successfully deleted; false otherwise

◆ DHDK_enumerate()

bool DHDK_enumerate ( )

Lists the devices available on your system.

Returns
true if succeeded; false otherwise

◆ DHDK_getAddressTrigger()

DHDK_UINT DHDK_getAddressTrigger ( DHDK_SCENE_HANDLE  hScene)

Returns the address for the trigger.

if =1, port 1
if =2, port 2
if =3, port 1 AND port 2
if =4, port 3
if =12, port 3 AND port 4
etc... *

Parameters
hScene
Returns
trigger's address
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getButtonCount()

DHDK_UINT DHDK_getButtonCount ( DHDK_DEVICE_HANDLE  hDevice)

Returns number of buttons on the device.

Parameters
hDevice
Returns
buttons number
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getButtonName()

bool DHDK_getButtonName ( DHDK_DEVICE_HANDLE  hDevice,
DHDK_UINT  iButton,
char *  buttonName,
DHDK_UINT  size 
)

Gets the button's name.

Parameters
[in]hDevicehandle of the device to get Button information
[in]iButtonthe index of the Button
[out]buttonNamea pointer which will be filled with button name in utf8 encoding
[in]sizesize of buffer in char
Returns
true if succeeded; false otherwise

◆ DHDK_getButtonState()

DHDK_UINT DHDK_getButtonState ( DHDK_DEVICE_HANDLE  hDevice,
DHDK_UINT  iButton 
)

Returns the state of button on the device.

Parameters
hDevice
iButton
Return values
0means button released
1means button pressed
DHDK_UINT_ERRORmeans an error occurred when reading port

◆ DHDK_getCountStep()

DHDK_UINT DHDK_getCountStep ( DHDK_SCENE_HANDLE  hScene)

Get steps count for the given scene.

Parameters
hScene
Returns
the steps count
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getCountTimeTrigger()

DHDK_UINT DHDK_getCountTimeTrigger ( DHDK_SCENE_HANDLE  hScene)

Returns the number of time triggers of a scene.

Parameters
hScene
Returns
number of time triggers
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getDevice()

DHDK_DEVICE_HANDLE DHDK_getDevice ( DHDK_UINT  iDevice)

Returns the handle for the given device index.

Parameters
iDevice
Returns
handle for the given device index
Return values
XHL_INVALID_HANDLEif not found

◆ DHDK_getDeviceCount()

DHDK_UINT DHDK_getDeviceCount ( )

Returns the number of devices enumerated on your system.

Returns
the number of devices enumerated on your system

◆ DHDK_getDeviceName()

bool DHDK_getDeviceName ( DHDK_DEVICE_HANDLE  hDevice,
char *  buffer,
DHDK_UINT  size 
)

Gets the name of the device.

Parameters
[in]hDevicehandle of the device to query the name
[out]buffera pointer wher wil be filled device name in utf8
[in]sizesize in char
Returns
true if succeeded; false otherwise

◆ DHDK_getDeviceProtocol()

DHDK_UINT DHDK_getDeviceProtocol ( DHDK_DEVICE_HANDLE  hDevice)

Returns the protocol of the device.

Parameters
hDevicehandle of the device to query the protocol
Returns
the device's protocol

◆ DHDK_getDeviceSerial()

DHDK_UINT DHDK_getDeviceSerial ( DHDK_DEVICE_HANDLE  hDevice)

Returns the device serial.

Parameters
hDevice
Returns
the device serial number
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getDeviceTypeName()

bool DHDK_getDeviceTypeName ( DHDK_DEVICE_HANDLE  fhDevice,
char *  buffer,
DHDK_UINT  size 
)

Gets the name of the type of the device (Hardware Name)

Parameters
[in]fhDevicehandle of the device to query the name
[out]buffera pointer which will be filled with device name in utf8 encoding
[in]sizesize of buffer in char
Returns
true if succeeded; false otherwise

◆ DHDK_getDmxUniverse()

DHDK_DMX_UNIVERSE_HANDLE DHDK_getDmxUniverse ( DHDK_DEVICE_HANDLE  hDevice,
DHDK_UINT  universeNumber 
)

Returns the handle for the given universe number.

Parameters
hDevice
universeNumber
Returns
the handle for the given universe number
Return values
DHDK_INVALID_HANDLEin case of failure

◆ DHDK_getDmxUniverseCount()

DHDK_UINT DHDK_getDmxUniverseCount ( DHDK_DEVICE_HANDLE  hDdevice)

Returns the device's DMX universes count.

Parameters
hDdevice
Returns
the device's DMX universes count
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getDmxUniverseFeatures()

DHDK_UINT DHDK_getDmxUniverseFeatures ( DHDK_DMX_UNIVERSE_HANDLE  hDmxUniverse)

Give support of Dmx universe as bitfield.

Parameters
hDmxUniverse
if(getDmxUniverseFeatures(hDmxUniverse) & DHDK_DMXOUT)
{
//universe supports DmxOut
}
Returns
support of Dmx universe as bitfield
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getEnglishNameForSceneCounter()

bool DHDK_getEnglishNameForSceneCounter ( DHDK_SHOW_HANDLE  hShow,
DHDK_UINT  aIndex,
char *  sceneName,
DHDK_UINT  size 
)

Gets the english name of a scene.

Parameters
[in]hShow
[in]aIndex
[out]sceneName
[in]size
Returns
true if succeeded; false otherwise

◆ DHDK_getFadeTime()

DHDK_UINT DHDK_getFadeTime ( DHDK_STEP_HANDLE  hStep)

Get fade time for a step.

Parameters
hStep
Returns
the fade time (milliseconds)
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getHoldTime()

DHDK_UINT DHDK_getHoldTime ( DHDK_STEP_HANDLE  hStep)

Get wait time for a step.

Parameters
hStep
Returns
wait time (milliseconds)
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getLastError()

DHDK_UINT DHDK_getLastError ( )

Returns the last error raised.

Returns
the last error raised by calling thread

◆ DHDK_getLiveChannelsCount()

DHDK_UINT DHDK_getLiveChannelsCount ( DHDK_DMX_UNIVERSE_HANDLE  hDmxUniverse)

Returns the number of channels the given universe can output/input in live mode.

Parameters
hDmxUniversea universe handle
Returns
the number of channels the given universe can output/input in live mode
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getMaxChannels()

DHDK_UINT DHDK_getMaxChannels ( DHDK_DEVICE_HANDLE  hDevice)

◆ DHDK_getMaxPortTriggerCount()

DHDK_UINT DHDK_getMaxPortTriggerCount ( DHDK_DEVICE_HANDLE  hDevice)

Returns the max port triggers count that the device can handle.

Parameters
hDevice
Returns
max port trigger count
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getMaxSceneCount()

DHDK_UINT DHDK_getMaxSceneCount ( DHDK_DEVICE_HANDLE  hDevice)

Get the maximum number of scenes that the device can handle.

Parameters
hDevice
Returns
the maximum number of scenes that the device can handle
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getMaxSceneIndex()

DHDK_UINT DHDK_getMaxSceneIndex ( DHDK_SHOW_HANDLE  hShow)

Get the max scene index.

Parameters
hShow
Returns
the max scene index
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getMaxStandAloneChannels()

DHDK_UINT DHDK_getMaxStandAloneChannels ( DHDK_DEVICE_HANDLE  hDevice)

Returns the max channels for a device in stand alone mode.

If a device can output stand alone on 2 FULL universes value will be 1024 (2x 512)

Parameters
hDevice
Returns
the max channels for a device in stand alone mode

◆ DHDK_getPort()

DHDK_UINT DHDK_getPort ( DHDK_DEVICE_HANDLE  hDevice)

Returns bitfield for active ports.

bit 0 is set if port 1 active,
bit 1,...

Parameters
hDevice
Returns
the active ports bits field
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getProductName()

bool DHDK_getProductName ( DHDK_DEVICE_HANDLE  fhDevice,
char *  productName,
DHDK_UINT  size 
)

Gets the name of commercial product used.

Parameters
[in]fhDevicehandle of the device to query the name
[out]productNamea pointer which will be filled with device name in utf8 codding
[in]sizesize of buffer in char
Returns
true if succeeded; false otherwise

◆ DHDK_getScene()

DHDK_SCENE_HANDLE DHDK_getScene ( DHDK_SHOW_HANDLE  hShow,
DHDK_UINT  index 
)

Returns the scene at index from the show hShow.

Parameters
hShow
index
Returns
the scence handle for the given index
Return values
DHDK_INVALID_HANDLEin case of failure

◆ DHDK_getSceneCount()

DHDK_UINT DHDK_getSceneCount ( DHDK_SHOW_HANDLE  hShow)

Get scenes count.

Parameters
hShow
Returns
the scenes count
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_getSceneFromCounter()

DHDK_SCENE_HANDLE DHDK_getSceneFromCounter ( DHDK_SHOW_HANDLE  hShow,
DHDK_UINT  counter 
)

Get a particular scene handle with a counter.

Parameters
hShow
counter
Returns
the scene for the given counter
Return values
DHDK_INVALID_HANDLEif failed

◆ DHDK_getStep()

DHDK_STEP_HANDLE DHDK_getStep ( DHDK_UINT  index,
DHDK_SCENE_HANDLE  hScene 
)

Get a step from a scene.

Parameters
index
hScene
Returns
the step handle for the given index
Return values
DHDK_INVALID_HANDLEif failed

◆ DHDK_getTimeTrigger()

DHDK_TIME_TRIGGER_HANDLE DHDK_getTimeTrigger ( DHDK_UINT  aIndex,
DHDK_SCENE_HANDLE  hScene 
)

Returns the handle of time trigger index for a specific scene.

Parameters
aIndex
hScene
Returns
the time trigger handle
Return values
DHDK_INVALID_HANDLEin case of failure

◆ DHDK_getTimeTriggerDescription()

bool DHDK_getTimeTriggerDescription ( DHDK_TIME_TRIGGER_HANDLE  hTimeTrigger,
char *  timeTriggerString,
DHDK_UINT  size 
)

Retrieve the description of time trigger.

Parameters
hTimeTrigger
timeTriggerString
size
Returns
true if succeeded; false otherwise

◆ DHDK_getValueChannel()

DHDK_UINT DHDK_getValueChannel ( DHDK_UINT  aIndex,
DHDK_STEP_HANDLE  hStep 
)

Get channel for a step.

Parameters
aIndex
hStep
Returns
channel's value
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_hasFadeTransitionChannel()

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.

Parameters
hShow
aIndex
Return values
trueif the show has a fading transition channel
falseif there is not fading transition

◆ DHDK_init()

void DHDK_init ( DHDK_UINT  protocol,
const char *  aSoftwareName 
)

First function to call on start up.

Parameters
protocolthe protocol you want to use. DHDK_DASUSB|DHDK_DASNET for our USB devices and network devices
aSoftwareNamea null terminated string that contains the name of your software
Warning
this function is not treadsafe, and should not be called during any other function can be accessed

◆ DHDK_isStandAloneSupported()

bool DHDK_isStandAloneSupported ( DHDK_DEVICE_HANDLE  hDevice)

Tells whether the device supports standalone mode or not.

Parameters
hDeviceis the device
Returns
true if standalone mode is supported; false otherwise

◆ DHDK_openDevice()

bool DHDK_openDevice ( DHDK_DEVICE_HANDLE  hDevice)

Opens the communication with the device.

Parameters
hDevice
Returns
true if succeeded; false otherwise

◆ DHDK_receiveDmx()

DHDK_UINT DHDK_receiveDmx ( DHDK_DMX_UNIVERSE_HANDLE  hDmxUniverse,
unsigned char *  dmxBuffer,
DHDK_UINT  size = 512 
)

Pool dmx receive buffer.

Parameters
hDmxUniverse
dmxBufferpointer to a 512 bytes buffer
size
Returns
number of bytes copied into dmxBuffer
Return values
DHDK_UINT_ERRORin case of failure

◆ DHDK_sendDmx()

bool DHDK_sendDmx ( DHDK_DMX_UNIVERSE_HANDLE  hDmxUniverse,
const unsigned char *  dmxBuffer,
DHDK_UINT  size = 512 
)

Sends DMX signal.

Parameters
hDmxUniverse
dmxBuffer
size
Returns
true if succeeded; false otherwise

◆ DHDK_setFadeTime()

bool DHDK_setFadeTime ( DHDK_STEP_HANDLE  hStep,
DHDK_UINT  fadeTime 
)

Set fade time for a step.

Parameters
hStep
fadeTimefade time in milliseconds
Returns
true if succeeded; false otherwise

◆ DHDK_setFadeTransitionChannel()

bool DHDK_setFadeTransitionChannel ( DHDK_SHOW_HANDLE  hShow,
DHDK_UINT  aIndex,
bool  aFade 
)

DHDK_setFadeTransitionChannel.

Parameters
hShow
aIndex
aFade
Returns
true if succeeded; false otherwise

◆ DHDK_setHoldTime()

bool DHDK_setHoldTime ( DHDK_STEP_HANDLE  hStep,
DHDK_UINT  holdTime 
)

Set hold time for a step.

Parameters
hStep
holdTimein milliseconds
Returns
true if succeeded; false otherwise

◆ DHDK_setTriggerAddressToScene()

bool DHDK_setTriggerAddressToScene ( DHDK_SCENE_HANDLE  hScene,
DHDK_UINT  address 
)

Set the port trigger address to the scene hScene.

Address can be 1,2,3,4,5...maxAddress (example 255) 0 for disabled

Parameters
hScene
address
Returns
true if succeeded; false otherwise

◆ DHDK_setValueChannel()

bool DHDK_setValueChannel ( DHDK_UINT  aIndex,
uint8_t  aValue,
DHDK_STEP_HANDLE  hStep 
)

Set channel for a step.

Parameters
aIndex
aValue
hStep
Returns
true if succeeded; false otherwise

◆ DHDK_writeDemoShow()

bool DHDK_writeDemoShow ( DHDK_DEVICE_HANDLE  hDevice)

Writes the demo show.

Parameters
hDevice
Returns
true if the show was successfully written; false otherwise

◆ DHDK_writeShow()

bool DHDK_writeShow ( DHDK_SHOW_HANDLE  hShow,
DHDK_DEVICE_HANDLE  hDevice 
)

Write a show.

Parameters
hShow
hDevice
Returns
true if the show was successfully written; false otherwise