AMS Advanced Air Mobility Sensors UG
Loading...
Searching...
No Matches
CSoftwareComponentPort< tPortDataType, uPortId > Class Template Reference

Public Member Functions

 CSoftwareComponentPort ()=default
 
 ~CSoftwareComponentPort ()=default
 
bool Write (const tPortDataType &korData)
 
bool Read (tPortDataType &orData)
 
bool Init ()
 

Public Attributes

const uint8_t kuId_ { uPortId }
 

Detailed Description

template<class tPortDataType, uint8_t uPortId>
class CSoftwareComponentPort< tPortDataType, uPortId >

The class implements a software component port. The port is a mutex-protected variable used by software components to pass data from one to another.

Constructor & Destructor Documentation

◆ CSoftwareComponentPort()

template<class tPortDataType , uint8_t uPortId>
CSoftwareComponentPort< tPortDataType, uPortId >::CSoftwareComponentPort ( )
default

◆ ~CSoftwareComponentPort()

template<class tPortDataType , uint8_t uPortId>
CSoftwareComponentPort< tPortDataType, uPortId >::~CSoftwareComponentPort ( )
default

Member Function Documentation

◆ Init()

template<typename tPortDataType , uint8_t uPortId>
bool CSoftwareComponentPort< tPortDataType, uPortId >::Init

Initialize the port. The function creates the required mutex object.

Returns
True – success, false – failure.

◆ Read()

template<typename tPortDataType , uint8_t uPortId>
bool CSoftwareComponentPort< tPortDataType, uPortId >::Read ( tPortDataType &  orData)

Read from the port.

Parameters
orDataA reference to the output data structure.
Returns
True – success, false – failure.

◆ Write()

template<typename tPortDataType , uint8_t uPortId>
bool CSoftwareComponentPort< tPortDataType, uPortId >::Write ( const tPortDataType &  korData)

Write data to the port.

Parameters
korDataA reference to the data to be written to the port.
Returns
True – success, false – failure.

Member Data Documentation

◆ kuId_

template<class tPortDataType , uint8_t uPortId>
const uint8_t CSoftwareComponentPort< tPortDataType, uPortId >::kuId_ { uPortId }

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