| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * ComPacket.cpp | ||
| 3 | * | ||
| 4 | * Created on: May 24, 2014 | ||
| 5 | * Author: Timothy Canham | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include <Fw/Com/ComPacket.hpp> | ||
| 9 | |||
| 10 | namespace Fw { | ||
| 11 | |||
| 12 | 381 | ComPacket::ComPacket() : m_type(ComPacketType::FW_PACKET_UNKNOWN) {} | |
| 13 | |||
| 14 | 762 | ComPacket::~ComPacket() {} | |
| 15 | |||
| 16 | 678 | SerializeStatus ComPacket::serializeBase(SerialBufferBase& buffer) const { | |
| 17 | 678 | return buffer.serializeFrom(static_cast<FwPacketDescriptorType>(this->m_type)); | |
| 18 | } | ||
| 19 | |||
| 20 | 145 | SerializeStatus ComPacket::deserializeBase(SerialBufferBase& buffer) { | |
| 21 | FwPacketDescriptorType serVal; | ||
| 22 |
1/1✓ Branch 1 taken 145 times.
|
145 | SerializeStatus stat = buffer.deserializeTo(serVal); |
| 23 |
1/2✓ Branch 0 taken 145 times.
✗ Branch 1 not taken.
|
145 | if (FW_SERIALIZE_OK == stat) { |
| 24 | 145 | this->m_type = static_cast<ComPacketType>(serVal); | |
| 25 | } | ||
| 26 | 145 | return stat; | |
| 27 | } | ||
| 28 | |||
| 29 | } /* namespace Fw */ | ||
| 30 |