GCC Code Coverage Report


Directory: Fw/Types/
File: SerialBuffer.cpp
Date: 2026-09-23 21:11:53
Exec Total Coverage
Lines: 0 11 0.0%
Functions: 0 5 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // ======================================================================
2 // \title SerialBuffer.cpp
3 // \author bocchino
4 // \brief cpp file for SerialBuffer type
5 //
6 // \copyright
7 // Copyright (C) 2016 California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12
13 #include "Fw/Types/SerialBuffer.hpp"
14 #include "Fw/Types/Assert.hpp"
15
16 namespace Fw {
17
18 ✗ SerialBuffer ::SerialBuffer(U8* const data, const FwSizeType capacity) : LinearBufferBase(data, capacity) {}
19
20 ✗ FwSizeType SerialBuffer ::getBuffCapacity() const {
21 ✗ return this->getCapacity();
22 }
23
24 ✗ void SerialBuffer ::fill() {
25 ✗ const SerializeStatus status = this->setBuffLen(this->getCapacity());
26 ✗ FW_ASSERT(status == FW_SERIALIZE_OK);
27 ✗ }
28
29 ✗ SerializeStatus SerialBuffer ::pushBytes(const U8* const addr, const FwSizeType n) {
30 ✗ return this->serializeFrom(const_cast<U8*>(addr), n, Fw::Serialization::OMIT_LENGTH);
31 }
32
33 ✗ SerializeStatus SerialBuffer ::popBytes(U8* const addr, FwSizeType n) {
34 ✗ return this->deserializeTo(addr, n, Fw::Serialization::OMIT_LENGTH);
35 }
36
37 } // namespace Fw
38