F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
UartFramer.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title UartFramer.hpp
3 // \author tcanham
4 // \brief hpp file for UartFramer component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #ifndef UartFramer_HPP
14 #define UartFramer_HPP
15 
16 #include "Drv/UartFramer/UartFramerComponentAc.hpp"
17 
18 namespace Drv {
19 
20  class UartFramer :
21  public UartFramerComponentBase
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Construction, initialization, and destruction
28  // ----------------------------------------------------------------------
29 
32  UartFramer(
33  const char *const compName
34  );
35 
38  void init(
39  const NATIVE_INT_TYPE instance = 0
40  );
41 
44  ~UartFramer();
45 
46 
48  // instances must be connected and ready. BufferManager should have at least
49  // number+1 buffers allocated
50  void allocate(NATIVE_UINT_TYPE number, NATIVE_UINT_TYPE size);
51 
52  PRIVATE:
53 
54  // ----------------------------------------------------------------------
55  // Handler implementations for user-defined typed input ports
56  // ----------------------------------------------------------------------
57 
60  Drv::SendStatus Framer_handler(
61  const NATIVE_INT_TYPE portNum,
62  Fw::Buffer &sendBuffer
63  );
64 
67  void serialRecv_handler(
68  const NATIVE_INT_TYPE portNum,
69  Fw::Buffer &serBuffer,
72  Drv::SerialReadStatus &status
75  );
76 
77  // Private data members
78 
79  NATIVE_UINT_TYPE m_size;
80 
81 
82  };
83 
84 } // end namespace Drv
85 
86 #endif
Drv::UartFramer
Definition: UartFramer.hpp:20
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:28
Drv
Definition: BlockDriver.hpp:11
Drv::UartFramer::allocate
void allocate(NATIVE_UINT_TYPE number, NATIVE_UINT_TYPE size)
Allocate pool of buffers for UART receive - BufferManager and UART.
Definition: UartFramer.cpp:46
Fw::Buffer
Definition: Buffer.hpp:43
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:27
Drv::UartFramer::~UartFramer
~UartFramer()
Definition: UartFramer.cpp:41
Drv::UartFramer::init
void init(const NATIVE_INT_TYPE instance=0)
Definition: UartFramer.cpp:33
Drv::UartFramer::UartFramer
UartFramer(const char *const compName)
Definition: UartFramer.cpp:25