mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
* Created new SerialBufferBase as a parent of SerializeBufferBase. Renaming interface functions to be less confusing. * Deprecating copyRawOffset. No direct use-cases in F' core. * Make SerialBufferBase a true pure virtual interface. * Changing Serializable to work with SerialBufferBase parent interface. * Changing copyRaw and copyRawOffset to work with SerialBufferBase * Updating documentation for SerialBufferBase usage * Adding some documentation. Adding missing ASSERT in copyRaw. Fixing some bugs that new ASSERT uncovered. * Renaming SerializeBufferBase to LinearBufferBase. Add a using declaration to maintain backwards compatability. Properly mark LinearBufferBase functions as override. * Filling in the rest of the docstrings for the classes in Serializable * Removing redundant virtual keyword on override function * Applying clang formatting * Incorporating PR comments * Fix compile issues * Bump version to alpha * Format * v --------- Co-authored-by: M Starch <LeStarch@googlemail.com>
38 lines
857 B
C++
38 lines
857 B
C++
/*
|
|
* ComPacket.hpp
|
|
*
|
|
* Created on: May 24, 2014
|
|
* Author: Timothy Canham
|
|
*/
|
|
|
|
#ifndef COMPACKET_HPP_
|
|
#define COMPACKET_HPP_
|
|
|
|
#include <Fw/Types/Serializable.hpp>
|
|
#include "config/ApidEnumAc.hpp"
|
|
|
|
// Packet format:
|
|
// | packet type (width = FwPacketDescriptorType) | packet type-specific data |
|
|
|
|
namespace Fw {
|
|
|
|
// This type is defined in config/ComCfg.fpp
|
|
using ComPacketType = ComCfg::Apid::T;
|
|
|
|
class ComPacket : public Serializable {
|
|
public:
|
|
ComPacket();
|
|
virtual ~ComPacket();
|
|
|
|
protected:
|
|
ComPacketType m_type;
|
|
SerializeStatus serializeBase(
|
|
SerialBufferBase& buffer) const; // called by derived classes to serialize common fields
|
|
SerializeStatus deserializeBase(
|
|
SerialBufferBase& buffer); // called by derived classes to deserialize common fields
|
|
};
|
|
|
|
} /* namespace Fw */
|
|
|
|
#endif /* COMPACKET_HPP_ */
|