CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Local device Functions

List of all local device functions. More...

Sub-Device Functions

CLC_ErrorCode LocalDevice_AddSubDevice (ObjectTypes deviceType, CPHOBJECT const hLocalDevice, CPUINT16 const wModuleID, CPBOOLEAN const fHidden, ExtendedDeviceCapabilities const extendedCapabilities, CPCHAR8 const *const utf8ModelName, CPUINT32 const dwNewDeviceUserData, CPHOBJECT *const phNewDevice)
 Add a sub-device. More...
 

Notification Handling Functions

CLC_ErrorCode LocalDevice_RegisterNotificationHandler (CPHOBJECT const hLocalDevice)
 Register notification handler for a local device (or sub type). More...
 
CLC_ErrorCode LocalDevice_UnregisterNotificationHandler (CPHOBJECT const hLocalDevice)
 Unregister notification handler for a local device (or sub type). More...
 
CLC_ErrorCode LocalDevice_RegisterSnapshotNotificationHandler (CPHOBJECT const hLocalDevice)
 Register snapshot notification handler for a local device (or sub type). More...
 
CLC_ErrorCode LocalDevice_UnregisterSnapshotNotificationHandler (CPHOBJECT const hLocalDevice)
 Unregister snapshot notification handler for a local device (or sub type). More...
 
CLC_ErrorCode LocalDevice_RegisterSmartConnectTargetNotificationHandler (CPHOBJECT const hLocalDevice)
 Register Local Device notification handler for Smart Connect, Target side. This notification handler is used to query information about parameters. Only one SmartConnect Target notification handler can be set for a Device! More...
 
CLC_ErrorCode LocalDevice_UnregisterSmartConnectTargetNotificationHandler (CPHOBJECT const hLocalDevice)
 Unregister Local Device notification handler for Smart Connect, Target side. More...
 
CLC_ErrorCode LocalDevice_RegisterSignalNotificationHandler (CPHOBJECT const hLocalDevice)
 Register signal notification handler for a local device (or sub type). More...
 
CLC_ErrorCode LocalDevice_UnregisterSignalNotificationHandler (CPHOBJECT const hLocalDevice)
 Unregister signal notification handler for a local device (or sub type). More...
 

Device Identity Handling

CLC_ErrorCode LocalDevice_GetInfo (CPHOBJECT const hLocalDevice, CPLOCALDEVICEINFO *const pInfo)
 Get local device (or sub type) informations (see CPLOCALDEVICEINFO structure for details). More...
 
CLC_ErrorCode LocalDevice_SetCustomName (CPHOBJECT const hLocalDevice, CPCHAR8 const *const utf8CustomName)
 Set the Custom name. More...
 
CLC_ErrorCode LocalDevice_GetName (CPHOBJECT const hLocalDevice, DeviceNameFormats format, CPCHAR8 const **const putf8Name)
 Get the specified name. More...
 
CLC_ErrorCode LocalDevice_GetPath (CPHOBJECT const hLocalDevice, CPCHAR8 const **const putf8Name)
 Get the path. More...
 
CLC_ErrorCode LocalDevice_SetVisibility (CPHOBJECT const hLocalDevice, CPBOOLEAN const fHidden)
 Change device visibility. More...
 
CLC_ErrorCode LocalDevice_SetDisabledDestinationAutoDelete (CPHOBJECT const hLocalDevice, CPBOOLEAN const fAutoDelete)
 Enable/disable the automatic deletion of disabled destination after 60 seconds. Default status is OFF. More...
 
CLC_ErrorCode LocalDevice_SetSectionName (CPHOBJECT const hLocalDevice, CPSECTIONID const *const pSectionID, CPCHAR8 const *const utf8Name)
 Set a custom name for the specified section. More...
 
CLC_ErrorCode LocalDevice_GetSectionName (CPHOBJECT const hLocalDevice, CPSECTIONID const *const pSectionID, CPCHAR8 const **const putf8Name)
 Get the custom name for the specified section type. More...
 
CLC_ErrorCode LocalDevice_SetStringProperty (CPHOBJECT const hLocalDevice, CPUINT16 const wPropertyNum, CPCHAR8 const *const utf8Value)
 Set a text device property. More...
 
CLC_ErrorCode LocalDevice_SetNumericProperty (CPHOBJECT const hLocalDevice, CPUINT16 const wPropertyNum, CPUINT64 const qwValue)
 Set a numeric device property. More...
 

