micro-ELC
Public Member Functions | Public Attributes | List of all members
LoadAdjustRelayParallelBinary< N > Class Template Reference

load adjustor that switches relays or other switches on and off in a binary pattern More...

#include <LoadAdjustRelayParallelBinary.h>

Inheritance diagram for LoadAdjustRelayParallelBinary< N >:
Inheritance graph
[legend]
Collaboration diagram for LoadAdjustRelayParallelBinary< N >:
Collaboration graph
[legend]

Public Member Functions

 LoadAdjustRelayParallelBinary (RelaysDriver &_relaysDriver, bool _activeRelaysIncreaseLoad=false)
 load adjustor that switches relays or other switches on and off in a binary pattern More...
 
void setLoad (float load)
 set a new value for the adjustable load More...
 
void begin ()
 set up pin states More...
 
virtual void setLoad (float load)=0
 set a new value for the adjustable load More...
 
virtual void begin ()=0
 set up pin states More...
 

Public Attributes

RelaysDriverdriver
 
bool activeRelaysIncreaseLoad
 

Detailed Description

template<byte N>
class LoadAdjustRelayParallelBinary< N >

load adjustor that switches relays or other switches on and off in a binary pattern

Note
this is a template class, N is how many relays are used.

Constructor & Destructor Documentation

◆ LoadAdjustRelayParallelBinary()

template<byte N>
LoadAdjustRelayParallelBinary< N >::LoadAdjustRelayParallelBinary ( RelaysDriver _relaysDriver,
bool  _activeRelaysIncreaseLoad = false 
)
inline

load adjustor that switches relays or other switches on and off in a binary pattern

Parameters
_relaysDriverRelaysDriver for controlling relays or other switches
_activeRelaysIncreaseLoad(bool) true if resistors are through NO, false if through NC relay terminals

Member Function Documentation

◆ begin()

template<byte N>
void LoadAdjustRelayParallelBinary< N >::begin ( )
inlinevirtual

set up pin states

Implements LoadAdjust.

◆ setLoad()

template<byte N>
void LoadAdjustRelayParallelBinary< N >::setLoad ( float  load)
inlinevirtual

set a new value for the adjustable load

Parameters
loadbetween 0.0 and 1.0 where 1.0 is the highest load

Implements LoadAdjust.

Member Data Documentation

◆ activeRelaysIncreaseLoad

template<byte N>
bool LoadAdjustRelayParallelBinary< N >::activeRelaysIncreaseLoad

◆ driver

template<byte N>
RelaysDriver& LoadAdjustRelayParallelBinary< N >::driver

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