// ====================================================================== // \title S3SerializableAc.hpp // \author Generated by fpp-to-cpp // \brief hpp file for S3 struct // ====================================================================== #ifndef S_S3SerializableAc_HPP #define S_S3SerializableAc_HPP #include "Fw/FPrimeBasicTypes.hpp" #include "Fw/Types/ExternalString.hpp" #include "Fw/Types/Serializable.hpp" #include "Fw/Types/String.hpp" namespace S { //! A struct with a member array class S3 : public Fw::Serializable { public: // ---------------------------------------------------------------------- // Types // ---------------------------------------------------------------------- //! The type of mU32Array using Type_of_mU32Array = U32[3]; public: // ---------------------------------------------------------------------- // Constants // ---------------------------------------------------------------------- enum { //! The size of the serial representation SERIALIZED_SIZE = sizeof(U32) * 3 + sizeof(F64) }; public: // ---------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------- //! Constructor (default value) S3(); //! Member constructor S3( const Type_of_mU32Array& mU32Array, F64 mF64 ); //! Copy constructor S3( const S3& obj //!< The source object ); //! Member constructor (scalar values for arrays) S3( U32 mU32Array, F64 mF64 ); public: // ---------------------------------------------------------------------- // Operators // ---------------------------------------------------------------------- //! Copy assignment operator S3& operator=( const S3& obj //!< The source object ); //! Equality operator bool operator==( const S3& obj //!< The other object ) const; //! Inequality operator bool operator!=( const S3& obj //!< The other object ) const; #ifdef BUILD_UT //! Ostream operator friend std::ostream& operator<<( std::ostream& os, //!< The ostream const S3& obj //!< The object ); #endif public: // ---------------------------------------------------------------------- // Member functions // ---------------------------------------------------------------------- //! Serialization Fw::SerializeStatus serializeTo( Fw::LinearBufferBase& buffer, //!< The serial buffer Fw::Endianness mode = Fw::Endianness::BIG //!< Endianness of serialized buffer ) const; //! Deserialization Fw::SerializeStatus deserializeFrom( Fw::LinearBufferBase& buffer, //!< The serial buffer Fw::Endianness mode = Fw::Endianness::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 mU32Array Type_of_mU32Array& get_mU32Array() { return this->m_mU32Array; } //! Get member mU32Array (const) const Type_of_mU32Array& get_mU32Array() const { return this->m_mU32Array; } //! Get member mF64 F64 get_mF64() const { return this->m_mF64; } // ---------------------------------------------------------------------- // Setter functions // ---------------------------------------------------------------------- //! Set all members void set( const Type_of_mU32Array& mU32Array, F64 mF64 ); //! Set member mU32Array void set_mU32Array(const Type_of_mU32Array& mU32Array); //! Set member mF64 void set_mF64(F64 mF64); protected: // ---------------------------------------------------------------------- // Member variables // ---------------------------------------------------------------------- U32 m_mU32Array[3]; F64 m_mF64; }; } #endif