CANTram Framework 1.0.1
Dieses Framework ermöglicht die Nutzung der CANTram Hardware, einer Mikrocontroller basierten mdoularen Steuerung.
Loading...
Searching...
No Matches
OutputDefinition Class Reference

Describes an available output (GPIO or shift register bit). More...

#include <OutputDefinition.h>

Collaboration diagram for OutputDefinition:

Public Types

enum  ConfigurationMode {
  MODE_INPUT , MODE_OUTPUT , MODE_PWM , MODE_INPUT_PULLUP ,
  MODE_NONE
}

Public Member Functions

 OutputDefinition (bool isShift, uint8_t pinOrBit, bool adc, bool pwm, bool inputOnly, OutputProvider *provider)
 Construct a new OutputDefinition instance.
const String ConfigurationModeToString (ConfigurationMode mode)
String toString ()
 Create a human-readable string describing the OutputDefinition.

Public Attributes

const bool isShift
const uint8_t pinOrBit
const bool adc
const bool pwm
const bool inputOnly
ConfigurationMode mode = MODE_NONE
OutputProvider * provider
bool initialValue = LOW

Detailed Description

Describes an available output (GPIO or shift register bit).

Holds metadata about an output such as whether it is on a shift register, the pin/bit identifier, and capabilities (ADC, PWM, input-only). Also stores a pointer to the OutputProvider responsible for configuring/controlling the physical output.

Constructor & Destructor Documentation

◆ OutputDefinition()

OutputDefinition::OutputDefinition ( bool isShift,
uint8_t pinOrBit,
bool adc,
bool pwm,
bool inputOnly,
OutputProvider * provider )
inline

Construct a new OutputDefinition instance.

Initializes the definition fields describing the output and records the provider responsible for manipulating the physical pin/bit.

Parameters
isShiftTrue if the output is implemented on a shift register rather than a MCU pin.
pinOrBitPin number or bit index identifying the physical output.
adcTrue if the output supports ADC (analog input) functionality.
pwmTrue if the output supports PWM output.
inputOnlyTrue if the output is input-only (no output capability).
providerPointer to the OutputProvider that controls this output.

Member Function Documentation

◆ toString()

String OutputDefinition::toString ( )
inline

Create a human-readable string describing the OutputDefinition.

Produces a textual representation suitable for logging that includes the isShift flag, pin/bit identifier and capability flags.

Returns
String A formatted description of this OutputDefinition.
Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • C:/Users/leowa/Documents/PlatformIO/Projects/CANTramFrameworkUsage/lib/CANTramFramework/include/OutputDefinition.h