roo_control
API Documentation for roo_control
Loading...
Searching...
No Matches
roo_control::GpioRelay Class Reference

Simple, raw, Arduino GPIO-pin-controlled relay switch. More...

#include <gpio_relay.h>

Inheritance diagram for roo_control::GpioRelay:
[legend]
Collaboration diagram for roo_control::GpioRelay:
[legend]

Public Member Functions

 GpioRelay (uint8_t pin, BinaryLogicalState initial_state=BINARY_STATE_LOW)
 
bool setState (BinaryLogicalState state) override
 Updates the state of the switch. Returns true on success.
 
bool getState (BinaryLogicalState &result) const override
 
- Public Member Functions inherited from roo_control::Switch< BinaryLogicalState >
virtual ~Switch ()=default
 
- Public Member Functions inherited from roo_control::Selector< State >
virtual ~Selector ()=default
 
virtual bool getState (State &result) const =0
 Retrieves the current state, or returns false when it cannot be read.
 

Detailed Description

Simple, raw, Arduino GPIO-pin-controlled relay switch.

Definition at line 10 of file gpio_relay.h.

Constructor & Destructor Documentation

◆ GpioRelay()

roo_control::GpioRelay::GpioRelay ( uint8_t  pin,
BinaryLogicalState  initial_state = BINARY_STATE_LOW 
)
inline

Definition at line 12 of file gpio_relay.h.

Member Function Documentation

◆ getState()

bool roo_control::GpioRelay::getState ( BinaryLogicalState result) const
inlineoverride

Definition at line 23 of file gpio_relay.h.

◆ setState()

bool roo_control::GpioRelay::setState ( BinaryLogicalState  state)
inlineoverridevirtual

Updates the state of the switch. Returns true on success.

Implements roo_control::Switch< BinaryLogicalState >.

Definition at line 18 of file gpio_relay.h.


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