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:
- io.macchina.composite (Composite)
- io.macchina.accelerometer (Accelerometer)
- io.macchina.barcode (BarcodeReader)
- io.macchina.gnss (GNSSSensor)
- io.macchina.gyroscope (Gyroscope)
- io.macchina.io (IO)
- io.macchina.led (LED)
- io.macchina.magnetometer (Magnetometer)
- io.macchina.rotary (RotaryEncoder)
- io.macchina.sensor (Sensor)
- io.macchina.boolean (BooleanSensor)
- io.macchina.counter (Counter)
- io.macchina.serial (SerialDevice)
- io.macchina.switch (Switch)
- io.macchina.trigger (Trigger)
- io.macchina.datapoint (Datapoint)
- io.macchina.datapoint.scalar (ScalarDatapoint)
- io.macchina.datapoint.vector (VectorDatapoint)
- io.macchina.datapoint.counter (CounterDatapoint)
- io.macchina.datapoint.boolean (BooleanDatapoint)
- io.macchina.datapoint.string (StringDatapoint)
- io.macchina.datapoint.enum (EnumDatapoint)
- io.macchina.datapoint.flags (FlagsDatapoint)
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(
IDevice * pInterface,
const Poco::RemotingNG::Identifiable::ObjectId & objectId,
const std::string & protocol
);
Creates a DeviceEventDispatcher.
Destructor
~DeviceEventDispatcher
virtual ~DeviceEventDispatcher();
Destroys the DeviceEventDispatcher.
Member Functions
event__statusChanged
void event__statusChanged(
const void * pSender,
const IoT::Devices::DeviceStatusChange & data
);
remoting__typeId
virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;