F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Fw::TlmPacket Class Reference

#include <Fw/Tlm/TlmPacket.hpp>

Inheritance diagram for Fw::TlmPacket:
Fw::ComPacket Fw::Serializable

Public Member Functions

 TlmPacket ()
 Constructor. More...
 
virtual ~TlmPacket ()
 Destructor. More...
 
SerializeStatus serializeTo (SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const override
 serialize contents More...
 
SerializeStatus deserializeFrom (SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) override
 Deserialize the contents of this object from a buffer. More...
 
SerializeStatus addValue (FwChanIdType id, Time &timeTag, TlmBuffer &buffer)
 Add telemetry value to buffer. More...
 
SerializeStatus extractValue (FwChanIdType &id, Time &timeTag, TlmBuffer &buffer, FwSizeType bufferSize)
 
SerializeStatus resetPktSer ()
 Reset serialization of values. This should be done when starting to accumulate a new set of values. More...
 
SerializeStatus resetPktDeser ()
 Reset deserialization. This should be done before extracting values. More...
 
Fw::ComBuffergetBuffer ()
 get buffer to send to the ground More...
 
void setBuffer (Fw::ComBuffer &buffer)
 set the internal buffer for deserializing values More...
 
FwSizeType getNumEntries ()
 get the number of packets added via addValue() More...
 
- Public Member Functions inherited from Fw::ComPacket
 ComPacket ()
 
virtual ~ComPacket ()
 
- Public Member Functions inherited from Fw::Serializable
Serializableoperator= (const Serializable &src)=default
 TODO: this operator should be deleted, this must be done after RawTime is modified though. More...
 
 DEPRECATED (SerializeStatus serialize(SerialBufferBase &buffer) const, "Use serializeTo(SerialBufferBase& buffer) instead")
 
 DEPRECATED (SerializeStatus deserialize(SerialBufferBase &buffer), "Use deserializeFrom(SerialBufferBase& buffer) instead")
 

Additional Inherited Members

- Public Types inherited from Fw::Serializable
using SizeType = FwSizeType
 
- Protected Member Functions inherited from Fw::ComPacket
SerializeStatus serializeBase (SerialBufferBase &buffer) const
 
SerializeStatus deserializeBase (SerialBufferBase &buffer)
 
- Protected Member Functions inherited from Fw::Serializable
 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 Virtual destructor. More...
 
- Protected Attributes inherited from Fw::ComPacket
ComPacketType m_type
 

Detailed Description

Definition at line 18 of file TlmPacket.hpp.

Constructor & Destructor Documentation

◆ TlmPacket()

Fw::TlmPacket::TlmPacket ( )

Constructor.

Definition at line 13 of file TlmPacket.cpp.

◆ ~TlmPacket()

Fw::TlmPacket::~TlmPacket ( )
virtual

Destructor.

Definition at line 18 of file TlmPacket.cpp.

Member Function Documentation

◆ addValue()

SerializeStatus Fw::TlmPacket::addValue ( FwChanIdType  id,
Time timeTag,
TlmBuffer buffer 
)

Add telemetry value to buffer.

Definition at line 63 of file TlmPacket.cpp.

◆ deserializeFrom()

SerializeStatus Fw::TlmPacket::deserializeFrom ( SerialBufferBase buffer,
Fw::Endianness  mode = Fw::Endianness::BIG 
)
overridevirtual

Deserialize the contents of this object from a buffer.

This method reads serialized data from the provided buffer and reconstructs the object's data from it. The buffer should contain data in the format produced by serializeTo().

Parameters
bufferReference to the SerialBufferBase from which data will be deserialized
modeEndianness mode for deserialization (default is Endianness::BIG)
Returns
SerializeStatus indicating the result of the operation

Implements Fw::Serializable.

Definition at line 137 of file TlmPacket.cpp.

◆ extractValue()

SerializeStatus Fw::TlmPacket::extractValue ( FwChanIdType id,
Time timeTag,
TlmBuffer buffer,
FwSizeType  bufferSize 
)

extract telemetry value - since there are potentially multiple channel values in the packet, the size of the entry must be known

Definition at line 97 of file TlmPacket.cpp.

◆ getBuffer()

Fw::ComBuffer & Fw::TlmPacket::getBuffer ( )

get buffer to send to the ground

Definition at line 55 of file TlmPacket.cpp.

◆ getNumEntries()

FwSizeType Fw::TlmPacket::getNumEntries ( )

get the number of packets added via addValue()

Definition at line 51 of file TlmPacket.cpp.

◆ resetPktDeser()

SerializeStatus Fw::TlmPacket::resetPktDeser ( )

Reset deserialization. This should be done before extracting values.

Definition at line 33 of file TlmPacket.cpp.

◆ resetPktSer()

SerializeStatus Fw::TlmPacket::resetPktSer ( )

Reset serialization of values. This should be done when starting to accumulate a new set of values.

Definition at line 20 of file TlmPacket.cpp.

◆ serializeTo()

SerializeStatus Fw::TlmPacket::serializeTo ( SerialBufferBase buffer,
Fw::Endianness  mode = Fw::Endianness::BIG 
) const
overridevirtual

serialize contents

Implements Fw::Serializable.

Definition at line 127 of file TlmPacket.cpp.

◆ setBuffer()

void Fw::TlmPacket::setBuffer ( Fw::ComBuffer buffer)

set the internal buffer for deserializing values

Definition at line 59 of file TlmPacket.cpp.


The documentation for this class was generated from the following files: