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 
23  Fw::Endianness mode = Fw::Endianness::BIG) const override;
25 
26  void setId(FwEventIdType id);
27  void setLogBuffer(const LogBuffer& buffer);
28  void setTimeTag(const Fw::Time& timeTag);
29 
33 
34  protected:
35  FwEventIdType m_id; // !< Channel id
36  Fw::Time m_timeTag; // !< time tag
37  LogBuffer m_logBuffer; // !< serialized argument data
38 };
39 
40 } /* namespace Fw */
41 
42 #endif /* LOGPACKET_HPP_ */
LogBuffer & getLogBuffer()
Definition: LogPacket.cpp:86
void setTimeTag(const Fw::Time &timeTag)
Definition: LogPacket.cpp:74
Fw::Time m_timeTag
Definition: LogPacket.hpp:36
void setId(FwEventIdType id)
Definition: LogPacket.cpp:66
SerializeStatus
forward declaration for string
FwIdType FwEventIdType
The type of an event identifier.
Fw::Time & getTimeTag()
Definition: LogPacket.cpp:82
FwEventIdType m_id
Definition: LogPacket.hpp:35
void setLogBuffer(const LogBuffer &buffer)
Definition: LogPacket.cpp:70
LogBuffer m_logBuffer
Definition: LogPacket.hpp:37
virtual ~LogPacket()
Definition: LogPacket.cpp:17
Implementation of malloc based allocator.
Endianness
FwEventIdType getId()
Definition: LogPacket.cpp:78
SerializeStatus deserializeFrom(SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) override
Deserialize the contents of this object from a buffer.
Definition: LogPacket.cpp:39
SerializeStatus serializeTo(SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const override
serialize contents
Definition: LogPacket.cpp:19
Big endian serialization.