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

The Controller object is aimed to be assigned to a remote parameter. More...

+ Inheritance diagram for CPNS::IController:
+ Collaboration diagram for CPNS::IController:

Public Member Functions

virtual operator CPNS::IBaseOutput * () const =0
 
virtual CPNS::uint16 GetControllerID () const =0
 Get the controller's ID. More...
 
virtual
CPNS::CombinedControllerTypes 
GetControllerTypes () const =0
 Get the controller types combination. More...
 
virtual CPNS::uint16 GetGroup () const =0
 Get the controller's group. More...
 
virtual CPNS::Enums::MessageTypes GetPreferredMessageType () const =0
 Get the controller's preferred message type. More...
 
virtual CPNS::uint16 GetPreferredMessageNumber () const =0
 Get the controller's preferred message number. More...
 
virtual
CPNS::ControllerAssignment
const & 
GetCurrentAssignment () const =0
 Get the current controller's assignment. More...
 
virtual CPNS::boolean IsDefaultAssignment ()=0
 Check if the controller is currently configured with its default assignment. More...
 
virtual void QueryParameterPath ()=0
 Queries the currently assigned parameter path. More...
 
virtual void QueryParameterValue ()=0
 Send a query of current parameter value update This is an asynchronous operation, the notification CPNS::IController_NotificationHandler::OnController_RefreshCurrentModifierParameterValue, CPNS::IController_NotificationHandler::OnController_RefreshCurrentSelectorParameterValue, or CPNS::IController_NotificationHandler::OnController_RefreshCurrentTextParameterValue, will be called later. More...
 
virtual void RegisterNotificationHandler (CPNS::IController_NotificationHandler *const pHandler)=0
 Register a Controller notification handler. More...
 
virtual void UnregisterNotificationHandler (CPNS::IController_NotificationHandler *const pHandler)=0
 Unregister a Controller notification handler. More...
 
virtual void Assign (CPNS::ControllerAssignment const &assignment)=0
 Assign the controller. More...
 
virtual void Unassign ()=0
 Unassign the controller, back to the preferred settings. More...
 
virtual CPNS::Enums::Errors EnterLearningMode ()=0
 Enter learning mode. More...
 
virtual CPNS::Enums::Errors SendValue (CPNS::uint16 const wValue, CPNS::Enums::ControllerSendModes const mode)=0
 Send a value using the assigned message. More...
 
virtual CPNS::Enums::Errors SendValueWithAutomation (CPNS::uint16 const wValue, CPNS::Enums::ControllerSendModes const mode, CPNS::boolean const fWriteToEnd, CPNS::boolean const fTouch, CPNS::Enums::PerformanceMessageAutomationStates const state)=0
 Send a value using the assigned message, specifying automation The value is sent in proportional mode (see CPNS::ISelectorMessage::SetProportionalValue) if the assigned message. More...
 
virtual CPNS::Enums::Errors SendDown ()=0
 Send the message related to the button down action, if any. More...
 
virtual CPNS::Enums::Errors SendUp ()=0
 Send the message related to the button up action, if any. More...
 
virtual CPNS::Enums::Errors SendTextValue (CPNS::char8 const *const utf8Value)=0
 Send a text value using the assigned message (only for controllers assigned to text parameter) More...
 
virtual CPNS::Enums::Errors SendTextValueWithAutomation (CPNS::char8 const *const utf8Value, CPNS::boolean const fWriteToEnd, CPNS::boolean const fTouch, CPNS::Enums::PerformanceMessageAutomationStates const state)=0
 Send a value using the assigned message, specifying automation (only for controllers assigned to text parameter) The value is sent in proportional mode (see CPNS::ISelectorMessage::SetProportionalValue) if the assigned message. More...
 
- Public Member Functions inherited from CPNS::IBaseOutput
CPNS::IOutputGetIOutput () const
 Check Output type and return an IOutput object pointer if type match. More...
 
CPNS::IControllerGetIController () const
 Check Controller type and return an IController object pointer if type match. More...
 
virtual CPNS::IBaseLocalDeviceGetDevice () const =0
 Get the related Local DeviceCHAI. More...
 
virtual void SetDisabledInternalSnapshot (CPNS::boolean const fDisabled)=0
 Enable/disable the internal snapshot capability for this output. More...
 
virtual CPNS::UTF8String GetName () const =0
 Get the Output name. More...
 
virtual void SetName (CPNS::char8 const *const utf8Name)=0
 Set the Output name. More...
 
virtual CPNS::Endpoint GetEndpoint ()=0
 Get the Endpoint related to the output. More...
 
virtual void SetSectionID (CPNS::SectionID const &sectionID)=0
 Set the Output section. More...
 
