CHAI SDK  Version 1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CPNS::IBaseLocalDevice Class Referenceabstract

It is the base interface for all Local Devices. More...

+ Inheritance diagram for CPNS::IBaseLocalDevice:
+ Collaboration diagram for CPNS::IBaseLocalDevice:

Public Member Functions

virtual CPNS::ILocalDeviceGetILocalDevice () const =0
 Check LocalDevice type and return an ILocalDevice object pointer if type match. More...
 
virtual CPNS::IMIDI2CPLocalDeviceGetIMIDI2CPLocalDevice () const =0
 Check LocalDevice type and return an IMIDI2CPLocalDevice object pointer if type match. More...
 
virtual CPNS::ICP2MIDILocalDeviceGetICP2MIDILocalDevice () const =0
 Check LocalDevice type and return an ICP2MIDILocalDevice object pointer if type match. More...
 
virtual
CPNS::IHybridMIDILocalDevice
GetIHybridMIDILocalDevice () const =0
 Check LocalDevice type and return an IHybridMIDILocalDevice object pointer if type match. More...
 
virtual
CPNS::IVMIDILinkInLocalDevice
GetIVMIDILinkInLocalDevice () const =0
 Check LocalDevice type and return an IInVMIDILinkLocalDevice object pointer if type match. More...
 
virtual
CPNS::IVMIDILinkOutLocalDevice
GetIVMIDILinkOutLocalDevice () const =0
 Check LocalDevice type and return an IOutVMIDILinkLocalDevice object pointer if type match. More...
 
virtual
CPNS::IVMIDILinkHybridLocalDevice
GetIVMIDILinkHybridLocalDevice () const =0
 Check LocalDevice type and return an IHybridVMIDILinkLocalDevice object pointer if type match. More...
 
virtual
CPNS::ISharedDisplayLocalDevice
GetISharedDisplayLocalDevice () const =0
 Check LocalDevice type and return an ISharedDisplayLocalDevice object pointer if type match. More...
 
virtual
CPNS::ISharedDisplayClientLocalDevice
GetISharedDisplayClientLocalDevice () const =0
 Check LocalDevice type and return an ISharedDisplayClientLocalDevice object pointer if type match. More...
 
virtual
CPNS::IAudioLanLocalDevice
GetIAudioLanLocalDevice () const =0
 Check LocalDevice type and return an IAudioLanLocalDevice object pointer if type match. More...
 
virtual void SetDisabledDestinationAutoDelete (CPNS::boolean const fAutoDelete)=0
 Enable/disable the automatic deletion of disabled destination after 60 seconds. More...
 
virtual void SetDisabledInternalSnapshot (CPNS::boolean const fDisabled, CPNS::boolean const fAlsoForChildren)=0
 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...
 
virtual void SetSectionName (CPNS::SectionID const &sectionID, CPNS::char8 const *const utf8Name)=0
 Set a custom name for the specified section. More...
 
virtual CPNS::UTF8String GetSectionName (CPNS::SectionID const &sectionID)=0
 Get the custom name for the specified section type. 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::ILocalDeviceAddSubLocalDevice (CPNS::uint16 const wModuleID, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0
 Add a generic sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. More...
 
virtual CPNS::IMIDI2CPLocalDeviceAddSubMIDI2CPLocalDevice (CPNS::uint16 const wModuleID, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0
 Add a generic MIDI to CopperLan sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. More...
 
virtual CPNS::ICP2MIDILocalDeviceAddSubCP2MIDILocalDevice (CPNS::uint16 const wModuleID, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0
 Add a generic CopperLan to MIDI sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. More...
 
virtual
CPNS::IHybridMIDILocalDevice
AddSubHybridMIDILocalDevice (CPNS::uint16 const wModuleID, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0
 Add a generic hybrid MIDI sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. More...
 
virtual
CPNS::IVMIDILinkOutLocalDevice
AddSubVMIDILinkOutLocalDevice (CPNS::uint16 const wModuleID, CPNS::char8 const *const utf8PortName)=0
 Add a VMIDILink Out sub-device. More...
 
virtual
CPNS::IVMIDILinkInLocalDevice
AddSubVMIDILinkInLocalDevice (CPNS::uint16 const wModuleID, 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
AddSubVMIDILinkHybridLocalDevice (CPNS::uint16 const wModuleID, 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
AddSubSharedDisplayLocalDevice (CPNS::uint16 const wModuleID, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0
 Add a generic shared display server sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. More...
 
virtual
CPNS::ISharedDisplayClientLocalDevice
AddSubSharedDisplayClientLocalDevice (CPNS::uint16 const wModuleID, CPNS::boolean const fHidden, CPNS::CombinedExtendedDeviceCapabilities const extDevCaps, CPNS::char8 const *const utf8ModelName)=0
 Add a generic shared display client sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. More...
 
virtual CPNS::IBaseLocalDeviceGetFirstSubDevice ()=0
 Get the first sub-device. More...
 
virtual CPNS::IBaseLocalDeviceGetNextDevice ()=0
 Get next sibling device. More...
 
virtual CPNS::IBaseLocalDeviceGetParentDevice ()=0
 Get parent device. More...
 
virtual
CPNS::CombinedDeviceCapabilities 
GetDeviceCapabilities ()=0
 Get the consolidated capabilities of the device and its children. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetOutputCapabilities ()=0
 Get the consolidated Output capabilities of the device and its children. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetInputCapabilities ()=0
 Get the consolidated Input capabilities of the device and its children. More...
 
virtual
CPNS::CombinedDeviceCapabilities 
GetOwnDeviceCapabilities ()=0
 Get the device capabilities. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetOwnOutputCapabilities ()=0
 Get the Output capabilities. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetOwnInputCapabilities ()=0
 Get the Input capabilities. More...
 
virtual
CPNS::CombinedExtendedDeviceCapabilities 
GetExtendedDeviceCapabilities ()=0
 Get the extended device capabilities. More...
 
virtual void RegisterNotificationHandler (CPNS::IBaseLocalDevice_NotificationHandler *const pHandler)=0
 Register a Local Device notification handler. More...
 
virtual void UnregisterNotificationHandler (CPNS::IBaseLocalDevice_NotificationHandler *const pHandler)=0
 Unregister a Local Device notification handler. More...
 
virtual void SetSnapshotNotificationHandler (CPNS::IBaseLocalDevice_SnapshotNotificationHandler *const pHandler)=0
 Set a Local Device Snapshot notification handler. More...
 
virtual void SetSmartConnectTargetNotificationHandler (CPNS::IBaseLocalDevice_SmartConnectTargetNotificationHandler *const pHandler)=0
 Set a Local Device notification handler for Smart Connect, Target side. More...
 
virtual CPNS::DeviceID GetDeviceID () const =0
 Get the DeviceID. More...
 
virtual CPNS::Enums::Errors SetExtendeddDevCaps (CPNS::CombinedExtendedDeviceCapabilities const xDevCaps)=0
 Set the device's extended caps. More...
 
virtual
CPNS::CombinedExtendedDeviceCapabilities 
GetExtendedDevCaps () const =0
 Get the extended caps. More...
 
virtual CPNS::DeviceID GetParentDeviceID () const =0
 Get the parent DeviceID. More...
 
virtual CPNS::boolean IsChildOf (CPNS::IBaseLocalDevice *const pCheckDev)=0
 Check if the local device is or is child of another one. More...
 
virtual CPNS::UTF8String GetBrandName ()=0
 Get the Brand name. More...
 
virtual CPNS::UTF8String GetModelName ()=0
 Get the Model name. More...
 
virtual CPNS::Enums::Errors SetCustomName (CPNS::char8 const *const utf8CustomName)=0
 Set the Custom name If not empty, the custom name override the default name. More...
 
virtual CPNS::UTF8String GetCustomName ()=0
 Get the Custom name. More...
 
virtual CPNS::UTF8String GetName (CPNS::Enums::DeviceNameFormats const format)=0
 Get the specified name. More...
 
virtual CPNS::UTF8String GetPath ()=0
 Get the path. More...
 
virtual CPNS::Enums::DuplicateModes GetDuplicateMode () const =0
 Get the duplicate mode. More...
 
virtual CPNS::Enums::Errors SetVisibility (CPNS::boolean const fHidden)=0
 Change device visibility. More...
 
virtual CPNS::Enums::Errors SetStringProperty (CPNS::uint16 const wPropertyNum, CPNS::char8 const *const utf8Value)=0
 Set a text device property. More...
 
virtual CPNS::Enums::Errors SetNumericProperty (CPNS::uint16 const wPropertyNum, CPNS::uint64 const qwValue)=0
 Set a numeric device property. More...
 
virtual CPNS::Enums::Errors GetStringProperty (CPNS::uint16 const wPropertyNum, CPNS::UTF8String &strValue)=0
 
virtual CPNS::Enums::Errors GetNumericProperty (CPNS::uint16 const wPropertyNum, CPNS::uint64 &qwValue)=0
 
virtual CPNS::IOutputAddOutput (CPNS::CombinedInOutCapabilities const outCaps, CPNS::char8 const *const utf8Name, CPNS::SectionID const &sectionID)=0
 Add an Output. More...
 
virtual void ClearOutputs ()=0
 Remove all outputs and associated data (controller definition) More...
 
virtual CPNS::uint16 GetNumOutputs ()=0
 Get the number of Outputs. More...
 
virtual CPNS::IOutputFindFirstOutput ()=0
 Get the first Output. More...
 
virtual CPNS::IOutputFindLastOutput ()=0
 Get the last Output. More...
 
virtual CPNS::IOutputFindPrevOutput (CPNS::uint16 const wOutputID)=0
 Get the prev Output. More...
 
virtual CPNS::IOutputFindNextOutput (CPNS::uint16 const wOutputID)=0
 Get the next Output. More...
 
virtual CPNS::IOutputGetOutputFromID (CPNS::uint16 const wOutputID)=0
 Get the specified Output. More...
 
virtual CPNS::Enums::Errors Flush ()=0
 Flush all outputs. More...
 
virtual CPNS::IInputAddInput (CPNS::CombinedInOutCapabilities const inCaps, CPNS::char8 const *const utf8Name, CPNS::SectionID const &sectionID)=0
 Add an Input. More...
 
virtual void ClearInputs ()=0
 Remove all inputs and associated data (parameter definition) More...
 
virtual CPNS::uint16 GetNumInputs ()=0
 Get the number of Inputs. More...
 
virtual CPNS::IInputFindFirstInput ()=0
 Get the first Input. More...
 
virtual CPNS::IInputFindLastInput ()=0
 Get the last Input. More...
 
virtual CPNS::IInputFindPrevInput (CPNS::uint16 const wInputID)=0
 Get the prev Input. More...
 
virtual CPNS::IInputFindNextInput (CPNS::uint16 const wInputID)=0
 Get the next Input. More...
 
virtual CPNS::IInputGetInputFromID (CPNS::uint16 const wInputID)=0
 Get the specified Input. More...
 
virtual CPNS::IControllerAddController (CPNS::char8 const *const utf8Name, CPNS::CombinedControllerTypes const types, CPNS::Enums::MessageTypes const preferredMsgType, CPNS::uint16 const wPreferredMsgNum, CPNS::uint16 const wGroup, CPNS::SectionID const &sectionID)=0
 Add a controller. More...
 
virtual void ClearControllers ()=0
 Remove all controllers. More...
 
virtual CPNS::uint16 GetNumControllers ()=0
 Get the number of Controller. More...
 
virtual CPNS::IControllerFindFirstController ()=0
 Get the first Controller. More...
 
virtual CPNS::IControllerFindLastController ()=0
 Get the last Controller. More...
 
virtual CPNS::IControllerFindPrevController (CPNS::uint16 const wControllerID)=0
 Get the prev Controller. More...
 
virtual CPNS::IControllerFindNextController (CPNS::uint16 const wControllerID)=0
 Get the next Controller. More...
 
virtual CPNS::IControllerGetControllerFromID (CPNS::uint16 const wControllerID)=0
 Get the specified Controller. More...
 
virtual void UnassignAllControllers (CPNS::boolean const fAlsoForChildren)=0
 Unassign all controllers and clear connections for all related Outputs. More...
 
virtual void LeaveLearningMode ()=0
 Leave learning mode if one of this Device's Controller is currently learning. More...
 
virtual CPNS::boolean IsLearningModeActive ()=0
 Check if learning mode is active for one of this Device's Controllers. More...
 
virtual CPNS::IPipeAddPipe (CPNS::boolean const fSynapse)=0
 Add an Pipe. More...
 
virtual void ClearPipes ()=0
 Remove all pipes. More...
 
virtual CPNS::uint16 GetNumPipes ()=0
 Get the number of Pipes. More...
 
virtual CPNS::IPipeFindFirstPipe ()=0
 Get the first Pipe. More...
 
virtual CPNS::IPipeFindNextPipe (CPNS::uint16 const wPipeID)=0
 Get the next Pipe. More...
 
virtual CPNS::IPipeGetPipeFromID (CPNS::uint16 const wPipeID)=0
 Get the specified Pipe. More...
 
virtual void RegisterSignalNotificationHandler (CPNS::IBaseLocalDevice_SignalNotificationHandler *const pHandler)=0
 Register a Signal reception notification handler. More...
 
virtual void UnregisterSignalNotificationHandler (CPNS::IBaseLocalDevice_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 directed signal to the specified device. 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 broadcast signal to all devices. More...
 
virtual CPNS::Enums::Errors SmartConnectTarget_UnassignAndRequestSectionList (CPNS::uint16 const wSessionID, CPNS::DeviceID const &devID)=0
 Query the SmartConnect source side to clear its controller assignments and to reply the consolidated section list. More...
 
virtual CPNS::Enums::Errors SmartConnectTarget_RequestControllerList (CPNS::uint16 const wSessionID, CPNS::DeviceID const &devID, CPNS::SectionID const &sectionID)=0
 Query the SmartConnect source side to reply the controller list related to the specified section instance. More...
 
virtual CPNS::Enums::Errors SmartConnectTarget_AssignController (CPNS::uint16 const wSessionID, CPNS::DeviceID const &devID, CPNS::uint16 const wControllerID, CPNS::ControllerAssignment const &assignment)=0
 Assign the specified controller to a target parameter. More...
 
virtual CPNS::Enums::Errors SmartConnectTarget_AssignOutput (CPNS::uint16 const wSessionID, CPNS::DeviceID const &devID, CPNS::SectionID const &sectionID, CPNS::Endpoint const &targetEndpoint)=0
 Assign the specified source section to a target input. More...
 
virtual CPNS::Enums::Errors SmartConnectTarget_Finished (CPNS::uint16 const wSessionID, CPNS::Enums::Errors const errCode)=0
 Close the SmartConnect session To be called from the SmartConnect target side. More...
 
virtual CPNS::uint32 GetInternalSnapshotDataSize ()=0
 Get the buffer size needed to store this device's internal snapshot data. More...
 
virtual CPNS::Enums::Errors GetInternalSnapshotData (CPNS::byte *const pData, CPNS::uint32 const dwSize)=0
 Get internal snapshot data. More...
 
virtual CPNS::Enums::Errors RestoreInternalSnapshotData (CPNS::byte const *const pData, CPNS::uint32 const dwSize)=0
 Restore internal snapshot data. More...
 
virtual CPNS::Enums::Errors Reply_RequestCollectSnapshotData (CPNS::uint16 const wRequestID, CPNS::Enums::SnapshotBlockPriorities const priority, CPNS::uint32 const dwContextData, CPNS::uint16 const wBlockSize, CPNS::boolean const fLastBlock, void *const pBlockData)=0
 Reply to a snapshot data collect request Call this to terminate a IBaseLocalDevice_SnapshotNotificationHandler::OnBaseLocalDevice_RequestCollectSnapshotData call. More...
 
virtual CPNS::Enums::Errors Reply_RequestRestoreSnapshotData (CPNS::uint16 const wRequestID, CPNS::Enums::Errors const returnCode, CPNS::uint32 const dwContextData)=0
 Reply to a snapshot data restore request Call this to terminate a IBaseLocalDevice_SnapshotNotificationHandler::OnBaseLocalDevice_RequestRestoreSnapshotData call. More...
 
virtual CPNS::Enums::Errors Reply_InvalidRequest (CPNS::uint16 const wRequestID)=0
 Invalid Request Call this to terminate a Request if no valid return can be done. More...
 
- Public Member Functions inherited from CPNS::IObject
virtual CPNS::ICHAIGetCHAI ()=0
 Get a pointer to the CHAI hosting this object. More...
 
virtual void RegisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Register an Object's notification handler. More...
 
virtual void UnregisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Unregister an Object's notification handler. More...
 
virtual CPNS::Enums::ObjectTypes GetObjectType () const =0
 Get the object type. More...
 
virtual CPNS::uint32 GetHandle () const =0
 Get a unique handle to the object if this object is handled by the trashcan. More...
 
virtual void SetUserDataPtr (void const *const pData)=0
 Set a custom user ptr data. More...
 
virtual void * GetUserDataPtr () const =0
 Get custom user ptr data. More...
 
virtual void SetUserDataUInt32 (const CPNS::uint32 dwData)=0
 Set a custom user uint32 data. More...
 
virtual CPNS::uint32 GetUserDataUInt32 () const =0
 Get custom user uint32 data. More...
 

Detailed Description

It is the base interface for all Local Devices.

A Local Device is an object representing a device handled by the current application, in opposition to a Remote Device related to a device located anywhere on the network.

Member Function Documentation

virtual CPNS::IController* CPNS::IBaseLocalDevice::AddController ( CPNS::char8 const *const  utf8Name,
CPNS::CombinedControllerTypes const  types,
CPNS::Enums::MessageTypes const  preferredMsgType,
CPNS::uint16 const  wPreferredMsgNum,
CPNS::uint16 const  wGroup,
CPNS::SectionID const &  sectionID 
)
pure virtual

Add a controller.

Note
Don't forget to set the CPNS::Enums::IOC_Explorable capability to the owner output in order to allow controllers exploration and remote control.
Parameters
[in]utf8Namecontroller's name
[in]typescombination of flags determining the controller's type.
Warning
The type argument is a combination of CPNS::Enums::ControllerTypes values, including the CPNS::Enums::CT_MsgMod, CPNS::Enums::CT_MsgSel or CPNS::Enums::CT_MsgText values. These are useful to describe the ability of this controller to send natively these kind of messages. These flags are used by SmartConnect to determine the best matching between controllers and parameters, or during the Learning process in order to accept only binding with a compatible Parameter.
Parameters
[in]preferredMsgTypethe preferred message type for the control (if any, can be CPNS::Enums::MT_None)
[in]wPreferredMsgNumthe preferred message number for the control (if any)
[in]wGroupcontroller's group. Controllers having the same group number (>0) are physically attached.
[in]sectionIDthe related section ID. If empty, it is automatically set to {type CPNS::Enums::SECT_Multipurpose, instance 0}. If it is not empty, the SectionType part must not be a wildcard value. If the instance part is 0xFFFF (wildcard), it is automatically assigned to the next free instance number for the specified section type.
Returns
Pointer to the new controller, or NULL in case of error due to not enough memory
Remarks
the returned pointer is related to an object handled by the CHAI; do not delete it!
Warning
Several outputs can share the same section and so have the same Section ID.
virtual CPNS::IInput* CPNS::IBaseLocalDevice::AddInput ( CPNS::CombinedInOutCapabilities const  inCaps,
CPNS::char8 const *const  utf8Name,
CPNS::SectionID const &  sectionID 
)
pure virtual

Add an Input.

The new Input's ID is the ordinal number in the collection of Inputs.

Parameters
[in]inCapsthe combined Input capabilities. Usually used to give information about the kinds of message handled by this Input. If the Input is aimed to host parameters, the input capabilities
[in]utf8Namethe name
[in]sectionIDthe related section ID. If empty, it is automatically transformed in a valid sectionID having the CPNS::Enums::SECT_Other type. If it is not empty, the SectionType part must not be a wildcard value. If the instance part is 0xFFFF (wildcard), it is automatically assigned with a unique value.
Returns
a pointer to the new Input object, or NULL if the Input can't be added due to a bas SectionType, a sectionID already used or memory limitation.
Remarks
the returned pointer is related to an object handled by the CHAI; do not delete it!
Warning
The Section ID must be unique for the input within the related local device.
virtual CPNS::IOutput* CPNS::IBaseLocalDevice::AddOutput ( CPNS::CombinedInOutCapabilities const  outCaps,
CPNS::char8 const *const  utf8Name,
CPNS::SectionID const &  sectionID 
)
pure virtual

Add an Output.

The new Output's ID is the ordinal number in the collection of Outputs.

Parameters
[in]outCapsthe combined Output capabilities. Usually used to give information about the kinds of message issued by this output. However in case of using this output with controllers, the supported message types capability flags are automatically added depending on the declared controller types.
[in]utf8Namethe name
[in]sectionIDthe related section ID. If the instance part is 0xFFFF (wildcard), it is automatically
Returns
a pointer to the new output object, or NULL if the output can't be added.
Remarks
the returned pointer is related to an object handled by the CHAI; do not delete it!
Warning
Several outputs can share the same section and so have the same Section ID.
virtual CPNS::IPipe* CPNS::IBaseLocalDevice::AddPipe ( CPNS::boolean const  fSynapse)
pure virtual

Add an Pipe.

The new Pipe's ID is the ordinal number in the collection of Pipes going down from 0xFFFE

Parameters
[in]fSynapseTRUE if the pipe is a Synapse. A Synapse automatically forward incoming message to all connected pipes, except the source of the message.
Returns
a pointer to the new Pipe object, or NULL if the Pipe can't be added.
Remarks
the returned pointer is related to an object handled by the CHAI; do not delete it!
virtual CPNS::ICP2MIDILocalDevice* CPNS::IBaseLocalDevice::AddSubCP2MIDILocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::boolean const  fHidden,
CPNS::CombinedExtendedDeviceCapabilities const  extDevCaps,
CPNS::char8 const *const  utf8ModelName 
)
pure virtual

Add a generic CopperLan to MIDI sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0.

Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]fHiddenTRUE if the device should be hidden
[in]extDevCapssub-device's extended capabilities
[in]utf8ModelNamesub-device's Model name, or NULL to keep root's name.
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
virtual CPNS::IHybridMIDILocalDevice* CPNS::IBaseLocalDevice::AddSubHybridMIDILocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::boolean const  fHidden,
CPNS::CombinedExtendedDeviceCapabilities const  extDevCaps,
CPNS::char8 const *const  utf8ModelName 
)
pure virtual

Add a generic hybrid MIDI sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0.

Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]fHiddenTRUE if the device should be hidden
[in]extDevCapssub-device's extended capabilities
[in]utf8ModelNamesub-device's Model name, or NULL to keep root's name.
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
virtual CPNS::ILocalDevice* CPNS::IBaseLocalDevice::AddSubLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::boolean const  fHidden,
CPNS::CombinedExtendedDeviceCapabilities const  extDevCaps,
CPNS::char8 const *const  utf8ModelName 
)
pure virtual

Add a generic sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0.

Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]fHiddenTRUE if the device should be hidden
[in]extDevCapssub-device's extended capabilities
[in]utf8ModelNamesub-device's Model name, or NULL to keep root's name.
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
virtual CPNS::IMIDI2CPLocalDevice* CPNS::IBaseLocalDevice::AddSubMIDI2CPLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::boolean const  fHidden,
CPNS::CombinedExtendedDeviceCapabilities const  extDevCaps,
CPNS::char8 const *const  utf8ModelName 
)
pure virtual

Add a generic MIDI to CopperLan sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0.

Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]fHiddenTRUE if the device should be hidden
[in]extDevCapssub-device's extended capabilities
[in]utf8ModelNamesub-device's Model name, or NULL to keep root's name.
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
virtual CPNS::ISharedDisplayClientLocalDevice* CPNS::IBaseLocalDevice::AddSubSharedDisplayClientLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::boolean const  fHidden,
CPNS::CombinedExtendedDeviceCapabilities const  extDevCaps,
CPNS::char8 const *const  utf8ModelName 
)
pure virtual