Output and Controller management Functions

CLC_ErrorCode LocalDevice_AddOutput (CPHOBJECT const hLocalDevice, InOutCapabilities const outCaps, CPCHAR8 const *const utf8OutputName, CPSECTIONID const *const pSectionID, CPUINT32 const dwOutputUserData, CPHOBJECT *const phOutput, CPUINT16 *const pwOutputID)
 Add an Output. More...
 
CLC_ErrorCode LocalDevice_GetOutputFromID (CPHOBJECT const hLocalDevice, CPUINT16 const wOutputID, CPHOBJECT *const phOutput)
 Get the specified Output. More...
 
CLC_ErrorCode LocalDevice_ClearOutputs (CPHOBJECT const hLocalDevice)
 Remove all outputs and associated data (controller definition) More...
 
CLC_ErrorCode LocalDevice_Flush (CPHOBJECT const hLocalDevice)
 Flush all outputs. More...
 
CLC_ErrorCode LocalDevice_AddController (CPHOBJECT const hLocalDevice, CPCHAR8 const *const utf8Name, ControllerTypes const types, MessageTypes const preferredMsgType, CPUINT16 const wPreferredMsgNum, CPUINT16 const wGroup, CPSECTIONID const *const pSectionID, CPUINT32 const dwControllerUserData, CPHOBJECT *const phController, CPUINT16 *const pwControllerID)
 Add a Controller. More...
 
CLC_ErrorCode LocalDevice_ClearControllers (CPHOBJECT const hLocalDevice)
 Remove all controllers. More...
 
CLC_ErrorCode LocalDevice_UnassignAllControllers (CPHOBJECT const hLocalDevice, CPBOOLEAN const fAlsoForChildren)
 Unassign all controllers and clear connections. More...
 

Input management Functions

CLC_ErrorCode LocalDevice_AddInput (CPHOBJECT const hLocalDevice, InOutCapabilities const inCaps, CPCHAR8 const *const utf8InputName, CPSECTIONID const *const pSectionID, CPUINT32 const dwInputUserData, CPHOBJECT *const phInput, CPUINT16 *const pwInputID)
 Add an Input. More...
 
CLC_ErrorCode LocalDevice_GetInputFromID (CPHOBJECT const hLocalDevice, CPUINT16 const wInputID, CPHOBJECT *const phInput)
 Get the specified Input. More...
 
CLC_ErrorCode LocalDevice_ClearInputs (CPHOBJECT const hLocalDevice)
 Remove all inputs and associated data (parameter definition) More...
 
CLC_ErrorCode LocalDevice_FlowControl (CPHOBJECT const hLocalDevice, CPBOOLEAN const fSuspend)
 This can be used to notify connected Output that they should suspend or resume sending. More...
 

Pipe management Functions

CLC_ErrorCode LocalDevice_AddPipe (CPHOBJECT const hLocalDevice, CPBOOLEAN const fSynapse, CPUINT32 const dwPipeUserData, CPHOBJECT *const phPipe, CPUINT16 *const pwPipeID)
 Add a Pipe. More...
 
CLC_ErrorCode LocalDevice_GetPipeFromID (CPHOBJECT const hLocalDevice, CPUINT16 const wPipeID, CPHOBJECT *const phPipe)
 Get the specified Pipe. More...
 
CLC_ErrorCode LocalDevice_ClearPipes (CPHOBJECT const hLocalDevice)
 Remove all pipes. More...
 

Learning management

CLC_ErrorCode LocalDevice_LeaveLearningMode (CPHOBJECT const hLocalDevice)
 Leave learning mode if one of this Device's Controller is currently learning. On success, the notification handler NH_CHAI_NOTIFICATION is called signaling CNT_GlobalLearningModeLeaved. More...
 
CLC_ErrorCode LocalDevice_IsLearningModeActive (CPHOBJECT const hLocalDevice, CPBOOLEAN *const pfActive)
 Check if learning mode is active for one of this Device's Controllers. More...
 

SmartConnect

These functions are only used in the Smart Connect Target (SCT) side. The Source Side (Ouputs and Controllers) are automatically handled by the CHAI.

CLC_ErrorCode LocalDevice_SCT_UnassignAndRequestSectionList (CPHOBJECT const hLocalDevice, CPUINT16 const wSessionID, CPDEVICEID const *const pDevID)
 Query the SmartConnect source side to clear its controller assignments and to reply the consolidated section list. To be called from the SmartConnect target state engine. More...
 
