File Information
Library: IoT/Devices
Package: Datapoints
Header: IoT/Devices/VectorDatapoint.h
Description
The base class for datapoints holding a vector value.
In addition to the methods defined in this interface, a VectorDatapoint implementation should expose the following properties:
- displayValue (string, optional): The current value of the datapoint, formatted as string for display purposes.
Inheritance
Direct Base Classes: Datapoint
Member Summary
Member Functions: update, validValue, value
Inherited Functions: getFeature, getPropertyBool, getPropertyDouble, getPropertyInt, getPropertyInt16, getPropertyInt64, getPropertyString, getPropertyTimestamp, hasFeature, hasProperty, invalidate, setFeature, setPropertyBool, setPropertyDouble, setPropertyInt, setPropertyInt16, setPropertyInt64, setPropertyString, setPropertyTimestamp, valid
Types Aliases
Vector
using Vector = std::vector < double >;
Constructors
VectorDatapoint
Creates the VectorDatapoint.
Destructor
~VectorDatapoint
~VectorDatapoint();
Destroys the VectorDatapoint.
Member Functions
update
virtual void update(
const Vector & value
) = 0;
Updates the value of the datapoint and makes it valid.
Not all Datapoint implementations may support this method.
validValue
virtual Poco::Optional < Vector > validValue() const = 0;
Returns the current value of the datapoint if it is valid, otherwise an empty value.
value
virtual Vector value() const = 0;
Returns the current value of the datapoint, even if it has been invalidated.
Use validValue() to get a valid value only.
Variables
validated
Poco::BasicEvent < const Vector > validated;
Fired when an invalid datapoint becomes valid again, by being updated with a new value. The new valud is given as event argument.
valueChanged
Poco::BasicEvent < const Vector > valueChanged;
Fired when the value of the datapoint has changed.
Actual behavior of this event (e.g., minimum interval between fires) are implementation specific and can be configured via properties.
valueUpdated
Poco::BasicEvent < const Vector > valueUpdated;
Fired when the value of the datapoint has been updated by calling update(). This event is also fired if the actual value has not changed.