IoT::Devices

class LEDServerHelper

File Information

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

Description

The base class for LEDs.

Each instance of the LED class represents a single physical LED. Some LED devices support different brightness levels, this is accounted for by allowing to specify a brightness level in range 0.0 to 1.0, where 0.0 turns the LED off and 1.0 is the maximum brightness.

Some implementations may also support blinking LEDs. This is exposed via the "blinkOn" and "blinkOff" properties, which take as values the time in milliseconds the LED should be on, or off, respectively. There is also a shortcut method, blink(), which allows setting both properties at once.

To turn on blinking, both "blinkOn" and "blinkOff" must be set to a non-zero value. Furthermore, the brightness must be non-zero.

Member Summary

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

Types Aliases

Service

using Service = IoT::Devices::LED;

Constructors

LEDServerHelper

LEDServerHelper();

Creates a LEDServerHelper.

Destructor

~LEDServerHelper

~LEDServerHelper();

Destroys the LEDServerHelper.

Member Functions

createRemoteObject static inline

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

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

registerObject static inline

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

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