Class Packet

Class Documentation

class core::networking::Packet

Public Functions

Packet(std::shared_ptr<PacketDefinition> definition)
~Packet()
void CopyData(std::vector<uint8_t> &data, unsigned int offset = 0)
void CopyData(boost::asio::streambuf &buffer)
std::vector<uint8_t> GetData()
unsigned int GetSize()
uint8_t GetHeader()
const std::string &GetName() const
void *GetField(std::string name)
template<typename T>
T GetField(std::string name)
std::string GetString(std::string name)
std::shared_ptr<Packet> GetRepeatedSubField(std::string name, unsigned int index)
std::shared_ptr<Packet> GetSubField(std::string name)
void SetRepeatedField(std::string name, unsigned int index, uint8_t *value, unsigned int length)
void SetField(std::string name, uint8_t *value, unsigned int length)
void SetString(std::string name, const char *value, unsigned int length)
void SetString(std::string name, std::string value)
template<typename T>
void SetField(std::string name, T value)
template<typename T>
void SetRepeatedField(std::string name, unsigned int index, T value)
void SetDynamicString(const std::string &str)
std::string GetDynamicString()
void SetDynamicData(std::vector<uint8_t> data)
bool IsReply()
bool IsRequest()
bool IsDynamicSized()
bool HasSequence()
uint64_t GetReferenceId()