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

#include <Fw/Types/Serializable.hpp>

Inheritance diagram for Fw::Serializable:
ComCfg::Apid ComCfg::FrameContext Drv::ByteStreamStatus Drv::GpioStatus Drv::I2cStatus Drv::SpiStatus Fpp::ToCpp::Phases Fw::Active Fw::Buffer Fw::CmdResponse Fw::ComPacket Fw::Completed Fw::ConstStringBase Fw::DeserialStatus Fw::Direction Fw::DpCfg::ProcType Fw::DpState Fw::Enabled Fw::Health Fw::Logic Fw::LogSeverity Fw::MemoryAllocation::MemoryAllocatorType Fw::On Fw::Open Fw::ParamValid Fw::PolyType Fw::SerialStatus Fw::Success Fw::Time Fw::TimeComparison Fw::TimeInterval Fw::TimeIntervalValue Fw::TimeValue Fw::TlmValid Fw::Wait Os::DirectoryOpenMode Os::DirectoryStatus Os::FileMode Os::FileStatus Os::FileSystemStatus Os::GenericStatus Os::MutexStatus Os::QueueBlockingType Os::QueueStatus Os::RawTimeInterface Os::RawTimeStatus Os::TaskStatus Svc::BufferAccumulator_BlockMode Svc::BufferAccumulator_OpState Svc::BufferLogger_LogState Svc::BuffQueueDepth Svc::Ccsds::FrameError Svc::Ccsds::SpacePacketHeader Svc::Ccsds::TCHeader Svc::Ccsds::TCTrailer Svc::Ccsds::TMHeader Svc::Ccsds::TMTrailer Svc::CmdSequencer_BlockState Svc::CmdSequencer_FileReadStage Svc::CmdSequencer_SeqMode Svc::ComDataContextPair Svc::ComQueueDepth Svc::CustomVersionDb Svc::DpHdrField Svc::DpRecord Svc::EventManager_Enabled Svc::EventManager_FilterSeverity Svc::FprimeProtocol::FrameHeader Svc::FprimeProtocol::FrameTrailer Svc::FprimeRouter_AllocationReason Svc::Fpy::DirectiveErrorCode Svc::Fpy::DirectiveId Svc::Fpy::FlagId Svc::Fpy::Footer Svc::Fpy::Header Svc::Fpy::Sequence Svc::Fpy::Statement Svc::FpySequencer_AllocateDirective Svc::FpySequencer_BlockState Svc::FpySequencer_BreakpointArgs Svc::FpySequencer_CallDirective Svc::FpySequencer_ConstCmdDirective Svc::FpySequencer_DiscardDirective Svc::FpySequencer_ExitDirective Svc::FpySequencer_FileReadStage Svc::FpySequencer_GetFieldDirective Svc::FpySequencer_GetFlagDirective Svc::FpySequencer_GoalState Svc::FpySequencer_GotoDirective Svc::FpySequencer_IfDirective Svc::FpySequencer_LoadAbsDirective Svc::FpySequencer_LoadRelDirective Svc::FpySequencer_MemCmpDirective Svc::FpySequencer_NoOpDirective Svc::FpySequencer_PeekDirective Svc::FpySequencer_PushPrmDirective Svc::FpySequencer_PushTimeDirective Svc::FpySequencer_PushTlmValAndTimeDirective Svc::FpySequencer_PushTlmValDirective Svc::FpySequencer_PushValDirective Svc::FpySequencer_ReturnDirective Svc::FpySequencer_SequenceExecutionArgs Svc::FpySequencer_SetFlagDirective Svc::FpySequencer_StackCmdDirective Svc::FpySequencer_StackOpDirective Svc::FpySequencer_StoreAbsConstOffsetDirective Svc::FpySequencer_StoreAbsDirective Svc::FpySequencer_StoreRelConstOffsetDirective Svc::FpySequencer_StoreRelDirective Svc::FpySequencer_WaitAbsDirective Svc::FpySequencer_WaitRelDirective Svc::MeasurementStatus Svc::PolyDbCfg::PolyDbEntry Svc::PrmDb_Merge Svc::PrmDb_PrmDbFileLoadState Svc::PrmDb_PrmDbType Svc::PrmDb_PrmLoadAction Svc::PrmDb_PrmReadError Svc::PrmDb_PrmWriteError Svc::QueueType Svc::SendFileResponse Svc::SendFileStatus Svc::SeqDispatcher_CmdSequencerState Svc::SystemResourceEnabled Svc::VersionCfg::VersionEnum Svc::VersionEnabled Svc::VersionStatus Svc::VersionType TimeBase

