Relay Class

class RelayClass

The RelayClass is the 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()

Constructor.

~RelayClass()

Destructor.

!RelayClass ()

Finalizer.

void init (BrainStem2CLI::ModuleClass^ module, const unsigned char index)

Initializes the class. Should only be called when manually creating classes.

Parameters:
  • pModule – The module.

  • index – The cmdRELAY index to be addressed.

aErr setEnable(const unsigned char bEnable)

Set the enable/disable state.

Parameters:

bEnable – False or 0 = Disabled, True or 1 = Enabled

Returns:

Returns common entity return values

aErr getEnable(unsigned char %bEnabled)

Get the state.

Parameters:

bEnabled – False or 0 = Disabled, True or 1 = Enabled

Returns:

Returns common entity return values

aErr getVoltage(int %microvolts)

Get the scaled micro volt value with refrence 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 refrence voltages.

Returns:

Returns common entity return values