Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::rtcp::header::PacketHeader Class Reference

RTCP packet header, common for all RTCP packet types. More...

#include <headers.h>

Public Member Functions

void reset (const PacketType t)
 Reset to initial state (all zeros). More...
 
size_t counter () const
 Get number of blocks/chunks following. More...
 
void set_counter (const size_t c)
 Set number of blocks/chunks. More...
 
void inc_counter ()
 Increment packet counter,. More...
 
uint8_t version () const
 Get protocol version. More...
 
void set_version (const Version v)
 Set protocol version. More...
 
bool has_padding () const
 Get padding flag. More...
 
void set_padding (const bool v)
 Set padding flag. More...
 
PacketType type () const
 Get packet type. More...
 
void set_type (const PacketType t)
 Set packet type. More...
 
uint16_t len_words () const
 Get packet length, including the header, in 32-bit words minus one. More...
 
void set_len_words (const uint16_t len)
 Set packet length in words. More...
 
size_t len_bytes () const
 Get packet length, including the header, in bytes. More...
 
void set_len_bytes (const size_t len)
 Set packet length in bytes. More...
 

Detailed Description

RTCP packet header, common for all RTCP packet types.

RFC 3550 6.4.1: "SR: Sender Report RTCP Packet" RFC 3550 6.4.2: "RR: Receiver Report RTCP Packet"

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P| RC | PT | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition at line 126 of file headers.h.

Member Function Documentation

◆ counter()

size_t roc::rtcp::header::PacketHeader::counter ( ) const
inline

Get number of blocks/chunks following.

Definition at line 172 of file headers.h.

◆ has_padding()

bool roc::rtcp::header::PacketHeader::has_padding ( ) const
inline

Get padding flag.

Definition at line 199 of file headers.h.

◆ inc_counter()

void roc::rtcp::header::PacketHeader::inc_counter ( )
inline

Increment packet counter,.

Definition at line 183 of file headers.h.

◆ len_bytes()

size_t roc::rtcp::header::PacketHeader::len_bytes ( ) const
inline

Get packet length, including the header, in bytes.

Definition at line 230 of file headers.h.

◆ len_words()

uint16_t roc::rtcp::header::PacketHeader::len_words ( ) const
inline

Get packet length, including the header, in 32-bit words minus one.

Definition at line 220 of file headers.h.

◆ reset()

void roc::rtcp::header::PacketHeader::reset ( const PacketType  t)
inline

Reset to initial state (all zeros).

Definition at line 162 of file headers.h.

◆ set_counter()

void roc::rtcp::header::PacketHeader::set_counter ( const size_t  c)
inline

Set number of blocks/chunks.

Definition at line 177 of file headers.h.

◆ set_len_bytes()

void roc::rtcp::header::PacketHeader::set_len_bytes ( const size_t  len)
inline

Set packet length in bytes.

Definition at line 235 of file headers.h.

◆ set_len_words()

void roc::rtcp::header::PacketHeader::set_len_words ( const uint16_t  len)
inline

Set packet length in words.

Definition at line 225 of file headers.h.

◆ set_padding()

void roc::rtcp::header::PacketHeader::set_padding ( const bool  v)
inline

Set padding flag.

Definition at line 204 of file headers.h.

◆ set_type()

void roc::rtcp::header::PacketHeader::set_type ( const PacketType  t)
inline

Set packet type.

Definition at line 214 of file headers.h.

◆ set_version()

void roc::rtcp::header::PacketHeader::set_version ( const Version  v)
inline

Set protocol version.

Definition at line 193 of file headers.h.

◆ type()

PacketType roc::rtcp::header::PacketHeader::type ( ) const
inline

Get packet type.

Definition at line 209 of file headers.h.

◆ version()

uint8_t roc::rtcp::header::PacketHeader::version ( ) const
inline

Get protocol version.

Definition at line 188 of file headers.h.


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