File Information
Library: IoT/Devices
Package: Generated
Header: IoT/Devices/IIO.h
Description
The interface for general purpose input/output (GPIO) ports.
This class represents a single GPIO pin. Mapping to physical pins is configured when setting up the specific IO implementation class, typically using a configuration file.
Implementations supporting dynamically changing pin directions should expose a string property named "direction" that takes the values "in" and "out".
Inheritance
Direct Base Classes: IDevice
All Base Classes: IDevice, Poco::OSP::Service, Poco::RefCountedObject
Known Derived Classes: IORemoteObject
Member Summary
Member Functions: isA, remoting__enableEvents, remoting__typeId, set, state, toggle, type
Inherited Functions: duplicate, getFeature, getPropertyBool, getPropertyDouble, getPropertyInt, getPropertyInt16, getPropertyInt64, getPropertyString, getPropertyTimestamp, hasFeature, hasProperty, isA, referenceCount, release, remoting__enableEvents, remoting__typeId, setFeature, setPropertyBool, setPropertyDouble, setPropertyInt, setPropertyInt16, setPropertyInt64, setPropertyString, setPropertyTimestamp, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < IIO >;
Constructors
IIO
IIO();
Creates a IIO.
Destructor
~IIO
virtual ~IIO();
Destroys the IIO.
Member Functions
isA
bool isA(
const std::type_info & otherType
) const;
Returns true if the class is a subclass of the class given by otherType.
See also: IoT::Devices::IDevice::isA()
remoting__enableEvents
virtual std::string remoting__enableEvents(
Poco::RemotingNG::Listener::Ptr pListener,
bool enable = bool (true)
) = 0;
Enable or disable delivery of remote events.
The given Listener instance must implement the Poco::RemotingNG::EventListener interface, otherwise this method will fail with a RemotingException.
This method is only used with Proxy objects; calling this method on a RemoteObject will do nothing.
remoting__typeId
static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();
Returns the TypeId of the class.
set
virtual void set(
bool state
) = 0;
Sets the state of an output pin to the given state.
state
virtual bool state() const = 0;
Returns the current state of the pin.
toggle
virtual bool toggle() = 0;
Toggles the state of an output pin and returns the new state.
type
const std::type_info & type() const;
Returns the type information for the object's class.
See also: IoT::Devices::IDevice::type()
Variables
stateChanged
Poco::BasicEvent < const bool > stateChanged;