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

The Input object is used to receive messages from one or more outputs. More...

+ Inheritance diagram for CPNS::IInput:
+ Collaboration diagram for CPNS::IInput:

Public Member Functions

virtual CPNS::IBaseLocalDeviceGetDevice () const =0
 Get the related Local DeviceCHAI. More...
 
virtual void RegisterNotificationHandler (CPNS::IInput_NotificationHandler *const pHandler)=0
 Register an Input notification handler. More...
 
virtual void UnregisterNotificationHandler (CPNS::IInput_NotificationHandler *const pHandler)=0
 Unregister an Input notification handler. More...
 
virtual void RegisterRecordingNotificationHandler (CPNS::IInput_NotificationHandler *const pHandler)=0
 Register an Input recording notification handler. More...
 
virtual void UnregisterRecordingNotificationHandler (CPNS::IInput_NotificationHandler *const pHandler)=0
 Unregister an Input recording notification handler. More...
 
virtual void RegisterClockListenerControlNotificationHandler (CPNS::IInput_ClockListenerControlNotificationHandler *const pHandler)=0
 Register an Input clock listener notification handler. More...
 
virtual void UnregisterClockListenerControlNotificationHandler (CPNS::IInput_ClockListenerControlNotificationHandler *const pHandler)=0
 Unregister an Input clock listener notification handler. More...
 
virtual void RegisterParameterNotificationHandler (CPNS::IInput_ParameterNotificationHandler *const pHandler)=0
 Register a Parameter notification handler. More...
 
virtual void UnregisterParameterNotificationHandler (CPNS::IInput_ParameterNotificationHandler *const pHandler)=0
 Unregister a Parameter notification handler. More...
 
virtual CPNS::uint16 GetInputID () const =0
 Get the input ID. More...
 
virtual void SetCapabilities (CPNS::CombinedInOutCapabilities const caps)=0
 Set the Output capabilities. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetCapabilities () const =0
 Get the Output capabilities. More...
 
virtual void SetName (CPNS::char8 const *const utf8Name)=0
 Change the input name. More...
 
virtual CPNS::UTF8String GetName () const =0
 Get the input name. More...
 
virtual CPNS::UTF8String GetPath () const =0
 Get the input path. More...
 
virtual void SetSectionID (CPNS::SectionID const &sectionID)=0
 Set the section type information. More...
 
virtual CPNS::SectionID GetSectionID () const =0
 Get the section type information. More...
 
virtual CPNS::boolean IsCompatibleWith (CPNS::CombinedInOutCapabilities const outCaps)=0
 Check if the input is compatible with the specified output caps. More...
 
virtual CPNS::Endpoint GetEndpoint ()=0
 Get the Endpoint related to the input. More...
 
virtual CPNS::IParameterAddModifierParameter (CPNS::char8 const *const utf8Name, CPNS::uint16 const wMsgNum, CPNS::IIndexList *const pIndexList, CPNS::uint16 const wMidPointValue, CPNS::char8 const *const utf8LabelMin, CPNS::char8 const *const utf8LabelMidPoint, CPNS::char8 const *const utf8LabelMax, CPNS::Enums::DataTypes const preferredDataType, CPNS::uint16 const wGroup, CPNS::CombinedModifierInformationProfiles const informationProfiles, CPNS::CombinedControllerTypes const preferredControllerType)=0
 Add a Modifier parameter. More...
 
virtual CPNS::IParameterAddSelectorParameter (CPNS::char8 const *const utf8Name, CPNS::uint16 const wMsgNum, CPNS::IIndexList *const pIndexList, CPNS::ISelectorItemList *const pSelectorItemList, CPNS::uint16 const wGroup, CPNS::CombinedSelectorInformationProfiles const informationProfiles, CPNS::CombinedControllerTypes const preferredControllerType)=0
 Add a Selector parameter. More...
 
virtual CPNS::IParameterAddTextParameter (CPNS::char8 const *const utf8Name, CPNS::uint16 const wMsgNum, CPNS::IIndexList *const pIndexList, CPNS::uint16 const wGroup, CPNS::CombinedTextInformationProfiles const informationProfiles, CPNS::CombinedControllerTypes const preferredControllerType)=0
 Add a Text parameter. More...
 
