Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
LoggingPin< message > Struct Template Reference

GPIO Pin definition structure with no actual pin behind it. More...

#include <LoggingGPIO.hxx>

Inheritance diagram for LoggingPin< message >:
LoggingPinWithRead< message >

Static Public Member Functions

static void hw_init ()
 Empty. No initialization needed.
 
static void hw_set_to_safe ()
 Empty. No initialization needed.
 
static void set (bool value)
 Sets the output pin level (generating a log output).
 
static void toggle ()
 Toggles the output pin level.
 
static bool is_output ()
 Returns whether this is an output pin or not.
 

Static Protected Attributes

static bool lastValue_ = false
 Last output value.
 

Detailed Description

template<const char * message>
struct LoggingPin< message >

GPIO Pin definition structure with no actual pin behind it.

All writes to this pin will be logged to stdout. Reads from this pin will not compile.

Definition at line 43 of file LoggingGPIO.hxx.

Member Function Documentation

◆ hw_init()

template<const char * message>
static void LoggingPin< message >::hw_init ( )
inlinestatic

Empty. No initialization needed.

Definition at line 46 of file LoggingGPIO.hxx.

◆ hw_set_to_safe()

template<const char * message>
static void LoggingPin< message >::hw_set_to_safe ( )
inlinestatic

Empty. No initialization needed.

Definition at line 50 of file LoggingGPIO.hxx.

◆ is_output()

template<const char * message>
static bool LoggingPin< message >::is_output ( )
inlinestatic

Returns whether this is an output pin or not.

Definition at line 69 of file LoggingGPIO.hxx.

◆ set()

template<const char * message>
static void LoggingPin< message >::set ( bool  value)
inlinestatic

Sets the output pin level (generating a log output).

Parameters
valueis true if output should be HIGH.

Definition at line 55 of file LoggingGPIO.hxx.

◆ toggle()

template<const char * message>
static void LoggingPin< message >::toggle ( )
inlinestatic

Toggles the output pin level.

Definition at line 62 of file LoggingGPIO.hxx.

Member Data Documentation

◆ lastValue_

template<const char * message>
bool LoggingPin< message >::lastValue_ = false
staticprotected

Last output value.

Definition at line 76 of file LoggingGPIO.hxx.


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