![]() |
GM6000 Digital Heater Controller Branch: main
SDX-1330
|
This class defines a generic interface for controlling N Digital inputs and M Digital outputs. More...
This class defines a generic interface for controlling N Digital inputs and M Digital outputs.
This driver is useful when the Application wants to access Inputs and Output using a zero based index.
The driver interface is a Singleton interface (i.e. there is only one 'instance' of the driver).
The maximum 'N' and 'M' values are defined by the concrete driver instance.
The 'asserted' Pin state maps to the signal being physical high.
#include <InOut.h>
Classes | |
struct | Config_T |
Configuration Options. More... | |
Static Public Member Functions | |
static bool | start (uint8_t numInputs, const Config_T inputCfg[], uint8_t numOutputs, const Config_T outputCfg[]) |
Starts the driver actively sampling and outputting signals. | |
static void | stop () |
Stops the driver from sampling inputs, and places all of the output into their de-asserted state. | |
static bool | getOutput (uint8_t outputIndex, bool &assertedOut) |
Returns (via the 'assertedOut' argument) the current commanded state of the specified DO signal. | |
static bool | setOutput (uint8_t outputIndex, bool asserted) |
Sets the state of the specified DO signal. | |
static bool | assertOutput (uint8_t outputIndex) |
Convenience method. | |
static bool | deassertOutput (uint8_t outputIndex) |
Convenience method. | |
static bool | getInput (uint8_t inputIndex, bool &assertedOut) |
Returns (via the 'assertedOut' argument) the current DI signal state. | |
struct Driver::DIO::InOut::Config_T |
|
inlinestatic |
Convenience method.
|
inlinestatic |
Convenience method.
|
static |
Returns (via the 'assertedOut' argument) the current DI signal state.
A true values indicates that the signal is asserted.
'inputIndex' is a zero-based index.
The method returns false if there is error or the 'outputIndex' argument is out of range.
|
static |
Returns (via the 'assertedOut' argument) the current commanded state of the specified DO signal.
A true value indicates that the signal is asserted state
'outputIndex' is a zero-based index.
The method returns false if there is error or the 'outputIndex' argument is out of range.
|
static |
Sets the state of the specified DO signal.
The method returns false if there is error or the 'outputIndex' argument is out of range.
|
static |
Starts the driver actively sampling and outputting signals.
The 'inputCfg[]' and 'outputCfg[]' array must stay in the scope while the driver is started, i.e. can NOT go out of scope till stop() has been called.
Returns false if an error was encountered (e.g. exceeded max number of Inputs/Outputs signals)
|
static |
Stops the driver from sampling inputs, and places all of the output into their de-asserted state.