Yate
Public Types | Public Member Functions | Protected Member Functions | Friends
SIGTransport Class Reference

An abstract SIGTRAN transport layer. More...

#include <yatesig.h>

Inheritance diagram for SIGTransport:
SignallingComponent RefObject DebugEnabler GenObject

List of all members.

Public Types

enum  Transport {
  None = 0, Sctp, Tcp, Udp,
  Unix
}

Public Member Functions

SIGTRANsigtran () const
u_int32_t defPort () const
virtual bool reliable () const =0
void notifyLayer (SignallingInterface::Notification status)
virtual bool initialize (const NamedList *config)
virtual bool connected (int streamId) const =0
void attach (SIGTRAN *sigtran)
bool processMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId) const
virtual void reconnect (bool force=false)

Protected Member Functions

 SIGTransport (const char *name=0)
virtual void attached (bool hasUAL)=0
virtual bool transmitMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock &msg, int streamId=0)
virtual bool transmitMSG (const DataBlock &header, const DataBlock &msg, int streamId=0)=0

Friends

class SIGTRAN

Detailed Description

An abstract SIGTRAN transport layer.

A an abstraction offering connectivity to a SIGTRAN transport


Member Enumeration Documentation

enum Transport

Type of transport used


Constructor & Destructor Documentation

SIGTransport ( const char *  name = 0) [inline, explicit, protected]

Constructor

Parameters:
nameDefault empty component name

Member Function Documentation

void attach ( SIGTRAN sigtran)

Attach an user adaptation layer

Parameters:
sigtranSIGTRAN component to attach, can be NULL
virtual void attached ( bool  hasUAL) [protected, pure virtual]

Notification if the attached state changed

Parameters:
hasUALTrue if an User Adaptation Layer is now attached
virtual bool connected ( int  streamId) const [pure virtual]

Check if the network transport layer is connected

Parameters:
streamIdIdentifier of the stream to check if applicable
Returns:
True if the transport (and stream if applicable) is connected
u_int32_t defPort ( ) const

Get the default SCTP/TCP/UDP port used

Returns:
Default protocol port, 0 if unknown, not set or no SIGTRAN attached
virtual bool initialize ( const NamedList config) [inline, virtual]

Configure and initialize the component and any subcomponents it may have

Parameters:
configOptional configuration parameters override
Returns:
True if the component was initialized properly

Reimplemented from SignallingComponent.

Notify the SIGTRAN layer about transport status changes

Parameters:
statusStatus to notify
bool processMSG ( unsigned char  msgVersion,
unsigned char  msgClass,
unsigned char  msgType,
const DataBlock msg,
int  streamId 
) const

Send a complete message to the adaptation layer for processing

Parameters:
msgVersionVersion of the protocol
msgClassClass of the message
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream the message was received on
Returns:
True if the message was handled
virtual void reconnect ( bool  force = false) [inline, virtual]

Force the underlaying transport to reconnect

Parameters:
forceTrue to force transport socket reconnection
virtual bool reliable ( ) const [pure virtual]

Check if transport layer is reliable

Returns:
true if transport is reliable
SIGTRAN* sigtran ( ) const [inline]

Get the SIGTRAN component attached to this transport

Returns:
Pointer to adaptation layer or NULL
virtual bool transmitMSG ( unsigned char  msgVersion,
unsigned char  msgClass,
unsigned char  msgType,
const DataBlock msg,
int  streamId = 0 
) [protected, virtual]

Transmit a message to the network

Parameters:
msgVersionVersion of the protocol
msgClassClass of the message
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream to send the data over
Returns:
True if the message was transmitted to network
virtual bool transmitMSG ( const DataBlock header,
const DataBlock msg,
int  streamId = 0 
) [protected, pure virtual]

Transmit a prepared message to the network

Parameters:
headerMessage header, typically 8 octets
msgMessage data, may be empty
streamIdIdentifier of the stream to send the data over
Returns:
True if the message was transmitted to network

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