IoT::Devices

class DatapointServerHelper

File Information

Library: IoT/Devices
Package: Generated
Header: IoT/Devices/DatapointServerHelper.h

Description

The base class for datapoints. Datapoints typically represent the result of sensor measurements, or data obtained from monitoring processes.

The main difference between a Datapoint and a Sensor is that a Sensor is typically an interface to a specific device (i.e., a temperature sensor), whereas a Datapoint holds a value that has been acquired from another device (via a network or bus system) or computed from other data points.

In addition to the methods defined in this interface, a Sensor implementation should expose the following properties:

  • displayValue (string, optional): The current value of the datapoint, formatted as string for display purposes.
  • updated (timestamp, optional): The point in time when the datapoint's value was last updated.
  • access (string, optional): Access permissions ("rw" - read/write, "ro" - read-only, "wo" - write-only).

Subclasses of Datapoint implement specific value types.

Member Summary

Member Functions: createRemoteObject, enableEvents, registerObject, registerRemoteObject, shutdown, unregisterObject

Types Aliases

Service

using Service = IoT::Devices::Datapoint;

Constructors

DatapointServerHelper

DatapointServerHelper();

Destructor

~DatapointServerHelper

~DatapointServerHelper();

Destroys the DatapointServerHelper.

Member Functions

createRemoteObject static inline

static Poco::AutoPtr < IoT::Devices::DatapointRemoteObject > createRemoteObject(
    Poco::SharedPtr < IoT::Devices::Datapoint > pServiceObject,
    const Poco::RemotingNG::Identifiable::ObjectId & oid
);

Creates and returns a RemoteObject wrapper for the given IoT::Devices::Datapoint instance.

enableEvents static inline

static void enableEvents(
    const std::string & uri,
    const std::string & protocol
);

Enables remote events for the RemoteObject identified by the given URI.

Events will be delivered using the Transport for the given protocol. Can be called multiple times for the same URI with different protocols.

registerObject static inline

static std::string registerObject(
    Poco::SharedPtr < IoT::Devices::Datapoint > pServiceObject,
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    const std::string & listenerId
);

Creates a RemoteObject wrapper for the given IoT::Devices::Datapoint instance and registers it with the ORB and the Listener instance uniquely identified by the Listener's ID.

Returns the URI created for the object.

registerRemoteObject static inline

static std::string registerRemoteObject(
    Poco::AutoPtr < IoT::Devices::DatapointRemoteObject > pRemoteObject,
    const std::string & listenerId
);

Registers the given RemoteObject with the ORB and the Listener instance uniquely identified by the Listener's ID.

Returns the URI created for the object.

shutdown static

static void shutdown();

Removes the Skeleton for IoT::Devices::Datapoint from the ORB.

unregisterObject static inline

static void unregisterObject(
    const std::string & uri
);

Unregisters a service object identified by URI from the ORB.

Securely control IoT edge devices from anywhere   Connect a Device