F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpDemo.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpDemo.hpp
3 // \author jawest
4 // \brief hpp file for DpDemo component implementation class
5 // ======================================================================
6 
7 #ifndef Ref_DpDemo_HPP
8 #define Ref_DpDemo_HPP
9 
10 #include "Ref/DpDemo/DpDemoComponentAc.hpp"
11 
13 
14 namespace Ref {
15 
16 class DpDemo final : public DpDemoComponentBase {
17  public:
18  // ----------------------------------------------------------------------
19  // Component construction and destruction
20  // ----------------------------------------------------------------------
21 
23  DpDemo(const char* const compName
24  );
25 
27  ~DpDemo();
28 
29  private:
30  // ----------------------------------------------------------------------
31  // Handler implementations for commands
32  // ----------------------------------------------------------------------
33 
37  void run_handler(FwIndexType portNum,
38  U32 context
39  ) override;
40 
44  void SelectColor_cmdHandler(FwOpcodeType opCode,
45  U32 cmdSeq,
46  const Ref::DpDemo_ColorEnum& color) override;
47 
51  void Dp_cmdHandler(FwOpcodeType opCode,
52  U32 cmdSeq,
53  const DpDemo_DpReqType& reqType,
54  U32 priority,
55  const Fw::DpCfg::ProcType& proc) override;
56 
57  private:
58  // ----------------------------------------------------------------------
59  // Handler implementations for data products
60  // ----------------------------------------------------------------------
61 
63  void dpRecv_DpDemoContainer_handler(DpContainer& container,
64  Fw::Success::T status
65  ) override;
66 
67  // DP cleanup helper
68  void cleanupAndSendDp();
69 
70  // Member variables
71  DpDemo_ColorEnum selectedColor;
72  U32 numRecords;
73  U32 dpPriority;
74  Fw::DpCfg::ProcType dpProc;
75  DpContainer dpContainer;
76  bool dpInProgress;
77  FwOpcodeType pendingOpCode = 0;
78  U32 pendingCmdSeq = 0;
79 };
80 
81 } // namespace Ref
82 
83 #endif
FwIdType FwOpcodeType
The type of a command opcode.
~DpDemo()
Destroy DpDemo object.
Definition: DpDemo.cpp:22
T
The raw enum type.
PlatformIndexType FwIndexType
DpDemo(const char *const compName)
Construct DpDemo object.
Definition: DpDemo.cpp:15