GCC Code Coverage Report


Directory: ./
File: CancelPacket.cpp
Date: 2026-09-03 22:13:00
Exec Total Coverage
Lines: 0 14 0.0%
Functions: 0 4 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
1 // ======================================================================
2 // \title CancelPacket.cpp
3 // \author bocchino
4 // \brief cpp file for FilePacket::CancelPacket
5 //
6 // \copyright
7 // Copyright 2009-2016, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12
13 #include <Fw/FilePacket/FilePacket.hpp>
14 #include <Fw/Types/Assert.hpp>
15
16 namespace Fw {
17
18 void FilePacket::CancelPacket ::initialize(const U32 sequenceIndex) {
19 this->m_header.initialize(FilePacket::T_CANCEL, sequenceIndex);
20 }
21
22 U32 FilePacket::CancelPacket ::bufferSize() const {
23 return this->m_header.bufferSize();
24 }
25
26 SerializeStatus FilePacket::CancelPacket ::toBuffer(Buffer& buffer) const {
27 SerialBuffer serialBuffer(buffer.getData(), buffer.getSize());
28 return this->m_header.toSerialBuffer(serialBuffer);
29 }
30
31 SerializeStatus FilePacket::CancelPacket ::fromSerialBuffer(SerialBuffer& serialBuffer) {
32 FW_ASSERT(this->m_header.m_type == T_CANCEL);
33
34 if (serialBuffer.getDeserializeSizeLeft() != 0) {
35 return FW_DESERIALIZE_SIZE_MISMATCH;
36 }
37
38 return FW_SERIALIZE_OK;
39 }
40
41 } // namespace Fw
42