CHAILink SDK  Version 1.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CLC_Fct_CHAI.h
Go to the documentation of this file.
1 //*********************************************************
2 // File: CLC_Fct_CHAI.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_CHAI_H_
28 #define _CLC_FCT_CHAI_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
35 // CHAI functions
43 
46 
56  CPUINT32 * const pdwVersion,
57  CPCHAR8 const ** const ppVersionString);
58 
67  CPCHAR8 const * const utf8Name);
69 
72 
79 
85 
88 
95  SystemTime * const pSystemTime);
96 
102 CLC_SDK_API CLC_ErrorCode CHAI_IsGlobalSynchronizedTimeReference(CPBOOLEAN * const pfTimeReference);
103 
105 
106 //---------------------------------------------------------------------
107 // Snapshot
108 //---------------------------------------------------------------------
109 
112 
119 
126 
132 
138 
140 
141 //---------------------------------------------------------------------
142 // Lists management
143 //---------------------------------------------------------------------
144 
147 
155  CPUINT16 const wSize,
156  CPCHAR8 const * const * const arutf8Names,
157  CPHOBJECT * const phIndexList);
158 
166  CPHOBJECT const hIndexList);
167 
176  CPUINT16 const wSize,
177  CPUINT16 const * const arValues,
178  CPCHAR8 const * const * const arutf8Names,
179  CPHOBJECT * const phSelectorItemList);
180 
189  CPHOBJECT const hSelectorItemList,
190  CPUINT16 const wSize,
191  CPUINT16 const * const arValues,
192  CPCHAR8 const * const * const arutf8Names);
193 
201  CPHOBJECT const hSelectorItemList);
202 
204 
207 
212 
232  ObjectTypes deviceType,
233  CPUINT16 const wModelID,
234  CPUINT32 const dwDuplicateNumber,
235  DuplicateModes const duplicateMode,
236  CPBOOLEAN const fHidden,
237  ExtendedDeviceCapabilities const extendedCapabilities,
238  CPCHAR8 const * const utf8ModelName,
239  CPUINT32 const dwDeviceUserData,
240  CPHOBJECT * const phDevice);
241 
252  CPHOBJECT const LocalDeviceHandle);
254 
257 
267  CPUINT16 const wBrandID,
268  CPCHAR8 const * const utf8BrandName,
269  CPCHAR8 const * const utf8ContactInfo);
270 
275 
281  CPBOOLEAN * const pfConnected);
282 
289  CPUINT32 const dwGroups);
290 
296  CPUINT32 * const pdwGroups);
297 
299 
302 
303 #if defined(ENABLE_NETWORK_SEARCH)
324  FindDeviceOptions const options,
325  CPDEVICEID const * const pParentDevID,
326  DeviceCapabilities const includeDeviceCapabilities,
327  DeviceCapabilities const excludeDeviceCapabilities,
328  InOutCapabilities const includeInputCapabilities,
329  InOutCapabilities const excludeInputCapabilities,
330  InOutCapabilities const includeOutputCapabilities,
331  InOutCapabilities const excludeOutputCapabilities,
332  CPUINT16 const wBrandID,
333  CPUINT16 const wModelID,
334  CPUINT32 const dwDuplicateNumberFrom,
335  CPUINT32 const dwDuplicateNumberTo,
336  CPUINT16 const wModuleIDFrom,
337  CPUINT16 const wModuleIDTo,
338  CPUINT32 const dwClientContextData,
339  CPHASYNC * const phAsync);
340 
348  CPHOOKEDOBJECT const hDeviceEnumContext,
349  CPUINT32 const dwClientContextData,
350  CPHASYNC * const phAsync);
351 
359  CPHOOKEDOBJECT const hDeviceEnumContext,
360  CPUINT32 const dwClientContextData,
361  CPHASYNC * const phAsync);
362 #endif
363 
367 #if defined(ENABLE_GLOBAL_TIMER)
377  GlobalTimerNotificationFlags const flags);
378 #endif
379 
383 
393  CPENDPOINT const * const pOptionalSource,
394  WarningCodes const code,
395  WarningDomains const domain,
396  CPCHAR8 const * const utf8Title,
397  CPCHAR8 const * const utf8Content);
398 
400 
403 
404 #if defined(ENABLE_SIGNAL)
411 
416 #endif // defined(ENABLE_SIGNAL)
417 
431  CPDEVICEID const * const pDevID,
432  CPUINT16 const wSignalNumber,
433  CPUINT16 const wOptionalData0,
434  CPUINT16 const wOptionalData1,
435  CPUINT16 const wOptionalData2,
436  CPUINT16 const wOptionalData3,
437  CPCHAR8 const * const utf8OptionalData,
438  CPENDPOINT const * const pOptionalEndPoint);
440 
443 
444 #if defined(ENABLE_REMOTE_DEVICE)
453  CPHOBJECT const hLocalDevice,
454  CPHOOKEDOBJECT * const phRemoteDevice);
455 
465  CPDEVICEID const * const pDevID,
466  CPHOOKEDOBJECT * const phRemoteDevice);
467 #endif // defined(ENABLE_REMOTE_DEVICE)
468 
477  CPUINT16 const wNumber,
478  CPHOOKEDOBJECT * const phMsg);
479 
488  CPUINT32 const dwCapacity);
490 
492 
493 #ifdef __cplusplus
494 }
495 #endif
496 
497 #endif // _CLC_FCT_CHAI_H_
CLC_ErrorCode CHAI_UnregisterSignalNotificationHandler(void)
Unregister the Signal notification handler for the CHAI.
CLC_ErrorCode CHAI_Connect(CPUINT16 const wBrandID, CPCHAR8 const *const utf8BrandName, CPCHAR8 const *const utf8ContactInfo)
Get connected to the network. If this method is called when the CHAI is already connected, a redeclare of devices is performed and parameters are ignored.
FindDeviceOptions
Device finding flags, can be combined.
Definition: CLC_Enums.h:1092
CLC_ErrorCode CHAI_EnterSnapshotSavingMode(void)
Enter in Snapshot saving mode. The CHAI will maintain the network in snapshot saving mode sending reg...
CLC_ErrorCode CHAI_GetCurrentSnapshotMode(SnapshotModes *const pSnapshotMode)
Check if a Snapshot mode is running.
CLC_ErrorCode CHAI_GetCHAIGroups(CPUINT32 *const pdwGroups)
Get the CHAI groups.
CLC_ErrorCode CHAI_SetFlowControlIncomingCapacity(CPUINT32 const dwCapacity)
Set the flow control incoming capacity.
WarningCodes
Warning codes.
Definition: CLC_Enums.h:2359
CLC_ErrorCode CHAI_AddLocalDevice(ObjectTypes deviceType, CPUINT16 const wModelID, CPUINT32 const dwDuplicateNumber, DuplicateModes const duplicateMode, CPBOOLEAN const fHidden, ExtendedDeviceCapabilities const extendedCapabilities, CPCHAR8 const *const utf8ModelName, CPUINT32 const dwDeviceUserData, CPHOBJECT *const phDevice)
Add a new root device to the CHAI.
GlobalTimerNotificationFlags
Flags for CHAI's global timer notification handler. Used by the CHAI's global timer notification hand...
Definition: CLC_Enums.h:1111
#define CLC_SDK_API
Definition: CLCm_Platform.h:37
CPUINT32 CPHOOKEDOBJECT
Handle on Hooked Object.
Definition: CLCm_Types.h:58
CLC_ErrorCode CHAI_Signal(CPDEVICEID const *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)
CLC_ErrorCode CHAI_RemoteDevice_FindFirst_Async(FindDeviceOptions const options, CPDEVICEID const *const pParentDevID, DeviceCapabilities const includeDeviceCapabilities, DeviceCapabilities const excludeDeviceCapabilities, InOutCapabilities const includeInputCapabilities, InOutCapabilities const excludeInputCapabilities, InOutCapabilities const includeOutputCapabilities, InOutCapabilities const excludeOutputCapabilities, CPUINT16 const wBrandID, CPUINT16 const wModelID, CPUINT32 const dwDuplicateNumberFrom, CPUINT32 const dwDuplicateNumberTo, CPUINT16 const wModuleIDFrom, CPUINT16 const wModuleIDTo, CPUINT32 const dwClientContextData, CPHASYNC *const phAsync)
Find the first device according the specified filtering arguments.
CLC_ErrorCode CHAI_UnregisterNotificationHandler(void)
Unregister CHAI notification handler.
CLC_ErrorCode CHAI_GetGlobalSynchronizedTime(SystemTime *const pSystemTime)
Get the current global synchronized time.
CLC_ErrorCode CHAI_CreateRemoteDevice(CPDEVICEID const *const pDevID, CPHOOKEDOBJECT *const phRemoteDevice)
Create a new Remote Device object from a DeviceID.
CLC_ErrorCode
Error code Enumeration. Error codes from 0x01 to 0xFF are related to a CopperLan functions return cod...
Definition: CLCm_Defines.h:469
DuplicateModes
Duplicate resolution modes.
Definition: CLC_Enums.h:906
char CPCHAR8
Character Type (8 bit signed)
Definition: PlatformTypes.h:66
WarningDomains
Warning domains.
Definition: CLC_Enums.h:2331
CPUINT32 CPHASYNC
Handle on Async handler.
Definition: CLCm_Types.h:59
CPUINT64 SystemTime
System Time definition as unsigned 64 bit integer.
Definition: CLCm_Types.h:62
CLC_ErrorCode CHAI_EnterSnapshotRestoreMode(void)
Enter in Snapshot restore mode. The CHAI will maintain the network in pSnapshotMode restore mode send...
CLC_ErrorCode CHAI_RemoteDevice_FindPrev_Async(CPHOOKEDOBJECT const hDeviceEnumContext, CPUINT32 const dwClientContextData, CPHASYNC *const phAsync)
Find the previous device according the specified enumeration context.
CLC_ErrorCode CHAI_RemoveSelectorItemList(CPHOBJECT const hSelectorItemList)
Remove a Selector Item List.
CLC_ErrorCode CHAI_RegisterNotificationHandler(void)
Register CHAI notification handler.
ObjectTypes
Object types.
Definition: CLC_Enums.h:1521
InOutCapabilities
Input & Output capabilities.
Definition: CLC_Enums.h:1145
CLC_ErrorCode CHAI_RegisterSignalNotificationHandler(void)
Register the Signal notification handler for the CHAI.
CLC_ErrorCode CHAI_IsConnected(CPBOOLEAN *const pfConnected)
Check if the CHAI is connected.
unsigned short CPUINT16
Word Integer (16 bit unsigned)
Definition: PlatformTypes.h:45
CLC_ErrorCode CHAI_RegisterGlobalTimer(GlobalTimerNotificationFlags const flags)
Register global timer notification handler for specified events.
unsigned long CPUINT32
Double Word Integer (32 bit unsigned)
Definition: PlatformTypes.h:48
CLC_ErrorCode CHAI_RemoveIndexList(CPHOBJECT const hIndexList)
Remove an Index List.
CLC_ErrorCode CHAI_AddSelectorItemList(CPUINT16 const wSize, CPUINT16 const *const arValues, CPCHAR8 const *const *const arutf8Names, CPHOBJECT *const phSelectorItemList)
Add a Selector Item List.
CLC_ErrorCode CHAI_Warning_Send(CPENDPOINT const *const pOptionalSource, WarningCodes const code, WarningDomains const domain, CPCHAR8 const *const utf8Title, CPCHAR8 const *const utf8Content)
Broadcast an warning message.
CLC_ErrorCode CHAI_RedeclareAllDevices(void)
Redeclare all devices.
CLC_ErrorCode CHAI_AddIndexList(CPUINT16 const wSize, CPCHAR8 const *const *const arutf8Names, CPHOBJECT *const phIndexList)
Add an Index List for use with parameter creation.
CLC_ErrorCode CHAI_SetCHAIGroups(CPUINT32 const dwGroups)
Set the CHAI groups (31 bits - one per group - ; MSB = super-group).
Container structure for Endpoint.
Definition: CLC_Types.h:48
CLC_ErrorCode CHAI_LeaveSnapshotMode(void)
Quit the Snapshot mode if this is managed by the local CHAI!
DeviceCapabilities
Device capabilities It can be used for device filtering during enumeration. This combination of value...
Definition: CLC_Enums.h:483
SnapshotModes
Currently running Snapshot modes.
Definition: CLC_Enums.h:1997
CLC_ErrorCode CHAI_SetApplicationName(CPCHAR8 const *const utf8Name)
Set the application name.
CLC_ErrorCode CHAI_CreateRemoteDeviceFromLocalDevice(CPHOBJECT const hLocalDevice, CPHOOKEDOBJECT *const phRemoteDevice)
Create a new Remote Device object from a local device.
Container structure for Device ID.
Definition: CLC_Types.h:39
CLC_ErrorCode CHAI_UpdateSelectorItemList(CPHOBJECT const hSelectorItemList, CPUINT16 const wSize, CPUINT16 const *const arValues, CPCHAR8 const *const *const arutf8Names)
Update a Selector Item List.
CLC_ErrorCode CHAI_GetVersion(CPUINT32 *const pdwVersion, CPCHAR8 const **const ppVersionString)
Get the current CHAI and VNM versions.
CLC_ErrorCode CHAI_CreateDataTransferMessage(CPUINT16 const wNumber, CPHOOKEDOBJECT *const phMsg)
Create a new Data Transfer Message object.
CPUINT32 CPHOBJECT
Handle on Object.
Definition: CLCm_Types.h:57
CLC_ErrorCode CHAI_RemoveLocalDevice(CPHOBJECT const LocalDeviceHandle)
Remove a local device.
CLC_ErrorCode CHAI_RemoteDevice_FindNext_Async(CPHOOKEDOBJECT const hDeviceEnumContext, CPUINT32 const dwClientContextData, CPHASYNC *const phAsync)
Find the next device according the specified enumeration context.
CLC_ErrorCode CHAI_IsGlobalSynchronizedTimeReference(CPBOOLEAN *const pfTimeReference)
Check if this machine is the current global synchronized time reference.
ExtendedDeviceCapabilities
Extended device capabilities It can not be used for device enumeration filtering. ...
Definition: CLC_Enums.h:531
CLC_ErrorCode CHAI_Disconnect(void)
Disconnect from the network.