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

The Parameter object is aimed to: More...

+ Inheritance diagram for CPNS::IParameter:
+ Collaboration diagram for CPNS::IParameter:

Public Member Functions

virtual CPNS::IInputGetInput () const =0
 Get the related Input. More...
 
virtual CPNS::ParameterID GetParameterID () const =0
 Get the parameter's ID. More...
 
virtual CPNS::UTF8String GetName () const =0
 Get the Parameter name. More...
 
virtual
CPNS::CombinedControllerTypes 
GetPreferredControllerType () const =0
 Get the preferred control type. More...
 
virtual CPNS::uint16 GetInformationProfile () const =0
 Get the information profile. More...
 
virtual CPNS::ISelectorItemListGetSelectorItemList () const =0
 Get the Selector Item list, if this parameter is a Selector. More...
 
virtual CPNS::UTF8String GetPath (CPNS::uint16 const wIndex) const =0
 Get the parameter path. More...
 
virtual CPNS::Enums::Errors RefreshCurrentModifierParameterValue (CPNS::uint16 const wIndex, CPNS::Value const &Value, CPNS::char8 const *const utf8ValueText, CPNS::CombinedRefreshValueAttributes const attributes)=0
 Notify the connected Outputs & Controllers about a Modifier parameter change. More...
 
virtual CPNS::Enums::Errors RefreshCurrentSelectorParameterValue (CPNS::uint16 const wIndex, CPNS::uint16 const wValue, CPNS::CombinedRefreshValueAttributes const attributes)=0
 Notify the connected Outputs & Controllers about a Selector parameter change. More...
 
virtual CPNS::Enums::Errors RefreshCurrentTextParameterValue (CPNS::uint16 const wIndex, CPNS::char8 const *const utf8ValueText, CPNS::CombinedRefreshValueAttributes const attributes)=0
 Notify the connected Outputs & Controllers about a Text parameter change. More...
 
virtual void DeclareParameterChanged (CPNS::uint16 const wIndex, CPNS::uint16 const wRawValue)=0
 This can be used to declare a parameter value change without sending immediately the feedback. More...
 
virtual CPNS::Enums::Errors AddModifierSupportedDataType (CPNS::Enums::DataTypes const dataType, CPNS::Value const &minValue, CPNS::Value const &midValue, CPNS::Value const &maxValue)=0
 Declare a supported data type and its value range information. 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 Parameter object is aimed to:

  • handle parameter current value,
  • to notify changes to the network,
  • tonotify the application on change issued from the network

Member Function Documentation

virtual CPNS::Enums::Errors CPNS::IParameter::AddModifierSupportedDataType ( CPNS::Enums::DataTypes const  dataType,
CPNS::Value const &  minValue,
CPNS::Value const &  midValue,
CPNS::Value const &  maxValue 
)
pure virtual

Declare a supported data type and its value range information.

Parameters
[in]dataTypethe data type
[in]minValuethe min value
[in]midValuethe middle value
[in]maxValuethe max value
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_InvalidType | CPNS::Enums::ERR_NotEnoughMemory
virtual void CPNS::IParameter::DeclareParameterChanged ( CPNS::uint16 const  wIndex,
CPNS::uint16 const  wRawValue 
)
pure virtual

This can be used to declare a parameter value change without sending immediately the feedback.

Then the CHAI can call the IInput_ParameterNotificationHandler::OnParameter_RequestCurrentValue when it deems it necessary. This is a convenient way to limit the bandwidth used by parameter's current value feedback.

Remarks
The change declaration is supported only if the new value is different than the actual current value. wIndex the related parameter index, or 0 if the parameter is not indexed. wValue the new value if the parameter is related to a Modifier or a Selector. This argument is not used in case of Text parameter.
virtual CPNS::uint16 CPNS::IParameter::GetInformationProfile ( ) const
pure virtual

Get the information profile.

