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 (Version v)
 Set protocol version. More...
 
bool has_padding () const
 Get padding flag. More...
 
void set_padding (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 ln)
 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 ln)
 Set packet length in bytes. More...
 

Detailed Description

RTCP packet header, common for all RTCP packet types.

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=SR=200 | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition at line 150 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 199 of file headers.h.

◆ has_padding()

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

Get padding flag.

Definition at line 226 of file headers.h.

◆ inc_counter()

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

Increment packet counter,.

Definition at line 210 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 257 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 247 of file headers.h.

◆ reset()

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

Reset to initial state (all zeros).

Definition at line 189 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 204 of file headers.h.

◆ set_len_bytes()

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

Set packet length in bytes.

Definition at line 262 of file headers.h.

◆ set_len_words()

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

Set packet length in words.

Definition at line 252 of file headers.h.

◆ set_padding()

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

Set padding flag.

Definition at line 231 of file headers.h.

◆ set_type()

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

Set packet type.

Definition at line 241 of file headers.h.

◆ set_version()

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

Set protocol version.

Definition at line 220 of file headers.h.

◆ type()

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

Get packet type.

Definition at line 236 of file headers.h.

◆ version()

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

Get protocol version.

Definition at line 215 of file headers.h.


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