F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
AmpcsEvrLogPacket.hpp
Go to the documentation of this file.
1 /*
2  * AmpcsEvrLogPacket.hpp
3  *
4  * Created on: October 07, 2016
5  * Author: Kevin F. Ortega
6  * Aadil Rizvi
7  */
8 
9 #ifndef AMPCS_EVR_LOGPACKET_HPP_
10 #define AMPCS_EVR_LOGPACKET_HPP_
11 
12 #include <Fw/Com/ComPacket.hpp>
13 #include <Fw/Log/LogBuffer.hpp>
14 #include <Fw/Time/Time.hpp>
15 #include <cstring>
16 
17 #define AMPCS_EVR_TASK_NAME_LEN 6
18 
19 namespace Fw {
20 
21  class AmpcsEvrLogPacket : public ComPacket {
22  public:
23 
25  virtual ~AmpcsEvrLogPacket();
26 
29 
30  void setTaskName(U8 *taskName, U8 len);
31  void setId(U32 eventID);
32  void setOverSeqNum(U32 overSeqNum);
33  void setCatSeqNum(U32 catSeqNum);
34  void setLogBuffer(LogBuffer& buffer);
35 
36  const U8* getTaskName() const;
37  U32 getId() const;
38  U32 getOverSeqNum() const;
39  U32 getCatSeqNum() const;
41 
42  protected:
44  U32 m_eventID;
47  LogBuffer m_logBuffer; // !< serialized argument data
48  };
49 
50 } /* namespace Fw */
51 
52 #endif /* AMPCS_EVR_LOGPACKET_HPP_ */
Fw::AmpcsEvrLogPacket::~AmpcsEvrLogPacket
virtual ~AmpcsEvrLogPacket()
Definition: AmpcsEvrLogPacket.cpp:21
Fw::AmpcsEvrLogPacket::getLogBuffer
LogBuffer & getLogBuffer()
Definition: AmpcsEvrLogPacket.cpp:127
Fw::AmpcsEvrLogPacket::m_overSeqNum
U32 m_overSeqNum
Definition: AmpcsEvrLogPacket.hpp:45
Fw::AmpcsEvrLogPacket::getId
U32 getId() const
Definition: AmpcsEvrLogPacket.cpp:115
Fw::AmpcsEvrLogPacket
Definition: AmpcsEvrLogPacket.hpp:21
LogBuffer.hpp
Fw::AmpcsEvrLogPacket::deserialize
SerializeStatus deserialize(SerializeBufferBase &buffer)
deserialize to contents
Definition: AmpcsEvrLogPacket.cpp:52
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Fw::AmpcsEvrLogPacket::getTaskName
const U8 * getTaskName() const
Definition: AmpcsEvrLogPacket.cpp:111
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:73
Fw::LogBuffer
Definition: LogBuffer.hpp:22
Fw::AmpcsEvrLogPacket::getCatSeqNum
U32 getCatSeqNum() const
Definition: AmpcsEvrLogPacket.cpp:123
Fw::AmpcsEvrLogPacket::m_taskName
U8 m_taskName[AMPCS_EVR_TASK_NAME_LEN]
Definition: AmpcsEvrLogPacket.hpp:43
AMPCS_EVR_TASK_NAME_LEN
#define AMPCS_EVR_TASK_NAME_LEN
Definition: AmpcsEvrLogPacket.hpp:17
Fw::AmpcsEvrLogPacket::serialize
SerializeStatus serialize(SerializeBufferBase &buffer) const
serialize contents
Definition: AmpcsEvrLogPacket.cpp:24
Fw::AmpcsEvrLogPacket::setTaskName
void setTaskName(U8 *taskName, U8 len)
Definition: AmpcsEvrLogPacket.cpp:88
Fw::AmpcsEvrLogPacket::AmpcsEvrLogPacket
AmpcsEvrLogPacket()
Definition: AmpcsEvrLogPacket.cpp:14
Fw::AmpcsEvrLogPacket::setLogBuffer
void setLogBuffer(LogBuffer &buffer)
Definition: AmpcsEvrLogPacket.cpp:107
Fw::ComPacket
Definition: ComPacket.hpp:18
Fw::AmpcsEvrLogPacket::getOverSeqNum
U32 getOverSeqNum() const
Definition: AmpcsEvrLogPacket.cpp:119
Fw::AmpcsEvrLogPacket::m_catSeqNum
U32 m_catSeqNum
Definition: AmpcsEvrLogPacket.hpp:46
Fw::AmpcsEvrLogPacket::setOverSeqNum
void setOverSeqNum(U32 overSeqNum)
Definition: AmpcsEvrLogPacket.cpp:99
Fw::AmpcsEvrLogPacket::setCatSeqNum
void setCatSeqNum(U32 catSeqNum)
Definition: AmpcsEvrLogPacket.cpp:103
Fw::AmpcsEvrLogPacket::m_eventID
U32 m_eventID
Definition: AmpcsEvrLogPacket.hpp:44
Fw::AmpcsEvrLogPacket::m_logBuffer
LogBuffer m_logBuffer
Definition: AmpcsEvrLogPacket.hpp:47
Time.hpp
Fw::AmpcsEvrLogPacket::setId
void setId(U32 eventID)
Definition: AmpcsEvrLogPacket.cpp:95
ComPacket.hpp
Fw
Definition: SerIds.hpp:20