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

#include <Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.hpp>

Inheritance diagram for Drv::LinuxSpiDriverComponentImpl:
Drv::LinuxSpiDriverComponentBase Fw::PassiveComponentBase Fw::ObjBase

Public Member Functions

 LinuxSpiDriverComponentImpl (const char *const compName)
 
void init (const NATIVE_INT_TYPE instance=0)
 
 ~LinuxSpiDriverComponentImpl ()
 
bool open (NATIVE_INT_TYPE device, NATIVE_INT_TYPE select, SpiFrequency clock, SpiMode spiMode=SpiMode::SPI_MODE_CPOL_LOW_CPHA_LOW)
 Open device. More...
 
- Public Member Functions inherited from Drv::LinuxSpiDriverComponentBase
void init (FwEnumStoreType instance=0)
 Initialize LinuxSpiDriverComponentBase object. More...
 
Drv::InputSpiReadWritePortget_SpiReadWrite_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_Tlm_OutputPort (FwIndexType portNum, Fw::InputTlmPort *port)
 Connect port to Tlm[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::LinuxSpiDriverComponentBase
enum  { NUM_SPIREADWRITE_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 , NUM_TLM_OUTPUT_PORTS = 1 }
 Enumerations for numbers of special output ports. More...
 
enum  { EVENTID_SPI_OPENERROR = 0x0 , EVENTID_SPI_CONFIGERROR = 0x1 , EVENTID_SPI_WRITEERROR = 0x2 , EVENTID_SPI_PORTOPENED = 0x4 }
 Event IDs. More...
 
enum  { EVENTID_SPI_WRITEERROR_THROTTLE = 5 }
 Event throttle values: sets initial value of countdown variables. More...
 
enum  { CHANNELID_SPI_BYTES = 0x0 }
 Channel IDs. More...
 
- Protected Member Functions inherited from Drv::LinuxSpiDriverComponentBase
 LinuxSpiDriverComponentBase (const char *compName="")
 Construct LinuxSpiDriverComponentBase object. More...
 
virtual ~LinuxSpiDriverComponentBase ()
 Destroy LinuxSpiDriverComponentBase object. More...
 
FwIndexType getNum_SpiReadWrite_InputPorts () const
 
FwIndexType getNum_Log_OutputPorts () const
 
FwIndexType getNum_Time_OutputPorts () const
 
FwIndexType getNum_Tlm_OutputPorts () const
 
bool isConnected_Log_OutputPort (FwIndexType portNum)
 
bool isConnected_Time_OutputPort (FwIndexType portNum)
 
bool isConnected_Tlm_OutputPort (FwIndexType portNum)
 
void SpiReadWrite_handlerBase (FwIndexType portNum, Fw::Buffer &writeBuffer, Fw::Buffer &readBuffer)
 Handler base-class function for input port SpiReadWrite. More...
 
void log_WARNING_HI_SPI_OpenError (I32 device, I32 select, I32 error)
 
void log_WARNING_HI_SPI_ConfigError (I32 device, I32 select, I32 error)
 
void log_WARNING_HI_SPI_WriteError (I32 device, I32 select, I32 error)
 
void log_ACTIVITY_HI_SPI_PortOpened (I32 device, I32 select)
 
void log_WARNING_HI_SPI_WriteError_ThrottleClear ()
 Reset throttle value for SPI_WriteError. More...
 
void tlmWrite_SPI_Bytes (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
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 55 of file LinuxSpiDriverComponentImpl.hpp.

Constructor & Destructor Documentation

◆ LinuxSpiDriverComponentImpl()

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

Construct object LinuxSpiDriver

Parameters
compNameThe component name

Definition at line 22 of file LinuxSpiDriverComponentImplCommon.cpp.

◆ ~LinuxSpiDriverComponentImpl()

Drv::LinuxSpiDriverComponentImpl::~LinuxSpiDriverComponentImpl ( )

Destroy object LinuxSpiDriver

Definition at line 189 of file LinuxSpiDriverComponentImpl.cpp.

Member Function Documentation

◆ init()

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

Initialize object LinuxSpiDriver

Parameters
instanceThe instance number

Definition at line 33 of file LinuxSpiDriverComponentImplCommon.cpp.

◆ open()

bool Drv::LinuxSpiDriverComponentImpl::open ( NATIVE_INT_TYPE  device,
NATIVE_INT_TYPE  select,
SpiFrequency  clock,
SpiMode  spiMode = SpiMode::SPI_MODE_CPOL_LOW_CPHA_LOW 
)

Open device.

Definition at line 71 of file LinuxSpiDriverComponentImpl.cpp.


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