F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
Framer.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title Framer.hpp
3
// \author mstarch, bocchino
4
// \brief hpp file for Framer component implementation class
5
//
6
// \copyright
7
// Copyright 2009-2022, by the California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
13
#ifndef Svc_Framer_HPP
14
#define Svc_Framer_HPP
15
16
#include "
Svc/Framer/FramerComponentAc.hpp
"
17
#include "
Svc/FramingProtocol/FramingProtocol.hpp
"
18
#include "
Svc/FramingProtocol/FramingProtocolInterface.hpp
"
19
20
namespace
Svc
{
31
class
Framer
:
public
FramerComponentBase
,
public
FramingProtocolInterface
{
32
public
:
33
// ----------------------------------------------------------------------
34
// Construction, initialization, and destruction
35
// ----------------------------------------------------------------------
36
39
Framer
(
const
char
*
const
compName
40
);
41
44
void
setup
(
FramingProtocol
& protocol );
45
48
~Framer
();
49
50
PRIVATE:
51
// ----------------------------------------------------------------------
52
// Handler implementations for user-defined typed input ports
53
// ----------------------------------------------------------------------
54
57
void
comIn_handler(
const
NATIVE_INT_TYPE
portNum,
58
Fw::ComBuffer
& data,
59
U32 context
60
);
61
64
void
bufferIn_handler(
const
NATIVE_INT_TYPE
portNum,
65
Fw::Buffer
& fwBuffer
66
);
67
70
void
comStatusIn_handler(
const
NATIVE_INT_TYPE
portNum,
71
Fw::Success
& condition );
72
73
// ----------------------------------------------------------------------
74
// Implementation of FramingProtocolInterface
75
// ----------------------------------------------------------------------
76
85
Fw::Buffer
allocate(
const
U32 size);
86
89
void
send(
Fw::Buffer
& outgoing
90
);
91
92
// ----------------------------------------------------------------------
93
// Helper functions
94
// ----------------------------------------------------------------------
95
98
void
handle_framing(
const
U8
*
const
data,
const
U32 size,
Fw::ComPacket::ComPacketType
packet_type);
99
100
// ----------------------------------------------------------------------
101
// Member variables
102
// ----------------------------------------------------------------------
103
105
FramingProtocol
* m_protocol;
106
108
bool
m_frame_sent;
109
};
110
111
}
// end namespace Svc
112
113
#endif
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition
BasicTypes.h:55
U8
uint8_t U8
8-bit unsigned integer
Definition
BasicTypes.h:30
FramerComponentAc.hpp
FramingProtocol.hpp
FramingProtocolInterface.hpp
Fw::Buffer
Definition
Buffer.hpp:43
Fw::ComBuffer
Definition
ComBuffer.hpp:20
Fw::ComPacket::ComPacketType
ComPacketType
Definition
ComPacket.hpp:21
Fw::Success
Success/Failure.
Definition
SuccessEnumAc.hpp:19
Svc::FramerComponentBase
Auto-generated base for Framer component.
Definition
FramerComponentAc.hpp:29
Svc::Framer
Generic framing component using FramingProtocol implementation for actual framing.
Definition
Framer.hpp:31
Svc::Framer::~Framer
~Framer()
Definition
Framer.cpp:27
Svc::Framer::setup
void setup(FramingProtocol &protocol)
Setup this component with a supplied framing protocol.
Definition
Framer.cpp:29
Svc::FramingProtocol
abstract class representing a framing protocol
Definition
FramingProtocol.hpp:31
Svc::FramingProtocolInterface
interface supplied to the framing protocol
Definition
FramingProtocolInterface.hpp:28
Svc
Definition
ActiveRateGroupCfg.hpp:18
Svc
Framer
Framer.hpp
Generated by
1.9.8