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
TlmChan.hpp
Go to the documentation of this file.
1 
13 #ifndef TELEMCHANIMPL_HPP_
14 #define TELEMCHANIMPL_HPP_
15 
16 #include <Fw/Tlm/TlmPacket.hpp>
18 #include <TlmChanImplCfg.hpp>
19 
20 namespace Svc {
21 
22 class TlmChan : public TlmChanComponentBase {
23  public:
24  TlmChan(const char* compName);
25  virtual ~TlmChan();
26 
27  PROTECTED:
28  // can be overridden for alternate algorithms
30 
31  PRIVATE:
32  // Port functions
33  void TlmRecv_handler(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time& timeTag, Fw::TlmBuffer& val);
34  void TlmGet_handler(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time& timeTag, Fw::TlmBuffer& val);
35  void Run_handler(NATIVE_INT_TYPE portNum, U32 context);
38  void pingIn_handler(const NATIVE_INT_TYPE portNum,
39  U32 key
40  );
41 
42  typedef struct tlmEntry {
43  FwChanIdType id;
44  bool updated;
45  Fw::Time lastUpdate;
46  Fw::TlmBuffer buffer;
47  tlmEntry* next;
48  bool used;
49  NATIVE_UINT_TYPE bucketNo;
50  } TlmEntry;
51 
52  struct TlmSet {
53  TlmEntry* slots[TLMCHAN_NUM_TLM_HASH_SLOTS];
54  TlmEntry buckets[TLMCHAN_HASH_BUCKETS];
55  NATIVE_INT_TYPE free;
56  } m_tlmEntries[2];
57 
58  U32 m_activeBuffer; // !< which buffer is active for storing telemetry
59 };
60 
61 } // namespace Svc
62 
63 #endif /* TELEMCHANIMPL_HPP_ */
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:56
U32 FwChanIdType
Definition: FpConfig.h:95
Configuration file for Telemetry Channel component.
Definition: Time.hpp:9
Auto-generated base for TlmChan component.
virtual NATIVE_UINT_TYPE doHash(FwChanIdType id)
Definition: TlmChan.cpp:45
virtual ~TlmChan()
Definition: TlmChan.cpp:43
TlmChan(const char *compName)
Definition: TlmChan.cpp:19