#include <Device.h>

Inheritance diagram for IO::DMX512::Device:
Collaboration diagram for IO::DMX512::Device:

Classes

struct  Config
 DMX512 Device Configuration. More...
 
class  Factory
 

Public Member Functions

const DeviceType type () const override
 
ErrorCode init (const Config &config)
 
ErrorCode init (JsonObjectConst config) override
 
IO::RequestcreateRequest () override
 Create a request object for this device. More...
 
uint16_t maxNodes () const override
 Determine maximum number of nodes supported by the device. More...
 
const NodeDatagetNodeData (uint8_t nodeId) const
 
bool isValid (DevNode node) 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::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 constexpr size_t MaxPacketSize {520}
 

Protected Member Functions

void parseJson (JsonObjectConst json, Config &cfg)
 
ErrorCode start () override
 
bool update ()
 controller calls this before performing an update, typically for effects processing. Return true if value changed. More...
 
void updateSlaves ()
 
ErrorCode execute (Request &request)
 
- 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 stop ()
 
void submit (Request *request)
 

Additional Inherited Members

- Public Types inherited from IO::Device
enum  State { State::stopped, State::starting, State::fault, State::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::DMX512::Device::createRequest ( )
overridevirtual

Create a request object for this device.

Return values
Request*Caller must destroy or submit the request

Implements IO::Device.

◆ execute()

ErrorCode IO::DMX512::Device::execute ( Request request)
protected

◆ getNodeData()

const NodeData& IO::DMX512::Device::getNodeData ( uint8_t  nodeId) const
inline

◆ handleEvent()

void IO::DMX512::Device::handleEvent ( IO::Request request,
Event  event 
)
overridevirtual

Implementations may override this method to customise event handling.

Reimplemented from IO::Device.

◆ init() [1/2]

ErrorCode IO::DMX512::Device::init ( const Config config)

◆ init() [2/2]

ErrorCode IO::DMX512::Device::init ( JsonObjectConst  config)
overridevirtual

Implements IO::Device.

◆ isValid()

bool IO::DMX512::Device::isValid ( DevNode  node) const
inline

◆ maxNodes()

uint16_t IO::DMX512::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::DMX512::Device::parseJson ( JsonObjectConst  json,
Config cfg 
)
protected

◆ start()

ErrorCode IO::DMX512::Device::start ( )
inlineoverrideprotectedvirtual

Reimplemented from IO::Device.

◆ type()

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

Implements IO::Device.

◆ update()

bool IO::DMX512::Device::update ( )
protected

controller calls this before performing an update, typically for effects processing. Return true if value changed.

◆ updateSlaves()

void IO::DMX512::Device::updateSlaves ( )
protected

Member Data Documentation

◆ factory

const Factory IO::DMX512::Device::factory
static

◆ MaxPacketSize

constexpr size_t IO::DMX512::Device::MaxPacketSize {520}
staticconstexpr

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