Add a generic shared display client sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0.

Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]fHiddenTRUE if the device should be hidden
[in]extDevCapssub-device's extended capabilities
[in]utf8ModelNamesub-device's Model name, or NULL to keep root's name.
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
virtual CPNS::ISharedDisplayLocalDevice* CPNS::IBaseLocalDevice::AddSubSharedDisplayLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::boolean const  fHidden,
CPNS::CombinedExtendedDeviceCapabilities const  extDevCaps,
CPNS::char8 const *const  utf8ModelName 
)
pure virtual

Add a generic shared display server sub-device A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0.

Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]fHiddenTRUE if the device should be hidden
[in]extDevCapssub-device's extended capabilities
[in]utf8ModelNamesub-device's Model name, or NULL to keep root's name.
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
virtual CPNS::IVMIDILinkHybridLocalDevice* CPNS::IBaseLocalDevice::AddSubVMIDILinkHybridLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::char8 const *const  utf8PortName 
)
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.

A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]extDevCapssub-device's extended capabilities
[in]utf8PortNameThe port name
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory, or invalid devcaps
Warning
VMIDILink devices are automatically flagged as hidden
virtual CPNS::IVMIDILinkInLocalDevice* CPNS::IBaseLocalDevice::AddSubVMIDILinkInLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::char8 const *const  utf8PortName 
)
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.

