IO::Custom::Device Class Referenceabstract

#include <Device.h>

Inheritance diagram for IO::Custom::Device:
Collaboration diagram for IO::Custom::Device:

Classes

class  FactoryTemplate
 

Public Member Functions

const DeviceType type () const override
 
IO::RequestcreateRequest () override
 Create a request object for this device. More...
 
virtual int getNodeValue (IO::DevNode node) const
 
- Public Member Functions inherited from IO::Device
 Device (Controller &controller, const char *id)
 Device constructor. More...
 
virtual ~Device ()
 
ErrorCode init (const Config &config)
 
virtual ErrorCode init (JsonObjectConst config)=0
 
const CStringgetId () const
 The unique device identifier. More...
 
bool operator== (const String &id) const
 
const CStringgetName () const
 Optional descriptive name for the device. More...
 
virtual uint16_t address () const
 Devices with a numeric address should implement this method. More...
 
unsigned minTransactionInterval () const
 
String caption () const
 Obtain a descriptive caption for this device. More...
 
ControllergetController () const
 Obtain the owning controller. More...
 
State getState ()
 Get current device state. More...
 
virtual DevNode::ID nodeIdMin () const
 Get minimum valid Node ID for this device. More...
 
DevNode::ID nodeIdMax () const
 Get maximum valid Node ID for this device. More...
 
virtual uint16_t maxNodes () const
 Determine maximum number of nodes supported by the device. More...
 
virtual DevNode::States getNodeStates (DevNode node) const
 Return the current set of states for all nodes controlled by this device. More...
 
virtual void handleEvent (Request *request, Event event)
 Implementations may override this method to customise event handling. More...
 
- Public Member Functions inherited from LinkedObjectTemplate< Device >
Device * getNext () const
 
bool insertAfter (Device *object)
 
Iterator begin () const
 
Iterator end () const
 
Iterator cbegin () const
 
Iterator cend () const
 
- Public Member Functions inherited from LinkedObject
virtual ~LinkedObject ()
 
virtual LinkedObjectnext () const
 
bool insertAfter (LinkedObject *object)
 
bool operator== (const LinkedObject &other) const
 
bool operator!= (const LinkedObject &other) const
 

Protected Member Functions

virtual ErrorCode execute (Request &request)=0
 
virtual void getRequestJson (const Request &request, JsonObject json) const
 
- Protected Member Functions inherited from IO::Device
void parseJson (JsonObjectConst json, Config &cfg)
 
virtual ErrorCode start ()
 
virtual ErrorCode stop ()
 
void submit (Request *request)
 

Additional Inherited Members

- Public Types inherited from IO::Device
enum class  State { stopped , starting , fault , normal }
 
using OwnedList = OwnedLinkedObjectListTemplate< Device >
 
- Public Types inherited from LinkedObjectTemplate< Device >
using Iterator = IteratorTemplate< Device, Device *, Device & >
 
using ConstIterator = IteratorTemplate< const Device, const Device *, const Device & >
 
- Protected Attributes inherited from IO::Device
Controllercontroller
 

Member Function Documentation

◆ createRequest()

IO::Request* IO::Custom::Device::createRequest ( )
overridevirtual

Create a request object for this device.

Return values
Request*Caller must destroy or submit the request

Implements IO::Device.

◆ execute()

virtual ErrorCode IO::Custom::Device::execute ( Request request)
protectedpure virtual

◆ getNodeValue()

virtual int IO::Custom::Device::getNodeValue ( IO::DevNode  node) const
inlinevirtual

◆ getRequestJson()

virtual void IO::Custom::Device::getRequestJson ( const Request request,
JsonObject  json 
) const
protectedvirtual

◆ type()

const DeviceType IO::Custom::Device::type ( ) const
inlineoverridevirtual

Implements IO::Device.


The documentation for this class was generated from the following file: