mirror of
https://github.com/nasa/fpp.git
synced 2025-12-12 15:31:41 -06:00
226 lines
5.5 KiB
C++
Vendored
226 lines
5.5 KiB
C++
Vendored
// ======================================================================
|
|
// \title StructWithAliasSerializableAc.hpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief hpp file for StructWithAlias struct
|
|
// ======================================================================
|
|
|
|
#ifndef StructWithAliasSerializableAc_HPP
|
|
#define StructWithAliasSerializableAc_HPP
|
|
|
|
#include "AliasAliasArrayAliasAc.hpp"
|
|
#include "AliasArrayAliasAc.hpp"
|
|
#include "AliasArrayAliasArrayAliasAc.hpp"
|
|
#include "AliasPrim1AliasAc.hpp"
|
|
#include "AliasStringAliasAc.hpp"
|
|
#include "Fw/FPrimeBasicTypes.hpp"
|
|
#include "Fw/Types/ExternalString.hpp"
|
|
#include "Fw/Types/Serializable.hpp"
|
|
#include "Fw/Types/String.hpp"
|
|
|
|
class StructWithAlias :
|
|
public Fw::Serializable
|
|
{
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constants
|
|
// ----------------------------------------------------------------------
|
|
|
|
enum {
|
|
//! The size of the serial representation
|
|
SERIALIZED_SIZE =
|
|
sizeof(AliasPrim1) +
|
|
Fw::StringBase::STATIC_SERIALIZED_SIZE(32) +
|
|
AliasArray::SERIALIZED_SIZE +
|
|
AliasAliasArray::SERIALIZED_SIZE +
|
|
AliasArrayAliasArray::SERIALIZED_SIZE
|
|
};
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constructors
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Constructor (default value)
|
|
StructWithAlias();
|
|
|
|
//! Member constructor
|
|
StructWithAlias(
|
|
AliasPrim1 x,
|
|
const Fw::StringBase& y,
|
|
const AliasArray& z,
|
|
const AliasAliasArray& w,
|
|
const AliasArrayAliasArray& q
|
|
);
|
|
|
|
//! Copy constructor
|
|
StructWithAlias(
|
|
const StructWithAlias& obj //!< The source object
|
|
);
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Operators
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Copy assignment operator
|
|
StructWithAlias& operator=(
|
|
const StructWithAlias& obj //!< The source object
|
|
);
|
|
|
|
//! Equality operator
|
|
bool operator==(
|
|
const StructWithAlias& obj //!< The other object
|
|
) const;
|
|
|
|
//! Inequality operator
|
|
bool operator!=(
|
|
const StructWithAlias& obj //!< The other object
|
|
) const;
|
|
|
|
#ifdef BUILD_UT
|
|
|
|
//! Ostream operator
|
|
friend std::ostream& operator<<(
|
|
std::ostream& os, //!< The ostream
|
|
const StructWithAlias& obj //!< The object
|
|
);
|
|
|
|
#endif
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Serialization
|
|
Fw::SerializeStatus serializeTo(
|
|
Fw::SerializeBufferBase& buffer, //!< The serial buffer
|
|
Fw::Serialization::Endianness mode = Fw::Serialization::BIG //!< Endianness of serialized buffer
|
|
) const;
|
|
|
|
//! Deserialization
|
|
Fw::SerializeStatus deserializeFrom(
|
|
Fw::SerializeBufferBase& buffer, //!< The serial buffer
|
|
Fw::Serialization::Endianness mode = Fw::Serialization::BIG //!< Endianness of serialized buffer
|
|
);
|
|
|
|
//! Get the dynamic serialized size of the struct
|
|
FwSizeType serializedSize() const;
|
|
|
|
#if FW_SERIALIZABLE_TO_STRING
|
|
|
|
//! Convert struct to string
|
|
void toString(
|
|
Fw::StringBase& sb //!< The StringBase object to hold the result
|
|
) const;
|
|
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Get member x
|
|
AliasPrim1 get_x() const
|
|
{
|
|
return this->m_x;
|
|
}
|
|
|
|
//! Get member y
|
|
Fw::ExternalString& get_y()
|
|
{
|
|
return this->m_y;
|
|
}
|
|
|
|
//! Get member y (const)
|
|
const Fw::ExternalString& get_y() const
|
|
{
|
|
return this->m_y;
|
|
}
|
|
|
|
//! Get member z
|
|
AliasArray& get_z()
|
|
{
|
|
return this->m_z;
|
|
}
|
|
|
|
//! Get member z (const)
|
|
const AliasArray& get_z() const
|
|
{
|
|
return this->m_z;
|
|
}
|
|
|
|
//! Get member w
|
|
AliasAliasArray& get_w()
|
|
{
|
|
return this->m_w;
|
|
}
|
|
|
|
//! Get member w (const)
|
|
const AliasAliasArray& get_w() const
|
|
{
|
|
return this->m_w;
|
|
}
|
|
|
|
//! Get member q
|
|
AliasArrayAliasArray& get_q()
|
|
{
|
|
return this->m_q;
|
|
}
|
|
|
|
//! Get member q (const)
|
|
const AliasArrayAliasArray& get_q() const
|
|
{
|
|
return this->m_q;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Setter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Set all members
|
|
void set(
|
|
AliasPrim1 x,
|
|
const Fw::StringBase& y,
|
|
const AliasArray& z,
|
|
const AliasAliasArray& w,
|
|
const AliasArrayAliasArray& q
|
|
);
|
|
|
|
//! Set member x
|
|
void set_x(AliasPrim1 x);
|
|
|
|
//! Set member y
|
|
void set_y(const Fw::StringBase& y);
|
|
|
|
//! Set member z
|
|
void set_z(const AliasArray& z);
|
|
|
|
//! Set member w
|
|
void set_w(const AliasAliasArray& w);
|
|
|
|
//! Set member q
|
|
void set_q(const AliasArrayAliasArray& q);
|
|
|
|
protected:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member variables
|
|
// ----------------------------------------------------------------------
|
|
|
|
AliasPrim1 m_x;
|
|
char m___fprime_ac_y_buffer[Fw::StringBase::BUFFER_SIZE(32)];
|
|
Fw::ExternalString m_y;
|
|
AliasArray m_z;
|
|
AliasAliasArray m_w;
|
|
AliasArrayAliasArray m_q;
|
|
|
|
};
|
|
|
|
#endif
|