CHAI SDK
Version 1.3
|
CHAI interface. More...
Public Member Functions | |
virtual void | Destroy ()=0 |
Destroy the CHAI instance. More... | |
virtual void | GetVersion (CPNS::uint16 &wCHAIVersion, CPNS::uint16 &wVNMVersion)=0 |
Get the current CHAI and VNM versions. More... | |
virtual CPNS::UTF8String | GetVersionString ()=0 |
Get a string containing the current CHAI and VNM versions. More... | |
virtual CPNS::uint32 | GetMachineUniqueDuplicateNumber ()=0 |
Get unique duplicate related to the machine. More... | |
virtual CPNS::UTF8String | GetMachineName ()=0 |
Get the machine name. More... | |
virtual CPNS::UTF8String | GetMachineMACAddress ()=0 |
Get the machine MAC address. More... | |
virtual CPNS::MachineID | GetMachineID () const =0 |
Get the machine ID. More... | |
virtual CPNS::uint32 | GetRandom ()=0 |
Get a random number Can be used to assign a random duplicate number to local devices. More... | |
virtual void | SetApplicationName (CPNS::char8 const *const utf8Name)=0 |
Set the application name. More... | |
virtual void | SetMachineFitness (CPNS::uint8 const bFitnessValue)=0 |
Set the machine fitness. More... | |
virtual void | CHAILock ()=0 |
Lock the CHAI library This prevents the CHAI and related objects sending a notification or async return handler to the application. More... | |
virtual void | CHAIUnlock ()=0 |
Unlock the CHAI library Restores the CHAI activity, handlers will be called again. More... | |
virtual void | SetThreadPriority (CPNS::uint8 const bPriority)=0 |
Set the CHAI's thread priority. More... | |
virtual void | SetAsyncTimeouts (CPNS::boolean const fEnabled)=0 |
Enable or disable the Async timeouts By default, Async operation timeout is enabled. More... | |
virtual void | SetTrashcanUsageForMessageObjects (CPNS::boolean const fEnabled)=0 |
Enable or disable the trashcan usage for message objects By default, the trashcan is not used to maintain the message objects. More... | |
virtual void | SetCHAIDeviceFiltering (CPNS::boolean const fFiletered)=0 |
Enable or disable the CHAI device filtering By default, CHAI devices PnP events are not notified to the application side. More... | |
virtual void | SetFlowControlIncomingCapacity (CPNS::uint32 const dwCapacity)=0 |
Set the flow control incoming capacity By default, flow control capacity is infinite. More... | |
virtual void | FlowControl (CPNS::boolean const fSuspend)=0 |
This can be used to notify connected Output that they should suspend or resume sending. More... | |
virtual CPNS::boolean | CheckAsync (CPNS::IAsync *const pAsync)=0 |
Check if an async operation is still valid Verify if the async operation pointer is valid and can be used. More... | |
virtual CPNS::boolean | CancelAsync (CPNS::IAsync *const pAsync)=0 |
Cancel an Async operation. More... | |
virtual void | RegisterNotificationHandler (CPNS::ICHAI_NotificationHandler *const pHandler)=0 |
Register a CHAI's notification handler. More... | |
virtual void | UnregisterNotificationHandler (CPNS::ICHAI_NotificationHandler *const pHandler)=0 |
Unregister a CHAI's notification handler. More... | |
virtual void | RegisterWatcherNotificationHandler (CPNS::CombinedWatcherPOIs const POIs, CPNS::ICHAI_WatcherNotificationHandler *const pHandler)=0 |
Register a watcher notification handler. More... | |
virtual void | UnregisterWatcherNotificationHandler (CPNS::ICHAI_WatcherNotificationHandler *const pHandler)=0 |
Unregister a watcher notification handler. More... | |
virtual CPNS::SystemTime | GetGlobalSynchronizedTime ()=0 |
Get the current global synchronized time. More... | |
virtual CPNS::uint32 | GetGlobalSynchronizedTimeMillisecond ()=0 |
Get the current global synchronized time in milliseconds. More... | |
virtual CPNS::boolean | IsGlobalSynchronizedTimeReference ()=0 |
Check if this machine is the current global synchronized time reference. More... | |
virtual CPNS::SystemTime | GetLocalTime ()=0 |
Get the machine local time. More... | |
virtual CPNS::uint32 | GetLocalTimeMillisec ()=0 |
Get the machine local time in milliseconds. More... | |
virtual CPNS::Enums::Errors | EnterSnapshotSavingMode ()=0 |
Enter in Snapshot saving mode. More... | |
virtual CPNS::Enums::Errors | EnterSnapshotRestoreMode ()=0 |
Enter in Snapshot restore mode. More... | |
virtual void | LeaveSnapshotMode ()=0 |
Quit the Snapshot mode if this is managed by the local CHAI! More... | |
virtual CPNS::Enums::SnapshotModes | GetCurrentSnapshotMode ()=0 |
Check if a Snapshot mode is running. More... | |
virtual CPNS::IIndexList * | AddIndexList (CPNS::uint16 const wSize, CPNS::char8 const *const *const arutf8Names)=0 |
Add a static Index List. More... | |
virtual CPNS::IIndexList * | AddIndexList (CPNS::uint16 const wSize, CPNS::IIndexList_NotificationHandler *const pHandler)=0 |
Add an dynamic Index List. More... | |
virtual CPNS::boolean | RemoveIndexList (CPNS::IIndexList *const pList)=0 |
Remove an Index List. More... | |
virtual CPNS::ISelectorItemList * | AddSelectorItemList (CPNS::uint16 const wSize, CPNS::SelectorItem const *const arItems)=0 |
Add a static Selector Item List. More... | |
virtual CPNS::ISelectorItemList * | AddSelectorItemList (CPNS::uint16 const wSize, CPNS::ISelectorItemList_NotificationHandler *const pHandler)=0 |
Add an dynamic Selector Item List. More... | |
virtual CPNS::boolean | RemoveSelectorItemList (CPNS::ISelectorItemList *const pList)=0 |
Remove a Selector Item List. More... | |
virtual CPNS::boolean | RedeclareAllDevices ()=0 |
Redeclare all devices. More... | |
virtual CPNS::ILocalDevice * | AddLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0 |
Add a new general purpose local device to the CHAI. More... | |
virtual CPNS::IMIDI2CPLocalDevice * | AddMIDI2CPLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0 |
Add a new MIDI -> CopperLan local device to the CHAI. More... | |
virtual CPNS::ICP2MIDILocalDevice * | AddCP2MIDILocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0 |
Add a new CopperLan -> MIDI local device to the CHAI. More... | |
virtual CPNS::IHybridMIDILocalDevice * | AddHybridMIDILocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0 |
Add a new CopperLan <-> MIDI local device to the CHAI. More... | |
virtual CPNS::IVMIDILinkOutLocalDevice * | AddVMIDILinkOutLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::char8 const *const utf8PortName)=0 |
Add a VMIDILink Out device. More... | |
virtual CPNS::IVMIDILinkInLocalDevice * | AddVMIDILinkInLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::char8 const *const utf8PortName)=0 |
Add a VMIDILink In sub-device This kind of Local Device is acting as a local input port, aimed to receive messages from a MIDI Out port automatically created on remote computers. More... | |
virtual CPNS::IVMIDILinkHybridLocalDevice * | AddVMIDILinkHybridLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::char8 const *const utf8PortName)=0 |
Add a VMIDILink Hybrid sub-device This kind of Local Device is acting as a local input/output port, aimed to receive and send messages from/to a pair of MIDI Out/In ports automatically created on remote computers. More... | |
virtual CPNS::ISharedDisplayLocalDevice * | AddSharedDisplayLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0 |
Add a new Shared Display local device to the CHAI. More... | |
virtual CPNS::ISharedDisplayClientLocalDevice * | AddSharedDisplayClientLocalDevice (CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumber, CPNS::Enums::DuplicateModes const duplicateMode, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0 |
Add a new Shared Display Client local device to the CHAI. More... | |
virtual CPNS::IBaseLocalDevice * | GetLocalDevice (CPNS::DeviceID const &devID)=0 |
Get a local device from its device ID. More... | |
virtual CPNS::boolean | RemoveLocalDevice (CPNS::IBaseLocalDevice const *const pDevice)=0 |
Remove a local device. More... | |
virtual CPNS::Enums::Errors | Connect ()=0 |
Get connected to the network. More... | |
virtual void | Disconnect ()=0 |
Disconnected from the network. More... | |
virtual CPNS::boolean | IsConnected () const =0 |
Check if the CHAI is connected. More... | |
virtual void | SetCHAIGroups (CPNS::uint32 const dwGroups)=0 |
Set the CHAI groups. More... | |
virtual CPNS::uint32 | GetCHAIGroups () const =0 |
Get the CHAI groups. More... | |
virtual CPNS::IAsync * | RemoteDevice_FindFirst_Async (CPNS::CombinedFindDeviceOptions const options, CPNS::DeviceID const &parentDevID, CPNS::CombinedDeviceCapabilities const includeDeviceCapabilities, CPNS::CombinedDeviceCapabilities const excludeDeviceCapabilities, CPNS::ICHAI_RemoteDevice_Find_AsyncReturnHandler *const pHandler, void *const pUserPointer)=0 |
Find the first device according the specified filtering arguments. More... | |
virtual CPNS::IAsync * | RemoteDevice_FindFirst_Async (CPNS::CombinedFindDeviceOptions const options, CPNS::DeviceID const &parentDevID, CPNS::CombinedDeviceCapabilities const includeDeviceCapabilities, CPNS::CombinedDeviceCapabilities const excludeDeviceCapabilities, CPNS::CombinedInOutCapabilities const includeInputCapabilities, CPNS::CombinedInOutCapabilities const excludeInputCapabilities, CPNS::CombinedInOutCapabilities const includeOutputCapabilities, CPNS::CombinedInOutCapabilities const excludeOutputCapabilities, CPNS::ICHAI_RemoteDevice_Find_AsyncReturnHandler *const pHandler, void *const pUserPointer)=0 |
Find the first device according the specified filtering arguments. More... | |
virtual CPNS::IAsync * | RemoteDevice_FindFirst_Async (CPNS::CombinedFindDeviceOptions const options, CPNS::DeviceID const &parentDevID, CPNS::CombinedDeviceCapabilities const includeDeviceCapabilities, CPNS::CombinedDeviceCapabilities const excludeDeviceCapabilities, CPNS::CombinedInOutCapabilities const includeInputCapabilities, CPNS::CombinedInOutCapabilities const excludeInputCapabilities, CPNS::CombinedInOutCapabilities const includeOutputCapabilities, CPNS::CombinedInOutCapabilities const excludeOutputCapabilities, CPNS::uint16 const wBrandID, CPNS::uint16 const wModelID, CPNS::uint32 const dwDuplicateNumberFrom, CPNS::uint32 const dwDuplicateNumberTo, CPNS::uint16 const wModuleIDFrom, CPNS::uint16 const wModuleIDTo, CPNS::ICHAI_RemoteDevice_Find_AsyncReturnHandler *const pHandler, void *const pUserPointer)=0 |
Find the first device according the specified filtering arguments. More... | |
virtual CPNS::IAsync * | RemoteDevice_FindNext_Async (CPNS::IDeviceEnumerationContext *const pEnumerationContext, CPNS::ICHAI_RemoteDevice_Find_AsyncReturnHandler *const pHandler, void *const pUserPointer)=0 |
Find the next device according the specified enumeration context. More... | |
virtual CPNS::IAsync * | RemoteDevice_FindPrev_Async (CPNS::IDeviceEnumerationContext *const pEnumerationContext, CPNS::ICHAI_RemoteDevice_Find_AsyncReturnHandler *const pHandler, void *const pUserPointer)=0 |
Find the previous device according the specified enumeration context. More... | |
virtual void | RegisterGlobalTimer (CPNS::CombinedGlobalTimerNotificationFlags const flags, CPNS::ICHAI_GlobalTimer_NotificationHandler *const pHandler)=0 |
Register global timer notification handler for specified events. More... | |
virtual void | UnregisterGlobalTimer (CPNS::ICHAI_GlobalTimer_NotificationHandler *const pHandler)=0 |
Unregister global timer notification handler. More... | |
virtual CPNS::ITimer * | AddTimer (CPNS::ICHAI_Timer_NotificationHandler *const pHandler)=0 |
Add a timer. More... | |
virtual CPNS::boolean | RemoveTimer (CPNS::ITimer *const pTimer)=0 |
Remove a timer. More... | |
virtual CPNS::Enums::Errors | Recording_Arm ()=0 |
Global recording arming. More... | |
virtual CPNS::Enums::Errors | Recording_Arm (CPNS::DeviceID const &devID)=0 |
Device recording arming. More... | |
virtual CPNS::Enums::Errors | Recording_Arm (CPNS::DeviceID const &devID, CPNS::uint16 const wOutputID_or_ControllerID)=0 |
Output or Controller recording arming. More... | |
virtual CPNS::Enums::Errors | Recording_Disarm ()=0 |
Global recording disarming. More... | |
virtual CPNS::Enums::Errors | Recording_Disarm (CPNS::DeviceID const &devID)=0 |
Device recording disarming. More... | |
virtual CPNS::Enums::Errors | Recording_Disarm (CPNS::DeviceID const &devID, CPNS::uint16 const wOutputID_or_ControllerID)=0 |
Output recording disarming. More... | |
virtual CPNS::Enums::Errors | Warning_Send (CPNS::Endpoint const &optionalSource, CPNS::CombinedWarningCodes const code, CPNS::Enums::WarningDomains const domain, CPNS::char8 const *const utf8Title, CPNS::char8 const *const utf8Content)=0 |
Broadcast an warning message. More... | |
virtual void | RegisterSignalNotificationHandler (CPNS::ICHAI_SignalNotificationHandler *const pHandler)=0 |
Register a Signal reception notification handler. More... | |
virtual void | UnregisterSignalNotificationHandler (CPNS::ICHAI_SignalNotificationHandler *const pHandler)=0 |
Unregister a Signal reception notification handler. More... | |
virtual CPNS::Enums::Errors | Signal_Direct (CPNS::DeviceID const &devID, CPNS::uint16 const wSignalNumber, CPNS::uint16 const wOptionalData0, CPNS::uint16 const wOptionalData1, CPNS::uint16 const wOptionalData2, CPNS::uint16 const wOptionalData3, CPNS::char8 const *const utf8OptionalData, CPNS::Endpoint const &optionalEndpoint)=0 |
Send a signal directed to the specified device from the CHAI. More... | |
virtual CPNS::Enums::Errors | Signal_Broadcast (CPNS::uint16 const wSignalNumber, CPNS::uint16 const wOptionalData0, CPNS::uint16 const wOptionalData1, CPNS::uint16 const wOptionalData2, CPNS::uint16 const wOptionalData3, CPNS::char8 const *const utf8OptionalData, CPNS::Endpoint const &optionalEndpoint)=0 |
Send a signal broadcasted to all devices from the CHAI. More... | |
virtual CPNS::IRemoteDevice * | CreateRemoteDevice (CPNS::IBaseLocalDevice *const pLocalDevice)=0 |
Create a new Remote Device object from a local device. More... | |
virtual CPNS::IRemoteDevice * | CreateRemoteDevice (CPNS::DeviceID const &devID, CPNS::IRemoteDevice_NotificationHandler *const pHandler)=0 |
Create a new Remote Device object from a DeviceID. More... | |
virtual CPNS::IRemoteDevice * | CreateRemoteDevice (CPNS::Endpoint const &endPoint, CPNS::boolean const fEndpointIsSource, CPNS::IRemoteDevice_NotificationHandler2 *const pHandler)=0 |
Create a new Remote Device object from an Endpoint. More... | |
virtual CPNS::IEventMessage * | CreateEventMessage ()=0 |
Create a new Event Message object. More... | |
virtual CPNS::IEventMessage * | CreateEventMessage (CPNS::IEventMessage *const pCopySource)=0 |
Create a new Event Message object. More... | |
virtual CPNS::IModifierMessage * | CreateModifierMessage ()=0 |
Create a new Modifier Message object. More... | |
virtual CPNS::IModifierMessage * | CreateModifierMessage (CPNS::IModifierMessage *const pCopySource)=0 |
Create a new Modifier Message object. More... | |
virtual CPNS::IModifierMessage * | CreateModifierMessage (CPNS::uint16 const wNumber, CPNS::uint16 const wIndex, CPNS::uint16 const wRawValue, CPNS::Enums::RelativeMode const relativeMode)=0 |
Create a new Modifier Message object. More... | |
virtual CPNS::IModifierMessage * | CreateModifierMessage (CPNS::uint16 const wNumber, CPNS::uint16 const wIndex, CPNS::Value const &value, CPNS::Enums::RelativeMode const relativeMode)=0 |
Create a new Modifier Message object. More... | |
virtual CPNS::ISelectorMessage * | CreateSelectorMessage ()=0 |
Create a new Selector Message object. More... | |
virtual CPNS::ISelectorMessage * | CreateSelectorMessage (CPNS::uint16 const wNumber, CPNS::uint16 const wIndex, CPNS::uint16 const wRawValue, CPNS::Enums::RelativeMode const relativeMode)=0 |
Create a new Selector Message object. More... | |
virtual CPNS::ITextMessage * | CreateTextMessage ()=0 |
Create a new Text Message object. More... | |
virtual CPNS::ITextMessage * | CreateTextMessage (CPNS::uint16 const wNumber, CPNS::uint16 const wIndex, CPNS::char8 const *const utf8Text)=0 |
Create a new Text Message object. More... | |
virtual CPNS::IMIDISysexMessage * | CreateMIDISysexMessage ()=0 |
Create a new MIDI Sysex Message object. More... | |
virtual CPNS::IDataTransferMessage * | CreateDataTransferMessage ()=0 |
Create a new Data Transfer Message object. More... | |
virtual CPNS::IDataTransferMessage * | CreateDataTransferMessage (CPNS::uint16 const wNumber)=0 |
Create a new Data Transfer Message object. More... | |
CHAI interface.
This is the CopperLan root object interface
|
pure virtual |
Add a new CopperLan -> MIDI local device to the CHAI.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | fHidden | TRUE if the device is hidden |
[in] | extDevCaps | Combination of ExtendedDeviceCapabilities flags |
[in] | utf8ModelName | Model name |
|
pure virtual |
Add a new CopperLan <-> MIDI local device to the CHAI.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | fHidden | TRUE if the device is hidden |
[in] | extDevCaps | Combination of ExtendedDeviceCapabilities flags |
[in] | utf8ModelName | Model name |
|
pure virtual |
Add a static Index List.
[in] | wSize | Number of items in the list |
[in] | arutf8Names | Array of string pointers. |
|
pure virtual |
Add an dynamic Index List.
[in] | wSize | Number of items in the list |
[in] | pHandler | Pointer to the application object implementing IIndexList_NotificationHandler |
|
pure virtual |
Add a new general purpose local device to the CHAI.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | fHidden | TRUE if the device is hidden |
[in] | extDevCaps | Combination of ExtendedDeviceCapabilities flags |
[in] | utf8ModelName | Model name |
|
pure virtual |
Add a new MIDI -> CopperLan local device to the CHAI.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | fHidden | TRUE if the device is hidden |
[in] | extDevCaps | Combination of ExtendedDeviceCapabilities flags |
[in] | utf8ModelName | Model name |
|
pure virtual |
Add a static Selector Item List.
[in] | wSize | Number of items in the list |
[in] | arItems | Array of Selector Item pointers. |
|
pure virtual |
Add an dynamic Selector Item List.
[in] | wSize | Number of items in the list |
[in] | pHandler | Pointer to the application object implementing ISelectorItemList_NotificationHandler |
|
pure virtual |
Add a new Shared Display Client local device to the CHAI.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | fHidden | TRUE if the device is hidden |
[in] | extDevCaps | Combination of ExtendedDeviceCapabilities flags |
[in] | utf8ModelName | Model name |
|
pure virtual |
Add a new Shared Display local device to the CHAI.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | fHidden | TRUE if the device is hidden |
[in] | extDevCaps | Combination of ExtendedDeviceCapabilities flags |
[in] | utf8ModelName | Model name |
|
pure virtual |
Add a timer.
[in] | pHandler | Pointer to the notification handler related to the new timer. |
|
pure virtual |
Add a VMIDILink Hybrid sub-device This kind of Local Device is acting as a local input/output port, aimed to receive and send messages from/to a pair of MIDI Out/In ports automatically created on remote computers.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | utf8PortName | The port name |
|
pure virtual |
Add a VMIDILink In sub-device This kind of Local Device is acting as a local input port, aimed to receive messages from a MIDI Out port automatically created on remote computers.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | utf8PortName | The port name |
|
pure virtual |
Add a VMIDILink Out device.
This kind of Local Device is acting as a local output port, aimed to send messages to a MIDI In port automatically created on remote computers.
[in] | wModelID | Device model ID code. This argument is not relevant if you provided a SDKKey during the CHAI creation. In this case the modelID is overridden by the one provided in the key. |
[in] | dwDuplicateNumber | Preferred duplicate number for DM_Auto mode (might change in case of conflict), or requested number for DM_Fixed mode. |
[in] | duplicateMode | Duplicate resolution mode |
[in] | utf8PortName | The port name |
|
pure virtual |
Cancel an Async operation.
The async operation will be canceled, the related notification handler will be called with fSuccess at FALSE.
[in] | pAsync | pointer to the IAsync object handling the async operation. |
|
pure virtual |
Lock the CHAI library This prevents the CHAI and related objects sending a notification or async return handler to the application.
In other words, an application call Lock to ensure exclusive ownership of its resources for a while, without risk of those resource access from the CHAI's thread.
|
pure virtual |
Unlock the CHAI library Restores the CHAI activity, handlers will be called again.
|
pure virtual |
Check if an async operation is still valid Verify if the async operation pointer is valid and can be used.
Typically used within CHAILock/CHAIUnlock
[in] | pAsync | pointer to the IAsync object handling the async operation. |
|
pure virtual |
Get connected to the network.
If this method is called when the CHAI is already connected, a redeclare of devices is performed.
|
pure virtual |
Create a new Data Transfer Message object.
|
pure virtual |
Create a new Data Transfer Message object.
This method creates a new Data Transfer ready to be sent
[in] | wNumber | message number, custom value or standard value DTN_*** from DataTransferNumbers enum |
|
pure virtual |
Create a new Event Message object.
|
pure virtual |
Create a new Event Message object.
This method copy data from an existing event
[in] | pCopySource | a pointer to the original Event |
|
pure virtual |
Create a new MIDI Sysex Message object.
|
pure virtual |
Create a new Modifier Message object.
|
pure virtual |
Create a new Modifier Message object.
This method copy data from an existing modifier
[in] | pCopySource | a pointer to the original Modifier |
|
pure virtual |
Create a new Modifier Message object.
This method creates a new Modifier ready to be sent
[in] | wNumber | message number, custom value or standard value MOD_*** from Modifiers enum |
[in] | wIndex | message index, 0 if no index. |
[in] | wRawValue | raw value |
[in] | relativeMode | specifies if the value is relative or not |
|
pure virtual |
Create a new Modifier Message object.
This method creates a new Modifier ready to be sent
[in] | wNumber | message number, custom value or standard value MOD_*** from Modifiers enum |
[in] | wIndex | message index, 0 if no index. |
[in] | value | complete value (including raw value and optional typed value) |
[in] | relativeMode | specifies if the value is relative or not |
|
pure virtual |
Create a new Remote Device object from a local device.
[in] | pLocalDevice | The local device pointer |
|
pure virtual |
Create a new Remote Device object from a DeviceID.
The application is notified when additional information such as parent and capabilities is available.
[in] | devID | The device ID |
[in] | pHandler | Pointer to the application object implementing IRemoteDevice_NotificationHandler. Can be NULL if the remote device is just needed to perform immediate async operation. |
|
pure virtual |
Create a new Remote Device object from an Endpoint.
The application is notified when additional information such as parent and capabilities is available. The notification informs also about the endpoint path.
[in] | endPoint | The endpoint related to the expected device |
[in] | fEndpointIsSource | TRUE if the endpoint is a source, FALSE is it is a destination |
[in] | pHandler | Pointer to the application object implementing IRemoteDevice_NotificationHandler2 |
|
pure virtual |
Create a new Selector Message object.
|
pure virtual |
Create a new Selector Message object.
This method creates a new Selector ready to be sent
[in] | wNumber | message number, custom value or standard value SEL_*** from Selectors enum |
[in] | wIndex | message index, 0 if no index. |
[in] | wRawValue | raw value |
[in] | relativeMode | specifies if the value is relative or not |
|
pure virtual |
Create a new Text Message object.
|
pure virtual |
Create a new Text Message object.
This method creates a new Text ready to be sent
[in] | wNumber | message number, custom value or standard value TXT_*** from Texts enum |
[in] | wIndex | message index, 0 if no index. |
[in] | utf8Text | text value |
|
pure virtual |
Destroy the CHAI instance.
Call this to destroy the CHAI instance and clear related memory.
|
pure virtual |
Disconnected from the network.
|
pure virtual |
Enter in Snapshot restore mode.
The CHAI will maintain the network in Snapshot restore mode sending regularly a signal, so any application is aware about that, even it is declared on the network while a snapshot is running.
|
pure virtual |
Enter in Snapshot saving mode.
The CHAI will maintain the network in snapshot saving mode sending regularly a signal, so any application is aware about that, even it is declared on the network while a snapshot is running.
|
pure virtual |
This can be used to notify connected Output that they should suspend or resume sending.
This is overriding the automatic flow control behavior. This method is offering the same functionality as CPNS::IBaseLocalDevice::FlowControl.
[in] | fSuspend | TRUE if the connected Outputs should suspend sending |
|
pure virtual |
Get the CHAI groups.
|
pure virtual |
Check if a Snapshot mode is running.
|
pure virtual |
Get the current global synchronized time.
|
pure virtual |
Get the current global synchronized time in milliseconds.
|
pure virtual |
Get a local device from its device ID.
[in] | devID | Requested device ID |
|
pure virtual |
Get the machine local time.
|
pure virtual |
Get the machine local time in milliseconds.
|
pure virtual |
Get the machine ID.
|
pure virtual |
Get the machine MAC address.
|
pure virtual |
Get the machine name.
|
pure virtual |
Get unique duplicate related to the machine.
This value is calculated by platform dependend code. On Mac and PC, this value is the duplicated number identifying the local VNM Manager.
|
pure virtual |
Get a random number Can be used to assign a random duplicate number to local devices.
|
pure virtual |
Get the current CHAI and VNM versions.
This method is useful to identify the current CHAI and VNM versions. Version format is 0xMmbb, M: major, m: minor, bb: build. Ascendant compatibility is not guaranteed between different major versions.
[out] | wCHAIVersion | Output argument receiving the CHAI version. |
[out] | wVNMVersion | Output argument receiving the VNM version (if the CHAI is connected to the VNM) |
|
pure virtual |
Get a string containing the current CHAI and VNM versions.
|
pure virtual |
Check if the CHAI is connected.
|
pure virtual |
Check if this machine is the current global synchronized time reference.
|
pure virtual |
Quit the Snapshot mode if this is managed by the local CHAI!
|
pure virtual |
Global recording arming.
Broadcasted to all outputs of all devices
|
pure virtual |
Device recording arming.
Broadcasted to all outputs of the specified device
[in] | devID | Device ID of the target device |
|
pure virtual |
Output or Controller recording arming.
Sent to the specified Output or Controller of the specified device
[in] | devID | Device ID of the target device |
[in] | wOutputID_or_ControllerID | Output or Controller ID |
|
pure virtual |
Global recording disarming.
Broadcasted to all outputs of all devices
|
pure virtual |
Device recording disarming.
Broadcasted to all outputs of the specified device
[in] | devID | Device ID of the target device |
|
pure virtual |
Output recording disarming.
Sent to the specified Output or Controller of the specified device
[in] | devID | Device ID of the target device |
[in] | wOutputID_or_ControllerID | Output or Controller ID |
|
pure virtual |
Redeclare all devices.
|
pure virtual |
Register global timer notification handler for specified events.
Override previous registered flags for the specified handler.
[in] | flags | Combination of GTNF_XXX flags |
[in] | pHandler | Pointer to the application object implementing ICHAI_GlobalTimer_NotificationHandler |
|
pure virtual |
Register a CHAI's notification handler.
The CHAI's notification handler is used to send information to the application, such as connection status, device plug/unplug, ...
[in] | pHandler | Pointer to the application object implementing ICHAI_NotificationHandler. If pHandler is NULL, clear all registered handlers. |
|
pure virtual |
Register a Signal reception notification handler.
[in] | pHandler | Pointer to the application object implementing ICHAI_SignalNotificationHandler Clear all registered handlers if pHandler is NULL. |
|
pure virtual |
Register a watcher notification handler.
The watcher notification handler is used to notify the application when remote device connection status or controller assignment change.
[in] | POIs | Bitfield containing the points of interest. |
[in] | pHandler | Pointer to the application object implementing ICHAI_WatcherNotificationHandler. If pHandler is NULL, clear all registered handlers. |
|
pure virtual |
Find the first device according the specified filtering arguments.
[in] | parentDevID | Parent ID |
[in] | includeDeviceCapabilities | Included device capabilities flags. Use DC_Any to keep all devices. |
[in] | excludeDeviceCapabilities | Excluded device capabilities flags. Use DC_None to keep all devices. |
[in] | pHandler | Pointer to the application object implementing ICHAI_RemoteDevice_Find_AsyncReturnHandler |
[in] | pUserPointer | User data |
|
pure virtual |
Find the first device according the specified filtering arguments.
[in] | options | Find options flags (FDO_XXX) combination. |
[in] | parentDevID | Parent ID (not used if FDO_NoHierarchy is set) |
[in] | includeDeviceCapabilities | Included device capabilities flags. Use DC_Any to keep all devices. |
[in] | excludeDeviceCapabilities | Excluded device capabilities flags. Use DC_None to keep all devices. |
[in] | includeInputCapabilities | Included input capabilities flags. Use IOC_Any to keep all devices. |
[in] | excludeInputCapabilities | Excluded input capabilities flags. Use IOC_None to keep all devices. |
[in] | includeOutputCapabilities | Included output capabilities flags. Use IOC_Any to keep all devices. |
[in] | excludeOutputCapabilities | Excluded output capabilities flags. Use IOC_None to keep all devices. |
[in] | pHandler | Pointer to the application object implementing ICHAI_RemoteDevice_Find_AsyncReturnHandler |
[in] | pUserPointer | User data |
|
pure virtual |
Find the first device according the specified filtering arguments.
[in] | options | Find options flags (FDO_XXX) combination. |
[in] | parentDevID | Parent ID (not used if FDO_NoHierarchy is set) |
[in] | includeDeviceCapabilities | Included device capabilities flags. Use DC_Any to keep all devices. |
[in] | excludeDeviceCapabilities | Excluded device capabilities flags. Use DC_None to keep all devices. |
[in] | includeInputCapabilities | Included input capabilities flags. Use IOC_Any to keep all devices. |
[in] | excludeInputCapabilities | Excluded input capabilities flags. Use IOC_None to keep all devices. |
[in] | includeOutputCapabilities | Included output capabilities flags. Use IOC_Any to keep all devices. |
[in] | excludeOutputCapabilities | Excluded output capabilities flags. Use IOC_None to keep all devices. |
[in] | wBrandID | Brand ID filter. Use 0xFFFF as wildcard. |
[in] | wModelID | Model ID filter. Use 0xFFFF as wildcard. |
[in] | dwDuplicateNumberFrom | First duplicate number. Use 0xFFFFFFFF as wildcard. |
[in] | dwDuplicateNumberTo | Last duplicate number. Use 0xFFFFFFFF as wildcard. |
[in] | wModuleIDFrom | First module ID. Use 0xFFFF as wildcard. |
[in] | wModuleIDTo | Last module ID. Use 0xFFFF as wildcard. |
[in] | pHandler | Pointer to the application object implementing ICHAI_RemoteDevice_Find_AsyncReturnHandler |
[in] | pUserPointer | User data |
|
pure virtual |
Find the next device according the specified enumeration context.
[in] | pEnumerationContext | Enumeration context from previous ICHAI_RemoteDevice_Find_AsyncReturnHandler call |
[in] | pHandler | Pointer to the application object implementing ICHAI_RemoteDevice_Find_AsyncReturnHandler |
[in] | pUserPointer | User data |
|
pure virtual |
Find the previous device according the specified enumeration context.
[in] | pEnumerationContext | Enumeration context from previous ICHAI_RemoteDevice_Find_AsyncReturnHandler call |
[in] | pHandler | Pointer to the application object implementing ICHAI_RemoteDevice_Find_AsyncReturnHandler |
[in] | pUserPointer | User data |
|
pure virtual |
Remove an Index List.
[in] | pList | Pointer to the list to remove. |
|
pure virtual |
Remove a local device.
[in] | pDevice | Pointer to the local device object to remove. |
|
pure virtual |
Remove a Selector Item List.
[in] | pList | Pointer to the list to remove. |
|
pure virtual |
Remove a timer.
[in] | pTimer | Pointer to the timer object to remove. |
|
pure virtual |
Set the application name.
The application name is used to identify the application over the network, for instance by warning messages to identify source in a friendly way. If no application name is set, the name of the first root is automatically used.
[in] | utf8Name | Application name |
|
pure virtual |
Enable or disable the Async timeouts By default, Async operation timeout is enabled.
[in] | fEnabled | TRUE to enable timeouts |
|
pure virtual |
Enable or disable the CHAI device filtering By default, CHAI devices PnP events are not notified to the application side.
If means that CPNS::ICHAI_NotificationHandler virtual methods are not called for devices having BrandID 0x0001 and ModelID 0x0001.
|
pure virtual |
Set the CHAI groups.
Default group is 1.
[in] | dwGroups | Group bit field: 31 LSB = one per group; MSB = super-group |
|
pure virtual |
Set the flow control incoming capacity By default, flow control capacity is infinite.
[in] | dwCapacity | 0: (default value) infinite capacity, for computers. else available memory for incoming messaging |
|
pure virtual |
Set the machine fitness.
[in] | bFitnessValue | Fitness value |
|
pure virtual |
Set the CHAI's thread priority.
[in] | bPriority | 0: Low; 1: Normal; 2: High (default value) |
|
pure virtual |
Enable or disable the trashcan usage for message objects By default, the trashcan is not used to maintain the message objects.
[in] | fEnabled | TRUE to enable thrashcan usage for message objects. |
|
pure virtual |
Send a signal broadcasted to all devices from the CHAI.
[in] | wSignalNumber | Standard Signal numbers are available from CPNS::Enums::Signals |
[in] | wOptionalData0 | Optional value, depending on the signal number |
[in] | wOptionalData1 | Optional value, depending on the signal number |
[in] | wOptionalData2 | Optional value, depending on the signal number |
[in] | wOptionalData3 | Optional value, depending on the signal number |
[in] | utf8OptionalData | Optional value, depending on the signal number |
[in] | optionalEndpoint | Optional value, depending on the signal number |
|
pure virtual |
Send a signal directed to the specified device from the CHAI.
[in] | devID | Target Device ID |
[in] | wSignalNumber | Standard Signal numbers are available from CPNS::Enums::Signals |
[in] | wOptionalData0 | Optional value, depending on the signal number |
[in] | wOptionalData1 | Optional value, depending on the signal number |
[in] | wOptionalData2 | Optional value, depending on the signal number |
[in] | wOptionalData3 | Optional value, depending on the signal number |
[in] | utf8OptionalData | Optional value, depending on the signal number |
[in] | optionalEndpoint | Optional value, depending on the signal number |
|
pure virtual |
Unregister global timer notification handler.
[in] | pHandler | Pointer to the application object implementing ICHAI_GlobalTimer_NotificationHandler |
|
pure virtual |
Unregister a CHAI's notification handler.
[in] | pHandler | Pointer to the application object implementing ICHAI_NotificationHandler. If pHandler is NULL, clear all registered handlers. |
|
pure virtual |
Unregister a Signal reception notification handler.
[in] | pHandler | Pointer to the application object implementing ICHAI_SignalNotificationHandler Clear all registered handlers if pHandler is NULL. |
|
pure virtual |
Unregister a watcher notification handler.
[in] | pHandler | Pointer to the application object implementing ICHAI_WatcherNotificationHandler. If pHandler is NULL, clear all registered handlers. |
|
pure virtual |
Broadcast an warning message.
[in] | optionalSource | Optional source of the warning message |
[in] | code | Combination of CPNS::Enums::WarningCodes values |
[in] | domain | Related domain |
[in] | utf8Title | Main description of the warning |
[in] | utf8Content | Additional description of the warning |