F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
LogPacket.hpp
Go to the documentation of this file.
1 /*
2  * LogPacket.hpp
3  *
4  * Created on: May 24, 2014
5  * Author: Timothy Canham
6  */
7 
8 #ifndef LOGPACKET_HPP_
9 #define LOGPACKET_HPP_
10 
11 #include <Fw/Com/ComPacket.hpp>
12 #include <Fw/Log/LogBuffer.hpp>
13 #include <Fw/Time/Time.hpp>
14 
15 namespace Fw {
16 
17 class LogPacket : public ComPacket {
18  public:
19  LogPacket();
20  virtual ~LogPacket();
21 
22  SerializeStatus serializeTo(SerializeBufferBase& buffer) const override;
24 
25  void setId(FwEventIdType id);
26  void setLogBuffer(const LogBuffer& buffer);
27  void setTimeTag(const Fw::Time& timeTag);
28 
32 
33  protected:
34  FwEventIdType m_id; // !< Channel id
35  Fw::Time m_timeTag; // !< time tag
36  LogBuffer m_logBuffer; // !< serialized argument data
37 };
38 
39 } /* namespace Fw */
40 
41 #endif /* LOGPACKET_HPP_ */
SerializeStatus serializeTo(SerializeBufferBase &buffer) const override
serialize contents
Definition: LogPacket.cpp:19
LogBuffer & getLogBuffer()
Definition: LogPacket.cpp:87
void setTimeTag(const Fw::Time &timeTag)
Definition: LogPacket.cpp:75
Fw::Time m_timeTag
Definition: LogPacket.hpp:35
void setId(FwEventIdType id)
Definition: LogPacket.cpp:67
SerializeStatus
forward declaration for string
FwIdType FwEventIdType
The type of an event identifier.
Fw::Time & getTimeTag()
Definition: LogPacket.cpp:83
FwEventIdType m_id
Definition: LogPacket.hpp:34
void setLogBuffer(const LogBuffer &buffer)
Definition: LogPacket.cpp:71
LogBuffer m_logBuffer
Definition: LogPacket.hpp:36
virtual ~LogPacket()
Definition: LogPacket.cpp:17
FwEventIdType getId()
Definition: LogPacket.cpp:79
SerializeStatus deserializeFrom(SerializeBufferBase &buffer) override
deserialize contents from buffer
Definition: LogPacket.cpp:40