Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::rtcp::Traverser::Iterator Class Reference

Packet iterator. More...

#include <traverser.h>

Public Types

enum  State {
  BEGIN , SR , RR , XR ,
  SDES , BYE , END
}
 Iterator state. More...
 

Public Member Functions

State next ()
 Advance iterator. More...
 
bool error () const
 Check if there were any parsing errors. More...
 
const header::SenderReportPacketget_sr () const
 Get SR packet. More...
 
const header::ReceiverReportPacketget_rr () const
 Get RR packet. More...
 
XrTraverser get_xr () const
 Get traverser for XR packet. More...
 
SdesTraverser get_sdes ()
 Get traverser for SDES packet. More...
 
ByeTraverser get_bye ()
 Get traverser for BYE packet. More...
 

Friends

class Traverser
 

Detailed Description

Packet iterator.

Definition at line 27 of file traverser.h.

Member Enumeration Documentation

◆ State

Iterator state.

Enumerator
BEGIN 

Iterator created.

SR 

SR packet.

RR 

RR packet.

XR 

XR packet.

SDES 

SDES packet.

BYE 

BYE packet.

END 

Parsed whole compound packet.

Definition at line 30 of file traverser.h.

Member Function Documentation

◆ error()

bool roc::rtcp::Traverser::Iterator::error ( ) const

Check if there were any parsing errors.

◆ get_bye()

ByeTraverser roc::rtcp::Traverser::Iterator::get_bye ( )

Get traverser for BYE packet.

Precondition
Can be used if next() returned BYE.

◆ get_rr()

const header::ReceiverReportPacket& roc::rtcp::Traverser::Iterator::get_rr ( ) const

Get RR packet.

Precondition
Can be used if next() returned RR.

◆ get_sdes()

SdesTraverser roc::rtcp::Traverser::Iterator::get_sdes ( )

Get traverser for SDES packet.

Precondition
Can be used if next() returned SDES.

◆ get_sr()

const header::SenderReportPacket& roc::rtcp::Traverser::Iterator::get_sr ( ) const

Get SR packet.

Precondition
Can be used if next() returned SR.

◆ get_xr()

XrTraverser roc::rtcp::Traverser::Iterator::get_xr ( ) const

Get traverser for XR packet.

Precondition
Can be used if next() returned XR.

◆ next()

State roc::rtcp::Traverser::Iterator::next ( )

Advance iterator.


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