| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include <Drv/Ports/DataTypes/DataBuffer.hpp> | ||
| 2 | #include <Fw/Types/Assert.hpp> | ||
| 3 | |||
| 4 | namespace Drv { | ||
| 5 | |||
| 6 | ✗ | DataBuffer::DataBuffer(const U8* args, FwSizeType size) : Fw::LinearBufferBase(m_data, sizeof(m_data)) { | |
| 7 | ✗ | Fw::SerializeStatus stat = Fw::LinearBufferBase::setBuff(args, size); | |
| 8 | ✗ | FW_ASSERT(Fw::FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat)); | |
| 9 | ✗ | } | |
| 10 | |||
| 11 | ✗ | DataBuffer::DataBuffer() : Fw::LinearBufferBase(m_data, sizeof(m_data)) {} | |
| 12 | |||
| 13 | ✗ | DataBuffer::~DataBuffer() {} | |
| 14 | |||
| 15 | // m_data contents are copied via setBuff below | ||
| 16 | // cppcheck-suppress missingMemberCopy | ||
| 17 | ✗ | DataBuffer::DataBuffer(const DataBuffer& other) : Fw::LinearBufferBase(m_data, sizeof(m_data)) { | |
| 18 | ✗ | Fw::SerializeStatus stat = Fw::LinearBufferBase::setBuff(other.m_data, other.getSize()); | |
| 19 | ✗ | FW_ASSERT(Fw::FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat)); | |
| 20 | ✗ | } | |
| 21 | |||
| 22 | ✗ | DataBuffer& DataBuffer::operator=(const DataBuffer& other) { | |
| 23 | ✗ | if (this == &other) { | |
| 24 | ✗ | return *this; | |
| 25 | } | ||
| 26 | |||
| 27 | ✗ | Fw::SerializeStatus stat = Fw::LinearBufferBase::setBuff(other.m_data, other.getSize()); | |
| 28 | ✗ | FW_ASSERT(Fw::FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat)); | |
| 29 | ✗ | return *this; | |
| 30 | } | ||
| 31 | |||
| 32 | ✗ | FwSizeType DataBuffer::getBuffCapacity() const { | |
| 33 | ✗ | return this->getCapacity(); | |
| 34 | } | ||
| 35 | |||
| 36 | } // namespace Drv | ||
| 37 |