F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ByteStreamBufferAdapter.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ByteStreamBufferAdapter.cpp
3 // \author bocchino
4 // \brief cpp file for ByteStreamBufferAdapter component implementation class
5 // ======================================================================
6 
8 
9 namespace Drv {
10 
11 // ----------------------------------------------------------------------
12 // Component construction and destruction
13 // ----------------------------------------------------------------------
14 
17 
19 
20 // ----------------------------------------------------------------------
21 // Handler implementations for typed input ports
22 // ----------------------------------------------------------------------
23 
24 void ByteStreamBufferAdapter::bufferIn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
25  // TODO: If m_driverIsReady then
26  // TODO: Send fwBuffer on toByteStreamDriver_out
27  // TODO: Check the return status. If there is an error, then log it to the Logger.
28  // TODO: Otherwise log the error
29  // TODO: Send fwBuffer on bufferInReturn_out
30 }
31 
32 void ByteStreamBufferAdapter::bufferOutReturn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
33  // TODO: Send fwBuffer on fromByteStreamDriverReturn_out
34 }
35 
36 void ByteStreamBufferAdapter::fromByteStreamDriver_handler(FwIndexType portNum,
37  Fw::Buffer& buffer,
38  const Drv::ByteStreamStatus& status) {
39  // TODO: If the status is OK, then send buffer on toByteStreamDriver_out
40  // TODO: Otherwise log the error and send buffer on fromByteStreamDriverReturn_out
41 }
42 
43 void ByteStreamBufferAdapter::byteStreamDriverReady_handler(FwIndexType portNum) {
44  this->m_driverIsReady = true;
45 }
46 
47 } // namespace Drv
Auto-generated base for ByteStreamBufferAdapter component.
Status returned by the send call.
ByteStreamBufferAdapter(const char *const compName)
Construct ByteStreamBufferAdapter object.
~ByteStreamBufferAdapter()
Destroy ByteStreamBufferAdapter object.
PlatformIndexType FwIndexType