A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]utf8PortNameThe port name
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory
Warning
VMIDILink devices are automatically flagged as hidden
virtual CPNS::IVMIDILinkOutLocalDevice* CPNS::IBaseLocalDevice::AddSubVMIDILinkOutLocalDevice ( CPNS::uint16 const  wModuleID,
CPNS::char8 const *const  utf8PortName 
)
pure virtual

Add a VMIDILink Out sub-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. A sub-device get the same identity (BrandID and ModelID) than its root, but it has a unique ModuleID that must be <>0. Brand name and Model name can be customized if needed.

Parameters
[in]wModuleIDA unique non-zero ModuleID identifying the sub-device.
[in]utf8PortNameThe port name
Returns
Pointer to the new local device, or NULL in case of error due to not enough memory
Warning
VMIDILink devices are automatically flagged as hidden
virtual void CPNS::IBaseLocalDevice::ClearControllers ( )
pure virtual

Remove all controllers.

virtual void CPNS::IBaseLocalDevice::ClearInputs ( )
pure virtual

Remove all inputs and associated data (parameter definition)

virtual void CPNS::IBaseLocalDevice::ClearOutputs ( )
pure virtual

Remove all outputs and associated data (controller definition)

virtual void CPNS::IBaseLocalDevice::ClearPipes ( )
pure virtual

