F´ Flight Software - C/C++ Documentation NASA-v1.6.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
FprimeProtocol.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title FprimeProtocol.hpp
3// \author mstarch
4// \brief hpp file for FprimeProtocol class
5//
6// \copyright
7// Copyright 2009-2021, by the California Institute of Technology.
8// ALL RIGHTS RESERVED. United States Government Sponsorship
9// acknowledged.
10//
11// ======================================================================
12
13#ifndef SVC_FPRIME_PROTOCOL_HPP
14#define SVC_FPRIME_PROTOCOL_HPP
15
18
19namespace Svc {
20
21 // Definitions for the F Prime frame header
22 namespace FpFrameHeader {
23
25 typedef U32 TokenType;
26
27 enum {
29 SIZE = sizeof(TokenType) * 2
30 };
31
33 const TokenType START_WORD = static_cast<TokenType>(0xdeadbeef);
34
35 }
36
39 public:
40
43
45 void frame(
46 const U8* const data,
47 const U32 size,
49 ) override;
50
51 };
52
55 public:
56
59
64 bool validate(
65 Types::CircularBuffer& buffer,
66 U32 size
67 );
68
72 Types::CircularBuffer& buffer,
73 U32& needed
74 ) override;
75
76 };
77
78}
79#endif // SVC_FPRIME_PROTOCOL_HPP
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:26
Abstract base class representing a deframing protocol.
DeframingStatus
Status of the deframing call.
Implements the F Prime deframing protocol.
FprimeDeframing()
Constructor.
bool validate(Types::CircularBuffer &buffer, U32 size)
DeframingStatus deframe(Types::CircularBuffer &buffer, U32 &needed) override
Implements the F Prime framing protocol.
FprimeFraming()
Constructor.
void frame(const U8 *const data, const U32 size, Fw::ComPacket::ComPacketType packet_type) override
Implements the frame method.
abstract class representing a framing protocol
U32 TokenType
Token type for F Prime frame header.
@ SIZE
Header size for F Prime frame header.
const TokenType START_WORD
The start word for F Prime framing.