F´ Flight Software - C/C++ Documentation  NASA-v2.0.1
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 // ======================================================================
7 #include "Svc/GroundInterface/GroundInterfaceComponentAc.hpp"
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 
19  public GroundInterfaceComponentBase
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
Svc::GroundInterfaceComponentImpl::~GroundInterfaceComponentImpl
~GroundInterfaceComponentImpl(void)
Definition: GroundInterface.cpp:42
Svc::GroundInterfaceComponentImpl
Definition: GroundInterface.hpp:18
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
Fw::Buffer
Definition: Buffer.hpp:43
Svc::GroundInterfaceComponentImpl::MAX_DATA_SIZE
static const U32 MAX_DATA_SIZE
Definition: GroundInterface.hpp:22
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::START_WORD
static const TOKEN_TYPE START_WORD
Definition: GroundInterface.hpp:23
Svc
Definition: ActiveRateGroupImplCfg.hpp:18
Svc::GroundInterfaceComponentImpl::END_WORD
static const U32 END_WORD
Definition: GroundInterface.hpp:24
Types::CircularBuffer
Definition: CircularBuffer.hpp:31
Svc::GroundInterfaceComponentImpl::init
void init(const NATIVE_INT_TYPE instance=0)
Definition: GroundInterface.cpp:34
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Fw::ComBuffer
Definition: ComBuffer.hpp:21
GND_BUFFER_SIZE
#define GND_BUFFER_SIZE
Definition: GroundInterface.hpp:12