IoT::Devices

class SerialDeviceSkeleton

File Information

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

Description

This class provides a simple interface for accessing a serial port.

There are two modes of operation for receiving data: polling (blocking) mode (default) and events (callback) mode.

In polling mode, repeatedly call poll() to detect if data is available, then call one of the read() methods to receive available data. The read() methods can also be called if no data is available, but will block until at least one character can be read.

In event mode the class will start a thread that polls and reads available data from the serial port, and fires the lineReceived event whenever something has been read. Since callback mode uses readLine() to receive entire lines (if possible), delimiter characters and timeout can be set via the "delimiters" (string) and "timeout" (double) properties.

Clients of the class can switch between polling and event mode by enabling or disabling the "events" feature:

setFeature("events", true);

Inheritance

Direct Base Classes: Poco::RemotingNG::Skeleton

All Base Classes: Poco::RefCountedObject, Poco::RemotingNG::AttributedObject, Poco::RemotingNG::Skeleton

Member Summary

Member Functions: remoting__typeId

Inherited Functions: addMethodHandler, clearAttributes, countAttributes, duplicate, enumerateAttributes, getAttribute, hasAttribute, invoke, operator =, referenceCount, release, removeAttribute, setAttribute

Constructors

SerialDeviceSkeleton

SerialDeviceSkeleton();

Destructor

~SerialDeviceSkeleton virtual

virtual ~SerialDeviceSkeleton();

Destroys a SerialDeviceSkeleton.

Member Functions

remoting__typeId virtual inline

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

Variables

DEFAULT_NS static

static const std::string DEFAULT_NS;

Securely control IoT edge devices from anywhere   Connect a Device