![]() |
F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
Component class for managing parameters. More...
#include <Svc/PrmDb/PrmDbImpl.hpp>
Public Member Functions | |
| PrmDbImpl (const char *name) | |
| PrmDb constructor. More... | |
| void | init (NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance) |
| PrmDb initialization function. More... | |
| void | configure (const char *file) |
| PrmDb configure method. More... | |
| void | readParamFile () |
| PrmDb file read function. More... | |
| virtual | ~PrmDbImpl () |
| PrmDb destructor. More... | |
Public Member Functions inherited from Svc::PrmDbComponentBase | |
| void | init (NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance=0) |
| Initialize PrmDbComponentBase object. More... | |
| Fw::InputCmdPort * | get_CmdDisp_InputPort (NATIVE_INT_TYPE portNum) |
| Fw::InputPrmGetPort * | get_getPrm_InputPort (NATIVE_INT_TYPE portNum) |
| Svc::InputPingPort * | get_pingIn_InputPort (NATIVE_INT_TYPE portNum) |
| Fw::InputPrmSetPort * | get_setPrm_InputPort (NATIVE_INT_TYPE portNum) |
| void | set_CmdReg_OutputPort (NATIVE_INT_TYPE portNum, Fw::InputCmdRegPort *port) |
| Connect port to CmdReg[portNum]. More... | |
| void | set_CmdStatus_OutputPort (NATIVE_INT_TYPE portNum, Fw::InputCmdResponsePort *port) |
| Connect port to CmdStatus[portNum]. More... | |
| void | set_Log_OutputPort (NATIVE_INT_TYPE portNum, Fw::InputLogPort *port) |
| Connect port to Log[portNum]. More... | |
| void | set_Time_OutputPort (NATIVE_INT_TYPE portNum, Fw::InputTimePort *port) |
| Connect port to Time[portNum]. More... | |
| void | set_pingOut_OutputPort (NATIVE_INT_TYPE portNum, Svc::InputPingPort *port) |
| Connect port to pingOut[portNum]. More... | |
| void | regCommands () |
| Register commands with the Command Dispatcher. More... | |
Public Member Functions inherited from Fw::ActiveComponentBase | |
| void | start (NATIVE_UINT_TYPE priority=Os::Task::TASK_DEFAULT, NATIVE_UINT_TYPE stackSize=Os::Task::TASK_DEFAULT, NATIVE_UINT_TYPE cpuAffinity=Os::Task::TASK_DEFAULT, NATIVE_UINT_TYPE identifier=Os::Task::TASK_DEFAULT) |
| called by instantiator when task is to be started More... | |
| DEPRECATED (void start(NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, NATIVE_INT_TYPE cpuAffinity=-1), "Please switch to start(NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, NATIVE_UINT_TYPE identifier)") | |
| called by instantiator when task is to be started More... | |
| void | exit () |
| exit task in active component More... | |
| Os::Task::TaskStatus | join (void **value_ptr) |
| provide return value of thread if value_ptr is not NULL More... | |
Public Member Functions inherited from Fw::PassiveComponentBase | |
| void | setIdBase (const U32) |
| Set the ID base. More... | |
| U32 | getIdBase () const |
Friends | |
| class | PrmDbImplTester |
Additional Inherited Members | |
Public Types inherited from Fw::ActiveComponentBase | |
| enum | { ACTIVE_COMPONENT_EXIT } |
Public Types inherited from Fw::QueuedComponentBase | |
| enum | MsgDispatchStatus { MSG_DISPATCH_OK , MSG_DISPATCH_EMPTY , MSG_DISPATCH_ERROR , MSG_DISPATCH_EXIT } |
Protected Types inherited from Svc::PrmDbComponentBase | |
| enum | { NUM_CMDDISP_INPUT_PORTS = 1 } |
| Enumerations for numbers of special input ports. More... | |
| enum | { NUM_GETPRM_INPUT_PORTS = 1 , NUM_PINGIN_INPUT_PORTS = 1 , NUM_SETPRM_INPUT_PORTS = 1 } |
| Enumerations for numbers of typed input ports. More... | |
| enum | { NUM_CMDREG_OUTPUT_PORTS = 1 , NUM_CMDSTATUS_OUTPUT_PORTS = 1 , NUM_LOG_OUTPUT_PORTS = 1 , NUM_LOGTEXT_OUTPUT_PORTS = 1 , NUM_TIME_OUTPUT_PORTS = 1 } |
| Enumerations for numbers of special output ports. More... | |
| enum | { NUM_PINGOUT_OUTPUT_PORTS = 1 } |
| Enumerations for numbers of typed output ports. More... | |
| enum | { OPCODE_PRM_SAVE_FILE = 0x0 } |
| Command opcodes. More... | |
| enum | { EVENTID_PRMIDNOTFOUND = 0x0 , EVENTID_PRMIDUPDATED = 0x1 , EVENTID_PRMDBFULL = 0x2 , EVENTID_PRMIDADDED = 0x3 , EVENTID_PRMFILEWRITEERROR = 0x4 , EVENTID_PRMFILESAVECOMPLETE = 0x5 , EVENTID_PRMFILEREADERROR = 0x6 , EVENTID_PRMFILELOADCOMPLETE = 0x7 } |
| Event IDs. More... | |
| enum | { EVENTID_PRMIDNOTFOUND_THROTTLE = 5 } |
| Event throttle values: sets initial value of countdown variables. More... | |
Protected Member Functions inherited from Svc::PrmDbComponentBase | |
| PrmDbComponentBase (const char *compName="") | |
| Construct PrmDbComponentBase object. More... | |
| virtual | ~PrmDbComponentBase () |
| Destroy PrmDbComponentBase object. More... | |
| NATIVE_INT_TYPE | getNum_CmdDisp_InputPorts () const |
| NATIVE_INT_TYPE | getNum_getPrm_InputPorts () const |
| NATIVE_INT_TYPE | getNum_pingIn_InputPorts () const |
| NATIVE_INT_TYPE | getNum_setPrm_InputPorts () const |
| NATIVE_INT_TYPE | getNum_CmdReg_OutputPorts () const |
| NATIVE_INT_TYPE | getNum_CmdStatus_OutputPorts () const |
| NATIVE_INT_TYPE | getNum_Log_OutputPorts () const |
| NATIVE_INT_TYPE | getNum_Time_OutputPorts () const |
| NATIVE_INT_TYPE | getNum_pingOut_OutputPorts () const |
| bool | isConnected_CmdReg_OutputPort (NATIVE_INT_TYPE portNum) |
| bool | isConnected_CmdStatus_OutputPort (NATIVE_INT_TYPE portNum) |
| bool | isConnected_Log_OutputPort (NATIVE_INT_TYPE portNum) |
| bool | isConnected_Time_OutputPort (NATIVE_INT_TYPE portNum) |
| bool | isConnected_pingOut_OutputPort (NATIVE_INT_TYPE portNum) |
| Fw::ParamValid | getPrm_handlerBase (NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) |
| Handler base-class function for input port getPrm. More... | |
| void | pingIn_handlerBase (NATIVE_INT_TYPE portNum, U32 key) |
| Handler base-class function for input port pingIn. More... | |
| void | setPrm_handlerBase (NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) |
| Handler base-class function for input port setPrm. More... | |
| virtual void | pingIn_preMsgHook (NATIVE_INT_TYPE portNum, U32 key) |
| Pre-message hook for async input port pingIn. More... | |
| virtual void | setPrm_preMsgHook (NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) |
| Pre-message hook for async input port setPrm. More... | |
| void | pingOut_out (NATIVE_INT_TYPE portNum, U32 key) |
| Invoke output port pingOut. More... | |
| void | cmdResponse_out (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response) |
| Emit command response. More... | |
| void | PRM_SAVE_FILE_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args) |
| virtual void | PRM_SAVE_FILE_preMsgHook (FwOpcodeType opCode, U32 cmdSeq) |
| Pre-message hook for command PRM_SAVE_FILE. More... | |
| void | log_WARNING_LO_PrmIdNotFound (U32 Id) |
| void | log_ACTIVITY_HI_PrmIdUpdated (U32 Id) |
| void | log_FATAL_PrmDbFull (U32 Id) |
| void | log_ACTIVITY_HI_PrmIdAdded (U32 Id) |
| void | log_WARNING_HI_PrmFileWriteError (Svc::PrmDb_PrmWriteError stage, I32 record, I32 error) |
| void | log_ACTIVITY_HI_PrmFileSaveComplete (U32 records) |
| void | log_WARNING_HI_PrmFileReadError (Svc::PrmDb_PrmReadError stage, I32 record, I32 error) |
| void | log_ACTIVITY_HI_PrmFileLoadComplete (U32 records) |
| void | log_WARNING_LO_PrmIdNotFound_ThrottleClear () |
| Reset throttle value for PrmIdNotFound. More... | |
| Fw::Time | getTime () |
| virtual void | lock () |
| Lock the guarded mutex. More... | |
| virtual void | unLock () |
| Unlock the guarded mutex. More... | |
Protected Member Functions inherited from Fw::ActiveComponentBase | |
| ActiveComponentBase (const char *name) | |
| Constructor. More... | |
| virtual | ~ActiveComponentBase () |
| Destructor. More... | |
| void | init (NATIVE_INT_TYPE instance) |
| initialization code More... | |
| virtual void | preamble () |
| A function that will be called before the event loop is entered. More... | |
| virtual void | loop () |
| The function that will loop dispatching messages. More... | |
| virtual void | finalizer () |
| A function that will be called after exiting the loop. More... | |
Protected Member Functions inherited from Fw::QueuedComponentBase | |
| QueuedComponentBase (const char *name) | |
| Constructor. More... | |
| virtual | ~QueuedComponentBase () |
| Destructor. More... | |
| void | init (NATIVE_INT_TYPE instance) |
| initialization function More... | |
| Os::Queue::QueueStatus | createQueue (NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize) |
| NATIVE_INT_TYPE | getNumMsgsDropped () |
| return number of messages dropped More... | |
| void | incNumMsgDropped () |
| increment the number of messages dropped More... | |
Protected Member Functions inherited from Fw::PassiveComponentBase | |
| PassiveComponentBase (const char *name) | |
| Named constructor. More... | |
| virtual | ~PassiveComponentBase () |
| Destructor. More... | |
| void | init (NATIVE_INT_TYPE instance) |
| Initialization function. More... | |
| NATIVE_INT_TYPE | getInstance () const |
Protected Member Functions inherited from Fw::ObjBase | |
| ObjBase (const char *name) | |
| ObjBase constructor. More... | |
| virtual | ~ObjBase () |
| Destructor. More... | |
| void | init () |
| Object initializer. More... | |
Protected Attributes inherited from Fw::ActiveComponentBase | |
| Os::Task | m_task |
| task object for active component More... | |
Protected Attributes inherited from Fw::QueuedComponentBase | |
| Os::Queue | m_queue |
| queue object for active component More... | |
Component class for managing parameters.
This component supports storing, setting and saving of serialized parameters for components.
Definition at line 30 of file PrmDbImpl.hpp.
| Svc::PrmDbImpl::PrmDbImpl | ( | const char * | name | ) |
PrmDb constructor.
The constructor for the PrmDbImpl class. The constructor clears the database and stores the file name for opening later.
| name | component instance name |
Definition at line 44 of file PrmDbImpl.cpp.
|
virtual |
PrmDb destructor.
Definition at line 243 of file PrmDbImpl.cpp.
| void Svc::PrmDbImpl::configure | ( | const char * | file | ) |
PrmDb configure method.
The configure method stores the file name for opening later.
| file | file where parameters are stored. |
Definition at line 48 of file PrmDbImpl.cpp.
| void Svc::PrmDbImpl::init | ( | NATIVE_INT_TYPE | queueDepth, |
| NATIVE_INT_TYPE | instance | ||
| ) |
PrmDb initialization function.
The initialization function for the component creates the message queue and initializes the component base classes.
| queueDepth | queue depth for messages |
| instance | instance of component, if more than one is needed. |
Definition at line 53 of file PrmDbImpl.cpp.
| void Svc::PrmDbImpl::readParamFile | ( | ) |
PrmDb file read function.
The readFile function reads the set of parameters from the file passed in to the constructor.
Definition at line 246 of file PrmDbImpl.cpp.
|
friend |
Definition at line 33 of file PrmDbImpl.hpp.