IoT::Devices

class SensorServerHelper

File Information

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

Description

The base class for analog sensors, such as temperature or ambient light sensors.

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

  • physicalQuantity (string): The physical quantity that is being measured by the sensor, e.g. "temperature".
  • physicalUnit (string): The physical unit the measured value is being represented in (e.g. "Cel" for degree Celsius). This should use the "c/s" symbols from the Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html). See the PHYSICAL_UNIT_* strings for predefined values.
  • displayValue (string, optional): The current value of the sensor, formatted as string for display purposes.

Member Summary

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

Types Aliases

Service

using Service = IoT::Devices::Sensor;

Constructors

SensorServerHelper

SensorServerHelper();

Creates a SensorServerHelper.

Destructor

~SensorServerHelper

~SensorServerHelper();

Destroys the SensorServerHelper.

Member Functions

createRemoteObject static inline

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

Creates and returns a RemoteObject wrapper for the given IoT::Devices::Sensor 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::Sensor > pServiceObject,
    const Poco::RemotingNG::Identifiable::ObjectId & oid,
    const std::string & listenerId
);

Creates a RemoteObject wrapper for the given IoT::Devices::Sensor 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::SensorRemoteObject > 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::Sensor 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