IO::RS485::Device Class Reference
Base device class for communicating with an RS485 slave. More...
#include <Device.h>
Inheritance diagram for IO::RS485::Device:
Collaboration diagram for IO::RS485::Device:
Classes | |
struct | Config |
RS485 configuration. More... | |
class | FactoryTemplate |
Public Member Functions | |
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) |
virtual Request * | createRequest ()=0 |
Create a request object for this device. More... | |
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... | |
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... | |
![]() | |
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 |
Protected Member Functions | |
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 | |
![]() | |
enum class | State { stopped , starting , fault , normal } |
using | OwnedList = OwnedLinkedObjectListTemplate< Device > |
![]() | |
using | Iterator = IteratorTemplate< Device, Device *, Device & > |
using | ConstIterator = IteratorTemplate< const Device, const Device *, const Device & > |
![]() | |
Controller & | controller |
Detailed Description
Base device class for communicating with an RS485 slave.
Constructor & Destructor Documentation
◆ Device()
|
inline |
Member Function Documentation
◆ address()
|
inlineoverridevirtual |
Devices with a numeric address should implement this method.
Reimplemented from IO::Device.
◆ baudrate()
|
inline |
◆ getController()
|
inline |
◆ handleEvent()
|
overridevirtual |
Implementations may override this method to customise event handling.
Reimplemented from IO::Device.
◆ init() [1/2]
◆ init() [2/2]
|
overridevirtual |
Implements IO::Device.
◆ parseJson()
|
protected |
◆ segment()
|
inline |
◆ timeout()
|
inline |
◆ type()
|
inlineoverridevirtual |
Implements IO::Device.
The documentation for this class was generated from the following file: