F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PrmDbImpl.hpp
Go to the documentation of this file.
1 
13 #ifndef PRMDBIMPL_HPP_
14 #define PRMDBIMPL_HPP_
15 
17 #include <PrmDbImplCfg.hpp>
18 #include <Fw/Types/String.hpp>
19 #include <Os/Mutex.hpp>
20 
21 namespace Svc {
22 
29 
30  class PrmDbImpl : public PrmDbComponentBase {
31  public:
32 
33  friend class PrmDbImplTester;
34 
42  PrmDbImpl(const char* name);
43 
49  void configure(const char* file);
50 
51 
57  void readParamFile(); // NOTE: Assumed to run at initialization time. No guard of data structure.
58 
61  virtual ~PrmDbImpl();
62  protected:
63  private:
72  Fw::ParamValid getPrm_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val);
81  void setPrm_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val);
82 
91 
92  void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key);
101  void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
102 
107 
108  void clearDb();
109 
110  Fw::String m_fileName;
111 
112  struct t_dbStruct {
113  bool used;
114  FwPrmIdType id;
115  Fw::ParamBuffer val;
116  } m_db[PRMDB_NUM_DB_ENTRIES];
117 
118  };
119 }
120 
121 #endif /* PRMDBIMPL_HPP_ */
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
U32 FwOpcodeType
Definition: FpConfig.h:91
U32 FwPrmIdType
Definition: FpConfig.h:107
Enum representing parameter validity.
Auto-generated base for PrmDb component.
Component class for managing parameters.
Definition: PrmDbImpl.hpp:30
void readParamFile()
PrmDb file read function.
Definition: PrmDbImpl.cpp:254
virtual ~PrmDbImpl()
PrmDb destructor.
Definition: PrmDbImpl.cpp:251
PrmDbImpl(const char *name)
PrmDb constructor.
Definition: PrmDbImpl.cpp:44
void configure(const char *file)
PrmDb configure method.
Definition: PrmDbImpl.cpp:48
friend class PrmDbImplTester
Definition: PrmDbImpl.hpp:33