F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GroundInterface.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title GroundInterfaceImpl.hpp
3 // \author lestarch
4 // \brief hpp file for GroundInterface component implementation class
5 // ======================================================================
9 #ifndef GroundInterface_HPP
10 #define GroundInterface_HPP
11 
12 #define GND_BUFFER_SIZE 1024
13 #define TOKEN_TYPE U32
14 #define HEADER_SIZE (2 * sizeof(TOKEN_TYPE))
15 
16 namespace Svc {
17 
20  {
21  public:
22  static const U32 MAX_DATA_SIZE;
23  static const TOKEN_TYPE START_WORD;
24  static const U32 END_WORD;
25  // ----------------------------------------------------------------------
26  // Construction, initialization, and destruction
27  // ----------------------------------------------------------------------
28 
32  const char *const compName
33  );
34 
37  void init(
38  const NATIVE_INT_TYPE instance = 0
39  );
40 
44 
46 
47  // ----------------------------------------------------------------------
48  // Handler implementations for user-defined typed input ports
49  // ----------------------------------------------------------------------
50 
53  void downlinkPort_handler(
54  const NATIVE_INT_TYPE portNum,
56  U32 context
57  );
58 
62  const NATIVE_INT_TYPE portNum,
64  );
65 
69  const NATIVE_INT_TYPE portNum,
71  );
72 
75  void schedIn_handler(
76  const NATIVE_INT_TYPE portNum,
78  );
81  void frame_send(
82  U8* data,
83  TOKEN_TYPE size,
85  );
86 
88  void routeComData();
89 
91  void processRing();
92 
95 
96  // Basic data movement variables
99  // Input variables
103  };
104 
105 } // end namespace Svc
106 
107 #endif
Svc::GroundInterfaceComponentImpl::context
PRIVATE Fw::ComBuffer U32 context
Definition: GroundInterface.hpp:57
Svc::GroundInterfaceComponentImpl::fileDownlinkBufferSendIn_handler
void fileDownlinkBufferSendIn_handler(const NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Definition: GroundInterface.cpp:63
Svc::GroundInterfaceComponentImpl::frame_send
void frame_send(U8 *data, TOKEN_TYPE size, TOKEN_TYPE packet_type=Fw::ComPacket::FW_PACKET_UNKNOWN)
Definition: GroundInterface.cpp:97
Svc::GroundInterfaceComponentImpl::~GroundInterfaceComponentImpl
~GroundInterfaceComponentImpl(void)
Definition: GroundInterface.cpp:42
PRIVATE
#define PRIVATE
overridable private for unit testing
Definition: BasicTypes.hpp:118
Svc::GroundInterfaceComponentImpl
Definition: GroundInterface.hpp:20
Serializable.hpp
Fw::ComPacket::FW_PACKET_UNKNOWN
@ FW_PACKET_UNKNOWN
Definition: ComPacket.hpp:28
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:76
Svc::GroundInterfaceComponentImpl::GroundInterfaceComponentImpl
GroundInterfaceComponentImpl(const char *const compName)
Definition: GroundInterface.cpp:23
Svc::GroundInterfaceComponentImpl::data
PRIVATE Fw::ComBuffer & data
Definition: GroundInterface.hpp:55
Svc::GroundInterfaceComponentImpl::processRing
void processRing()
Process all the data in the ring.
Definition: GroundInterface.cpp:158
Svc::GroundInterfaceComponentImpl::routeComData
void routeComData()
Processes the out-going data into coms order.
Definition: GroundInterface.cpp:125
Svc::GroundInterfaceComponentImpl::m_buffer
U8 m_buffer[GND_BUFFER_SIZE]
Definition: GroundInterface.hpp:98
Fw::Buffer
Definition: BufferSerializableAc.hpp:24
GroundInterfaceComponentAc.hpp
Svc::GroundInterfaceComponentImpl::MAX_DATA_SIZE
static const U32 MAX_DATA_SIZE
Definition: GroundInterface.hpp:22
Svc::GroundInterfaceComponentImpl::m_in_buffer
U8 m_in_buffer[GND_BUFFER_SIZE]
Definition: GroundInterface.hpp:101
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
CircularBuffer.hpp
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
TOKEN_TYPE
#define TOKEN_TYPE
Definition: GroundInterface.hpp:13
Svc::GroundInterfaceComponentImpl::schedIn_handler
void schedIn_handler(const NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context)
Definition: GroundInterface.cpp:83
Svc::GroundInterfaceComponentBase::portNum
PRIVATE NATIVE_INT_TYPE portNum
Definition: GroundInterfaceComponentAc.hpp:714
Svc::GroundInterfaceComponentImpl::START_WORD
static const TOKEN_TYPE START_WORD
Definition: GroundInterface.hpp:23
Svc::GroundInterfaceComponentImpl::readCallback_handler
void readCallback_handler(const NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Definition: GroundInterface.cpp:74
Svc::GroundInterfaceComponentImpl::m_in_ring
Types::CircularBuffer m_in_ring
Definition: GroundInterface.hpp:102
Svc::GroundInterfaceComponentImpl::m_data_size
TOKEN_TYPE m_data_size
Data size expected in incoming data.
Definition: GroundInterface.hpp:100
Svc::GroundInterfaceComponentImpl::m_ext_buffer
Fw::Buffer m_ext_buffer
Definition: GroundInterface.hpp:97
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Svc::GroundInterfaceComponentBase::fwBuffer
PROTECTED Fw::Buffer & fwBuffer
Definition: GroundInterfaceComponentAc.hpp:366
Svc::GroundInterfaceComponentImpl::END_WORD
static const U32 END_WORD
Definition: GroundInterface.hpp:24
Types::CircularBuffer
Definition: CircularBuffer.hpp:31
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Fw::ComBuffer
Definition: ComBuffer.hpp:21
Svc::GroundInterfaceComponentBase
Auto-generated base for GroundInterface component.
Definition: GroundInterfaceComponentAc.hpp:44
Svc::GroundInterfaceComponentImpl::processBuffer
void processBuffer(Fw::Buffer &data)
Process a data buffer containing a read from the serial port.
Definition: GroundInterface.cpp:195
GND_BUFFER_SIZE
#define GND_BUFFER_SIZE
Definition: GroundInterface.hpp:12