Remove all pipes.

virtual CPNS::IController* CPNS::IBaseLocalDevice::FindFirstController ( )
pure virtual

Get the first Controller.

Remarks
this method exist for similarity with Remote Device Controller enumeration.
Returns
the pointer to the first Controller, or NULL if no Controller
virtual CPNS::IInput* CPNS::IBaseLocalDevice::FindFirstInput ( )
pure virtual

Get the first Input.

Remarks
this method exist for similarity with Remote Device Input enumeration.
Returns
the pointer to the first Input, or NULL if no Input
virtual CPNS::IOutput* CPNS::IBaseLocalDevice::FindFirstOutput ( )
pure virtual

Get the first Output.

Remarks
this method exist for similarity with Remote Device Output enumeration.
Returns
the pointer to the first Output, or NULL if no Output
virtual CPNS::IPipe* CPNS::IBaseLocalDevice::FindFirstPipe ( )
pure virtual

Get the first Pipe.

Returns
the pointer to the first Pipe, or NULL if no Pipe
virtual CPNS::IController* CPNS::IBaseLocalDevice::FindLastController ( )
pure virtual

Get the last Controller.

Remarks
this method exist for similarity with Remote Device Controller enumeration.
Returns
the pointer to the first Controller, or NULL if no Controller
virtual CPNS::IInput* CPNS::IBaseLocalDevice::FindLastInput ( )
pure virtual

Get the last Input.

Remarks
this method exist for similarity with Remote Device Input enumeration.
Returns
the pointer to the first Input, or NULL if no Input
virtual CPNS::IOutput* CPNS::IBaseLocalDevice::FindLastOutput ( )
pure virtual

Get the last Output.

Remarks
this method exist for similarity with Remote Device Output enumeration.
Returns
the pointer to the first Output, or NULL if no Output
virtual CPNS::IController* CPNS::IBaseLocalDevice::FindNextController ( CPNS::uint16 const  wControllerID)
pure virtual

Get the next Controller.

Parameters
[in]wControllerIDprevious Controller ID
Remarks
this method exist for similarity with Remote Device Controller enumeration.
Returns
the pointer to the first Input, or NULL if no more Input
virtual CPNS::IInput* CPNS::IBaseLocalDevice::FindNextInput ( CPNS::uint16 const  wInputID)
pure virtual

Get the next Input.

Parameters
[in]wInputIDprevious Input ID
Remarks
this method exist for similarity with Remote Device Input enumeration.
Returns
the pointer to the first Input, or NULL if no more Input
virtual CPNS::IOutput* CPNS::IBaseLocalDevice::FindNextOutput ( CPNS::uint16 const  wOutputID)
pure virtual

Get the next Output.

Parameters
[in]wOutputIDprevious Output ID
Remarks
this method exist for similarity with Remote Device Output enumeration.
Returns
the pointer to the first Output, or NULL if no more Output
virtual CPNS::IPipe* CPNS::IBaseLocalDevice::FindNextPipe ( CPNS::uint16 const  wPipeID)
pure virtual

Get the next Pipe.

Parameters
[in]wPipeIDprevious Pipe ID
Returns
the pointer to the first Pipe, or NULL if no more Pipe
virtual CPNS::IController* CPNS::IBaseLocalDevice::FindPrevController ( CPNS::uint16 const  wControllerID)
pure virtual

Get the prev Controller.

Parameters
[in]wControllerIDprevious Controller ID
Remarks
this method exist for similarity with Remote Device Controller enumeration.
Returns
the pointer to the first Controller, or NULL if no more Controller
virtual CPNS::IInput* CPNS::IBaseLocalDevice::FindPrevInput ( CPNS::uint16 const  wInputID)
pure virtual

Get the prev Input.

Parameters
[in]wInputIDprevious Input ID
Remarks
this method exist for similarity with Remote Device Input enumeration.
Returns
the pointer to the first Input, or NULL if no more Input
virtual CPNS::IOutput* CPNS::IBaseLocalDevice::FindPrevOutput ( CPNS::uint16 const  wOutputID)
pure virtual

Get the prev Output.

Parameters
[in]wOutputIDprevious Output ID
Remarks
this method exist for similarity with Remote Device Output enumeration.
Returns
the pointer to the first Output, or NULL if no more Output
virtual void CPNS::IBaseLocalDevice::FlowControl ( CPNS::boolean const  fSuspend)
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::ICHAI::FlowControl.

Parameters
[in]fSuspendTRUE if the connected Outputs should suspend sending
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::Flush ( )
pure virtual
virtual CPNS::UTF8String CPNS::IBaseLocalDevice::GetBrandName ( )
pure virtual

Get the Brand name.

Returns
the brand name
virtual CPNS::IController* CPNS::IBaseLocalDevice::GetControllerFromID ( CPNS::uint16 const  wControllerID)
pure virtual

Get the specified Controller.

Parameters
[in]wControllerIDrequested Controller ID
Returns
the pointer to the Controller or NULL if no Controller with the specified ID
virtual CPNS::UTF8String CPNS::IBaseLocalDevice::GetCustomName ( )
pure virtual

Get the Custom name.

Returns
the current custom name
virtual CPNS::CombinedDeviceCapabilities CPNS::IBaseLocalDevice::GetDeviceCapabilities ( )
pure virtual

Get the consolidated capabilities of the device and its children.

Returns
combined value of CPNS::Enums::DeviceCapabilities
virtual CPNS::DeviceID CPNS::IBaseLocalDevice::GetDeviceID ( ) const
pure virtual

Get the DeviceID.

Returns
the device ID
virtual CPNS::Enums::DuplicateModes CPNS::IBaseLocalDevice::GetDuplicateMode ( ) const
pure virtual

Get the duplicate mode.

Returns
the duplicate mode
virtual CPNS::CombinedExtendedDeviceCapabilities CPNS::IBaseLocalDevice::GetExtendedDevCaps ( ) const
pure virtual

Get the extended caps.

Returns
a combination of extended dev caps.
virtual CPNS::CombinedExtendedDeviceCapabilities CPNS::IBaseLocalDevice::GetExtendedDeviceCapabilities ( )
pure virtual

Get the extended device capabilities.

Returns
combined value of CPNS::Enums::ExtendedDeviceCapabilities
virtual CPNS::IBaseLocalDevice* CPNS::IBaseLocalDevice::GetFirstSubDevice ( )
pure virtual

Get the first sub-device.