Public Types

using SizeType = FwSizeType
 

Public Member Functions

virtual SerializeStatus serializeTo (SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const =0
 Serialize the contents of this object to a buffer. More...
 
virtual SerializeStatus deserializeFrom (SerialBufferBase &buffer, Endianness mode=Endianness::BIG)=0
 Deserialize the contents of this object from a buffer. More...
 
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 Member Functions

 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 Virtual destructor. More...
 

Detailed Description

Definition at line 43 of file Serializable.hpp.

Member Typedef Documentation

◆ SizeType

Definition at line 46 of file Serializable.hpp.

Constructor & Destructor Documentation

◆ Serializable()

Fw::Serializable::Serializable ( )
protected

Default constructor.

Initializes a Serializable object with default values.

Definition at line 16 of file Serializable.cpp.

◆ ~Serializable()

Fw::Serializable::~Serializable ( )
protectedvirtual

Virtual destructor.

Ensures proper cleanup of derived classes.

Definition at line 18 of file Serializable.cpp.

Member Function Documentation

◆ DEPRECATED() [1/2]

Fw::Serializable::DEPRECATED ( SerializeStatus serialize(SerialBufferBase &buffer)  const,
"Use serializeTo(SerialBufferBase& buffer) instead"   
)
inline

Definition at line 79 of file Serializable.hpp.

◆ DEPRECATED() [2/2]

Fw::Serializable::DEPRECATED ( SerializeStatus   deserializeSerialBufferBase &buffer,
"Use deserializeFrom(SerialBufferBase& buffer) instead"   
)
inline

Definition at line 84 of file Serializable.hpp.

◆ deserializeFrom()

virtual SerializeStatus Fw::Serializable::deserializeFrom ( SerialBufferBase buffer,
Endianness  mode = Endianness::BIG 
)
pure virtual

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

Implemented in Svc::Fpy::DirectiveId, Os::FileSystemStatus, Os::RawTime, Os::TaskStatus, Os::FileStatus, Os::QueueStatus, Svc::VersionCfg::VersionEnum, ComCfg::Apid, Os::DirectoryStatus, Svc::PolyDbCfg::PolyDbEntry, Svc::Fpy::DirectiveErrorCode, Fw::LogSeverity, Fpp::ToCpp::Phases, Svc::EventManager_FilterSeverity, Fw::CmdResponse, Os::FileMode, Drv::I2cStatus, Drv::SpiStatus, Svc::PrmDb_PrmReadError, Fw::MemoryAllocation::MemoryAllocatorType, Os::MutexStatus, Os::RawTimeStatus, Svc::VersionType, Fw::Buffer, Fw::DpCfg::ProcType, Fw::DeserialStatus, Svc::CmdSequencer_FileReadStage, Svc::PrmDb_PrmWriteError, TimeBase, Drv::ByteStreamStatus, Svc::BuffQueueDepth, Svc::ComQueueDepth, Drv::GpioStatus, Fw::DpState, Svc::Ccsds::FrameError, Fw::Direction, Fw::Health, Fw::SerialStatus, Svc::MeasurementStatus, Fw::Completed, Os::DirectoryOpenMode, Fw::ParamValid, Fw::Active, Fw::Enabled, Fw::Logic, Fw::On, Fw::Open, Fw::Success, Fw::Wait, Os::GenericStatus, Os::QueueBlockingType, Svc::DpHdrField, Svc::EventManager_Enabled, Svc::SendFileStatus, Svc::VersionStatus, Svc::VersionEnabled, Fw::TimeComparison, Svc::FprimeRouter_AllocationReason, Svc::Fpy::FlagId, Svc::PrmDb_PrmDbFileLoadState, Svc::PrmDb_PrmLoadAction, Svc::CmdSequencer_BlockState, Svc::CmdSequencer_SeqMode, Svc::QueueType, Svc::FpySequencer_FileReadStage, Svc::FpySequencer_GoalState, Svc::PrmDb_PrmDbType, Svc::SeqDispatcher_CmdSequencerState, Fw::TlmValid, Svc::BufferAccumulator_BlockMode, Svc::BufferAccumulator_OpState, Svc::BufferLogger_LogState, Svc::FpySequencer_BlockState, Svc::PrmDb_Merge, Svc::SystemResourceEnabled, Svc::Fpy::Sequence, Svc::FpySequencer_ConstCmdDirective, Svc::FpySequencer_PushValDirective, Svc::DpRecord, Svc::Fpy::Header, Fw::PolyType, ComCfg::FrameContext, Fw::TimeValue, Svc::Ccsds::TMHeader, Svc::Ccsds::SpacePacketHeader, Svc::Ccsds::TCHeader, Svc::Fpy::Statement, Svc::CustomVersionDb, Svc::FprimeProtocol::FrameHeader, Svc::ComDataContextPair, Svc::FpySequencer_GetFieldDirective, Svc::FpySequencer_LoadRelDirective, Svc::FpySequencer_StoreRelConstOffsetDirective, Svc::SendFileResponse, Svc::FpySequencer_BreakpointArgs, Svc::FpySequencer_LoadAbsDirective, Svc::FpySequencer_ReturnDirective, Svc::FpySequencer_StoreAbsConstOffsetDirective, Fw::TimeIntervalValue, Svc::FpySequencer_SequenceExecutionArgs, Svc::Ccsds::TCTrailer, Svc::Ccsds::TMTrailer, Svc::FprimeProtocol::FrameTrailer, Svc::FpySequencer_PushTlmValAndTimeDirective, Os::RawTimeInterface, Svc::Fpy::Footer, Svc::FpySequencer_AllocateDirective, Svc::FpySequencer_DiscardDirective, Svc::FpySequencer_MemCmpDirective, Svc::FpySequencer_PushPrmDirective, Svc::FpySequencer_PushTlmValDirective, Svc::FpySequencer_StackCmdDirective, Svc::FpySequencer_StackOpDirective, Svc::FpySequencer_StoreAbsDirective, Svc::FpySequencer_StoreRelDirective, Svc::FpySequencer_CallDirective, Svc::FpySequencer_ExitDirective, Svc::FpySequencer_GetFlagDirective, Svc::FpySequencer_GotoDirective, Svc::FpySequencer_IfDirective, Svc::FpySequencer_NoOpDirective, Svc::FpySequencer_PeekDirective, Svc::FpySequencer_PushTimeDirective, Svc::FpySequencer_SetFlagDirective, Svc::FpySequencer_WaitAbsDirective, Svc::FpySequencer_WaitRelDirective, Os::Posix::RawTime::PosixRawTime, Os::Stub::RawTime::StubRawTime, Fw::ConstStringBase, Fw::Time, Fw::StringBase, Fw::TimeInterval, Fw::TlmPacket, Fw::LogPacket, and Fw::CmdPacket.

◆ operator=()

Serializable& Fw::Serializable::operator= ( const Serializable src)
default

TODO: this operator should be deleted, this must be done after RawTime is modified though.

◆ serializeTo()

virtual SerializeStatus Fw::Serializable::serializeTo ( SerialBufferBase buffer,
Endianness  mode = Endianness::BIG 
) const
pure virtual

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

Implemented in Svc::Fpy::DirectiveId, Os::FileSystemStatus, Os::TaskStatus, Os::FileStatus, Os::QueueStatus, Svc::VersionCfg::VersionEnum, ComCfg::Apid, Os::DirectoryStatus, Svc::PolyDbCfg::PolyDbEntry, Os::RawTime, Svc::Fpy::DirectiveErrorCode, Fw::LogSeverity, Fpp::ToCpp::Phases, Svc::EventManager_FilterSeverity, Fw::CmdResponse, Os::FileMode, Drv::I2cStatus, Drv::SpiStatus, Svc::PrmDb_PrmReadError, Fw::MemoryAllocation::MemoryAllocatorType, Os::MutexStatus, Os::RawTimeStatus, Svc::VersionType, Fw::DpCfg::ProcType, Fw::DeserialStatus, Svc::CmdSequencer_FileReadStage, Svc::PrmDb_PrmWriteError, TimeBase, Drv::ByteStreamStatus, Svc::BuffQueueDepth, Svc::ComQueueDepth, Drv::GpioStatus, Fw::DpState, Svc::Ccsds::FrameError, Fw::Direction, Fw::Health, Fw::SerialStatus, Svc::MeasurementStatus, Fw::Completed, Os::DirectoryOpenMode, Fw::Buffer, Fw::ParamValid, Fw::Active, Fw::Enabled, Fw::Logic, Fw::On, Fw::Open, Fw::Success, Fw::Wait, Os::GenericStatus, Os::QueueBlockingType, Svc::DpHdrField, Svc::EventManager_Enabled, Svc::SendFileStatus, Svc::VersionStatus, Svc::VersionEnabled, Fw::TimeComparison, Svc::FprimeRouter_AllocationReason, Svc::Fpy::FlagId, Svc::PrmDb_PrmDbFileLoadState, Svc::PrmDb_PrmLoadAction, Svc::CmdSequencer_BlockState, Svc::CmdSequencer_SeqMode, Svc::QueueType, Svc::FpySequencer_FileReadStage, Svc::FpySequencer_GoalState, Svc::PrmDb_PrmDbType, Svc::SeqDispatcher_CmdSequencerState, Fw::TlmValid, Svc::BufferAccumulator_BlockMode, Svc::BufferAccumulator_OpState, Svc::BufferLogger_LogState, Svc::FpySequencer_BlockState, Svc::PrmDb_Merge, Svc::SystemResourceEnabled, Svc::Fpy::Sequence, Svc::FpySequencer_ConstCmdDirective, Svc::FpySequencer_PushValDirective, Fw::PolyType, Svc::DpRecord, Svc::Fpy::Header, ComCfg::FrameContext, Fw::TimeValue, Svc::Ccsds::TMHeader, Svc::Ccsds::SpacePacketHeader, Svc::Ccsds::TCHeader, Svc::Fpy::Statement, Svc::CustomVersionDb, Svc::FprimeProtocol::FrameHeader, Svc::ComDataContextPair, Svc::FpySequencer_GetFieldDirective, Svc::FpySequencer_LoadRelDirective, Svc::FpySequencer_StoreRelConstOffsetDirective, Svc::SendFileResponse, Svc::FpySequencer_BreakpointArgs, Svc::FpySequencer_LoadAbsDirective, Svc::FpySequencer_ReturnDirective, Svc::FpySequencer_StoreAbsConstOffsetDirective, Fw::TimeIntervalValue, Svc::FpySequencer_SequenceExecutionArgs, Svc::Ccsds::TCTrailer, Svc::Ccsds::TMTrailer, Svc::FprimeProtocol::FrameTrailer, Svc::FpySequencer_PushTlmValAndTimeDirective, Svc::Fpy::Footer, Svc::FpySequencer_AllocateDirective, Svc::FpySequencer_DiscardDirective, Svc::FpySequencer_MemCmpDirective, Svc::FpySequencer_PushPrmDirective, Svc::FpySequencer_PushTlmValDirective, Svc::FpySequencer_StackCmdDirective, Svc::FpySequencer_StackOpDirective, Svc::FpySequencer_StoreAbsDirective, Svc::FpySequencer_StoreRelDirective, Svc::FpySequencer_CallDirective, Svc::FpySequencer_ExitDirective, Svc::FpySequencer_GetFlagDirective, Svc::FpySequencer_GotoDirective, Svc::FpySequencer_IfDirective, Svc::FpySequencer_NoOpDirective, Svc::FpySequencer_PeekDirective, Svc::FpySequencer_PushTimeDirective, Svc::FpySequencer_SetFlagDirective, Svc::FpySequencer_WaitAbsDirective, Svc::FpySequencer_WaitRelDirective, Os::RawTimeInterface, Os::Posix::RawTime::PosixRawTime, Fw::ConstStringBase, Os::Stub::RawTime::StubRawTime, Fw::Time, Fw::TimeInterval, Fw::AmpcsEvrLogPacket, Fw::TlmPacket, Fw::CmdPacket, and Fw::LogPacket.


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