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

#include <Fw/Cmd/CmdPacket.hpp>

Inheritance diagram for Fw::CmdPacket:
Fw::ComPacket Fw::Serializable

Public Member Functions

 CmdPacket ()
 
virtual ~CmdPacket ()
 
SerializeStatus serializeTo (SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const override
 Serialize the contents of this object to a buffer. More...
 
SerializeStatus deserializeFrom (SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) override
 Deserialize the contents of this object from a buffer. More...
 
FwOpcodeType getOpCode () const
 
CmdArgBuffergetArgBuffer ()
 
- 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")
 

Protected Attributes

FwOpcodeType m_opcode
 
CmdArgBuffer m_argBuffer
 
- Protected Attributes inherited from Fw::ComPacket
ComPacketType m_type
 

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...
 

Detailed Description

Definition at line 16 of file CmdPacket.hpp.

Constructor & Destructor Documentation

◆ CmdPacket()

Fw::CmdPacket::CmdPacket ( )

Definition at line 14 of file CmdPacket.cpp.

◆ ~CmdPacket()

Fw::CmdPacket::~CmdPacket ( )
virtual

Definition at line 18 of file CmdPacket.cpp.

Member Function Documentation

◆ deserializeFrom()

SerializeStatus Fw::CmdPacket::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 27 of file CmdPacket.cpp.

◆ getArgBuffer()

CmdArgBuffer & Fw::CmdPacket::getArgBuffer ( )

Definition at line 56 of file CmdPacket.cpp.

◆ getOpCode()

FwOpcodeType Fw::CmdPacket::getOpCode ( ) const

Definition at line 52 of file CmdPacket.cpp.

◆ serializeTo()

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

Serialize the contents of this object to a buffer.

This method serializes the object's data into the provided buffer. The serialization process converts the object's data into a format that can be stored or transmitted, and then writes it to the buffer.

Parameters
bufferReference to the SerialBufferBase where data will be serialized
modeEndianness mode for serialization (default is Endianness::BIG)
Returns
SerializeStatus indicating the result of the operation

Implements Fw::Serializable.

Definition at line 21 of file CmdPacket.cpp.

Member Data Documentation

◆ m_argBuffer

CmdArgBuffer Fw::CmdPacket::m_argBuffer
protected

Definition at line 30 of file CmdPacket.hpp.

◆ m_opcode

FwOpcodeType Fw::CmdPacket::m_opcode
protected

Definition at line 29 of file CmdPacket.hpp.


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