Vanetza
 
Loading...
Searching...
No Matches
vanetza::geonet::CbfPacket Class Reference

#include <cbf_packet_buffer.hpp>

Public Member Functions

 CbfPacket (PendingPacket< GbcPdu > &&, const MacAddress &sender)
 
 CbfPacket (PendingPacket< GbcPdu, const MacAddress & > &&, const MacAddress &sender)
 
 CbfPacket (CbfPacket &&)=default
 
CbfPacketoperator= (CbfPacket &&)=default
 
const MacAddresssender () const
 
const Addresssource () const
 
SequenceNumber sequence_number () const
 
Clock::duration reduce_lifetime (Clock::duration d)
 
std::size_t length () const
 
PendingPacket< GbcPdupacket () &&
 

Private Attributes

PendingPacket< GbcPdum_packet
 
MacAddress m_sender
 

Detailed Description

CbfPacket enables handling of conventional packets in a CBF packet buffer. It contains a GeoBroadcast PDU and the network layer payload.

Definition at line 33 of file cbf_packet_buffer.hpp.

Constructor & Destructor Documentation

◆ CbfPacket() [1/2]

vanetza::geonet::CbfPacket::CbfPacket ( PendingPacket< GbcPdu > &&  packet,
const MacAddress sender 
)

Definition at line 15 of file cbf_packet_buffer.cpp.

◆ CbfPacket() [2/2]

vanetza::geonet::CbfPacket::CbfPacket ( PendingPacket< GbcPdu, const MacAddress & > &&  packet,
const MacAddress sender 
)

Definition at line 20 of file cbf_packet_buffer.cpp.

Member Function Documentation

◆ length()

std::size_t vanetza::geonet::CbfPacket::length ( ) const

Length of packet data in bytes (PDU including payload)

Returns
size of packet on wire

Definition at line 45 of file cbf_packet_buffer.cpp.

◆ packet()

PendingPacket< GbcPdu > vanetza::geonet::CbfPacket::packet ( ) &&
inline

Definition at line 73 of file cbf_packet_buffer.hpp.

◆ reduce_lifetime()

Clock::duration vanetza::geonet::CbfPacket::reduce_lifetime ( Clock::duration  d)

Reduce lifetime of buffered packet

Parameters
dreduce lifetime by this duration
Returns
remaining lifetime

Definition at line 40 of file cbf_packet_buffer.cpp.

◆ sender()

const MacAddress & vanetza::geonet::CbfPacket::sender ( ) const

Get sender of buffered packet

Returns
sender's link-layer address

Definition at line 25 of file cbf_packet_buffer.cpp.

◆ sequence_number()

SequenceNumber vanetza::geonet::CbfPacket::sequence_number ( ) const

Get sequence number of buffered packet

Returns
sequence number

Definition at line 35 of file cbf_packet_buffer.cpp.

◆ source()

const Address & vanetza::geonet::CbfPacket::source ( ) const

Get source address of buffered packet

Returns
source address

Definition at line 30 of file cbf_packet_buffer.cpp.

Member Data Documentation

◆ m_packet

PendingPacket<GbcPdu> vanetza::geonet::CbfPacket::m_packet
private

Definition at line 76 of file cbf_packet_buffer.hpp.

◆ m_sender

MacAddress vanetza::geonet::CbfPacket::m_sender
private

Definition at line 77 of file cbf_packet_buffer.hpp.


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