IAX2FullFrame Class Reference

#include <frame.h>

Inheritance diagram for IAX2FullFrame:

IAX2Frame IAX2FullFrameCng IAX2FullFrameDtmf IAX2FullFrameHtml IAX2FullFrameImage IAX2FullFrameNull IAX2FullFrameProtocol IAX2FullFrameSessionControl IAX2FullFrameText IAX2FullFrameVideo IAX2FullFrameVoice List of all members.

Public Types

enum  ConnectionRequired { callActive, callIrrelevant }

Public Member Functions

 IAX2FullFrame (IAX2Frame &srcFrame)
 IAX2FullFrame (IAX2EndPoint &_endpoint)
virtual ~IAX2FullFrame ()
BOOL IsAckFrame ()
BOOL IsPingFrame ()
BOOL IsNewFrame ()
BOOL IsLagRqFrame ()
BOOL IsLagRpFrame ()
BOOL IsPongFrame ()
BOOL IsAuthReqFrame ()
BOOL IsVnakFrame ()
BOOL IsRegReqFrame ()
BOOL IsRegAuthFrame ()
BOOL IsRegAckFrame ()
BOOL IsRegRelFrame ()
BOOL IsRegRejFrame ()
BOOL FrameIncrementsInSeqNo ()
virtual BOOL IsFullFrame ()
BOOL IsHangupFrame ()
void ZeroAllValues ()
virtual BOOL ProcessNetworkPacket ()
virtual BOOL TransmitPacket (PUDPSocket &sock)
PString GetFullFrameName () const
virtual PString GetSubClassName () const
void MarkDeleteNow ()
void MarkVnakSendNow ()
virtual BYTE * GetMediaDataPointer ()
virtual PINDEX GetMediaDataSize ()
PINDEX GetSubClass () const
void SetSubClass (PINDEX newValue)
virtual BOOL WriteHeader ()
void ModifyFrameHeaderSequenceNumbers (PINDEX inNo, PINDEX outNo)
void ModifyFrameTimeStamp (PINDEX newTimeStamp)
virtual BOOL InformationElementsPresent ()
BOOL SendFrameNow ()
BOOL DeleteFrameNow ()
IAX2SequenceNumbersGetSequenceInfo ()
virtual void PrintOn (ostream &strm) const
void MarkAsResent ()
BOOL operator *= (IAX2FullFrame &other)
virtual BYTE GetFullFrameType ()
virtual PINDEX GetEncryptionOffset ()

Protected Types

enum  RetryTime { minRetryTime = 500, maxRetryTime = 010000, maxRetries = 10 }

Protected Member Functions

virtual BOOL CallMustBeActive ()
void UnCompressSubClass (BYTE a)
int CompressSubClass ()
void ClearListFlags ()
virtual void InitialiseHeader (IAX2Processor *processor)
void OnTransmissionTimeout (PTimer &, INT)

Protected Attributes

PTimer transmissionTimer
PINDEX subClass
PTimeInterval retryDelta
PTimeInterval timeOffset
PINDEX retries
IAX2SequenceNumbers sequence
BOOL sendFrameNow
BOOL deleteFrameNow
BOOL packetResent
BOOL callMustBeActive
BOOL isAckFrame

Detailed Description

Class to handle a full frame, which is sent reliably to the remote endpoint


Member Enumeration Documentation

enum IAX2FullFrame::ConnectionRequired

enum to define if the call must be active when sending this frame

Enumerator:
callActive  the call must be active when sending frame
callIrrelevant  the call may, or may not be, active when sending frame

enum IAX2FullFrame::RetryTime [protected]

Internal variables specifying the retry time periods (in milliseconds)

Enumerator:
minRetryTime  500 milliseconds
maxRetryTime  10 seconds
maxRetries  number of retries


Constructor & Destructor Documentation

IAX2FullFrame::IAX2FullFrame ( IAX2Frame srcFrame  ) 

Construction from a supplied dataframe. In this case, this class is filled from an incoming data packet

IAX2FullFrame::IAX2FullFrame ( IAX2EndPoint _endpoint  ) 

Construction from an endpoint, to create an empty frame. In this case, the class is filled with the various methods

virtual IAX2FullFrame::~IAX2FullFrame (  )  [virtual]

Delete this frame now, but first we have to delete every timer on it.


Member Function Documentation

BOOL IAX2FullFrame::IsAckFrame (  )  [inline]

Return True if this an ack frame

BOOL IAX2FullFrame::IsPingFrame (  ) 

Return True if this is a PING frame

