F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
Version.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title Version.hpp
3// \author sreddy
4// \brief hpp file for Version component implementation class
5// ======================================================================
6
7#ifndef Svc_Version_HPP
8#define Svc_Version_HPP
9
11
12namespace Svc {
13
15 public:
16 // ----------------------------------------------------------------------
17 // Component construction and destruction
18 // ----------------------------------------------------------------------
19
21 explicit Version(const char* const compName
22 );
23
25 ~Version();
26
28 void config(bool enable);
29
30 PRIVATE:
31 // ----------------------------------------------------------------------
32 // Handler implementations for user-defined typed input ports
33 // ----------------------------------------------------------------------
34
38 void getVersion_handler(FwIndexType portNum,
39 const Svc::VersionCfg::VersionEnum& version_id,
40 Fw::StringBase& version_string,
41 Svc::VersionStatus& status
42 ) override;
43
47 void setVersion_handler(FwIndexType portNum,
48 const Svc::VersionCfg::VersionEnum& version_id,
49 Fw::StringBase& version_string,
50 Svc::VersionStatus& status
51 ) override;
52
60
61 private:
62 // ----------------------------------------------------------------------
63 // Handler implementations for commands
64 // ----------------------------------------------------------------------
65
69 void ENABLE_cmdHandler(FwOpcodeType opCode,
70 U32 cmdSeq,
72 ) override;
73
77 void VERSION_cmdHandler(FwOpcodeType opCode,
78 U32 cmdSeq,
79 Svc::VersionType version_type
80 ) override;
81
82 PRIVATE:
83 // An enumeration for TLM slot access
84 enum VersionSlot {
85 VER_SLOT_00 = 0,
86 VER_SLOT_01 = 1,
87 VER_SLOT_02 = 2,
88 VER_SLOT_03 = 3,
89 VER_SLOT_04 = 4,
90 VER_SLOT_05 = 5,
91 VER_SLOT_06 = 6,
92 VER_SLOT_07 = 7,
93 VER_SLOT_08 = 8,
94 VER_SLOT_09 = 9
95 };
96
97 // function to log framework version events and channels
98 void fwVersion_tlm();
99 // function to log project version events and channels
100 void projectVersion_tlm();
101 // function to log library version events and channels
102 void libraryVersion_tlm();
103 // function to log custom version events and channels
104 void customVersion_tlm(VersionSlot custom_slot);
105 void customVersion_tlm_all();
106 bool m_enable;
107 U8 m_num_custom_elements; // number of custom versions
108};
109
110} // namespace Svc
111
112#endif
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:30
U32 FwOpcodeType
Definition FpConfig.h:91
PlatformIndexType FwIndexType
Definition FpConfig.h:25
Data Structure for custom version Tlm.
@ NUM_CONSTANTS
The number of enumerated constants.
Auto-generated base for Version component.
Tracks versions for project, framework and user defined versions etc.
void config(bool enable)
configure version's verbosity and startup
Definition Version.cpp:31
~Version()
Destroy Version object.
Definition Version.cpp:29
An enumeration for version status.
An enumeration for Version Type.