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
GenericHubComponentImpl.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title GenericHubComponentImpl.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 GenericHub_HPP
14 #define GenericHub_HPP
15 
17 
18 namespace Svc {
19 
21  public:
27  enum HubType {
33  };
34 
35  const static U32 GENERIC_HUB_DATA_SIZE = 1024;
36  // ----------------------------------------------------------------------
37  // Construction, initialization, and destruction
38  // ----------------------------------------------------------------------
39 
42  GenericHubComponentImpl(const char* const compName
43  );
44 
48 
49  PRIVATE:
50  // ----------------------------------------------------------------------
51  // Handler implementations for user-defined typed input ports
52  // ----------------------------------------------------------------------
53 
56  void buffersIn_handler(const NATIVE_INT_TYPE portNum,
57  Fw::Buffer& fwBuffer);
58 
61  void dataIn_handler(const NATIVE_INT_TYPE portNum,
62  Fw::Buffer& fwBuffer);
63 
66  void LogRecv_handler(const NATIVE_INT_TYPE portNum,
67  FwEventIdType id,
68  Fw::Time& timeTag,
69  const Fw::LogSeverity& severity,
70  Fw::LogBuffer& args
71  );
72 
75  void TlmRecv_handler(const NATIVE_INT_TYPE portNum,
76  FwChanIdType id,
77  Fw::Time& timeTag,
78  Fw::TlmBuffer& val
79  );
80 
81  // ----------------------------------------------------------------------
82  // Handler implementations for user-defined serial input ports
83  // ----------------------------------------------------------------------
84 
87  void portIn_handler(NATIVE_INT_TYPE portNum,
89  );
90 
91  // Helpers and members
92  void send_data(const HubType type, const NATIVE_INT_TYPE port, const U8* data, const U32 size);
93 };
94 
95 } // end namespace Svc
96 
97 #endif
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:30
U32 FwChanIdType
Definition: FpConfig.h:95
U32 FwEventIdType
Definition: FpConfig.h:103
Enum representing event severity.
Definition: Time.hpp:9
Auto-generated base for GenericHub component.
@ HUB_TYPE_BUFFER
Buffer type transmission.
@ HUB_TYPE_CHANNEL
Telemetry channel type.
@ HUB_TYPE_PORT
Port type transmission.
GenericHubComponentImpl(const char *const compName)