F´ Flight Software - C/C++ Documentation  NASA-v2.0.1
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 
16 #include "Svc/GenericHub/GenericHubComponentAc.hpp"
17 
18 namespace Svc {
19 
20 class GenericHubComponentImpl : public GenericHubComponentBase {
21  public:
27  enum HubType {
31  };
32 
33  const static U32 GENERIC_HUB_DATA_SIZE = 1024;
34  // ----------------------------------------------------------------------
35  // Construction, initialization, and destruction
36  // ----------------------------------------------------------------------
37 
40  GenericHubComponentImpl(const char* const compName
41  );
42 
45  void init(const NATIVE_INT_TYPE instance = 0
46  );
47 
51 
52  PRIVATE:
53  // ----------------------------------------------------------------------
54  // Handler implementations for user-defined typed input ports
55  // ----------------------------------------------------------------------
56 
59  void buffersIn_handler(const NATIVE_INT_TYPE portNum,
60  Fw::Buffer& fwBuffer);
61 
64  void dataIn_handler(const NATIVE_INT_TYPE portNum,
65  Fw::Buffer& fwBuffer);
66 
67  // ----------------------------------------------------------------------
68  // Handler implementations for user-defined serial input ports
69  // ----------------------------------------------------------------------
70 
73  void portIn_handler(NATIVE_INT_TYPE portNum,
75  );
76 
77  // Helpers and members
78  void send_data(const HubType type, const NATIVE_INT_TYPE port, const U8* data, const U32 size);
79 };
80 
81 } // end namespace Svc
82 
83 #endif
Svc::GenericHubComponentImpl
Definition: GenericHubComponentImpl.hpp:20
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:76
Svc::GenericHubComponentImpl::init
void init(const NATIVE_INT_TYPE instance=0)
Definition: GenericHubComponentImpl.cpp:30
Fw::Buffer
Definition: Buffer.hpp:43
Svc::GenericHubComponentImpl::~GenericHubComponentImpl
~GenericHubComponentImpl(void)
Definition: GenericHubComponentImpl.cpp:34
Svc::GenericHubComponentImpl::HUB_TYPE_BUFFER
@ HUB_TYPE_BUFFER
Buffer type transmission.
Definition: GenericHubComponentImpl.hpp:29
Svc::GenericHubComponentImpl::GENERIC_HUB_DATA_SIZE
const static U32 GENERIC_HUB_DATA_SIZE
Definition: GenericHubComponentImpl.hpp:33
Svc::GenericHubComponentImpl::HubType
HubType
Definition: GenericHubComponentImpl.hpp:27
Svc::GenericHubComponentImpl::HUB_TYPE_MAX
@ HUB_TYPE_MAX
Definition: GenericHubComponentImpl.hpp:30
Svc
Definition: ActiveRateGroupImplCfg.hpp:18
Svc::GenericHubComponentImpl::HUB_TYPE_PORT
@ HUB_TYPE_PORT
Port type transmission.
Definition: GenericHubComponentImpl.hpp:28
Svc::GenericHubComponentImpl::GenericHubComponentImpl
GenericHubComponentImpl(const char *const compName)
Definition: GenericHubComponentImpl.cpp:28
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29