BOOL IAX2FullFrame::IsNewFrame (  ) 

Return True if this is a NEW frame

BOOL IAX2FullFrame::IsLagRqFrame (  ) 

Return True if this is a LAGRQ frame

BOOL IAX2FullFrame::IsLagRpFrame (  ) 

Return True if this is a LAGRP frame

BOOL IAX2FullFrame::IsPongFrame (  ) 

Return True if this is a PONG frame

BOOL IAX2FullFrame::IsAuthReqFrame (  ) 

Return True if this is a AuthReq frame

BOOL IAX2FullFrame::IsVnakFrame (  ) 

Return True if this is a VNAK frame

BOOL IAX2FullFrame::IsRegReqFrame (  ) 

Return True if this is a REGREQ frame

BOOL IAX2FullFrame::IsRegAuthFrame (  ) 

Return True if this is a REGAUTH frame

BOOL IAX2FullFrame::IsRegAckFrame (  ) 

Return True if this is a REGACK frame

BOOL IAX2FullFrame::IsRegRelFrame (  ) 

Return True if this is a REGREL frame

BOOL IAX2FullFrame::IsRegRejFrame (  ) 

Return True if this is a REGREJ frame

BOOL IAX2FullFrame::FrameIncrementsInSeqNo (  ) 

Return True if this FullFrame is of a type that increments the InSeqNo

virtual BOOL IAX2FullFrame::IsFullFrame (  )  [inline, virtual]

True if this is a full frame - always returns true as this is a full frame.

Reimplemented from IAX2Frame.

BOOL IAX2FullFrame::IsHangupFrame (  ) 

Report TRUE if this is a hangup frame. We need this information for processing incoming frames, before fully dissection of the frame has completed

void IAX2FullFrame::ZeroAllValues (  ) 

Initialise to zero all the members of this particular class

Reimplemented from IAX2Frame.

virtual BOOL IAX2FullFrame::ProcessNetworkPacket (  )  [virtual]

Process the incoming frame some more, but process it as a full frame

Reimplemented from IAX2Frame.

virtual BOOL IAX2FullFrame::TransmitPacket ( PUDPSocket &  sock  )  [virtual]

Send this packet on the specified socket to the remote host. This method is only called by the transmiter.

Reimplemented from IAX2Frame.

PString IAX2FullFrame::GetFullFrameName (  )  const

Get text descrption of this frame type

virtual PString IAX2FullFrame::GetSubClassName (  )  const [inline, virtual]

Get text description of the subclass contents

Reimplemented in IAX2FullFrameDtmf, IAX2FullFrameVoice, IAX2FullFrameVideo, IAX2FullFrameSessionControl, IAX2FullFrameNull, IAX2FullFrameProtocol, IAX2FullFrameText, IAX2FullFrameImage, IAX2FullFrameHtml, and IAX2FullFrameCng.

void IAX2FullFrame::MarkDeleteNow (  ) 

Stop the timer, so this packet is not retransmitted. Mark packet as dead. This happens when a packet has been received that matches one of the previously sent packets.

void IAX2FullFrame::MarkVnakSendNow (  ) 

A Vnak frame has been received. This Vnak frame is demanding that we resend this particular frame. Given it is to be resent by vnak, we reset the countdown variables. E.G. it gets the full amount of retries again.

virtual BYTE* IAX2FullFrame::GetMediaDataPointer (  )  [virtual]

Pointer to the beginning of the media (after the header) in this packet

Reimplemented from IAX2Frame.

virtual PINDEX IAX2FullFrame::GetMediaDataSize (  )  [virtual]

Number of bytes in the media section of this packet.

Reimplemented from IAX2Frame.

PINDEX IAX2FullFrame::GetSubClass (  )  const [inline]

Determine the current value of the subClass variable

Reimplemented in IAX2FullFrameProtocol.

void IAX2FullFrame::SetSubClass ( PINDEX  newValue  )  [inline]

Dry the current value of the subClass variable

virtual BOOL IAX2FullFrame::WriteHeader (  )  [virtual]

Write the header for this class to the internal data array. 12 bytes of data are writen. The application developer must write the remaining bytes, before transmiting this frame.

Reimplemented from IAX2Frame.

void IAX2FullFrame::ModifyFrameHeaderSequenceNumbers ( PINDEX  inNo,
PINDEX  outNo 
)

Alter the two bytes for in and out sequence values. (in the header)

void IAX2FullFrame::ModifyFrameTimeStamp ( PINDEX  newTimeStamp  ) 

