F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
PrmDbImpl.hpp
Go to the documentation of this file.
1
13#ifndef PRMDBIMPL_HPP_
14#define PRMDBIMPL_HPP_
15
16#include <Svc/PrmDb/PrmDbComponentAc.hpp>
17#include <PrmDbImplCfg.hpp>
18#include <Fw/Types/String.hpp>
19#include <Os/Mutex.hpp>
20
21namespace Svc {
22
29
30 class PrmDbImpl : public PrmDbComponentBase {
31 public:
32
33 friend class PrmDbImplTester;
34
42 PrmDbImpl(const char* name);
43
51
52 void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance);
53
59 void configure(const char* file);
60
61
67 void readParamFile(); // NOTE: Assumed to run at initialization time. No guard of data structure.
68
71 virtual ~PrmDbImpl();
72 protected:
73 private:
82 Fw::ParamValid getPrm_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val);
91 void setPrm_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val);
92
101
102 void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key);
111 void PRM_SAVE_FILE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq);
112
117
118 void clearDb();
119
120 Fw::String m_fileName;
121
122 struct t_dbStruct {
123 bool used;
124 FwPrmIdType id;
125 Fw::ParamBuffer val;
126 } m_db[PRMDB_NUM_DB_ENTRIES];
127
128 };
129}
130
131#endif /* PRMDBIMPL_HPP_ */
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
U32 FwOpcodeType
Definition FpConfig.h:56
U32 FwPrmIdType
Definition FpConfig.h:65
Component class for managing parameters.
Definition PrmDbImpl.hpp:30
void readParamFile()
PrmDb file read function.
virtual ~PrmDbImpl()
PrmDb destructor.
void configure(const char *file)
PrmDb configure method.
Definition PrmDbImpl.cpp:48
friend class PrmDbImplTester
Definition PrmDbImpl.hpp:33
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
PrmDb initialization function.
Definition PrmDbImpl.cpp:53