CLC_ErrorCode LocalDevice_SCT_RequestControllerList (CPHOBJECT const hLocalDevice, CPUINT16 const wSessionID, CPDEVICEID const *const pDevID, CPSECTIONID const *const pSectionID)
 Query the SmartConnect source side to reply the controller list related to the specified section instance. To be called from the SmartConnect target state engine. More...
 
CLC_ErrorCode LocalDevice_SCT_AssignController (CPHOBJECT const hLocalDevice, CPUINT16 const wSessionID, CPDEVICEID const *const pDevID, CPUINT16 const wControllerID, CPCONTROLLERASSIGNMENT const *const pAssignment)
 Assign the specified controller to a target parameter. To be called from the SmartConnect target state engine. More...
 
CLC_ErrorCode LocalDevice_SCT_AssignOutput (CPHOBJECT const hLocalDevice, CPUINT16 const wSessionID, CPDEVICEID const *const pDevID, CPSECTIONID const *const pSectionID, CPENDPOINT const *const pTargetEndpoint)
 Assign the specified source section to a target input. To be called from the SmartConnect target state engine. More...
 
CLC_ErrorCode LocalDevice_SCT_Finished (CPHOBJECT const hLocalDevice, CPUINT16 const wSessionID, Errors const errCode)
 Close the SmartConnect session To be called from the SmartConnect target side. More...
 
CLC_ErrorCode LocalDevice_SCT_Started_GetDeviceID (CPUINT16 const wIndex, CPDEVICEID *const pDevID)
 Get the DeviceID at index wIndex. This function can only be called during a NH_LOCALDEVICE_SCT_STARTED notification. More...
 
CLC_ErrorCode LocalDevice_SCT_SectionListReply_GetSCSectionItem (CPUINT16 const wIndex, CPSMARTCONNECTSECTIONITEM *const pSectionItem)
 Get the SmartConnect Section Item at index wIndex. This function can only be called during a NH_LOCALDEVICE_SCT_SECTIONLISTREPLY notification. More...
 
CLC_ErrorCode LocalDevice_SCT_ControllerListReply_GetSCControllerItem (CPUINT16 const wIndex, CPSMARTCONNECTCONTROLLERITEM *const pControllerItem)
 Get the SmartConnect Controller Item at index wIndex. This function can only be called during a NH_LOCALDEVICE_SCT_CONTROLLERLISTREPLY notification. More...
 

Signal Functions

CLC_ErrorCode LocalDevice_Signal (CPHOBJECT const hLocalDevice, CPDEVICEID const *pDevID, CPUINT16 const wSignalNumber, CPUINT16 const wOptionalData0, CPUINT16 const wOptionalData1, CPUINT16 const wOptionalData2, CPUINT16 const wOptionalData3, CPCHAR8 const *const utf8OptionalData, CPENDPOINT const *const pOptionalEndPoint)
 Send a signal (broadcast or directed to the specified device) More...
 

Remote Snapshot Functions

CLC_ErrorCode LocalDevice_SetDisabledInternalSnapshot (CPHOBJECT const hLocalDevice, CPBOOLEAN const fDisabled, CPBOOLEAN const fAlsoForChildren)
 Enable/disable the internal snapshot capability for this device and optionally its descendants By default it is enabled for device hosting outputs, for outputs hosting controllers, and for inputs hosting parameters. More...
 
CLC_ErrorCode LocalDevice_Reply_RequestCollectSnapshotData (CPHOBJECT const hLocalDevice, CPUINT16 const wRequestID, SnapshotBlockPriorities const priority, CPUINT32 const dwSnapshotContextData, CPUINT16 const wBlockSize, CPBOOLEAN const fLastBlock, CPBYTE const *const pBlockData)
 Reply to a snapshot data collect request. More...
 
CLC_ErrorCode LocalDevice_Reply_RequestRestoreSnapshotData (CPHOBJECT const hLocalDevice, CPUINT16 const wRequestID, Errors const returnCode, CPUINT32 const dwSnapshotContextData)
 Reply to a snapshot data restore request. More...
 
CLC_ErrorCode LocalDevice_Reply_InvalidRequest (CPHOBJECT const hLocalDevice, CPUINT16 const wRequestID)
 Reply Invalid Request. More...
 

Detailed Description

List of all local device functions.