31#ifndef DW_FRAMEWORK_CHANNEL_PACKET_HPP_
32#define DW_FRAMEWORK_CHANNEL_PACKET_HPP_
36#include <dwshared/dwfoundation/dw/core/base/ExceptionWithStatus.hpp>
37#include <dwshared/dwfoundation/dw/core/safety/Safety.hpp>
69 throw ExceptionWithStatus(DW_NOT_SUPPORTED,
"ChannelPacketBase: serialize: not implemented");
75 throw ExceptionWithStatus(DW_NOT_SUPPORTED,
"ChannelPacketBase: deserialize: not implemented");
97 throw ExceptionWithStatus(DW_BAD_ALLOC,
"ChannelPacketBase: initBuffer: cannot allocate memory");
116 throw ExceptionWithStatus(DW_INTERNAL_ERROR,
"ChannelPacketBase: getGenericData: not set by implementation.");
131 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