Returns
A pointer to the first sub-device
virtual CPNS::IAudioLanLocalDevice* CPNS::IBaseLocalDevice::GetIAudioLanLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an IAudioLanLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::IAudioLanLocalDevice interface if available
virtual CPNS::ICP2MIDILocalDevice* CPNS::IBaseLocalDevice::GetICP2MIDILocalDevice ( ) const
pure virtual

Check LocalDevice type and return an ICP2MIDILocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::ICP2MIDILocalDevice interface if available
virtual CPNS::IHybridMIDILocalDevice* CPNS::IBaseLocalDevice::GetIHybridMIDILocalDevice ( ) const
pure virtual

Check LocalDevice type and return an IHybridMIDILocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::IHybridMIDILocalDevice interface if available
virtual CPNS::ILocalDevice* CPNS::IBaseLocalDevice::GetILocalDevice ( ) const
pure virtual

Check LocalDevice type and return an ILocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::ILocalDevice interface if available
virtual CPNS::IMIDI2CPLocalDevice* CPNS::IBaseLocalDevice::GetIMIDI2CPLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an IMIDI2CPLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::IMIDI2CPLocalDevice interface if available
virtual CPNS::CombinedInOutCapabilities CPNS::IBaseLocalDevice::GetInputCapabilities ( )
pure virtual

Get the consolidated Input capabilities of the device and its children.

Returns
combined value of CPNS::Enums::InOutCapabilities
virtual CPNS::IInput* CPNS::IBaseLocalDevice::GetInputFromID ( CPNS::uint16 const  wInputID)
pure virtual

Get the specified Input.

Parameters
[in]wInputIDrequested Input ID
Returns
the pointer to the Input or NULL if no Input with the specified ID
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::GetInternalSnapshotData ( CPNS::byte *const  pData,
CPNS::uint32 const  dwSize 
)
pure virtual

Get internal snapshot data.

This buffer contains destination related to visible and not locked Outputs. The expected buffer size can be determined using GetInternalSnapshotDataSize().

Parameters
[in]pDatathe buffer receiving a copy of the internal snapshot data.
[in]dwSizethe buffer size.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BufferTooSmall | CPNS::Enums::ERR_NotSupported
virtual CPNS::uint32 CPNS::IBaseLocalDevice::GetInternalSnapshotDataSize ( )
pure virtual

Get the buffer size needed to store this device's internal snapshot data.

This buffer contains destination related to visible and not locked Outputs.

Returns
the buffer size
virtual CPNS::ISharedDisplayClientLocalDevice* CPNS::IBaseLocalDevice::GetISharedDisplayClientLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an ISharedDisplayClientLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::ISharedDisplayClientLocalDevice interface if available
virtual CPNS::ISharedDisplayLocalDevice* CPNS::IBaseLocalDevice::GetISharedDisplayLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an ISharedDisplayLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::ISharedDisplayLocalDevice interface if available
virtual CPNS::IVMIDILinkHybridLocalDevice* CPNS::IBaseLocalDevice::GetIVMIDILinkHybridLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an IHybridVMIDILinkLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::IHybridVMIDILinkLocalDevice interface if available
virtual CPNS::IVMIDILinkInLocalDevice* CPNS::IBaseLocalDevice::GetIVMIDILinkInLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an IInVMIDILinkLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::IInVMIDILinkLocalDevice interface if available
virtual CPNS::IVMIDILinkOutLocalDevice* CPNS::IBaseLocalDevice::GetIVMIDILinkOutLocalDevice ( ) const
pure virtual

Check LocalDevice type and return an IOutVMIDILinkLocalDevice object pointer if type match.

Returns
a pointer to the object's CPNS::IOutVMIDILinkLocalDevice interface if available
virtual CPNS::UTF8String CPNS::IBaseLocalDevice::GetModelName ( )
pure virtual

Get the Model name.

Returns
the model name
virtual CPNS::UTF8String CPNS::IBaseLocalDevice::GetName ( CPNS::Enums::DeviceNameFormats const  format)
pure virtual

Get the specified name.

Parameters
[in]formatthe requested name type
Returns
the name string corresponding to the requested name format
virtual CPNS::IBaseLocalDevice* CPNS::IBaseLocalDevice::GetNextDevice ( )
pure virtual

Get next sibling device.

Returns
A pointer to the next device
virtual CPNS::uint16 CPNS::IBaseLocalDevice::GetNumControllers ( )
pure virtual

Get the number of Controller.

Returns
the number of Controller
virtual CPNS::uint16 CPNS::IBaseLocalDevice::GetNumInputs ( )
pure virtual

Get the number of Inputs.

Returns
the number of Inputs
virtual CPNS::uint16 CPNS::IBaseLocalDevice::GetNumOutputs ( )
pure virtual

Get the number of Outputs.

Returns
the number of Outputs
virtual CPNS::uint16 CPNS::IBaseLocalDevice::GetNumPipes ( )
pure virtual

Get the number of Pipes.

Returns
the number of Pipes
virtual CPNS::CombinedInOutCapabilities CPNS::IBaseLocalDevice::GetOutputCapabilities ( )
pure virtual

Get the consolidated Output capabilities of the device and its children.

Returns
combined value of CPNS::Enums::InOutCapabilities
virtual CPNS::IOutput* CPNS::IBaseLocalDevice::GetOutputFromID ( CPNS::uint16 const  wOutputID)
pure virtual

Get the specified Output.

Parameters
[in]wOutputIDrequested Output ID
Returns
the pointer to the Output or NULL if no Output with the specified ID
virtual CPNS::CombinedDeviceCapabilities CPNS::IBaseLocalDevice::GetOwnDeviceCapabilities ( )
pure virtual

Get the device capabilities.

Returns
combined value of CPNS::Enums::DeviceCapabilities
virtual CPNS::CombinedInOutCapabilities CPNS::IBaseLocalDevice::GetOwnInputCapabilities ( )
pure virtual

Get the Input capabilities.

Returns
combined value of CPNS::Enums::InOutCapabilities
virtual CPNS::CombinedInOutCapabilities CPNS::IBaseLocalDevice::GetOwnOutputCapabilities ( )
pure virtual

Get the Output capabilities.

Returns
combined value of CPNS::Enums::InOutCapabilities
virtual CPNS::IBaseLocalDevice* CPNS::IBaseLocalDevice::GetParentDevice ( )
pure virtual

Get parent device.

Returns
A pointer to the parent device
virtual CPNS::DeviceID CPNS::IBaseLocalDevice::GetParentDeviceID ( ) const
pure virtual

Get the parent DeviceID.

Returns
the parent's device ID, or empty device ID in case of root device.
virtual CPNS::UTF8String CPNS::IBaseLocalDevice::GetPath ( )
pure virtual

