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

Notification handler for Parameters handling. More...

Public Member Functions

virtual void OnParameter_RequestRefreshCurrentValue (CPNS::IParameter *const pNotifiedObject, CPNS::uint16 const wIndex)=0
 Called by the CHAI to request a current value refresh related to a specific parameter. More...
 
virtual void OnParameter_OnModifierUpdate (CPNS::IParameter *const pNotifiedObject, CPNS::uint16 const wUpdatedRawValue, CPNS::IModifierMessage *const pModifier)
 An Modifier message related to this Parameter has been received. More...
 
virtual void OnParameter_OnSelectorUpdate (CPNS::IParameter *const pNotifiedObject, CPNS::SelectorItem const *const pItem, CPNS::ISelectorMessage *const pSelector)
 A Selector message related to this Parameter has been received. More...
 
virtual void OnParameter_OnTextUpdate (CPNS::IParameter *const pNotifiedObject, CPNS::ITextMessage *const pText)
 A Text message related to this Parameter has been received. More...
 

Detailed Description

Notification handler for Parameters handling.

Member Function Documentation

virtual void CPNS::IInput_ParameterNotificationHandler::OnParameter_OnModifierUpdate ( CPNS::IParameter *const  pNotifiedObject,
CPNS::uint16 const  wUpdatedRawValue,
CPNS::IModifierMessage *const  pModifier 
)
inlinevirtual

An Modifier message related to this Parameter has been received.

The updated raw value argument contains the value provided by the Modifier message, except in case of relative Modifier. In this case, an absolute raw value is calculated from the last known current value and the offset provided in the Modifier. The original Modifier message object is also forwarded to provide all of its content to the application (automation,...).

Remarks
It's up to the application to decide if it's relevant to notify a value change using CPNS::IParameter::DeclareParameterChanged
Parameters
[in]pNotifiedObjectPointer to the related parameter
[in]wUpdatedRawValueRaw value, always absolute within range 0x0000..0xFFFF
[in]pModifierPointer to the Modifier message
virtual void CPNS::IInput_ParameterNotificationHandler::OnParameter_OnSelectorUpdate ( CPNS::IParameter *const  pNotifiedObject,
CPNS::SelectorItem const *const  pItem,
CPNS::ISelectorMessage *const  pSelector 
)
inlinevirtual

A Selector message related to this Parameter has been received.

The updated item argument points corresponds to the value provided by the Selector message, except in case of proportional or relative Selector. In this case, the selected item is calculated from the Selector Item list size (proportional mode) or from the last known current value (relative mode). The original Selector message object is also forwarded to provide all of its content to the application (automation,...).

Warning
CAUTION! the item pointer might be NULL if non of the Selector Item list element matches the Selector message value.
Remarks
It's up to the application to decide if it's relevant to notify a value change using CPNS::IParameter::DeclareParameterChanged
Parameters
[in]pNotifiedObjectPointer to the related parameter
[in]pItemPointer to the Selector Item
[in]pSelectorPointer to the Selector message
virtual void CPNS::IInput_ParameterNotificationHandler::OnParameter_OnTextUpdate ( CPNS::IParameter *const  pNotifiedObject,
CPNS::ITextMessage *const  pText 
)
inlinevirtual

A Text message related to this Parameter has been received.

Remarks
It's up to the application to decide if it's relevant to notify a value change using CPNS::IParameter::DeclareParameterChanged
Parameters
[in]pNotifiedObjectPointer to the related parameter
[in]pTextPointer to the Text message
virtual void CPNS::IInput_ParameterNotificationHandler::OnParameter_RequestRefreshCurrentValue ( CPNS::IParameter *const  pNotifiedObject,
CPNS::uint16 const  wIndex 
)
pure virtual

Called by the CHAI to request a current value refresh related to a specific parameter.

When this method is called, the application should reply using IParameter::RefreshCurrentModifierParameterValue | IParameter::RefreshCurrentSelectorParameterValue | IParameter::RefreshCurrentTextParameterValue

Remarks
The call to RefreshCurrent***Value can be done at any time, even outside this notification handler scope. The CHAI is not waiting for it. It is just relaying the fact that a remote controller is interested in knowing the current value.
Parameters
[in]pNotifiedObjectPointer to the related parameter
[in]wIndexindex related to the expected current value, or 0 if no index.