F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Drv::LinuxGpioDriverComponentImpl Class Reference

#include <Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.hpp>

Inheritance diagram for Drv::LinuxGpioDriverComponentImpl:
Drv::LinuxGpioDriverComponentBase Fw::PassiveComponentBase Fw::ObjBase

Public Types

enum  GpioDirection { GPIO_IN , GPIO_OUT , GPIO_INT }
 configure GPIO More...
 

Public Member Functions

 LinuxGpioDriverComponentImpl (const char *const compName)
 
void init (const NATIVE_INT_TYPE instance=0)
 
 ~LinuxGpioDriverComponentImpl ()
 
Os::Task::Status startIntTask (Os::Task::ParamType priority=Os::Task::TASK_DEFAULT, Os::Task::ParamType stackSize=Os::Task::TASK_DEFAULT, Os::Task::ParamType cpuAffinity=Os::Task::TASK_DEFAULT)
 Start interrupt task. More...
 
bool open (NATIVE_INT_TYPE gpio, GpioDirection direction)
 open GPIO More...
 
void exitThread ()
 exit thread More...
 
- Public Member Functions inherited from Drv::LinuxGpioDriverComponentBase
void init (FwEnumStoreType instance=0)
 Initialize LinuxGpioDriverComponentBase object. More...
 
Drv::InputGpioReadPortget_gpioRead_InputPort (FwIndexType portNum)
 
Drv::InputGpioWritePortget_gpioWrite_InputPort (FwIndexType portNum)
 
void set_Log_OutputPort (FwIndexType portNum, Fw::InputLogPort *port)
 Connect port to Log[portNum]. More...
 
void set_Time_OutputPort (FwIndexType portNum, Fw::InputTimePort *port)
 Connect port to Time[portNum]. More...
 
void set_intOut_OutputPort (FwIndexType portNum, Svc::InputCyclePort *port)
 Connect port to intOut[portNum]. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const U32)
 Set the ID base. More...
 
U32 getIdBase () const
 

Additional Inherited Members