Get the path.

Returns
the path information (NOT terminated with a '/' !!!)
virtual CPNS::IPipe* CPNS::IBaseLocalDevice::GetPipeFromID ( CPNS::uint16 const  wPipeID)
pure virtual

Get the specified Pipe.

Parameters
[in]wPipeIDrequested Pipe ID
Returns
the pointer to the first Pipe or NULL if no Pipe with the specified ID
virtual CPNS::UTF8String CPNS::IBaseLocalDevice::GetSectionName ( CPNS::SectionID const &  sectionID)
pure virtual

Get the custom name for the specified section type.

Parameters
[in]sectionIDThe section ID
Returns
The name
virtual CPNS::boolean CPNS::IBaseLocalDevice::IsChildOf ( CPNS::IBaseLocalDevice *const  pCheckDev)
pure virtual

Check if the local device is or is child of another one.

Returns
TRUE is the specified device is the current device or one of its parents.
virtual CPNS::boolean CPNS::IBaseLocalDevice::IsLearningModeActive ( )
pure virtual

Check if learning mode is active for one of this Device's Controllers.

Returns
TRUE if active
virtual void CPNS::IBaseLocalDevice::LeaveLearningMode ( )
pure virtual

Leave learning mode if one of this Device's Controller is currently learning.

On success, the notification handler ICHAI_NotificationHandler::OnCHAI_Notification is called signaling CPNS::Enums::CNT_GlobalLearningModeLeaved

virtual void CPNS::IBaseLocalDevice::RegisterNotificationHandler ( CPNS::IBaseLocalDevice_NotificationHandler *const  pHandler)
pure virtual

Register a Local Device notification handler.

The LocalDevice's notification handler is used to send information to the application, such as status or duplicate change...

Parameters
[in]pHandlerPointer to the application object implementing IBaseLocalDevice_NotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IBaseLocalDevice::RegisterSignalNotificationHandler ( CPNS::IBaseLocalDevice_SignalNotificationHandler *const  pHandler)
pure virtual

Register a Signal reception notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IBaseLocalDevice_SignalNotificationHandler Clear all registered handlers if pHandler is NULL.
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::Reply_InvalidRequest ( CPNS::uint16 const  wRequestID)
pure virtual

Invalid Request Call this to terminate a Request if no valid return can be done.

Parameters
[in]wRequestIDthe Request ID provided by the Request Notification Handler
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadRequestID | CPNS::Enums::ERR_InvalidCall
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::Reply_RequestCollectSnapshotData ( CPNS::uint16 const  wRequestID,
CPNS::Enums::SnapshotBlockPriorities const  priority,
CPNS::uint32 const  dwContextData,
CPNS::uint16 const  wBlockSize,
CPNS::boolean const  fLastBlock,
void *const  pBlockData 
)
pure virtual

Reply to a snapshot data collect request Call this to terminate a IBaseLocalDevice_SnapshotNotificationHandler::OnBaseLocalDevice_RequestCollectSnapshotData call.

Parameters
[in]wRequestIDthe Request ID provided by the Request Notification Handler
[in]prioritythe restore priority for this type of data block. Must be the same for the whole data related to the requested type.
[in]dwContextDataContext data related to the collected device, to be send back during next block collect. Can be used by the application as a session handling data sent back by during the request for next block.
[in]wBlockSizeBlock size. Must be <= notification handler's wMaxBlockSize argument.
[in]fLastBlockTRUE if it is the last block
[in]pBlockDatapointer to the data block.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadRequestID | CPNS::Enums::ERR_InvalidCall
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::Reply_RequestRestoreSnapshotData ( CPNS::uint16 const  wRequestID,
CPNS::Enums::Errors const  returnCode,
CPNS::uint32 const  dwContextData 
)
pure virtual

Reply to a snapshot data restore request Call this to terminate a IBaseLocalDevice_SnapshotNotificationHandler::OnBaseLocalDevice_RequestRestoreSnapshotData call.

Parameters
[in]wRequestIDthe Request ID provided by the Request Notification Handler
[in]returnCodereturn code to be transmitted to the remote device
[in]dwContextDataContext data related to the collected device, to be send back during next block collect. Can be used by the application as a session handling data sent back by during the request for next block.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadRequestID | CPNS::Enums::ERR_InvalidCall
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::RestoreInternalSnapshotData ( CPNS::byte const *const  pData,
CPNS::uint32 const  dwSize 
)
pure virtual

Restore internal snapshot data.

This is restoring the connections described into the buffer.

Parameters
[in]pDatathe buffer receiving a copy of the internal snapshot data.
[in]dwSizethe buffer size.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_InvalidLength | CPNS::Enums::ERR_BadVersion | CPNS::Enums::ERR_InvalidOutputID | CPNS::Enums::ERR_InvalidType | CPNS::Enums::ERR_NotSupported
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SetCustomName ( CPNS::char8 const *const  utf8CustomName)
pure virtual

Set the Custom name If not empty, the custom name override the default name.

Parameters
[in]utf8CustomNamethe new custom name, or NULL to remove custom name.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_InvalidName
Remarks
Using this method in connected mode implies usage of ICHAI::RedeclareAllDevices()
virtual void CPNS::IBaseLocalDevice::SetDisabledDestinationAutoDelete ( CPNS::boolean const  fAutoDelete)
pure virtual

Enable/disable the automatic deletion of disabled destination after 60 seconds.

Default status is OFF.

Parameters
[in]fAutoDeleteif TRUE, lost destinations are automatically deleted after 60 seconds
virtual void CPNS::IBaseLocalDevice::SetDisabledInternalSnapshot ( CPNS::boolean const  fDisabled,
CPNS::boolean const  fAlsoForChildren 
)
pure virtual

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.

Parameters
[in]fDisabledIf TRUE, the internal snapshot is disabled for this device. Use default behavior if FALSE.
[in]fAlsoForChildrenset this status along the children tree.
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SetExtendeddDevCaps ( CPNS::CombinedExtendedDeviceCapabilities const  xDevCaps)
pure virtual

Set the device's extended caps.

Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported
Remarks
Using this method in connected mode implies usage of ICHAI::RedeclareAllDevices()
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SetNumericProperty ( CPNS::uint16 const  wPropertyNum,
CPNS::uint64 const  qwValue 
)
pure virtual

Set a numeric device property.

Parameters
[in]wPropertyNumthe property number. See CPNS::Enums::DeviceProperties.
[in]qwValuethe property value
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotEnoughMemory
virtual void CPNS::IBaseLocalDevice::SetSectionName ( CPNS::SectionID const &  sectionID,
CPNS::char8 const *const  utf8Name 
)
pure virtual

Set a custom name for the specified section.

