mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 13:54:34 -06:00
* lestarch: adding logical types implementation into Linux/StandardTypes.hpp * lestarch: removing VxWorks StandardTypes from repository * updated fprime types for correct compilation with vxworks and baremetal * lestarch: refactoring types and configuration header w.r.t type design * lestarch: replacing usages of AssertArg with FwAssertArgType * lestarch: missspelled configuration * lestarch: minor compilation fixes * lestarch: renaming StandardTypes.hpp -> PlatformTypes.hpp * lestarch: updating PRI tokens * lestarch: replacing BasicTypes.hpp includes with FpConfig.hpp * lestarch: UT and compilation fixes for types refactor * lestarch: sp * lestarch: fixing RPI issues in PassiveConsoleTextLogger * lestarch: converting RPI build to debug * lestarch: removing duplicate config imports * lestarch: fixing documentation * lestarch: fixing up multiple definitions and RPI compilation problems * lestarch: reverting debug build * lestarch: reverting platform types to class-based constants * lestarch: reworking basic types * lestarch: configured types refactor into classes * lestarch: fixing bugs with static constants in classes * lestarch: fixing platform types spelling and documentation * lestarch: adding include guards to types headers Co-authored-by: Kevin F Ortega <kevin.f.ortega@jpl.nasa.gov>
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
#ifndef EXAMPLE_TYPE_HPP
|
|
#define EXAMPLE_TYPE_HPP
|
|
|
|
// A hand-coded serializable
|
|
#include <FpConfig.hpp>
|
|
#include <Fw/Types/Serializable.hpp>
|
|
#include <Autocoders/Python/test/interface1/SomeStruct.hpp>
|
|
#if FW_SERIALIZABLE_TO_STRING
|
|
#include <Fw/Types/StringType.hpp>
|
|
#endif
|
|
|
|
|
|
namespace ANameSpace {
|
|
|
|
class UserSerializer : public Fw::Serializable {
|
|
public:
|
|
|
|
enum {
|
|
SERIALIZED_SIZE = sizeof(SomeUserStruct) + sizeof(I32)
|
|
};
|
|
|
|
UserSerializer(); // Default constructor
|
|
UserSerializer(const SomeUserStruct* src); // copy constructor
|
|
UserSerializer(const SomeUserStruct& src); // copy constructor
|
|
UserSerializer(SomeUserStruct arg); // constructor with arguments
|
|
SomeUserStruct& operator=(const SomeUserStruct& src); // Equal operator
|
|
|
|
void setVal(const SomeUserStruct& arg); // set values
|
|
|
|
void getVal(SomeUserStruct& arg);
|
|
|
|
Fw::SerializeStatus serialize(Fw::SerializeBufferBase& buffer) const;
|
|
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase& buffer);
|
|
#if FW_SERIALIZABLE_TO_STRING
|
|
void toString(Fw::StringBase& text) const; //!< generate text from serializable
|
|
#endif
|
|
protected:
|
|
|
|
private:
|
|
|
|
SomeUserStruct m_struct; // stored value
|
|
|
|
};
|
|
}
|
|
|
|
#endif
|