SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Private Attributes | List of all members
qrtplib::RTPEndian Class Reference

#include <rtpendian.h>

Public Member Functions

 RTPEndian ()
 
template<typename T >
qToHost (const T &x) const
 

Private Attributes

bool m_isLittleEndian
 

Detailed Description

Definition at line 16 of file rtpendian.h.

Constructor & Destructor Documentation

◆ RTPEndian()

qrtplib::RTPEndian::RTPEndian ( )
inline

Definition at line 19 of file rtpendian.h.

References m_isLittleEndian.

20  {
21  uint32_t endianTest32 = 1;
22  uint8_t *ptr = (uint8_t*) &endianTest32;
23  m_isLittleEndian = (*ptr == 1);
24  }
unsigned int uint32_t
Definition: rtptypes_win.h:46
unsigned char uint8_t
Definition: rtptypes_win.h:42

Member Function Documentation

◆ qToHost()

template<typename T >
T qrtplib::RTPEndian::qToHost ( const T &  x) const
inline

Definition at line 27 of file rtpendian.h.

References m_isLittleEndian.

Referenced by qrtplib::RTPPacket::GetCSRC(), qrtplib::RTCPCompoundPacket::ParseData(), and qrtplib::RTPPacket::ParseRawPacket().

28  {
29  return m_isLittleEndian ? qToLittleEndian(x) : qToBigEndian(x);
30  }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_isLittleEndian

bool qrtplib::RTPEndian::m_isLittleEndian
private

Definition at line 33 of file rtpendian.h.

Referenced by qToHost(), and RTPEndian().


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