F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
GenericHub.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title GenericHub.hpp
3 // \author mstarch
4 // \brief hpp file for GenericHub component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #ifndef Svc_GenericHub_HPP
14 #define Svc_GenericHub_HPP
15 
16 #include "Svc/GenericHub/GenericHubComponentAc.hpp"
17 
18 namespace Svc {
19 
20 class GenericHub final : public GenericHubComponentBase {
21  public:
27  enum HubType {
33  };
34 
35  // ----------------------------------------------------------------------
36  // Construction, initialization, and destruction
37  // ----------------------------------------------------------------------
38 
41  GenericHub(const char* const compName
42  );
43 
46  ~GenericHub();
47 
48  private:
49  // ----------------------------------------------------------------------
50  // Handler implementations for user-defined typed input ports
51  // ----------------------------------------------------------------------
52 
55  void bufferIn_handler(const FwIndexType portNum,
56  Fw::Buffer& fwBuffer) override;
57 
61  void bufferOutReturn_handler(FwIndexType portNum,
62  Fw::Buffer& fwBuffer
63  ) override;
64 
67  void fromBufferDriver_handler(const FwIndexType portNum,
68  Fw::Buffer& fwBuffer) override;
69 
73  void toBufferDriverReturn_handler(FwIndexType portNum,
74  Fw::Buffer& fwBuffer
75  ) override;
76 
79  void eventIn_handler(const FwIndexType portNum,
80  FwEventIdType id,
81  Fw::Time& timeTag,
82  const Fw::LogSeverity& severity,
83  Fw::LogBuffer& args
84  ) override;
85 
88  void tlmIn_handler(const FwIndexType portNum,
89  FwChanIdType id,
90  Fw::Time& timeTag,
91  Fw::TlmBuffer& val
92  ) override;
93 
94  // ----------------------------------------------------------------------
95  // Handler implementations for user-defined serial input ports
96  // ----------------------------------------------------------------------
97 
100  void serialIn_handler(FwIndexType portNum,
101  Fw::SerializeBufferBase& Buffer
102  ) override;
103 
104  // Helpers and members
105  void send_data(const HubType type, const FwIndexType port, const U8* data, const FwSizeType size);
106 };
107 
108 } // end namespace Svc
109 
110 #endif
PlatformSizeType FwSizeType
FwIdType FwEventIdType
The type of an event identifier.
Buffer type transmission.
Definition: GenericHub.hpp:29
FwIdType FwChanIdType
The type of a telemetry channel identifier.
Enum representing event severity.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
PlatformIndexType FwIndexType
Telemetry channel type.
Definition: GenericHub.hpp:31
Port type transmission.
Definition: GenericHub.hpp:28
RateGroupDivider component implementation.
GenericHub(const char *const compName)
Definition: GenericHub.cpp:27
Event transmission.
Definition: GenericHub.hpp:30