JackTrip: DefaultHeader Class Reference

JackTrip

Public Member Functions | List of all members
DefaultHeader Class Reference

Default Header. More...

`#include <PacketHeader.h>`

Inheritance diagram for DefaultHeader:
[legend]
Collaboration diagram for DefaultHeader:
[legend]

## Public Member Functions
| DefaultHeader (JackTrip *jacktrip)
virtual | ~DefaultHeader ()
virtual void | fillHeaderCommonFromAudio ()
virtual void | parseHeader ()
| Parse the packet header and take appropriate measures (like change settings, or quit the program if peer settings don't match) More...
virtual void | checkPeerSettings (int8_t *full_packet)
virtual void | increaseSequenceNumber ()
| Increase sequence number for counter, a 16bit number. More...
virtual uint16_t | getSequenceNumber () const
| Returns the current sequence number. More...
virtual int | getHeaderSizeInBytes () const
| Get the header size in bytes. More...
virtual void | putHeaderInPacket (int8_t *full_packet)
| Put the header in buffer pointed by full_packet. More...
void | printHeader () const
uint8_t | getConnectionMode () const
uint8_t | getNumChannels () const
virtual uint64_t | getPeerTimeStamp (int8_t *full_packet) const
virtual uint16_t | getPeerSequenceNumber (int8_t *full_packet) const
virtual uint16_t | getPeerBufferSize (int8_t *full_packet) const
virtual uint8_t | getPeerSamplingRate (int8_t *full_packet) const
virtual uint8_t | getPeerBitResolution (int8_t *full_packet) const
virtual uint8_t | getPeerNumChannels (int8_t *full_packet) const
virtual uint8_t | getPeerConnectionMode (int8_t *full_packet) const
Public Member Functions inherited from PacketHeader
| PacketHeader (JackTrip *jacktrip)
| The class Constructor. More...
virtual | ~PacketHeader ()
| The class Destructor. More...
virtual void | putHeaderInPacketBaseClass (int8_t *full_packet, const HeaderStruct &header_struct)

## Additional Inherited Members
Signals inherited from PacketHeader
void | signalError (const char *error_message)
Static Public Member Functions inherited from PacketHeader
static uint64_t | usecTime ()
| Return a time stamp in microseconds. More...

## Detailed Description

Default Header.

## Constructor & Destructor Documentation

## ◆ DefaultHeader()

DefaultHeader::DefaultHeader | ( | JackTrip * | jacktrip | ) |

## ◆ ~DefaultHeader()

virtual DefaultHeader::~DefaultHeader | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ checkPeerSettings()

void DefaultHeader::checkPeerSettings | ( | int8_t * | full_packet | ) |
| virtual

Todo:
  Check number of channels and other parameters

Implements PacketHeader.

## ◆ fillHeaderCommonFromAudio()

void DefaultHeader::fillHeaderCommonFromAudio | ( |  | ) |
| virtual

Todo:
  Implement this using a JackTrip Method (Mediator) member instead of the reference to JackAudio

Implements PacketHeader.

## ◆ getConnectionMode()

uint8_t DefaultHeader::getConnectionMode | ( |  | ) | const
| inline

## ◆ getHeaderSizeInBytes()

virtual int DefaultHeader::getHeaderSizeInBytes | ( |  | ) | const
| inlinevirtual

Get the header size in bytes.

Implements PacketHeader.

## ◆ getNumChannels()

uint8_t DefaultHeader::getNumChannels | ( |  | ) | const
| inline

## ◆ getPeerBitResolution()

uint8_t DefaultHeader::getPeerBitResolution | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getPeerBufferSize()

uint16_t DefaultHeader::getPeerBufferSize | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getPeerConnectionMode()

uint8_t DefaultHeader::getPeerConnectionMode | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getPeerNumChannels()

uint8_t DefaultHeader::getPeerNumChannels | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getPeerSamplingRate()

uint8_t DefaultHeader::getPeerSamplingRate | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getPeerSequenceNumber()

uint16_t DefaultHeader::getPeerSequenceNumber | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getPeerTimeStamp()

uint64_t DefaultHeader::getPeerTimeStamp | ( | int8_t * | full_packet | ) | const
| virtual

Implements PacketHeader.

## ◆ getSequenceNumber()

virtual uint16_t DefaultHeader::getSequenceNumber | ( |  | ) | const
| inlinevirtual

Returns the current sequence number.

Returns
  16bit Sequence number

Reimplemented from PacketHeader.

## ◆ increaseSequenceNumber()

virtual void DefaultHeader::increaseSequenceNumber | ( |  | ) |
| inlinevirtual

Increase sequence number for counter, a 16bit number.

Reimplemented from PacketHeader.

## ◆ parseHeader()

virtual void DefaultHeader::parseHeader | ( |  | ) |
| inlinevirtual

Parse the packet header and take appropriate measures (like change settings, or quit the program if peer settings don't match)

Implements PacketHeader.

## ◆ printHeader()

void DefaultHeader::printHeader | ( |  | ) | const

## ◆ putHeaderInPacket()

virtual void DefaultHeader::putHeaderInPacket | ( | int8_t * | full_packet | ) |
| inlinevirtual

Put the header in buffer pointed by full_packet.

Parameters

  full_packet | Pointer to full packet (audio+header). Size must be sizeof(header part) + sizeof(audio part)

Implements PacketHeader.

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

- src/PacketHeader.h
- src/PacketHeader.cpp