F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileDispatcher.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title FileDispatcher.hpp
3
// \author tcanham
4
// \brief hpp file for FileDispatcher component implementation class
5
// ======================================================================
6
7
#ifndef Svc_FileDispatcher_HPP
8
#define Svc_FileDispatcher_HPP
9
10
#include "
Svc/FileDispatcher/FileDispatcherComponentAc.hpp
"
11
12
namespace
Svc
{
13
14
struct
FileDispatcherEntry
{
15
Fw::String
fileExt
;
// file extension for dispatch
16
Svc::FileDispatcherCfg::FileDispatchPort
port
;
// port to dispatch to
17
bool
enabled
;
// whether dispatching is enabled for this type
18
};
19
20
struct
FileDispatcherTable
{
21
FileDispatcherEntry
entries
[
Svc::FileDispatcherCfg::FILE_DISPATCHER_MAX_TABLE_SIZE
];
22
FwSizeType
numEntries
;
23
};
24
25
class
FileDispatcher
final :
public
FileDispatcherComponentBase
{
26
public
:
27
// ----------------------------------------------------------------------
28
// Component construction and destruction
29
// ----------------------------------------------------------------------
30
32
FileDispatcher
(
const
char
*
const
compName
33
);
34
36
~FileDispatcher
();
37
39
void
configure
(
const
FileDispatcherTable
& table);
40
41
private
:
42
// ----------------------------------------------------------------------
43
// Handler implementations for commands
44
// ----------------------------------------------------------------------
45
49
void
fileAnnounceRecv_handler(
FwIndexType
portNum,
50
Fw::StringBase
& file_name
51
)
override
;
52
53
private
:
54
// ----------------------------------------------------------------------
55
// Handler implementations for commands
56
// ----------------------------------------------------------------------
57
59
void
ENABLE_DISPATCH_cmdHandler(
60
FwOpcodeType
opCode,
61
U32 cmdSeq,
62
Svc::FileDispatcherCfg::FileDispatchPort
file_type,
63
Fw::Enabled
enable
64
)
override
;
65
69
void
pingIn_handler(
FwIndexType
portNum,
70
U32 key
71
)
override
;
72
74
FileDispatcherTable
m_dispatchTable;
75
};
76
77
}
// namespace Svc
78
79
#endif
Svc::FileDispatcherCfg::FILE_DISPATCHER_MAX_TABLE_SIZE
Definition:
FppConstantsAc.hpp:148
Svc::FileDispatcherEntry::enabled
bool enabled
Definition:
FileDispatcher.hpp:17
FwOpcodeType
FwIdType FwOpcodeType
The type of a command opcode.
Definition:
FwOpcodeTypeAliasAc.h:14
FwSizeType
PlatformSizeType FwSizeType
Definition:
FwSizeTypeAliasAc.h:15
Svc::FileDispatcherEntry
Definition:
FileDispatcher.hpp:14
Svc::FileDispatcher::configure
void configure(const FileDispatcherTable &table)
configure the component
Definition:
FileDispatcher.cpp:26
FileDispatcherComponentAc.hpp
Svc::FileDispatcherTable::entries
FileDispatcherEntry entries[Svc::FileDispatcherCfg::FILE_DISPATCHER_MAX_TABLE_SIZE]
Definition:
FileDispatcher.hpp:21
Svc::FileDispatcher::FileDispatcher
FileDispatcher(const char *const compName)
Construct FileDispatcher object.
Definition:
FileDispatcher.cpp:16
Fw::String
Definition:
String.hpp:17
Svc::FileDispatcherTable
Definition:
FileDispatcher.hpp:20
Svc::FileDispatcherEntry::port
Svc::FileDispatcherCfg::FileDispatchPort port
Definition:
FileDispatcher.hpp:16
Svc::FileDispatcherTable::numEntries
FwSizeType numEntries
Definition:
FileDispatcher.hpp:22
Svc::FileDispatcherCfg::FileDispatchPort
Definition:
FileDispatchPortEnumAc.hpp:20
Fw::Enabled
Enabled and disabled states.
Definition:
EnabledEnumAc.hpp:17
FwIndexType
PlatformIndexType FwIndexType
Definition:
FwIndexTypeAliasAc.h:15
Svc::FileDispatcherComponentBase
Auto-generated base for FileDispatcher component.
Definition:
FileDispatcherComponentAc.hpp:38
Svc::FileDispatcher
Definition:
FileDispatcher.hpp:25
Svc
RateGroupDivider component implementation.
Definition:
ActiveRateGroupCfg.hpp:18
Svc::FileDispatcherEntry::fileExt
Fw::String fileExt
Definition:
FileDispatcher.hpp:15
Fw::StringBase
Definition:
StringBase.hpp:27
Svc::FileDispatcher::~FileDispatcher
~FileDispatcher()
Destroy FileDispatcher object.
Definition:
FileDispatcher.cpp:24
Svc
FileDispatcher
FileDispatcher.hpp
Generated by
1.8.14