virtual CPNS::SectionID GetSectionID () const =0
 Get the Output section. More...
 
virtual CPNS::boolean IsCompatibleWith (CPNS::CombinedInOutCapabilities const inCaps)=0
 Check if the output is compatible with the specified input caps. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetCapabilities () const =0
 Get the Output capabilities. More...
 
virtual CPNS::boolean HasRecordingDestinations ()=0
 Check if the Output has recording destinations. More...
 
virtual void ClearRecordingDestinations ()=0
 Clear all recording destinations. More...
 
virtual CPNS::Enums::Errors AddRecordingDestination (CPNS::Endpoint const &destination)=0
 Add a recording destination There is no effect if the recording destination is already set for the Output. More...
 
virtual CPNS::Enums::Errors RemoveRecordingDestination (CPNS::Endpoint const &destination)=0
 Remove a recording destination. More...
 
virtual CPNS::uint16 GetNumRecordingDestinations ()=0
 Get the number of recording destinations. More...
 
virtual CPNS::Endpoint GetRecordingDestination (CPNS::uint16 const wDestinationIndex)=0
 Get a recording destination. More...
 
virtual void EnableSendingDuringGlobalLearning (CPNS::boolean const fEnable)=0
 Allow sending message during global learning. More...
 
virtual void ClearTimeStamp ()=0
 Clear any timestamp information. More...
 
virtual void SetTimeStampOffline ()=0
 Set the timestamp in offline mode. More...
 
virtual void SetTimeStampSongPosition (CPNS::SongPosition const position)=0
 Set the timestamp to Song Position value. More...
 
virtual void SetTimeStampSystemTime (CPNS::SystemTime const position)=0
 Set the timestamp to System Time value. More...
 
virtual void SetTimeStampSystemTimeFromGlobalSynchronizedTime ()=0
 Set timestamp from Global Synchronized Clock (unit is 1us). More...
 
virtual void EnableAutoTimeStampOnRecording (CPNS::boolean const fEnable)=0
 Enable/disable automatic timestamping during recording session. More...
 
virtual CPNS::Enums::Errors QueryCurrentParameterValues ()=0
 Send a query for all current parameter values refresh to the connected input. More...
 
virtual CPNS::Enums::Errors QueryCurrentParameterValue (CPNS::ParameterID const &paramID)=0
 Send a query of current parameter value update for the specified parameter. 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 Controller object is aimed to be assigned to a remote parameter.

It can be automatically configured to send the message expected by the related parameter. Assignation can be done from anywhere in the network, or using the SmartConnect feature.

Member Function Documentation

virtual void CPNS::IController::Assign ( CPNS::ControllerAssignment const &  assignment)
pure virtual

Assign the controller.

Parameters
[in]assignmentthe new controller assignment
virtual CPNS::Enums::Errors CPNS::IController::EnterLearningMode ( )
pure virtual

Enter learning mode.

On success, the notification handler ICHAI_NotificationHandler::OnCHAI_Notification is called signaling CPNS::Enums::CNT_GlobalLearningModeRunning If a Learning is requested but already in progress, the method returns CPNS::Enums::ERR_GlobalLearningRunning.

Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_GlobalLearningRunning
virtual CPNS::uint16 CPNS::IController::GetControllerID ( ) const
pure virtual

Get the controller's ID.

Returns
the ControllerID
virtual CPNS::CombinedControllerTypes CPNS::IController::GetControllerTypes ( ) const
pure virtual

Get the controller types combination.

Returns
the controller types
virtual CPNS::ControllerAssignment const& CPNS::IController::GetCurrentAssignment ( ) const
pure virtual

Get the current controller's assignment.

Returns
a reference to the controller assignment structure
virtual CPNS::uint16 CPNS::IController::GetGroup ( ) const
pure virtual

Get the controller's group.

The group can be used to identify controllers sharing the same physical controller.

Returns
the group identifier
virtual CPNS::uint16 CPNS::IController::GetPreferredMessageNumber ( ) const
pure virtual

Get the controller's preferred message number.

Returns
the message number
virtual CPNS::Enums::MessageTypes CPNS::IController::GetPreferredMessageType ( ) const
pure virtual

Get the controller's preferred message type.

Returns
the message type
virtual CPNS::boolean CPNS::IController::IsDefaultAssignment ( )
pure virtual

Check if the controller is currently configured with its default assignment.

Returns
TRUE if the current assignment is the default one.
virtual void CPNS::IController::QueryParameterPath ( )
pure virtual

Queries the currently assigned parameter path.

This is an asynchronous operation, the notification CPNS::IController_NotificationHandler::OnParameterPathReply will be called later.

virtual void CPNS::IController::QueryParameterValue ( )
pure virtual
virtual void CPNS::IController::RegisterNotificationHandler ( CPNS::IController_NotificationHandler *const  pHandler)
pure virtual

