![]() |
AMS Advanced Air Mobility Sensors UG
|
RS232 Output Handler software component. More...
Public Member Functions | |
| void | Init () override |
| bool | IsInitialized () override |
| void | QueueTransmissionRequest (CSerialProtocol::EMessageIds eMessageId) |
| Put message transmission request into the queue of the sender task. The function does not make a snapshot of the data to be sent. | |
| void | SendInertialDataMessage () |
| Compose and send an inertial data message. | |
| void | SendTimeOfInertialDataMessage () |
| Compose and send a "time of inertial data" message. | |
| void | SendNavigationDataMessage () |
| Compose and send a navigation data message. | |
| void | SendTimeOfNavigationDataMessage () |
| Compose and send a "time of navigation data" message. | |
| void | SendAccuracyDataMessage () |
| Compose and send navigation data accuracy. | |
| void | SendTimeOfLatestSyncPulseMessage () |
| Compose and send the time of the latest pulse. | |
| void | SendSoftwareVersionMessage () |
| Compose and send the software version message. | |
| void | SendHardwareVersionMessage () |
| Compose and send the hardware version message. | |
| bool | TransmitMessage (uint8_t *upData, uint16_t uSize) |
| Transmit data using DMA: | |
| void | UARTTxInterruptHandler (uint16_t uSize) |
| DMA Transmission completed callback. | |
Public Member Functions inherited from CSoftwareComponent< CRs232OutputHandler, 1U > | |
| CSoftwareComponent (CSoftwareComponent &)=delete | |
| CSoftwareComponent (CSoftwareComponent &&)=delete | |
| CSoftwareComponent & | operator= (const CSoftwareComponent &orOther)=delete |
| CSoftwareComponent & | operator= (CSoftwareComponent &&orOther)=delete |
| virtual void | Init ()=0 |
| virtual bool | IsInitialized ()=0 |
Private Types | |
| typedef StaticSemaphore_t | osStaticMutexDef_t |
Private Member Functions | |
| CRs232OutputHandler (CRs232OutputHandler &)=delete | |
| CRs232OutputHandler (CRs232OutputHandler &&)=delete | |
| CRs232OutputHandler & | operator= (const CRs232OutputHandler &orOther)=delete |
| CRs232OutputHandler & | operator= (CRs232OutputHandler &&orOther)=delete |
| CRs232OutputHandler ()=default | |
| ~CRs232OutputHandler ()=default | |
| bool | isBufferFree (uint16_t uSize) |
| Checks whether the DMA buffer is able to allocate the amount of bytes that we wish to enqueue. | |
Static Private Member Functions | |
| static CRs232OutputHandler & | getInstanceImpl (unsigned uInstanceIndex) |
Private Attributes | |
| CSerialMessageBuilder | oMessageBuilder_ |
| An object that builds messages from generic inputs. | |
| uint8_t | auTxBuffer_ [skuBufferLength_] |
| A buffer for DMA transfer. | |
| uint32_t | uTxBufferRdIdx_ { 0U } |
| Output buffer read index. | |
| uint32_t | uTxBufferWrIdx_ { 0U } |
| Output buffer write index. | |
| osMutexId_t | pMutexHandle_ { nullptr } |
| Mutex handle. | |
| osStaticMutexDef_t | sMutexControlBlock_ |
| Memory reserved for the mutex control block. | |
| const osMutexAttr_t | sMutexAttributes_ { NULL, 0, &sMutexControlBlock_, sizeof(sMutexControlBlock_) } |
| A structure with mutex attributes required for creation. | |
Static Private Attributes | |
| static constexpr uint32_t | skuBufferLength_ { 512U } |
| Maximum allowed message length in bytes. | |
Friends | |
| class | CSoftwareComponent< CRs232OutputHandler, 1U > |
Additional Inherited Members | |
Static Public Member Functions inherited from CSoftwareComponent< CRs232OutputHandler, 1U > | |
| static CRs232OutputHandler & | GetInstance (unsigned uInstanceIndex=0U) |
Static Public Attributes inherited from CSoftwareComponent< CRs232OutputHandler, 1U > | |
| static constexpr unsigned | skuInstanceCount_ |
Protected Member Functions inherited from CSoftwareComponent< CRs232OutputHandler, 1U > | |
| CSoftwareComponent ()=default | |
| ~CSoftwareComponent ()=default | |
RS232 Output Handler software component.
|
private |
The typedef copied from a CMSIS_OS header.
|
privatedelete |
|
privatedelete |
|
privatedefault |
|
privatedefault |
|
staticprivate |
|
overridevirtual |
Initialize the software component.
Implements CSoftwareComponent< CRs232OutputHandler, 1U >.
|
private |
Checks whether the DMA buffer is able to allocate the amount of bytes that we wish to enqueue.
| uSize | Number of bytes sent. |
|
overridevirtual |
Get initialization status of the software component.
Implements CSoftwareComponent< CRs232OutputHandler, 1U >.
|
privatedelete |
|
privatedelete |
| void CRs232OutputHandler::QueueTransmissionRequest | ( | CSerialProtocol::EMessageIds | eMessageId | ) |
Put message transmission request into the queue of the sender task. The function does not make a snapshot of the data to be sent.
| eMessageId |
| void CRs232OutputHandler::SendAccuracyDataMessage | ( | ) |
Compose and send navigation data accuracy.
| void CRs232OutputHandler::SendHardwareVersionMessage | ( | ) |
Compose and send the hardware version message.
| void CRs232OutputHandler::SendInertialDataMessage | ( | ) |
Compose and send an inertial data message.
| void CRs232OutputHandler::SendNavigationDataMessage | ( | ) |
Compose and send a navigation data message.
| void CRs232OutputHandler::SendSoftwareVersionMessage | ( | ) |
Compose and send the software version message.
| void CRs232OutputHandler::SendTimeOfInertialDataMessage | ( | ) |
Compose and send a "time of inertial data" message.
| void CRs232OutputHandler::SendTimeOfLatestSyncPulseMessage | ( | ) |
Compose and send the time of the latest pulse.
| void CRs232OutputHandler::SendTimeOfNavigationDataMessage | ( | ) |
Compose and send a "time of navigation data" message.
| bool CRs232OutputHandler::TransmitMessage | ( | uint8_t * | upData, |
| uint16_t | uSize | ||
| ) |
Transmit data using DMA:
| upData | Pointer to data. |
| uSize | Number of bytes to be sent. |
| void CRs232OutputHandler::UARTTxInterruptHandler | ( | uint16_t | uSize | ) |
DMA Transmission completed callback.
| uSize | Number of bytes sent. |
|
friend |
|
private |
A buffer for DMA transfer.
|
private |
An object that builds messages from generic inputs.
|
private |
Mutex handle.
|
staticconstexprprivate |
Maximum allowed message length in bytes.
|
private |
A structure with mutex attributes required for creation.
|
private |
Memory reserved for the mutex control block.
|
private |
Output buffer read index.
|
private |
Output buffer write index.