F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
SerialBuffer.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title SerialBuffer.hpp
3// \author bocchino
4// \brief hpp file for SerialBuffer type
5//
6// \copyright
7// Copyright (C) 2016 California Institute of Technology.
8// ALL RIGHTS RESERVED. United States Government Sponsorship
9// acknowledged.
10//
11// ======================================================================
12
13#ifndef Fw_SerialBuffer_HPP
14#define Fw_SerialBuffer_HPP
15
16#include <FpConfig.hpp>
18
19namespace Fw {
20
26 {
27
28 public:
29
30 // ----------------------------------------------------------------------
31 // Construction
32 // ----------------------------------------------------------------------
33
37 U8 *const data,
38 const U32 capacity
39 );
40
41 public:
42
43 // ----------------------------------------------------------------------
44 // Pure virtual methods from SerializeBufferBase
45 // ----------------------------------------------------------------------
46
48
49 U8* getBuffAddr();
50
51 const U8* getBuffAddr() const;
52
53 public:
54
55 // ----------------------------------------------------------------------
56 // Public instance methods
57 // ----------------------------------------------------------------------
58
60 void fill();
61
64 const U8 *const addr,
65 const NATIVE_UINT_TYPE n
66 );
67
70 U8 *const addr,
72 );
73
74 private:
75
76 // ----------------------------------------------------------------------
77 // Data
78 // ----------------------------------------------------------------------
79
81 U8 *const data;
82
84 const U32 capacity;
85
86 };
87
88}
89
90#endif
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:26
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
C++-compatible configuration header for fprime configuration.
A variable-length serializable buffer.
NATIVE_UINT_TYPE getBuffCapacity() const
returns capacity, not current size, of buffer
SerializeStatus popBytes(U8 *const addr, NATIVE_UINT_TYPE n)
Pop n bytes off the buffer.
SerializeStatus pushBytes(const U8 *const addr, const NATIVE_UINT_TYPE n)
Push n bytes onto the buffer.
void fill()
Fill the buffer to capacity with preexisting data.
U8 * getBuffAddr()
gets buffer address for data filling
Definition Buffer.cpp:21
SerializeStatus
forward declaration for string