CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_Fct_LocalDevice.h
Go to the documentation of this file.
1 //*********************************************************
2 // File: CLC_Fct_LocalDevice.h
3 // Project: CopperLan CHAILink Client SDK
4 // Version: 1.3
5 // Release Date: 2014/04/15
6 //*********************************************************
7 
8 /********************************************************************
9 Software License Agreement: CHAILink Client source code
10 
11 The software supplied herewith by Klavis Technology (the “Company”) is intended and
12 supplied to you, the Company’s customer, for use solely and exclusively on embedded
13 CopperLan products needing a CHAILink Client.
14  The software is owned by the Company and/or its supplier, and is protected
15  under applicable copyright laws. All rights are reserved. Any use in violation of the
16  foregoing restrictions may subject the user to criminal sanctions under applicable laws,
17 as well as to civil liability for the breach of the terms and conditions of this license.
18 
19 THIS SOFTWARE MUST REMAIN UNMODIFIED. NO WARRANTIES, WHETHER EXPRESS,
20  IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
21  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE
22 IN CASE OF SOURCE CODE CHANGE BY THE CUSTOMER. IN CASE OF SUCH CHANGE, THE
23 COMPANY SHALL NOT BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
24 OF ANY KIND.
25 ********************************************************************/
26 
27 #ifndef _CLC_FCT_BASELOCALDEVICE_H_
28 #define _CLC_FCT_BASELOCALDEVICE_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
35  // Local device functions
37 
46 
49 
65  ObjectTypes deviceType,
66  CPHOBJECT const hLocalDevice,
67  CPUINT16 const wModuleID,
68  CPBOOLEAN const fHidden,
69  ExtendedDeviceCapabilities const extendedCapabilities,
70  CPCHAR8 const * const utf8ModelName,
71  CPUINT32 const dwNewDeviceUserData,
72  CPHOBJECT * const phNewDevice);
74 
77 #if !defined(NO_DEVICE_ENABLED)
85  CPHOBJECT const hLocalDevice);
86 
92  CPHOBJECT const hLocalDevice);
93 #endif // !defined(NO_DEVICE_ENABLED)
94 
95 #if defined(ENABLE_SNAPSHOT)
103  CPHOBJECT const hLocalDevice);
104 
110  CPHOBJECT const hLocalDevice);
111 #endif // defined(ENABLE_SNAPSHOT)
112 
113 #ifdef ENABLE_SMARTCONNECT_TARGET
114 
122  CPHOBJECT const hLocalDevice);
123 
129  CPHOBJECT const hLocalDevice);
130 
131 #endif // ENABLE_SMARTCONNECT_TARGET
132 
133 #if defined(ENABLE_SIGNAL)
141  CPHOBJECT const hLocalDevice);
142 
148  CPHOBJECT const hLocalDevice);
149 #endif // defined(ENABLE_SIGNAL)
150 
152 
155 
163  CPHOBJECT const hLocalDevice,
164  CPLOCALDEVICEINFO * const pInfo);
165 
173  CPHOBJECT const hLocalDevice,
174  CPCHAR8 const * const utf8CustomName);
175 
184  CPHOBJECT const hLocalDevice,
185  DeviceNameFormats format,
186  CPCHAR8 const ** const putf8Name);
187 
195  CPHOBJECT const hLocalDevice,
196  CPCHAR8 const ** const putf8Name);
197 
204  CPHOBJECT const hLocalDevice,
205  CPBOOLEAN const fHidden);
206 
214  CPHOBJECT const hLocalDevice,
215  CPBOOLEAN const fAutoDelete);
216 
224  CPHOBJECT const hLocalDevice,
225  CPSECTIONID const * const pSectionID,
226  CPCHAR8 const * const utf8Name);
227 
235  CPHOBJECT const hLocalDevice,
236  CPSECTIONID const * const pSectionID,
237  CPCHAR8 const ** const putf8Name);
238 
246  CPHOBJECT const hLocalDevice,
247  CPUINT16 const wPropertyNum,
248  CPCHAR8 const * const utf8Value);
249 
257  CPHOBJECT const hLocalDevice,
258  CPUINT16 const wPropertyNum,
259  CPUINT64 const qwValue);
260 
262 
265 
283  CPHOBJECT const hLocalDevice,
284  InOutCapabilities const outCaps,
285  CPCHAR8 const * const utf8OutputName,
286  CPSECTIONID const * const pSectionID,
287  CPUINT32 const dwOutputUserData,
288  CPHOBJECT * const phOutput,
289  CPUINT16 * const pwOutputID );
290 
298  CPHOBJECT const hLocalDevice,
299  CPUINT16 const wOutputID,
300  CPHOBJECT * const phOutput);
301 
307  CPHOBJECT const hLocalDevice);
308 
314  CPHOBJECT const hLocalDevice);
315 
336  CPHOBJECT const hLocalDevice,
337  CPCHAR8 const * const utf8Name,
338  ControllerTypes const types,
339  MessageTypes const preferredMsgType,
340  CPUINT16 const wPreferredMsgNum,
341  CPUINT16 const wGroup,
342  CPSECTIONID const * const pSectionID,
343  CPUINT32 const dwControllerUserData,
344  CPHOBJECT * const phController,
345  CPUINT16 * const pwControllerID);
346 
352  CPHOBJECT const hLocalDevice);
353 
360  CPHOBJECT const hLocalDevice,
361  CPBOOLEAN const fAlsoForChildren);
362 
364 
367 
386  InOutCapabilities const inCaps,
387  CPCHAR8 const * const utf8InputName,
388  CPSECTIONID const * const pSectionID,
389  CPUINT32 const dwInputUserData,
390  CPHOBJECT * const phInput,
391  CPUINT16 * const pwInputID );
392 
400  CPHOBJECT const hLocalDevice,
401  CPUINT16 const wInputID,
402  CPHOBJECT * const phInput);
403 
409  CPHOBJECT const hLocalDevice);
410 
411 
418  CPHOBJECT const hLocalDevice,
419  CPBOOLEAN const fSuspend);
421 
424 
437  CPHOBJECT const hLocalDevice,
438  CPBOOLEAN const fSynapse,
439  CPUINT32 const dwPipeUserData,
440  CPHOBJECT * const phPipe,
441  CPUINT16 * const pwPipeID);
442 
450  CPHOBJECT const hLocalDevice,
451  CPUINT16 const wPipeID,
452  CPHOBJECT * const phPipe);
453 
459  CPHOBJECT const hLocalDevice);
461 
464 
471  CPHOBJECT const hLocalDevice);
472 
479  CPHOBJECT const hLocalDevice,
480  CPBOOLEAN * const pfActive);
481 
483 
488 
499  CPHOBJECT const hLocalDevice,
500  CPUINT16 const wSessionID,
501  CPDEVICEID const * const pDevID);
502 
514  CPHOBJECT const hLocalDevice,
515  CPUINT16 const wSessionID,
516  CPDEVICEID const * const pDevID,
517  CPSECTIONID const * const pSectionID);
518 
530  CPHOBJECT const hLocalDevice,
531  CPUINT16 const wSessionID,
532  CPDEVICEID const * const pDevID,
533  CPUINT16 const wControllerID,
534  CPCONTROLLERASSIGNMENT const * const pAssignment);
535 
547  CPHOBJECT const hLocalDevice,
548  CPUINT16 const wSessionID,
549  CPDEVICEID const * const pDevID,
550  CPSECTIONID const * const pSectionID,
551  CPENDPOINT const * const pTargetEndpoint);
552 
561  CPHOBJECT const hLocalDevice,
562  CPUINT16 const wSessionID,
563  Errors const errCode);
564 
571  CPUINT16 const wIndex,
572  CPDEVICEID * const pDevID);
573 
580  CPUINT16 const wIndex,
581  CPSMARTCONNECTSECTIONITEM * const pSectionItem);
582 
589  CPUINT16 const wIndex,
590  CPSMARTCONNECTCONTROLLERITEM * const pControllerItem);
592 
595 
610  CPHOBJECT const hLocalDevice,
611  CPDEVICEID const * pDevID,
612  CPUINT16 const wSignalNumber,
613  CPUINT16 const wOptionalData0,
614  CPUINT16 const wOptionalData1,
615  CPUINT16 const wOptionalData2,
616  CPUINT16 const wOptionalData3,
617  CPCHAR8 const * const utf8OptionalData,
618  CPENDPOINT const * const pOptionalEndPoint);
619 
621 
624 #if defined(ENABLE_SNAPSHOT)
625 
636  CPHOBJECT const hLocalDevice,
637  CPBOOLEAN const fDisabled,
638  CPBOOLEAN const fAlsoForChildren);
639 
640 
656  CPHOBJECT const hLocalDevice,
657  CPUINT16 const wRequestID,
658  SnapshotBlockPriorities const priority,
659  CPUINT32 const dwSnapshotContextData,
660  CPUINT16 const wBlockSize,
661  CPBOOLEAN const fLastBlock,
662  CPBYTE const * const pBlockData);
663 
674  CPHOBJECT const hLocalDevice,
675  CPUINT16 const wRequestID,
676  Errors const returnCode,
677  CPUINT32 const dwSnapshotContextData);
678 
686  CPHOBJECT const hLocalDevice,
687  CPUINT16 const wRequestID);
688 
689 #endif // defined(ENABLE_SNAPSHOT)
690 
693 
694 #ifdef __cplusplus
695 }
696 #endif
697 
698 #endif // _CLC_FCT_BASELOCALDEVICE_H_
CLC_ErrorCode LocalDevice_ClearOutputs(CPHOBJECT const hLocalDevice)
Remove all outputs and associated data (controller definition)
CLC_ErrorCode LocalDevice_UnregisterSmartConnectTargetNotificationHandler(CPHOBJECT const hLocalDevice)
Unregister Local Device notification handler for Smart Connect, Target side.
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.
CLC_ErrorCode LocalDevice_SetVisibility(CPHOBJECT const hLocalDevice, CPBOOLEAN const fHidden)
Change device visibility.
#define CLC_SDK_API
Definition: CLCm_Platform.h:37
CLC_ErrorCode LocalDevice_UnregisterNotificationHandler(CPHOBJECT const hLocalDevice)
Unregister notification handler for a local device (or sub type).
CLC_ErrorCode LocalDevice_GetSectionName(CPHOBJECT const hLocalDevice, CPSECTIONID const *const pSectionID, CPCHAR8 const **const putf8Name)
Get the custom name for the specified section type.
Container structure for Section ID Each Input is associated to a SectionID giving information about i...
Definition: CLC_Types.h:67
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_LOCAL...
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)
SnapshotBlockPriorities
Snapshot block priorities.
Definition: CLC_Enums.h:2120
SmartConnect Section Item structure.
Definition: CLC_Types.h:98
CLC_ErrorCode LocalDevice_RegisterSnapshotNotificationHandler(CPHOBJECT const hLocalDevice)
Register snapshot notification handler for a local device (or sub type).
CLC_ErrorCode LocalDevice_SetSectionName(CPHOBJECT const hLocalDevice, CPSECTIONID const *const pSectionID, CPCHAR8 const *const utf8Name)
Set a custom name for the specified section.
CLC_ErrorCode
Error code Enumeration. Error codes from 0x01 to 0xFF are related to a CopperLan functions return cod...
Definition: CLCm_Defines.h:469
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.
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.
CLC_ErrorCode LocalDevice_GetInfo(CPHOBJECT const hLocalDevice, CPLOCALDEVICEINFO *const pInfo)
Get local device (or sub type) informations (see CPLOCALDEVICEINFO structure for details).
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 inst...
char CPCHAR8
Character Type (8 bit signed)
Definition: PlatformTypes.h:66
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.
SmartConnect Controller Item structure.
Definition: CLC_Types.h:106
CLC_ErrorCode LocalDevice_ClearInputs(CPHOBJECT const hLocalDevice)
Remove all inputs and associated data (parameter definition)
ControllerTypes
Controller types It is composed of the supported message types and the physical controller descriptio...
Definition: CLC_Enums.h:210
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_LO...
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.
CLC_ErrorCode LocalDevice_GetInputFromID(CPHOBJECT const hLocalDevice, CPUINT16 const wInputID, CPHOBJECT *const phInput)
Get the specified Input.
ObjectTypes
Object types.
Definition: CLC_Enums.h:1521
CLC_ErrorCode LocalDevice_UnassignAllControllers(CPHOBJECT const hLocalDevice, CPBOOLEAN const fAlsoForChildren)
Unassign all controllers and clear connections.
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.
InOutCapabilities
Input & Output capabilities.
Definition: CLC_Enums.h:1145
CLC_ErrorCode LocalDevice_GetPath(CPHOBJECT const hLocalDevice, CPCHAR8 const **const putf8Name)
Get the path.
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 stat...
Errors
CHAI Error codes Used with CLC_ErrorCode for value from 0 to 0xFF.
Definition: CLC_Enums.h:923
unsigned short CPUINT16
Word Integer (16 bit unsigned)
Definition: PlatformTypes.h:45
CLC_ErrorCode LocalDevice_RegisterSmartConnectTargetNotificationHandler(CPHOBJECT const hLocalDevice)
Register Local Device notification handler for Smart Connect, Target side. This notification handler ...
CLC_ErrorCode LocalDevice_SetStringProperty(CPHOBJECT const hLocalDevice, CPUINT16 const wPropertyNum, CPCHAR8 const *const utf8Value)
Set a text device property.
This structure contains information for a specific local device.
Definition: CLC_Types.h:194
unsigned long CPUINT32
Double Word Integer (32 bit unsigned)
Definition: PlatformTypes.h:48
CLC_ErrorCode LocalDevice_SetNumericProperty(CPHOBJECT const hLocalDevice, CPUINT16 const wPropertyNum, CPUINT64 const qwValue)
Set a numeric device property.
CLC_ErrorCode LocalDevice_UnregisterSnapshotNotificationHandler(CPHOBJECT const hLocalDevice)
Unregister snapshot notification handler for a local device (or sub type).
CLC_ErrorCode LocalDevice_RegisterSignalNotificationHandler(CPHOBJECT const hLocalDevice)
Register signal notification handler for a local device (or sub type).
CLC_ErrorCode LocalDevice_UnregisterSignalNotificationHandler(CPHOBJECT const hLocalDevice)
Unregister signal notification handler for a local device (or sub type).
CLC_ErrorCode LocalDevice_Reply_RequestRestoreSnapshotData(CPHOBJECT const hLocalDevice, CPUINT16 const wRequestID, Errors const returnCode, CPUINT32 const dwSnapshotContextData)
Reply to a snapshot data restore request.
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 ...
Container structure for Endpoint.
Definition: CLC_Types.h:48
CLC_ErrorCode LocalDevice_GetName(CPHOBJECT const hLocalDevice, DeviceNameFormats format, CPCHAR8 const **const putf8Name)
Get the specified name.
CLC_ErrorCode LocalDevice_Reply_InvalidRequest(CPHOBJECT const hLocalDevice, CPUINT16 const wRequestID)
Reply Invalid Request.
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 def...
CLC_ErrorCode LocalDevice_RegisterNotificationHandler(CPHOBJECT const hLocalDevice)
Register notification handler for a local device (or sub type).
DeviceNameFormats
Device name formats. Used during a LocalDevice_GetName or RemoteDevice_GetName_Async call to specify ...
Definition: CLC_Enums.h:803
Container structure for Device ID.
Definition: CLC_Types.h:39
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...
CLC_ErrorCode LocalDevice_Flush(CPHOBJECT const hLocalDevice)
Flush all outputs.
CLC_ErrorCode LocalDevice_GetOutputFromID(CPHOBJECT const hLocalDevice, CPUINT16 const wOutputID, CPHOBJECT *const phOutput)
Get the specified Output.
CLC_ErrorCode LocalDevice_AddPipe(CPHOBJECT const hLocalDevice, CPBOOLEAN const fSynapse, CPUINT32 const dwPipeUserData, CPHOBJECT *const phPipe, CPUINT16 *const pwPipeID)
Add a Pipe.
CLC_ErrorCode LocalDevice_SetCustomName(CPHOBJECT const hLocalDevice, CPCHAR8 const *const utf8CustomName)
Set the Custom name.
CLC_ErrorCode LocalDevice_ClearPipes(CPHOBJECT const hLocalDevice)
Remove all pipes.
CLC_ErrorCode LocalDevice_GetPipeFromID(CPHOBJECT const hLocalDevice, CPUINT16 const wPipeID, CPHOBJECT *const phPipe)
Get the specified Pipe.
MessageTypes
Message types.
Definition: CLC_Enums.h:147
Controller assignment structure.
Definition: CLC_Types.h:85
CLC_ErrorCode LocalDevice_IsLearningModeActive(CPHOBJECT const hLocalDevice, CPBOOLEAN *const pfActive)
Check if learning mode is active for one of this Device's Controllers.
CLC_ErrorCode LocalDevice_ClearControllers(CPHOBJECT const hLocalDevice)
Remove all controllers.
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.
CPUINT32 CPHOBJECT
Handle on Object.
Definition: CLCm_Types.h:57
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.
unsigned long long CPUINT64
Quad Word Integer (64 bit unsigned)
Definition: PlatformTypes.h:51
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 stat...
ExtendedDeviceCapabilities
Extended device capabilities It can not be used for device enumeration filtering. ...
Definition: CLC_Enums.h:531
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_STARTE...