mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 04:35:25 -06:00
* NATIVE_INT_TYPE use in toString * NATIVE_INT_TYPE use in SimpleObjRegistry * NATIVE_INT_TYPE use in Asserts * NATIVE_INT_TYPE use in Fw/Comp * NATIVE_INT_TYPE use in getCapacity * NATIVE_INT_TYPE use in getEntries * NATIVE_INT_TYPE use in size/length * NATIVE_INT_TYPE use in FILE_NAME_ARG * NATIVE_INT_TYPE use in Fw (misc) * NATIVE_INT_TYPE use in identifier * NATIVE_INT_TYPE use in Fw (misc II) * POINTER_CAST in Buffer * POINTER_CAST in Serializable * sp * Removing no longer used DefaultTypes.hpp * Fixes to accomidate Fw refactor * Unit-test and CI fixes * Fixing review comments - pt 1
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#include <Fw/Prm/PrmBuffer.hpp>
|
|
#include <Fw/Types/Assert.hpp>
|
|
|
|
namespace Fw {
|
|
|
|
ParamBuffer::ParamBuffer(const U8 *args, FwSizeType size) {
|
|
SerializeStatus stat = SerializeBufferBase::setBuff(args,size);
|
|
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<FwAssertArgType>(stat));
|
|
}
|
|
|
|
ParamBuffer::ParamBuffer() {
|
|
}
|
|
|
|
ParamBuffer::~ParamBuffer() {
|
|
}
|
|
|
|
ParamBuffer::ParamBuffer(const ParamBuffer& other) : Fw::SerializeBufferBase() {
|
|
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
|
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<FwAssertArgType>(stat));
|
|
}
|
|
|
|
ParamBuffer& ParamBuffer::operator=(const ParamBuffer& other) {
|
|
if(this == &other) {
|
|
return *this;
|
|
}
|
|
|
|
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
|
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<FwAssertArgType>(stat));
|
|
return *this;
|
|
}
|
|
|
|
FwSizeType ParamBuffer::getBuffCapacity() const {
|
|
return sizeof(this->m_bufferData);
|
|
}
|
|
|
|
const U8* ParamBuffer::getBuffAddr() const {
|
|
return this->m_bufferData;
|
|
}
|
|
|
|
U8* ParamBuffer::getBuffAddr() {
|
|
return this->m_bufferData;
|
|
}
|
|
|
|
}
|
|
|