Returns
the information profile, to be casted to CPNS::Combined***InformationProfile depending on the message type.
virtual CPNS::IInput* CPNS::IParameter::GetInput ( ) const
pure virtual

Get the related Input.

Returns
the Input pointer
virtual CPNS::UTF8String CPNS::IParameter::GetName ( ) const
pure virtual

Get the Parameter name.

Returns
the output name
virtual CPNS::ParameterID CPNS::IParameter::GetParameterID ( ) const
pure virtual

Get the parameter's ID.

Warning
Be careful that the m_wMsgIndex member contains the max available index for this parameter definition!
Returns
the ParameterID
virtual CPNS::UTF8String CPNS::IParameter::GetPath ( CPNS::uint16 const  wIndex) const
pure virtual

Get the parameter path.

Parameters
[in]wIndexParameter index, if relevant
virtual CPNS::CombinedControllerTypes CPNS::IParameter::GetPreferredControllerType ( ) const
pure virtual

Get the preferred control type.

Returns
the control type description
virtual CPNS::ISelectorItemList* CPNS::IParameter::GetSelectorItemList ( ) const
pure virtual

Get the Selector Item list, if this parameter is a Selector.

Returns
A pointer to a ISelectorItemList object, or NULL if the parameter is not a Selector
virtual CPNS::Enums::Errors CPNS::IParameter::RefreshCurrentModifierParameterValue ( CPNS::uint16 const  wIndex,
CPNS::Value const &  Value,
CPNS::char8 const *const  utf8ValueText,
CPNS::CombinedRefreshValueAttributes const  attributes 
)
pure virtual

Notify the connected Outputs & Controllers about a Modifier parameter change.

This causes an immediate sending of the feedback to the remote watchers.

Remarks
In case of Learning in progress, the learning device is automatically notified about the parameter change if the attribute parameter contains the CPNS::Enums::RVA_ValidForLearning flag.
The attributes argument is automatically updated with the CPNS::Enums::RVA_EnableMoveDown and CPNS::Enums::RVA_EnableMoveUp values before sending the current value refresh notification.
Parameters
[in]wIndexthe related parameter index, or 0 if the parameter is not indexed.
[in]ValueNew parameter value
[in]utf8ValueTextValue string representation
[in]attributesAdditional attributes
virtual CPNS::Enums::Errors CPNS::IParameter::RefreshCurrentSelectorParameterValue ( CPNS::uint16 const  wIndex,
CPNS::uint16 const  wValue,
CPNS::CombinedRefreshValueAttributes const  attributes 
)
pure virtual

Notify the connected Outputs & Controllers about a Selector parameter change.

This causes an immediate sending of the feedback to the remote watchers. The text value is issued from the related Selector Item list.

Remarks
In case of Learning in progress, the learning device is automatically notified about the parameter change if the attribute parameter contains the CPNS::Enums::RVA_ValidForLearning flag.
The attributes argument is automatically updated with the CPNS::Enums::RVA_EnableMoveDown and CPNS::Enums::RVA_EnableMoveUp values before sending the current value refresh notification.
Parameters
[in]wIndexthe related parameter index, or 0 if the parameter is not indexed.
[in]wValueNew parameter value
[in]attributesAdditional attributes
virtual CPNS::Enums::Errors CPNS::IParameter::RefreshCurrentTextParameterValue ( CPNS::uint16 const  wIndex,
CPNS::char8 const *const  utf8ValueText,
CPNS::CombinedRefreshValueAttributes const  attributes 
)
pure virtual

Notify the connected Outputs & Controllers about a Text parameter change.

This causes an immediate sending of the feedback to the remote watchers.

Remarks
In case of Learning in progress, the learning device is automatically notified about the parameter change if the attribute parameter contains the CPNS::Enums::RVA_ValidForLearning flag.
Parameters
[in]wIndexthe related parameter index, or 0 if the parameter is not indexed.
[in]utf8ValueTextValue string representation
[in]attributesAdditional attributes