F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PrmDbImpl.hpp
Go to the documentation of this file.
1 
13 #ifndef PRMDBIMPL_HPP_
14 #define PRMDBIMPL_HPP_
15 
16 #include <Fw/Types/String.hpp>
17 #include <Os/Mutex.hpp>
19 #include <config/PrmDbImplCfg.hpp>
20 
21 namespace Svc {
22 
29 
30 class PrmDbImpl final : public PrmDbComponentBase {
31  public:
32  friend class PrmDbTester;
33 
41  PrmDbImpl(const char* name);
42 
48  void configure(const char* file);
49 
55  void readParamFile(); // NOTE: Assumed to run at initialization time. No guard of data structure.
56 
59  virtual ~PrmDbImpl();
60 
61  protected:
62  private:
71  Fw::ParamValid getPrm_handler(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer& val);
80  void setPrm_handler(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer& val);
81 
90 
91  void pingIn_handler(FwIndexType portNum, U32 key);
100  void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
101 
106 
107  void clearDb();
108 
109  Fw::String m_fileName;
110 
111  struct t_dbStruct {
112  bool used;
113  FwPrmIdType id;
114  Fw::ParamBuffer val;
115  } m_db[PRMDB_NUM_DB_ENTRIES];
116 };
117 } // namespace Svc
118 
119 #endif /* PRMDBIMPL_HPP_ */
FwIdType FwOpcodeType
The type of a command opcode.
friend class PrmDbTester
Definition: PrmDbImpl.hpp:32
void readParamFile()
PrmDb file read function.
Definition: PrmDbImpl.cpp:238
FwIdType FwPrmIdType
The type of a parameter identifier.
PrmDbImpl(const char *name)
PrmDb constructor.
Definition: PrmDbImpl.cpp:39
Component class for managing parameters.
Definition: PrmDbImpl.hpp:30
void configure(const char *file)
PrmDb configure method.
Definition: PrmDbImpl.cpp:43
Auto-generated base for PrmDb component.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
Enum representing parameter validity.
virtual ~PrmDbImpl()
PrmDb destructor.
Definition: PrmDbImpl.cpp:236