Register a Controller notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IController_NotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual CPNS::Enums::Errors CPNS::IController::SendDown ( )
pure virtual

Send the message related to the button down action, if any.

If the controller has been assigned with a selector:

virtual CPNS::Enums::Errors CPNS::IController::SendTextValue ( CPNS::char8 const *const  utf8Value)
pure virtual

Send a text value using the assigned message (only for controllers assigned to text parameter)

Parameters
[in]utf8Valuethe text value
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_SentToNotYetValidatedDestination | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_NotReadyToSend | CPNS::Enums::ERR_Failed | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_TooManyRecordingDestinations
Remarks
If some destination is not yet validated, the method returns CPNS::Enums::ERR_SentToNotYetValidatedDestination. The message delivery is not guaranteed for those destinations.
virtual CPNS::Enums::Errors CPNS::IController::SendTextValueWithAutomation ( CPNS::char8 const *const  utf8Value,
CPNS::boolean const  fWriteToEnd,
CPNS::boolean const  fTouch,
CPNS::Enums::PerformanceMessageAutomationStates const  state 
)
pure virtual

Send a value using the assigned message, specifying automation (only for controllers assigned to text parameter) The value is sent in proportional mode (see CPNS::ISelectorMessage::SetProportionalValue) if the assigned message.

Parameters
[in]utf8Valuethe text value
[in]fWriteToEndFALSE: Latch mode, TRUE: Write to End mode
[in]fTouchFALSE: No touch, TRUE: touch
[in]statesee CPNS::Enums::PerformanceMessageAutomationStates
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_SentToNotYetValidatedDestination | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_NotReadyToSend | CPNS::Enums::ERR_Failed | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_TooManyRecordingDestinations
Remarks
If some destination is not yet validated, the method returns CPNS::Enums::ERR_SentToNotYetValidatedDestination. The message delivery is not guaranteed for those destinations.
virtual CPNS::Enums::Errors CPNS::IController::SendUp ( )
pure virtual

Send the message related to the button up action, if any.

If the controller has been assigned with a selector:

virtual CPNS::Enums::Errors CPNS::IController::SendValue ( CPNS::uint16 const  wValue,
CPNS::Enums::ControllerSendModes const  mode 
)
pure virtual

Send a value using the assigned message.

If the assigned message is a Selector, the value is sent in proportional mode (see CPNS::ISelectorMessage::SetProportionalValue)

Parameters
[in]wValuethe full range value [0..0xFFFF]
[in]modetells if the value is absolute, relative (simple cast to CPNS::int16) or proportional (only for Selectors). A generic controller that don't take care of the current assignment can use relative mode in any case, so the sent value will be used as an absolute value for modifiers, and mapped to the selector item list size in case of selector.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_SentToNotYetValidatedDestination | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_NotReadyToSend | CPNS::Enums::ERR_Failed | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_TooManyRecordingDestinations
Remarks
If some destination is not yet validated, the method returns CPNS::Enums::ERR_SentToNotYetValidatedDestination. The message delivery is not guaranteed for those destinations.
virtual CPNS::Enums::Errors CPNS::IController::SendValueWithAutomation ( CPNS::uint16 const  wValue,
CPNS::Enums::ControllerSendModes const  mode,
CPNS::boolean const  fWriteToEnd,
CPNS::boolean const  fTouch,
CPNS::Enums::PerformanceMessageAutomationStates const  state 
)
pure virtual

Send a value using the assigned message, specifying automation The value is sent in proportional mode (see CPNS::ISelectorMessage::SetProportionalValue) if the assigned message.

Parameters
[in]wValuethe full range value [0..0xFFFF]
[in]modetells if the valueis absolute, relative (simple cast to CPNS::int16) or proportional (only for Selectors)
[in]fWriteToEndFALSE: Latch mode, TRUE: Write to End mode
[in]fTouchFALSE: No touch, TRUE: touch
[in]statesee CPNS::Enums::PerformanceMessageAutomationStates
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_SentToNotYetValidatedDestination | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_NotReadyToSend | CPNS::Enums::ERR_Failed | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_TooManyRecordingDestinations
Remarks
If some destination is not yet validated, the method returns CPNS::Enums::ERR_SentToNotYetValidatedDestination. The message delivery is not guaranteed for those destinations.
virtual void CPNS::IController::Unassign ( )
pure virtual

Unassign the controller, back to the preferred settings.

virtual void CPNS::IController::UnregisterNotificationHandler ( CPNS::IController_NotificationHandler *const  pHandler)
pure virtual

Unregister a Controller notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IController_NotificationHandler. If pHandler is NULL, clear all registered handlers.