GCC Code Coverage Report


Directory: lib/fprime-samd/fprime-samd/
File: Drv/Types/ThinBuffer.cpp
Date: 2026-10-20 16:44:20
Exec Total Coverage
Lines: 11 11 100.0%
Functions: 7 7 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // ======================================================================
2 // \title ThinBuffer.cpp
3 // \author tumbar
4 // \brief cpp file for ThinBuffer class
5 // ======================================================================
6
7 #include "fprime-samd/Drv/Types/ThinBuffer.hpp"
8
9 namespace Samd21 {
10 136 ThinBuffer::ThinBuffer() : m_data(nullptr), m_size(0), m_context(0) {}
11
12 61 ThinBuffer::ThinBuffer(const Fw::Buffer& fwBuffer)
13 61 : m_data(fwBuffer.getData()), m_size(fwBuffer.getSize()), m_context(fwBuffer.getContext()) {}
14 44 ThinBuffer::ThinBuffer(U8* data, const U32 size) : m_data(data), m_size(size), m_context(0) {}
15 22 ThinBuffer::ThinBuffer(U8* data, const U32 size, const U32 context) : m_data(data), m_size(size), m_context(context) {}
16
17 107 U8* ThinBuffer ::getData() const {
18 107 return this->m_data;
19 }
20
21 121 U32 ThinBuffer ::getSize() const {
22 121 return this->m_size;
23 }
24
25 69 Fw::Buffer ThinBuffer ::getBuffer() const {
26 69 return Fw::Buffer(this->m_data, this->m_size, this->m_context);
27 }
28 } // namespace Samd21
29