File Information
Library: IoT/Datapoints
Package: Datapoints
Header: IoT/Datapoints/DatapointFactory.h
Description
A factory for the dynamic creation of Datapoints.
Inheritance
Known Derived Classes: DatapointFactoryImpl
Member Summary
Member Functions: createBoolean, createComposite, createCounter, createEnum, createFlags, createMovingAverage, createScalar, createString, createVector, remove
Types Aliases
ServiceID
using ServiceID = std::string;
Constructors
DatapointFactory
Creates the DatapointFactory.
Destructor
~DatapointFactory
virtual ~DatapointFactory();
Destroys the DatapointFactory.
Member Functions
createBoolean
virtual ServiceID createBoolean(
const BooleanDatapointParams & params
) = 0;
Creates a BooleanDatapoint and returns the service ID of the newly created Datapoint.
createComposite
virtual ServiceID createComposite(
const CompositeParams & params
) = 0;
Creates a Composite and returns the service ID of the newly created Composite.
createCounter
virtual ServiceID createCounter(
const CounterDatapointParams & params
) = 0;
Creates a CounterDatapoint and returns the service ID of the newly created Datapoint.
createEnum
virtual ServiceID createEnum(
const EnumDatapointParams & params
) = 0;
Creates an EnumDatapoint and returns the service ID of the newly created Datapoint.
createFlags
virtual ServiceID createFlags(
const FlagsDatapointParams & params
) = 0;
Creates an FlagsDatapoint and returns the service ID of the newly created Datapoint.
createMovingAverage
virtual ServiceID createMovingAverage(
const MovingAverageDatapointParams & params
) = 0;
Creates a ScalarDatapoint that implements moving average computation and returns the service ID of the newly created Datapoint.
createScalar
virtual ServiceID createScalar(
const ScalarDatapointParams & params
) = 0;
Creates a ScalarDatapoint and returns the service ID of the newly created Datapoint.
createString
virtual ServiceID createString(
const StringDatapointParams & params
) = 0;
Creates a StringDatapoint and returns the service ID of the newly created Datapoint.
createVector
virtual ServiceID createVector(
const VectorDatapointParams & params
) = 0;
Creates a VectorDatapoint and returns the service ID of the newly created Datapoint.
remove
virtual void remove(
const ServiceID serviceID
) = 0;
Removes the Datapoint (or Composite) with the given ID.
The Datapoint or Composite must have been created previously by calling one of the createXXX() methods.