F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AsyncByteStreamBufferAdapter.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AsyncByteStreamBufferAdapter.cpp
3 // \author bocchino
4 // \brief cpp file for AsyncByteStreamBufferAdapter 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 AsyncByteStreamBufferAdapter::bufferIn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
25  // TODO: If m_driverIsReady then send fwBuffer on toByteStreamDriver_out
26  // TODO: Otherwise
27  // TODO: Log the error
28  // TODO: Send fwBuffer on bufferInReturn_out
29 }
30 
31 void AsyncByteStreamBufferAdapter::bufferOutReturn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
32  // TODO: Send fwBuffer on fromByteStreamDriverReturn_out
33 }
34 
35 void AsyncByteStreamBufferAdapter::byteStreamDriverReady_handler(FwIndexType portNum) {
36  this->m_driverIsReady = true;
37 }
38 
39 void AsyncByteStreamBufferAdapter::fromByteStreamDriver_handler(FwIndexType portNum,
40  Fw::Buffer& buffer,
41  const Drv::ByteStreamStatus& status) {
42  // TODO: If the status is OK, then send buffer on toByteStreamDriver_out
43  // TODO: Otherwise log the error and send buffer on fromByteStreamDriverReturn_out
44 }
45 
46 void AsyncByteStreamBufferAdapter::toByteStreamDriverReturn_handler(FwIndexType portNum,
47  Fw::Buffer& buffer,
48  const Drv::ByteStreamStatus& status) {
49  // TODO: Send fwBuffer on bufferInReturn_out
50 }
51 
52 } // namespace Drv
AsyncByteStreamBufferAdapter(const char *const compName)
Construct AsyncByteStreamBufferAdapter object.
Status returned by the send call.
~AsyncByteStreamBufferAdapter()
Destroy AsyncByteStreamBufferAdapter object.
Auto-generated base for AsyncByteStreamBufferAdapter component.
PlatformIndexType FwIndexType