Classes |
Public Member Functions |
Static Public Attributes |
Protected Member Functions |
List of all members
IO::Modbus::R421A::Device Class Reference
#include <Device.h>
Inheritance diagram for IO::Modbus::R421A::Device:
Collaboration diagram for IO::Modbus::R421A::Device:
Classes | |
struct | Config |
R421A device configuration. More... | |
class | Factory |
Public Member Functions | |
ErrorCode | init (const Config &config) |
ErrorCode | init (JsonObjectConst config) override |
IO::Request * | createRequest () override |
Create a request object for this device. More... | |
const StateMask & | getStates () const |
DevNode::ID | nodeIdMin () const override |
Get minimum valid Node ID for this device. More... | |
uint16_t | maxNodes () const override |
Determine maximum number of nodes supported by the device. More... | |
bool | isValid (DevNode node) const |
DevNode::States | getNodeStates (DevNode node) const override |
Return the current set of states for all nodes controlled by this device. More... | |
void | handleEvent (IO::Request *request, Event event) override |
Implementations may override this method to customise event handling. More... | |
![]() | |
ErrorCode | init (const RS485::Device::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... | |
![]() | |
Device (Controller &controller, const char *id) | |
ErrorCode | init (const Config &config) |
ErrorCode | init (JsonObjectConst config) override |
const DeviceType | type () const override |
Controller & | getController () |
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... | |
![]() | |
Device (Controller &controller, const char *id) | |
Device constructor. More... | |
virtual | ~Device () |
ErrorCode | init (const Config &config) |
const CString & | getId () const |
The unique device identifier. More... | |
bool | operator== (const String &id) const |
const CString & | getName () const |
Optional descriptive name for the device. More... | |
unsigned | minTransactionInterval () const |
String | caption () const |
Obtain a descriptive caption for this device. More... | |
Controller & | getController () const |
Obtain the owning controller. More... | |
State | getState () |
Get current device state. More... | |
DevNode::ID | nodeIdMax () const |
Get maximum valid Node ID for this device. More... | |
![]() | |
Device * | getNext () const |
bool | insertAfter (Device *object) |
Iterator | begin () const |
Iterator | end () const |
Iterator | cbegin () const |
Iterator | cend () const |
![]() | |
virtual | ~LinkedObject () |
virtual LinkedObject * | next () 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 const Factory | factory |
Protected Member Functions | |
void | parseJson (JsonObjectConst json, Config &cfg) |
![]() | |
void | parseJson (JsonObjectConst json, Config &cfg) |
![]() | |
void | parseJson (JsonObjectConst json, Config &cfg) |
virtual ErrorCode | start () |
virtual ErrorCode | stop () |
void | submit (Request *request) |
Additional Inherited Members | |
![]() | |
using | TransferCallback = void(*)(const void *data, size_t length, bool send) |
![]() | |
enum | State { State::stopped, State::starting, State::fault, State::normal } |
using | OwnedList = OwnedLinkedObjectListTemplate< Device > |
![]() | |
using | Iterator = IteratorTemplate< Device, Device *, Device & > |
using | ConstIterator = IteratorTemplate< const Device, const Device *, const Device & > |
![]() | |
static void | onTransfer (TransferCallback callback) |
![]() | |
Controller & | controller |
Member Function Documentation
◆ createRequest()
|
overridevirtual |
Create a request object for this device.
- Return values
-
Request* Caller must destroy or submit the request
Reimplemented from IO::Modbus::Device.
◆ getNodeStates()
|
overridevirtual |
Return the current set of states for all nodes controlled by this device.
Used to determine if, say, all nodes are ON, OFF or a combination.
Reimplemented from IO::Device.
◆ getStates()
|
inline |
◆ handleEvent()
|
overridevirtual |
Implementations may override this method to customise event handling.
Reimplemented from IO::Modbus::Device.
◆ init() [1/2]
◆ init() [2/2]
|
overridevirtual |
Implements IO::Device.
◆ isValid()
◆ maxNodes()
|
inlineoverridevirtual |
Determine maximum number of nodes supported by the device.
- Return values
-
uint16_t 0 if device doesn't support nodes
Reimplemented from IO::Device.
◆ nodeIdMin()
|
inlineoverridevirtual |
Get minimum valid Node ID for this device.
Typically devices have a contiguous valid range of node IDs
Reimplemented from IO::Device.
◆ parseJson()
|
protected |
Member Data Documentation
◆ factory
|
static |
The documentation for this class was generated from the following file: