31#ifndef DW_FRAMEWORK_CHANNEL_PACKET_HPP_
32#define DW_FRAMEWORK_CHANNEL_PACKET_HPP_
36#include <dw/core/base/Exception.hpp>
66 throw ExceptionWithStatus(DW_NOT_SUPPORTED,
"ChannelPacketBase: serialize: not implemented");
72 throw ExceptionWithStatus(DW_NOT_SUPPORTED,
"ChannelPacketBase: deserialize: not implemented");
93 throw ExceptionWithStatus(DW_BAD_ALLOC,
"ChannelPacketBase: initBuffer: cannot allocate memory");
110 throw ExceptionWithStatus(DW_INTERNAL_ERROR,
"ChannelPacketBase: getGenericData: not set by implementation.");
124 virtual void notImplemented() = 0;
GenericData getGenericData() override
dw::core::Optional< GenericData > m_frame
uint8_t * getBuffer() override
std::unique_ptr< uint8_t[]> m_buffer
void deserialize(size_t) override
ChannelSocketPacketBase(size_t bufferSize)
void initBuffer(size_t bufferSize)
size_t serialize() override
virtual void serializeImpl()
size_t getBufferSize() override
ChannelSocketPacketBase()=default