Class for the serialization-deserialization of the messagess to send in packets. More...
#include "serializationwrapper.h"
Inheritance diagram for ns3::SerializationWrapper:
Collaboration diagram for ns3::SerializationWrapper:Public Member Functions | |
| SerializationWrapper () | |
| Default constructor. More... | |
| SerializationWrapper (protomessage::ProtoPacket message) | |
| Constructor with argument. More... | |
| virtual | ~SerializationWrapper () |
| virtual uint32_t | Deserialize (Buffer::Iterator start) |
| deserialize the data More... | |
| void | GetData (protomessage::ProtoPacket *message) |
| Getter of the data in the protocol header. More... | |
| virtual TypeId | GetInstanceTypeId (void) const |
| virtual uint32_t | GetSerializedSize (void) const |
| compute the serialized size of the data More... | |
| virtual void | Print (std::ostream &os) const |
| dummy printing of the serialized data More... | |
| virtual void | Serialize (Buffer::Iterator start) const |
| serialize the data More... | |
| void | SetData (protomessage::ProtoPacket message) |
| Setter of the data in the protocol header. More... | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Register this type. More... | |
Public Attributes | |
| uint8_t * | m_data |
| the serialized data More... | |
| int | m_dataSize = 0 |
| holds the size of the serialized data in bytes More... | |
Class for the serialization-deserialization of the messagess to send in packets.
Definition at line 54 of file serializationwrapper.h.
| ns3::SerializationWrapper::SerializationWrapper | ( | ) |
Default constructor.
Definition at line 47 of file serializationwrapper.cc.
|
virtual |
Definition at line 51 of file serializationwrapper.cc.
| ns3::SerializationWrapper::SerializationWrapper | ( | protomessage::ProtoPacket | message | ) |
Constructor with argument.
| [in] | message | the protobuff object containing the data to transmit |
Definition at line 85 of file serializationwrapper.cc.
References SetData().
Here is the call graph for this function:
|
virtual |
deserialize the data
| [in,out] | start | an iterator which points to where the data should read from. |
Definition at line 110 of file serializationwrapper.cc.
References m_data, and m_dataSize.
| void ns3::SerializationWrapper::GetData | ( | protomessage::ProtoPacket * | message | ) |
Getter of the data in the protocol header.
| [in,out] | message | pointer to the protobuff object for storing data |
Definition at line 78 of file serializationwrapper.cc.
References m_data, and m_dataSize.
Referenced by ns3::SensorNode::ReceivePacket(), and ns3::Sink::ReceivePacket().
Here is the caller graph for this function:
|
virtual |
Definition at line 42 of file serializationwrapper.cc.
References GetTypeId().
Here is the call graph for this function:
|
virtual |
compute the serialized size of the data
Definition at line 91 of file serializationwrapper.cc.
References m_dataSize.
|
static |
Register this type.
Definition at line 31 of file serializationwrapper.cc.
Referenced by GetInstanceTypeId().
Here is the caller graph for this function:
|
virtual |
dummy printing of the serialized data
Definition at line 129 of file serializationwrapper.cc.
|
virtual |
serialize the data
| [in,out] | start | an iterator which points to where the data should be written. |
Definition at line 102 of file serializationwrapper.cc.
References m_data, and m_dataSize.
| void ns3::SerializationWrapper::SetData | ( | protomessage::ProtoPacket | message | ) |
Setter of the data in the protocol header.
| [in] | message | the protobuff object containing the data to transmit |
Definition at line 58 of file serializationwrapper.cc.
References protomessage::ProtoPacket::ByteSizeLong(), m_data, and m_dataSize.
Referenced by ns3::SensorNode::ReceivePacket(), and SerializationWrapper().
Here is the call graph for this function:
Here is the caller graph for this function:| uint8_t* ns3::SerializationWrapper::m_data |
the serialized data
Definition at line 142 of file serializationwrapper.h.
Referenced by Deserialize(), GetData(), Serialize(), and SetData().
| int ns3::SerializationWrapper::m_dataSize = 0 |
holds the size of the serialized data in bytes
Definition at line 140 of file serializationwrapper.h.
Referenced by Deserialize(), GetData(), GetSerializedSize(), Serialize(), and SetData().