Relay Class¶
See the Relay Entity for generic information.
-
class RelayClass : public Acroname::BrainStem::EntityClass¶
RelayClass: Interface to relay entities on BrainStem modules. Relay entities can be set, and the voltage read. Other capabilities may be available, please see the product datasheet.
Public Functions
-
RelayClass(void)¶
Constructor.
-
virtual ~RelayClass(void)¶
Destructor.
-
void init(Module *pModule, const uint8_t index)¶
Initialize the Relay Class.
- Parameters:
pModule – The module to which this entity belongs.
index – The index of the Relay entity to be addressed.
-
aErr setEnable(const uint8_t enable)¶
Set the enable/disable state.
- Parameters:
enable – False or 0 = Disabled, True or 1 = Enabled
- Returns:
Returns common entity return values
-
aErr getEnable(uint8_t *enabled)¶
Get the state.
- Parameters:
enabled – False or 0 = Disabled, True or 1 = Enabled
- Returns:
Returns common entity return values
-
aErr getVoltage(int32_t *microvolts)¶
Get the scaled micro volt value with reference to ground.
Note
Not all modules provide 32 bits of accuracy. Refer to the module’s datasheet to determine the analog bit depth and reference voltage.
- Parameters:
microvolts – 32 bit signed integer (in micro Volts) based on the boards ground and reference voltages.
- Returns:
Returns common entity return values
-
RelayClass(void)¶