Parameters
[in]sectionIDThe section ID
[in]utf8NameThe name
Remarks
It is possible to set a name for any instance related to a section type passing a sectionID argument having its m_wInstance member at 0xFFFF
virtual void CPNS::IBaseLocalDevice::SetSmartConnectTargetNotificationHandler ( CPNS::IBaseLocalDevice_SmartConnectTargetNotificationHandler *const  pHandler)
pure virtual

Set a 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!

Parameters
[in]pHandlerPointer to the application object implementing IBaseLocalDevice_SmartConnectTargetNotificationHandler. If pHandler is NULL, clear all registered handlers.
Remarks
Automatically set the DC_SmartConnectTarget device capability.
virtual void CPNS::IBaseLocalDevice::SetSnapshotNotificationHandler ( CPNS::IBaseLocalDevice_SnapshotNotificationHandler *const  pHandler)
pure virtual

Set a Local Device Snapshot notification handler.

The LocalDevice's Snapshot notification handler is used to query/restore snapshot data. Only one Snapshot notification handler can be set for a Device!

Parameters
[in]pHandlerPointer to the application object implementing IBaseLocalDevice_SnapshotNotificationHandler. If pHandler is NULL, clear all registered handlers.
Remarks
Automatically set the DC_SupportSnapshot device capability.
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SetStringProperty ( CPNS::uint16 const  wPropertyNum,
CPNS::char8 const *const  utf8Value 
)
pure virtual

Set a text device property.

Parameters
[in]wPropertyNumthe property number. See CPNS::Enums::DeviceProperties.
[in]utf8Valuethe property value
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotEnoughMemory
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SetVisibility ( CPNS::boolean const  fHidden)
pure virtual

Change device visibility.

Parameters
[in]fHiddenTRUE if the device should be hidden
Returns
CPNS::Enums::ERR_None
Remarks
Using this method in connected mode implies usage of ICHAI::RedeclareAllDevices()
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::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 
)
pure virtual

Send a broadcast signal to all devices.

Remarks
This method send broadcast signals. So the signal number MUST have SIGB_Broadcast bit set
Parameters
[in]wSignalNumberStandard Signal numbers are available from CPNS::Enums::Signals
[in]wOptionalData0Optional value, depending on the signal number
[in]wOptionalData1Optional value, depending on the signal number
[in]wOptionalData2Optional value, depending on the signal number
[in]wOptionalData3Optional value, depending on the signal number
[in]utf8OptionalDataOptional value, depending on the signal number
[in]optionalEndpointOptional value, depending on the signal number
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSignalType | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_Failed
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::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 
)
pure virtual

Send a directed signal to the specified device.

Remarks
This method send directed signals. So the signal number MUST have SIGB_Directed bit set
Parameters
[in]devIDTarget Device ID
[in]wSignalNumberStandard Signal numbers are available from CPNS::Enums::Signals
[in]wOptionalData0Optional value, depending on the signal number
[in]wOptionalData1Optional value, depending on the signal number
[in]wOptionalData2Optional value, depending on the signal number
[in]wOptionalData3Optional value, depending on the signal number
[in]utf8OptionalDataOptional value, depending on the signal number
[in]optionalEndpointOptional value, depending on the signal number
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSignalType | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_Failed
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SmartConnectTarget_AssignController ( CPNS::uint16 const  wSessionID,
CPNS::DeviceID const &  devID,
CPNS::uint16 const  wControllerID,
CPNS::ControllerAssignment const &  assignment 
)
pure virtual

Assign the specified controller to a target parameter.

To be called from the SmartConnect target state engine.

Parameters
[in]wSessionIDthe SmartConnect session ID
[in]devIDthe device hosting the controller. The DevID must be compliant with the section hosting the controller. (see CPNS::SmartConnectSectionItem).
[in]wControllerIDthe controller ID
[in]assignmentthe new assignment
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSessionID | ERR_OutOfRange | ERR_Failed
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SmartConnectTarget_AssignOutput ( CPNS::uint16 const  wSessionID,
CPNS::DeviceID const &  devID,
CPNS::SectionID const &  sectionID,
CPNS::Endpoint const &  targetEndpoint 
)
pure virtual

Assign the specified source section to a target input.

To be called from the SmartConnect target state engine.

Parameters
[in]wSessionIDthe SmartConnect session ID
[in]devIDthe device hosting the output. The DevID must be compliant with the requested section. (see CPNS::SmartConnectSectionItem).
[in]sectionIDthe section ID identifying the output to be connected.
[in]targetEndpointthe target endpoint
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSessionID | ERR_OutOfRange | ERR_Failed
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SmartConnectTarget_Finished ( CPNS::uint16 const  wSessionID,
CPNS::Enums::Errors const  errCode 
)
pure virtual

Close the SmartConnect session To be called from the SmartConnect target side.

Parameters
[in]wSessionIDthe SmartConnect session ID
[in]errCodeerror code to be notified to the SmartConnect initiator.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSessionID | ERR_Failed
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SmartConnectTarget_RequestControllerList ( CPNS::uint16 const  wSessionID,
CPNS::DeviceID const &  devID,
CPNS::SectionID const &  sectionID 
)
pure virtual

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.

Parameters
[in]wSessionIDthe SmartConnect session ID
[in]devIDthe queried source. The DevID must be compliant with the requested section. (see CPNS::SmartConnectSectionItem).
[in]sectionIDthe section ID
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSessionID | ERR_OutOfRange | ERR_Failed
virtual CPNS::Enums::Errors CPNS::IBaseLocalDevice::SmartConnectTarget_UnassignAndRequestSectionList ( CPNS::uint16 const  wSessionID,
CPNS::DeviceID const &  devID 
)
pure virtual

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.

Parameters
[in]wSessionIDthe SmartConnect session ID
[in]devIDthe queried source. The DevID must be compliant with the source device list provided by CPNS::OnBaseLocalDevice_SmartConnectTarget_Started
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSessionID | ERR_OutOfRange | ERR_Failed
virtual void CPNS::IBaseLocalDevice::UnassignAllControllers ( CPNS::boolean const  fAlsoForChildren)
pure virtual

Unassign all controllers and clear connections for all related Outputs.

Parameters
[in]fAlsoForChildrenprocess also the children sub-devices if TRUE
virtual void CPNS::IBaseLocalDevice::UnregisterNotificationHandler ( CPNS::IBaseLocalDevice_NotificationHandler *const  pHandler)
pure virtual

Unregister a Local Device notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IBaseLocalDevice_NotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IBaseLocalDevice::UnregisterSignalNotificationHandler ( CPNS::IBaseLocalDevice_SignalNotificationHandler *const  pHandler)
pure virtual

Unregister a Signal reception notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IBaseLocalDevice_SignalNotificationHandler Clear all registered handlers if pHandler is NULL.