IO::RFSwitch::Device::Factory Class Reference

#include <Device.h>

Inheritance diagram for IO::RFSwitch::Device::Factory:
Collaboration diagram for IO::RFSwitch::Device::Factory:

Public Member Functions

IO::DevicecreateDevice (IO::Controller &controller, const char *id) const override
 Create a new device instance. More...
 
const FlashStringcontrollerClass () const override
 Return the expected controller type for this device class, e.g. 'rs485'. More...
 
const FlashStringdeviceClass () const override
 Return the Device class name, e.g. 'r421a'. More...
 
- Public Member Functions inherited from IO::Device::Factory
bool operator== (const String &className) const
 

Member Function Documentation

◆ controllerClass()

const FlashString& IO::RFSwitch::Device::Factory::controllerClass ( ) const
inlineoverridevirtual

Return the expected controller type for this device class, e.g. 'rs485'.

The Device Manager uses this value to verify that devices are constructed using the correct controller.

Implements IO::Device::Factory.

◆ createDevice()

IO::Device* IO::RFSwitch::Device::Factory::createDevice ( IO::Controller controller,
const char *  id 
) const
inlineoverridevirtual

Create a new device instance.

Parameters
controllerThe owning controller
idUnique identifier for the device
Return values
Device*The constructed instance

Called by DeviceManager::createDevice()

Implements IO::Device::Factory.

◆ deviceClass()

const FlashString& IO::RFSwitch::Device::Factory::deviceClass ( ) const
inlineoverridevirtual

Return the Device class name, e.g. 'r421a'.

Implements IO::Device::Factory.


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