F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
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 
45  PRIVATE:
46 
47  // ----------------------------------------------------------------------
48  // Handler implementations for user-defined typed input ports
49  // ----------------------------------------------------------------------
50 
53  void downlinkPort_handler(
54  const NATIVE_INT_TYPE portNum,
55  Fw::ComBuffer &data,
56  U32 context
57  );
58 
61  void fileDownlinkBufferSendIn_handler(
62  const NATIVE_INT_TYPE portNum,
63  Fw::Buffer &fwBuffer
64  );
65 
68  void readCallback_handler(
69  const NATIVE_INT_TYPE portNum,
70  Fw::Buffer &fwBuffer
71  );
72 
75  void schedIn_handler(
76  const NATIVE_INT_TYPE portNum,
77  NATIVE_UINT_TYPE context
78  );
81  void frame_send(
82  U8* data,
83  TOKEN_TYPE size,
85  );
86 
88  void routeComData();
89 
91  void processRing();
92 
94  void processBuffer(Fw::Buffer& data );
95 
96  // Basic data movement variables
97  Fw::Buffer m_ext_buffer;
98  U8 m_buffer[GND_BUFFER_SIZE];
99  // Input variables
100  TOKEN_TYPE m_data_size;
101  U8 m_in_buffer[GND_BUFFER_SIZE];
102  Types::CircularBuffer m_in_ring;
103  };
104 
105 } // end namespace Svc
106 
107 #endif
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:51
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:26
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:52
#define TOKEN_TYPE
#define GND_BUFFER_SIZE
void init()
Object initializer.
Definition: ObjBase.cpp:27
Auto-generated base for GroundInterface component.
GroundInterfaceComponentImpl(const char *const compName)
static const TOKEN_TYPE START_WORD