- Protected Types inherited from Drv::LinuxGpioDriverComponentBase
enum  { NUM_GPIOREAD_INPUT_PORTS = 1 , NUM_GPIOWRITE_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  { NUM_LOG_OUTPUT_PORTS = 1 , NUM_LOGTEXT_OUTPUT_PORTS = 1 , NUM_TIME_OUTPUT_PORTS = 1 }
 Enumerations for numbers of special output ports. More...
 
enum  { NUM_INTOUT_OUTPUT_PORTS = 2 }
 Enumerations for numbers of typed output ports. More...
 
enum  {
  EVENTID_GP_OPENERROR = 0x0 , EVENTID_GP_CONFIGERROR = 0x1 , EVENTID_GP_WRITEERROR = 0x2 , EVENTID_GP_READERROR = 0x3 ,
  EVENTID_GP_PORTOPENED = 0x4 , EVENTID_GP_INTSTARTERROR = 0x5 , EVENTID_GP_INTWAITERROR = 0x6
}
 Event IDs. More...
 
enum  { EVENTID_GP_WRITEERROR_THROTTLE = 5 , EVENTID_GP_READERROR_THROTTLE = 5 }
 Event throttle values: sets initial value of countdown variables. More...
 
- Protected Member Functions inherited from Drv::LinuxGpioDriverComponentBase
 LinuxGpioDriverComponentBase (const char *compName="")
 Construct LinuxGpioDriverComponentBase object. More...
 
virtual ~LinuxGpioDriverComponentBase ()
 Destroy LinuxGpioDriverComponentBase object. More...
 
FwIndexType getNum_gpioRead_InputPorts () const
 
FwIndexType getNum_gpioWrite_InputPorts () const
 
FwIndexType getNum_Log_OutputPorts () const
 
FwIndexType getNum_Time_OutputPorts () const
 
FwIndexType getNum_intOut_OutputPorts () const
 
bool isConnected_Log_OutputPort (FwIndexType portNum)
 
bool isConnected_Time_OutputPort (FwIndexType portNum)
 
bool isConnected_intOut_OutputPort (FwIndexType portNum)
 
void gpioRead_handlerBase (FwIndexType portNum, Fw::Logic &state)
 Handler base-class function for input port gpioRead. More...
 
void gpioWrite_handlerBase (FwIndexType portNum, const Fw::Logic &state)
 Handler base-class function for input port gpioWrite. More...
 
void intOut_out (FwIndexType portNum, Svc::TimerVal &cycleStart)
 Invoke output port intOut. More...
 
void log_WARNING_HI_GP_OpenError (I32 gpio, I32 error, const Fw::StringBase &msg)
 
void log_WARNING_HI_GP_ConfigError (I32 gpio, I32 error)
 
void log_WARNING_HI_GP_WriteError (I32 gpio, I32 error)
 
void log_WARNING_HI_GP_ReadError (I32 gpio, I32 error)
 
void log_ACTIVITY_HI_GP_PortOpened (I32 gpio)
 
void log_WARNING_HI_GP_IntStartError (I32 gpio)
 
void log_WARNING_HI_GP_IntWaitError (I32 gpio)
 
void log_WARNING_HI_GP_WriteError_ThrottleClear ()
 Reset throttle value for GP_WriteError. More...
 
void log_WARNING_HI_GP_ReadError_ThrottleClear ()
 Reset throttle value for GP_ReadError. More...
 
Fw::Time getTime ()
 
- Protected Member Functions inherited from Fw::PassiveComponentBase
 PassiveComponentBase (const char *name)
 Named constructor. More...
 
virtual ~PassiveComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 Initialization function. More...
 
NATIVE_INT_TYPE getInstance () const
 
- Protected Member Functions inherited from Fw::ObjBase
 ObjBase (const char *name)
 ObjBase constructor. More...
 
virtual ~ObjBase ()
 Destructor. More...
 
void init ()
 Object initializer. More...
 

Detailed Description

Definition at line 21 of file LinuxGpioDriverComponentImpl.hpp.

Member Enumeration Documentation

◆ GpioDirection

configure GPIO

Enumerator
GPIO_IN 

input

GPIO_OUT 

output

GPIO_INT 

interrupt

Definition at line 53 of file LinuxGpioDriverComponentImpl.hpp.

Constructor & Destructor Documentation

◆ LinuxGpioDriverComponentImpl()

Drv::LinuxGpioDriverComponentImpl::LinuxGpioDriverComponentImpl ( const char *const  compName)

Construct object LinuxGpioDriver

Parameters
compNameThe component name

Definition at line 23 of file LinuxGpioDriverComponentImplCommon.cpp.

◆ ~LinuxGpioDriverComponentImpl()

Drv::LinuxGpioDriverComponentImpl::~LinuxGpioDriverComponentImpl ( )

Destroy object LinuxGpioDriver

Definition at line 421 of file LinuxGpioDriverComponentImpl.cpp.

Member Function Documentation

◆ exitThread()

void Drv::LinuxGpioDriverComponentImpl::exitThread ( )

exit thread

Definition at line 414 of file LinuxGpioDriverComponentImpl.cpp.

◆ init()

void Drv::LinuxGpioDriverComponentImpl::init ( const NATIVE_INT_TYPE  instance = 0)

Initialize object LinuxGpioDriver

Parameters
instanceThe instance number

Definition at line 35 of file LinuxGpioDriverComponentImplCommon.cpp.

◆ open()

bool Drv::LinuxGpioDriverComponentImpl::open ( NATIVE_INT_TYPE  gpio,
GpioDirection  direction 
)

open GPIO

Definition at line 288 of file LinuxGpioDriverComponentImpl.cpp.

◆ startIntTask()

Os::Task::Status Drv::LinuxGpioDriverComponentImpl::startIntTask ( Os::Task::ParamType  priority = Os::Task::TASK_DEFAULT,
Os::Task::ParamType  stackSize = Os::Task::TASK_DEFAULT,
Os::Task::ParamType  cpuAffinity = Os::Task::TASK_DEFAULT 
)

Start interrupt task.

Definition at line 399 of file LinuxGpioDriverComponentImpl.cpp.


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