#include <Device.h>

Inheritance diagram for IO::Modbus::STS::Fan::Device:
Collaboration diagram for IO::Modbus::STS::Fan::Device:

Classes

class  Factory
 

Public Member Functions

IO::RequestcreateRequest () override
 Create a request object for this device. More...
 
const FanDatagetData () const
 
uint16_t maxNodes () const override
 Determine maximum number of nodes supported by the device. More...
 
void getValues (JsonObject json) const
 
- Public Member Functions inherited from IO::Modbus::Device
ErrorCode init (const Config &config)
 
const DeviceType type () const override
 
virtual void onBroadcast (const ADU &adu)
 Handle a broadcast message. More...
 
virtual void onRequest (ADU &adu)
 Handle a message specifically for this device. More...
 
void handleEvent (IO::Request *request, Event event) override
 Implementations may override this method to customise event handling. More...
 
- Public Member Functions inherited from IO::RS485::Device
 Device (Controller &controller, const char *id)
 
ErrorCode init (const Config &config)
 
ErrorCode init (JsonObjectConst config) override
 
const DeviceType type () const override
 
ControllergetController ()
 
uint16_t address () const override
 Devices with a numeric address should implement this method. More...
 
uint8_t segment () const
 
unsigned baudrate () const
 
unsigned timeout () const
 
void handleEvent (IO::Request *request, Event event) override
 Implementations may override this method to customise event handling. More...
 
- Public Member Functions inherited from IO::Device
 Device (Controller &controller, const char *id)
 Device constructor. More...
 
virtual ~Device ()
 
ErrorCode init (const Config &config)
 
const CStringgetId () const
 The unique device identifier. More...
 
bool operator== (const String &id) const
 
const CStringgetName () const
 Optional descriptive name for the device. 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 DevNode::States getNodeStates (DevNode node) const
 Return the current set of states for all nodes controlled by this device. 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
 

Static Public Attributes

static const Factory factory
 
- Static Public Attributes inherited from IO::Modbus::Device
static const Factory factory
 

Protected Member Functions

void parseJson (JsonObjectConst json, Config &cfg)
 
- Protected Member Functions inherited from IO::RS485::Device
void parseJson (JsonObjectConst json, Config &cfg)
 
- Protected Member Functions inherited from IO::Device
void parseJson (JsonObjectConst json, Config &cfg)
 
virtual ErrorCode start ()
 
virtual ErrorCode stop ()
 
void submit (Request *request)
 

Protected Attributes

FanData data {}
 
- Protected Attributes inherited from IO::Device
Controllercontroller
 

Friends

class Request
 

Additional Inherited Members

- Public Types inherited from IO::Modbus::Device
using TransferCallback = void(*)(const void *data, size_t length, bool send)
 
- 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 & >
 
- Static Public Member Functions inherited from IO::Modbus::Device
static void onTransfer (TransferCallback callback)
 

Member Function Documentation

◆ createRequest()

IO::Request* IO::Modbus::STS::Fan::Device::createRequest ( )
overridevirtual

Create a request object for this device.

Return values
Request*Caller must destroy or submit the request

Reimplemented from IO::Modbus::Device.

◆ getData()

const FanData& IO::Modbus::STS::Fan::Device::getData ( ) const
inline

◆ getValues()

void IO::Modbus::STS::Fan::Device::getValues ( JsonObject  json) const

◆ maxNodes()

uint16_t IO::Modbus::STS::Fan::Device::maxNodes ( ) const
inlineoverridevirtual

Determine maximum number of nodes supported by the device.

Return values
uint16_t0 if device doesn't support nodes

Reimplemented from IO::Device.

◆ parseJson()

void IO::Modbus::STS::Fan::Device::parseJson ( JsonObjectConst  json,
Config cfg 
)
protected

Friends And Related Function Documentation

◆ Request

friend class Request
friend

Member Data Documentation

◆ data

FanData IO::Modbus::STS::Fan::Device::data {}
protected

◆ factory

const Factory IO::Modbus::STS::Fan::Device::factory
static

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