GM6000 Digital Heater Controller Branch: main
SDX-1330
List of all members | Classes | Static Public Member Functions
Driver::DIO::InOut Class Reference

This class defines a generic interface for controlling N Digital inputs and M Digital outputs. More...

Detailed Description

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.
 

Class Documentation

◆ Driver::DIO::InOut::Config_T

struct Driver::DIO::InOut::Config_T

Configuration Options.

Class Members
size_t blob Additional Platform specific options.
size_t pin GPIO pin identifier.

Member Function Documentation

◆ assertOutput()

static bool Driver::DIO::InOut::assertOutput ( uint8_t  outputIndex)
inlinestatic

Convenience method.

◆ deassertOutput()

static bool Driver::DIO::InOut::deassertOutput ( uint8_t  outputIndex)
inlinestatic

Convenience method.

◆ getInput()

static bool Driver::DIO::InOut::getInput ( uint8_t  inputIndex,
bool &  assertedOut 
)
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.

◆ getOutput()

static bool Driver::DIO::InOut::getOutput ( uint8_t  outputIndex,
bool &  assertedOut 
)
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.

◆ setOutput()

static bool Driver::DIO::InOut::setOutput ( uint8_t  outputIndex,
bool  asserted 
)
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.

◆ start()

static bool Driver::DIO::InOut::start ( uint8_t  numInputs,
const Config_T  inputCfg[],
uint8_t  numOutputs,
const Config_T  outputCfg[] 
)
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)

◆ stop()

static void Driver::DIO::InOut::stop ( )
static

Stops the driver from sampling inputs, and places all of the output into their de-asserted state.


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