Public Member Functions | Public Attributes | Static Public Attributes
Packet Class Reference

The packet class for network layer packets. More...

#include <Packet.h>

List of all members.

Public Member Functions

bool addFrame (RoutedFrame frame)
bool frameAlreadyExsits (RoutedFrame f)
std::string getPayload ()
unsigned long getSize ()
bool isMcFrame ()
bool isNack ()
 Packet (RoutedFrame frame)
 Packet ()
void refreshLists ()
void refreshMissingFramesList ()
void requestMissingFrames ()
void sortFrameList ()
virtual ~Packet ()

Public Attributes

uint8_t data_type_
std::list< RoutedFrameframes_l_
uint32_t highest_seq
std::string hostname_source_
 hostname of the source
uint32_t id_
 Packet ID.
std::string mc_group_
 name of the mc group
std::list< uint32_t > missed_sequences_l_
 A list with all lost pending frames.
uint32_t size_
 Size of packet in bytes.
std::string topic_
 ROS topic on which to publish.
unsigned long ts_
unsigned long ts_last_frame_request
bool wrong_sequence_

Static Public Attributes

static int NACK_THRESHOLD = 10

Detailed Description

The packet class for network layer packets.

The packet class implements all functions required to build a network layer packet.

Definition at line 18 of file Packet.h.


Constructor & Destructor Documentation

Packet constructor. Constructor initializes basic members.

Parameters:
packet_idThe ID of the packet.
packet_sizeThe size of the packet in bytes.
payload_data_typeDefines which type the payload is
sourceThe host name of the source
topicThe ROS topic name on which to publish

Definition at line 18 of file Packet.cpp.

Definition at line 37 of file Packet.cpp.

Packet::~Packet ( ) [virtual]

Definition at line 33 of file Packet.cpp.


Member Function Documentation

bool Packet::addFrame ( RoutedFrame  frame)

Add the frame to the frame list of the packet, if the frame belongs to the packet. This method is needed to build up the packet on the receiver side. This method also checks if all frames are received and the packet is complete.

Parameters:
frameThe frame that should be added
Returns:
True, if packet is complete and ready to publish. False, in every other case

Definition at line 195 of file Packet.cpp.

Definition at line 60 of file Packet.cpp.

std::string Packet::getPayload ( )

Returns the packet's payload.

Returns:
True if
Todo:
what?, false otherwise.

Definition at line 301 of file Packet.cpp.

unsigned long Packet::getSize ( )

Definition at line 41 of file Packet.cpp.

bool Packet::isMcFrame ( ) [inline]

Definition at line 185 of file Packet.cpp.

bool Packet::isNack ( ) [inline]

Definition at line 190 of file Packet.cpp.

Definition at line 130 of file Packet.cpp.

Definition at line 74 of file Packet.cpp.


Member Data Documentation

Todo:
What is this?

Definition at line 60 of file Packet.h.

Todo:
What is this?

Definition at line 66 of file Packet.h.

Definition at line 58 of file Packet.h.

hostname of the source

Definition at line 63 of file Packet.h.

uint32_t Packet::id_

Packet ID.

Definition at line 57 of file Packet.h.

std::string Packet::mc_group_

name of the mc group

Definition at line 64 of file Packet.h.

std::list<uint32_t> Packet::missed_sequences_l_

A list with all lost pending frames.

Definition at line 67 of file Packet.h.

int Packet::NACK_THRESHOLD = 10 [static]

Definition at line 73 of file Packet.h.

uint32_t Packet::size_

Size of packet in bytes.

Definition at line 59 of file Packet.h.

std::string Packet::topic_

ROS topic on which to publish.

Definition at line 65 of file Packet.h.

unsigned long Packet::ts_

Definition at line 69 of file Packet.h.

Definition at line 70 of file Packet.h.

Definition at line 62 of file Packet.h.


The documentation for this class was generated from the following files:


adhoc_communication
Author(s): Guenter Cwioro , Torsten Andre
autogenerated on Thu Jun 6 2019 20:59:43