virtual void AddTitleParameter (CPNS::char8 const *const utf8Text, CPNS::uint16 const wGroup)=0
 Add a title in the parameter list. More...
 
virtual void ClearParameterDefinition ()=0
 Clear the whole set of parameters related to this Input. More...
 
virtual CPNS::Enums::Errors RefreshParameterDefinition ()=0
 Send a notification to all connected Outputs that the parameter definition changed. More...
 
virtual IParameterGetFromMessageDescription (CPNS::Enums::MessageTypes const msgType, CPNS::uint16 const wMsgNum, CPNS::uint16 const wMsgIndex)=0
 Get a parameter from its related message description. More...
 
virtual CPNS::boolean HasSources ()=0
 Check if some sources are currently connected to this input. More...
 
virtual CPNS::Enums::Errors RemoveSource (CPNS::Endpoint const &source)=0
 Remove a source. More...
 
virtual CPNS::uint16 GetNumSources ()=0
 Get the number of sources. More...
 
virtual CPNS::Endpoint GetSource (CPNS::uint16 const wSourceIndex)=0
 Get a source. More...
 
virtual CPNS::Enums::Errors Signal (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 multicast signal directed to all devices present in the source set. More...
 
virtual CPNS::Enums::Errors DataConsumed ()=0
 Tells the sources that incoming SysEx or DataTransfer message has been processed. More...
 
virtual CPNS::Enums::Errors Clock_Set (CPNS::uint8 const bCPQNMultiplier)=0
 Set expected clock description. 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

The Input object is used to receive messages from one or more outputs.

Member Function Documentation

virtual CPNS::IParameter* CPNS::IInput::AddModifierParameter ( CPNS::char8 const *const  utf8Name,
CPNS::uint16 const  wMsgNum,
CPNS::IIndexList *const  pIndexList,
CPNS::uint16 const  wMidPointValue,
CPNS::char8 const *const  utf8LabelMin,
CPNS::char8 const *const  utf8LabelMidPoint,
CPNS::char8 const *const  utf8LabelMax,
CPNS::Enums::DataTypes const  preferredDataType,
CPNS::uint16 const  wGroup,
CPNS::CombinedModifierInformationProfiles const  informationProfiles,
CPNS::CombinedControllerTypes const  preferredControllerType 
)
pure virtual

Add a Modifier parameter.

Note
Don't forget to set the CPNS::Enums::IOC_Explorable capability to the owner input in order to allow parameters exploration and remote control.
Parameters
[in]utf8Namethe parameter's name
[in]wMsgNummessage number (see CPNS::Enums::Modifiers)
[in]pIndexListthe related Index List, or NULL if the parameter is not indexed.
[in]wMidPointValuethe middle point value. Usually 0x8000
[in]utf8LabelMinthe label for min position
[in]utf8LabelMidPointthe label for middle position
[in]utf8LabelMaxthe label for max position
[in]preferredDataTypethe preferred data type if any. Use CPNS::Enums::DT_Knob16 by default.
[in]wGroupthe parameter's group. Parameters having the same group number (>0) are physically attached.
[in]informationProfilescombination of optional information profiles
[in]preferredControllerTypethe preferred controller type for this parameter, without the CPNS::Enums::CT_Msg* part.
Returns
Pointer to the new parameter, or NULL in case of error due to not enough memory
virtual CPNS::IParameter* CPNS::IInput::AddSelectorParameter ( CPNS::char8 const *const  utf8Name,
CPNS::uint16 const  wMsgNum,
CPNS::IIndexList *const  pIndexList,
CPNS::ISelectorItemList *const  pSelectorItemList,
CPNS::uint16 const  wGroup,
CPNS::CombinedSelectorInformationProfiles const  informationProfiles,
CPNS::CombinedControllerTypes const  preferredControllerType 
)
pure virtual

Add a Selector parameter.

Note
Don't forget to set the CPNS::Enums::IOC_Explorable capability to the owner input in order to allow parameters exploration and remote control.
Parameters
[in]utf8Namethe parameter's name
[in]wMsgNummessage number (see CPNS::Enums::Modifiers)
[in]pIndexListthe related Index List, or NULL if the parameter is not indexed.
[in]pItemListthe Selector Item list. Must be != NULL
[in]wGroupthe parameter's group. Parameters having the same group number (>0) are physically attached.
[in]informationProfilescombination of optional information profiles
[in]preferredControllerTypethe preferred controller type for this parameter, without the CPNS::Enums::CT_Msg* part.
Returns
Pointer to the new parameter, or NULL if the Selector Item list is not correctly defined or in case of error due to not enough memory
virtual CPNS::IParameter* CPNS::IInput::AddTextParameter ( CPNS::char8 const *const  utf8Name,
CPNS::uint16 const  wMsgNum,
CPNS::IIndexList *const  pIndexList,
CPNS::uint16 const  wGroup,
CPNS::CombinedTextInformationProfiles const  informationProfiles,
CPNS::CombinedControllerTypes const  preferredControllerType 
)
pure virtual

Add a Text parameter.

Note
Don't forget to set the CPNS::Enums::IOC_Explorable capability to the owner input in order to allow parameters exploration and remote control.
Parameters
[in]utf8Namethe parameter's name
[in]wMsgNummessage number (see CPNS::Enums::Modifiers)
[in]pIndexListthe related Index List, or NULL if the parameter is not indexed.
[in]wGroupthe parameter's group. Parameters having the same group number (>0) are physically attached.
[in]informationProfilescombination of optional information profiles
[in]preferredControllerTypethe preferred controller type for this parameter, without the CPNS::Enums::CT_Msg* part.
Returns
Pointer to the new parameter, or NULL in case of error due to not enough memory
virtual void CPNS::IInput::AddTitleParameter ( CPNS::char8 const *const  utf8Text,
CPNS::uint16 const  wGroup 
)
pure virtual

Add a title in the parameter list.

Parameters
[in]utf8Textthe parameter's name
[in]wGroupthe parameter's group. Parameters having the same group number (>0) are physically attached.
Warning
Adding parameters consumes custom text message number going up from CPNS::Enums::TXT_CustomZoneStop.
virtual void CPNS::IInput::ClearParameterDefinition ( )
pure virtual

Clear the whole set of parameters related to this Input.

Warning
All pointers to parameters belonging to this Input will become invalid! Take care to clear also any application side reference to these parameters!
virtual CPNS::Enums::Errors CPNS::IInput::Clock_Set ( CPNS::uint8 const  bCPQNMultiplier)
pure virtual

Set expected clock description.

Remarks
Only available if the Input has the IOC_Clock capability
Parameters
[in]bCPQNMultiplierClock resolution = 24 * bCPQNMultiplier (default value = 1)
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported
virtual CPNS::Enums::Errors CPNS::IInput::DataConsumed ( )
pure virtual

Tells the sources that incoming SysEx or DataTransfer message has been processed.

If this command is not used, the sender wait for 500ms before sending next SysEx or DataTransferMessage.

virtual CPNS::CombinedInOutCapabilities CPNS::IInput::GetCapabilities ( ) const
pure virtual

Get the Output capabilities.

Returns
the capabilities
virtual CPNS::IBaseLocalDevice* CPNS::IInput::GetDevice ( ) const
pure virtual

Get the related Local DeviceCHAI.

Returns
the local device pointer
virtual CPNS::Endpoint CPNS::IInput::GetEndpoint ( )
pure virtual

Get the Endpoint related to the input.

Returns
the endpoint
virtual IParameter* CPNS::IInput::GetFromMessageDescription ( CPNS::Enums::MessageTypes const  msgType,
CPNS::uint16 const  wMsgNum,
CPNS::uint16 const  wMsgIndex 
)
pure virtual

Get a parameter from its related message description.

Parameters
[in]msgTypemessage type
[in]wMsgNummessage number
[in]wMsgIndexmessage index, if relevant
virtual CPNS::uint16 CPNS::IInput::GetInputID ( ) const
pure virtual

Get the input ID.

Returns
the current input ID
virtual CPNS::UTF8String CPNS::IInput::GetName ( ) const
pure virtual

Get the input name.

virtual CPNS::uint16 CPNS::IInput::GetNumSources ( )
pure virtual

Get the number of sources.

Returns
the number of sources
virtual CPNS::UTF8String CPNS::IInput::GetPath ( ) const
pure virtual

Get the input path.

virtual CPNS::SectionID CPNS::IInput::GetSectionID ( ) const
pure virtual

Get the section type information.

virtual CPNS::Endpoint CPNS::IInput::GetSource ( CPNS::uint16 const  wSourceIndex)
pure virtual

Get a source.

Parameters
[in]wSourceIndexIndex, from 0 to GetNumSources()-1
Returns
Source's endpoint, or empty Endpoint if wSourceIndex is out of range
virtual CPNS::boolean CPNS::IInput::HasSources ( )
pure virtual

Check if some sources are currently connected to this input.

virtual CPNS::boolean CPNS::IInput::IsCompatibleWith ( CPNS::CombinedInOutCapabilities const  outCaps)
pure virtual

Check if the input is compatible with the specified output caps.

Parameters
[in]outCapsthe output capabilities
Returns
TRUE if ok
virtual CPNS::Enums::Errors CPNS::IInput::RefreshParameterDefinition ( )
pure virtual

Send a notification to all connected Outputs that the parameter definition changed.

Calling this makes IOutput_NotificationHandler::OnOutput_RefreshParameterDefinition to be called on connected outputs.

virtual void CPNS::IInput::RegisterClockListenerControlNotificationHandler ( CPNS::IInput_ClockListenerControlNotificationHandler *const  pHandler)
pure virtual

Register an Input clock listener notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_ClockListenerControlNotificationHandler. If pHandler is NULL, clear all registered handlers.
Remarks
IOC_Clock is automatically added to the InpCaps of the device.
virtual void CPNS::IInput::RegisterNotificationHandler ( CPNS::IInput_NotificationHandler *const  pHandler)
pure virtual

Register an Input notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_NotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IInput::RegisterParameterNotificationHandler ( CPNS::IInput_ParameterNotificationHandler *const  pHandler)
pure virtual

Register a Parameter notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_ParameterNotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IInput::RegisterRecordingNotificationHandler ( CPNS::IInput_NotificationHandler *const  pHandler)
pure virtual

Register an Input recording notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_NotificationHandler. If pHandler is NULL, clear all registered handlers.
Remarks
IC_Recording is automatically added to the InpCaps of the device.
virtual CPNS::Enums::Errors CPNS::IInput::RemoveSource ( CPNS::Endpoint const &  source)
pure virtual

Remove a source.

Warning
calling this method forces the related output to get disconnected from this input, even it is locked!
Parameters
[in]sourcethe output which must be disconnected
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NoSource
virtual void CPNS::IInput::SetCapabilities ( CPNS::CombinedInOutCapabilities const  caps)
pure virtual

Set the Output capabilities.

Parameters
[in]capsthe new capabilities
virtual void CPNS::IInput::SetName ( CPNS::char8 const *const  utf8Name)
pure virtual

Change the input name.

Parameters
[in]utf8Namenew name
virtual void CPNS::IInput::SetSectionID ( CPNS::SectionID const &  sectionID)
pure virtual

Set the section type information.

Parameters
[in]sectionIDthe new Section ID
virtual CPNS::Enums::Errors CPNS::IInput::Signal ( 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 multicast signal directed to all devices present in the source set.

Only one signal per device is sent.

Remarks
This method send directed signals. So the signal number MUST have SIGB_Directed 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 void CPNS::IInput::UnregisterClockListenerControlNotificationHandler ( CPNS::IInput_ClockListenerControlNotificationHandler *const  pHandler)
pure virtual

Unregister an Input clock listener notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_ClockListenerControlNotificationHandler. If pHandler is NULL, clear all registered handlers.
Remarks
IOC_Clock is automatically removed from the InpCaps of the device.
virtual void CPNS::IInput::UnregisterNotificationHandler ( CPNS::IInput_NotificationHandler *const  pHandler)
pure virtual

Unregister an Input notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_NotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IInput::UnregisterParameterNotificationHandler ( CPNS::IInput_ParameterNotificationHandler *const  pHandler)
pure virtual

Unregister a Parameter notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_ParameterNotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IInput::UnregisterRecordingNotificationHandler ( CPNS::IInput_NotificationHandler *const  pHandler)
pure virtual

Unregister an Input recording notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IInput_NotificationHandler. If pHandler is NULL, clear all registered handlers.
Remarks
IC_Recording is automatically removed from the InpCaps of the device.