IoT::Devices

class DeviceEventDispatcher

File Information

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

Description

The base class for all devices and sensors.

This class defines a generic interface for setting and querying device properties and features.

The class also defines an event for notifications about changes to the device status.

Every implementation of Device should expose the following properties:

  • symbolicName: A name in reverse DNS notation that identifies the specific implementation of the device type.
  • type (string): A name in reverse DNS notation that identifies the generic device type (e.g., "io.macchina.serial").
  • name (string): A human-readable device type (e.g., "Serial Port").
  • status (int): Current device status (DeviceStatus); optional.

The following generic device types are currently defined:

Inheritance

Direct Base Classes: Poco::RemotingNG::EventDispatcher

All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::EventDispatcher

Member Summary

Member Functions: event__statusChanged, remoting__typeId

Inherited Functions: accept, attributes, duplicate, protocol, referenceCount, release, removeEventFilter, setEventFilter, setEventFilterImpl, subscribe, transportForSubscriber, unsubscribe

Constructors

DeviceEventDispatcher

DeviceEventDispatcher(
    DeviceRemoteObject * pRemoteObject,
    const std::string & protocol
);

Destructor

~DeviceEventDispatcher virtual

virtual ~DeviceEventDispatcher();

Destroys the DeviceEventDispatcher.

Member Functions

event__statusChanged

void event__statusChanged(
    const void * pSender,
    const IoT::Devices::DeviceStatusChange & data
);

remoting__typeId virtual inline

virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;

Securely control IoT edge devices from anywhere   Connect a Device