openDAQ
Open data acquisition platform
IFunctionBlockWrapper Struct Referenceabstract

Enables to change the configuration behaviour of a function block. More...

+ Inheritance diagram for IFunctionBlockWrapper:
+ Collaboration diagram for IFunctionBlockWrapper:

Detailed Description

Enables to change the configuration behaviour of a function block.

Function block wrapper is used when a parent function block creates a child function block. Often it is required that the child function block does not expose all configuration features to the client SDK code. Some configuration is performed by the parent function block. Therefore it is required that the parent function block is able to hide and/or change configuration parameters of the child function block.

The parent function block should create an instance of a function block wrapper to modify the configuration interface of the child function block. The original function block is passed as a parameter to factory function. The parent function block should configure access to the original child function block using the functions on function block wrapper. Then it should publish the wrapped function block.

Public Member Functions

virtual ErrCode INTERFACE_FUNC includeInputPort (IString *inputPortName)=0
 Includes the input port to a list of input ports on the function block. More...
 
virtual ErrCode INTERFACE_FUNC excludeInputPort (IString *inputPortName)=0
 Excludes the input port from a list of input ports on the function block. More...
 
virtual ErrCode INTERFACE_FUNC includeSignal (IString *signalLocalId)=0
 Includes the signal to a list of signals on the function block. More...
 
virtual ErrCode INTERFACE_FUNC excludeSignal (IString *signalLocalId)=0
 Excludes the signal from a list of signals on the function block. More...
 
virtual ErrCode INTERFACE_FUNC includeProperty (IString *propertyName)=0
 Includes the property to a list of visible properties on the function block. More...
 
virtual ErrCode INTERFACE_FUNC excludeProperty (IString *propertyName)=0
 Excludes the property from a list of visible properties on the function block. More...
 
virtual ErrCode INTERFACE_FUNC includeFunctionBlock (IString *functionBlockLocalId)=0
 Includes the function block to a list of sub-function blocks on the function block. More...
 
virtual ErrCode INTERFACE_FUNC excludeFunctionBlock (IString *functionBlockLocalId)=0
 Excludes the function block from a list of sub-function blocks on the function block. More...
 
virtual ErrCode INTERFACE_FUNC setPropertyCoercer (IString *propertyName, ICoercer *coercer)=0
 Sets a custom coercer for the property. More...
 
virtual ErrCode INTERFACE_FUNC setPropertyValidator (IString *propertyName, IValidator *validator)=0
 Sets a custom validator for the property. More...
 
virtual ErrCode INTERFACE_FUNC setPropertySelectionValues (IString *propertyName, IList *enumValues)=0
 Sets a list of accepted selection values. More...
 
virtual ErrCode INTERFACE_FUNC getWrappedFunctionBlock (IFunctionBlock **functionBlock)=0
 Returns the wrapped function block which was passed as a parameter to the constructor/factory. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ excludeFunctionBlock()

virtual ErrCode INTERFACE_FUNC excludeFunctionBlock ( IString functionBlockLocalId)
pure virtual

Excludes the function block from a list of sub-function blocks on the function block.

Parameters
functionBlockLocalIdThe local id of the function block.

◆ excludeInputPort()

virtual ErrCode INTERFACE_FUNC excludeInputPort ( IString inputPortName)
pure virtual

Excludes the input port from a list of input ports on the function block.

Parameters
inputPortNameThe name of the input port.

◆ excludeProperty()

virtual ErrCode INTERFACE_FUNC excludeProperty ( IString propertyName)
pure virtual

Excludes the property from a list of visible properties on the function block.

Parameters
propertyNameThe name of the property.

Note that if the property is not visible in the wrapped function block, this method will have no effect. The method affects the return value of IFunctionBlock.GetVisibleProperties method.

◆ excludeSignal()

virtual ErrCode INTERFACE_FUNC excludeSignal ( IString signalLocalId)
pure virtual

Excludes the signal from a list of signals on the function block.

Parameters
signalLocalIdThe name of the signal.

◆ getWrappedFunctionBlock()

virtual ErrCode INTERFACE_FUNC getWrappedFunctionBlock ( IFunctionBlock **  functionBlock)
pure virtual

Returns the wrapped function block which was passed as a parameter to the constructor/factory.

Parameters
[out]functionBlockThe wrapped function block.

◆ includeFunctionBlock()

virtual ErrCode INTERFACE_FUNC includeFunctionBlock ( IString functionBlockLocalId)
pure virtual

Includes the function block to a list of sub-function blocks on the function block.

Parameters
functionBlockLocalIdThe local id of the sub-function block.

◆ includeInputPort()

virtual ErrCode INTERFACE_FUNC includeInputPort ( IString inputPortName)
pure virtual

Includes the input port to a list of input ports on the function block.

Parameters
inputPortNameThe name of the input port.

◆ includeProperty()

virtual ErrCode INTERFACE_FUNC includeProperty ( IString propertyName)
pure virtual

Includes the property to a list of visible properties on the function block.

Parameters
propertyNameThe name of the property.

Note that if the property is not visible in the wrapped function block, the property will not be included. The method the return value of IFunctionBlock.GetVisibleProperties method.

◆ includeSignal()

virtual ErrCode INTERFACE_FUNC includeSignal ( IString signalLocalId)
pure virtual

Includes the signal to a list of signals on the function block.

Parameters
signalLocalIdThe local id of the signal.

◆ setPropertyCoercer()

virtual ErrCode INTERFACE_FUNC setPropertyCoercer ( IString propertyName,
ICoercer coercer 
)
pure virtual

Sets a custom coercer for the property.

Parameters
propertyNameThe name of the property.
coercerThe custom coercer.

The custom coercer is applied before the standard coercer of the property.

◆ setPropertySelectionValues()

virtual ErrCode INTERFACE_FUNC setPropertySelectionValues ( IString propertyName,
IList enumValues 
)
pure virtual

Sets a list of accepted selection values.

Parameters
propertyNameThe name of the property.
enumValuesThe list of accepted selection values. An element of a list is selection index (int).

The list of accepted selection values must be a subset of property selection values.

◆ setPropertyValidator()

virtual ErrCode INTERFACE_FUNC setPropertyValidator ( IString propertyName,
IValidator validator 
)
pure virtual

Sets a custom validator for the property.

Parameters
propertyNameThe name of the property.
validatorThe custom validator.

The custom validator is applied before the standard validator of the property.