Alter the four bytes for this frames timestamp. It is required, when transmitting full frames, that there is a 3ms interval to last full frame in the timestamps. This is required by limitations in the handline of time in asterisk.

virtual BOOL IAX2FullFrame::InformationElementsPresent (  )  [inline, virtual]

Mark this frame as having (or not having) information elements

Reimplemented in IAX2FullFrameProtocol.

BOOL IAX2FullFrame::SendFrameNow (  )  [inline]

Get flag to see if this frame is ready to be sent (or resent). In other words, has the timer expired?

BOOL IAX2FullFrame::DeleteFrameNow (  )  [inline]

Get flag to see if this frame is ready for deletion. In other words. Has it been sent too many times?

IAX2SequenceNumbers& IAX2FullFrame::GetSequenceInfo (  )  [inline]

Get the sequence number info (inSeqNo and outSeqNo)

virtual void IAX2FullFrame::PrintOn ( ostream &  strm  )  const [virtual]

Pretty print this frame data to the designated stream

Reimplemented from IAX2Frame.

Reimplemented in IAX2FullFrameProtocol.

void IAX2FullFrame::MarkAsResent (  ) 

Mark this frame as having been resent (set bit 7 of data[2])

BOOL IAX2FullFrame::operator *= ( IAX2FullFrame other  ) 

Compare this FullFrame with another full frame, which is used when determining if we are dealing with a frame we have already processed

virtual BYTE IAX2FullFrame::GetFullFrameType (  )  [inline, virtual]

Return the FullFrame type represented here (voice, protocol, session etc

Reimplemented in IAX2FullFrameDtmf, IAX2FullFrameVoice, IAX2FullFrameVideo, IAX2FullFrameSessionControl, IAX2FullFrameNull, IAX2FullFrameProtocol, IAX2FullFrameText, IAX2FullFrameImage, IAX2FullFrameHtml, and IAX2FullFrameCng.

virtual PINDEX IAX2FullFrame::GetEncryptionOffset (  )  [inline, virtual]

Get the offset to the beginning of the encrypted region

Reimplemented from IAX2Frame.

virtual BOOL IAX2FullFrame::CallMustBeActive (  )  [inline, protected, virtual]

Report flag stating that this call must be active when this frame is transmitted

Reimplemented from IAX2Frame.

void IAX2FullFrame::UnCompressSubClass ( BYTE  a  )  [protected]

Turn the 8 bit subClass value into a 16 bit representation

int IAX2FullFrame::CompressSubClass (  )  [protected]

Turn the 16 bit subClass value into a 8 bit representation

void IAX2FullFrame::ClearListFlags (  )  [protected]

Mark this frame as not to be sent, and not to be deleted

virtual void IAX2FullFrame::InitialiseHeader ( IAX2Processor processor  )  [protected, virtual]

Given the supplied Connection class, write the first 12 bytes of the frame. This method is called by the frame construcors, in preparation for transmission. This method is never called when processing a received frame.

Whenever a frame is transmitted, this method will be called.

Reimplemented from IAX2Frame.

void IAX2FullFrame::OnTransmissionTimeout ( PTimer &  ,
INT   
) [protected]

pwlib constructs to cope with timeout, when transmitting a full frame. This happens when a full frame has not been acknowledged in the required time period. This frame will be resent.


Member Data Documentation

PTimer IAX2FullFrame::transmissionTimer [protected]

The timer which is used to test for no reply to this frame (on transmission)

PINDEX IAX2FullFrame::subClass [protected]

integer variable specifying the uncompressed subClass value for this particular frame

PTimeInterval IAX2FullFrame::retryDelta [protected]

Time to wait between retries

PTimeInterval IAX2FullFrame::timeOffset [protected]

Time delta between call start and sending (or receiving)

PINDEX IAX2FullFrame::retries [protected]

Number of retries this frame has undergone

IAX2SequenceNumbers IAX2FullFrame::sequence [protected]

Class holding the sequence numbers, which is used by all classes which have a FullFrame ancestor.

BOOL IAX2FullFrame::sendFrameNow [protected]

List flag, indicating if this frame ready for sending

BOOL IAX2FullFrame::deleteFrameNow [protected]

List flag, this frame is ready for deletion (too many retries)

BOOL IAX2FullFrame::packetResent [protected]

A tracking flag to indicate this fame has been resent

BOOL IAX2FullFrame::callMustBeActive [protected]

Flag stating that this call must be active when this frame is transmitted

BOOL IAX2FullFrame::isAckFrame [protected]

flag to indicate if this is an ack frame


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:34:02 2008 for OPAL by  doxygen 1.5.1