Yate
SS7TCAPTransaction Class Referenceabstract

SS7 TCAP transaction implementation. More...

#include <yatesig.h>

Inheritance diagram for SS7TCAPTransaction:
RefObject Mutex GenObject Lockable SS7TCAPTransactionANSI SS7TCAPTransactionITU

Public Types

enum  TransactionState { Idle = 0 , PackageSent = 1 , PackageReceived = 2 , Active = 3 }
 
enum  TransactionTransmit { NoTransmit = 0 , PendingTransmit = 256 , Transmitted = 521 }
 

Public Member Functions

 SS7TCAPTransaction (SS7TCAP *tcap, SS7TCAP::TCAPUserTransActions type, const String &transactID, NamedList &params, u_int64_t timeout, bool initLocal=true)
 
 ~SS7TCAPTransaction ()
 
virtual SS7TCAPError handleData (NamedList &params, DataBlock &data)=0
 
virtual SS7TCAPError update (SS7TCAP::TCAPUserTransActions type, NamedList &params, bool updateByUser=true)=0
 
virtual SS7TCAPError handleDialogPortion (NamedList &params, bool byUser=true)=0
 
virtual SS7TCAPError buildComponentError (SS7TCAPError &error, NamedList &params, DataBlock &data)
 
virtual SS7TCAPError handleComponents (NamedList &params, bool updateByUser=true)
 
virtual void requestComponents (NamedList &params, DataBlock &data)
 
virtual void transactionData (NamedList &params)
 
virtual void requestContent (NamedList &params, DataBlock &data)=0
 
virtual void checkComponents ()
 
void setTransactionType (SS7TCAP::TCAPUserTransActions type)
 
SS7TCAP::TCAPUserTransActions transactionType ()
 
void setState (TransactionState state)
 
TransactionState transactionState ()
 
void setTransmitState (TransactionTransmit state)
 
TransactionTransmit transmitState ()
 
SS7TCAPtcap ()
 
const StringtoString () const
 
void setUserName (const String &name)
 
const StringuserName ()
 
bool basicEnd ()
 
void addSCCPAddressing (NamedList &fillParams, bool local)
 
bool endNow ()
 
void endNow (bool endNow)
 
bool timedOut ()
 
SS7TCAPComponentfindComponent (const String &id)
 
virtual void updateToEnd ()
 
virtual void updateState (bool byUser=true)=0
 
virtual void abnormalDialogInfo (NamedList &params)
 
virtual SS7TCAPError decodeDialogPortion (NamedList &params, DataBlock &data)=0
 
virtual void encodeDialogPortion (NamedList &params, DataBlock &data)=0
 
virtual SS7TCAPError decodeComponents (NamedList &params, DataBlock &data)=0
 
virtual void encodeComponents (NamedList &params, DataBlock &data)=0
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Protected Attributes

SS7TCAPm_tcap
 
SS7TCAP::TCAPType m_tcapType
 
String m_userName
 
String m_localID
 
String m_remoteID
 
SS7TCAP::TCAPUserTransActions m_type
 
TransactionState m_state
 
TransactionTransmit m_transmit
 
ObjList m_components
 
NamedList m_localSCCPAddr
 
NamedList m_remoteSCCPAddr
 
bool m_basicEnd
 
bool m_endNow
 
SignallingTimer m_timeout
 

Additional Inherited Members

- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
virtual void destroyed ()
 

Detailed Description

SS7 TCAP transaction implementation.

Implementation of SS7 Transactional Capabilities Application Part Transaction

Constructor & Destructor Documentation

◆ SS7TCAPTransaction()

SS7TCAPTransaction ( SS7TCAP * tcap,
SS7TCAP::TCAPUserTransActions type,
const String & transactID,
NamedList & params,
u_int64_t timeout,
bool initLocal = true )

Constructor

Parameters
tcapTCAP holding this transaction
typeInitiating type for transaction
transactIDTransaction ID
paramsDecoded TCAP parameters for building the transaction
timeoutTransaction timeout
initLocalTrue if the transaction was initiated locally, false if not

References tcap().

Referenced by SS7TCAPTransactionANSI::decodePAbort(), SS7TCAPTransactionITU::decodePAbort(), SS7TCAPTransactionANSI::encodePAbort(), and SS7TCAPTransactionITU::encodePAbort().

◆ ~SS7TCAPTransaction()

Destructor

Member Function Documentation

◆ abnormalDialogInfo()

virtual void abnormalDialogInfo ( NamedList & params)
virtual

Set information in case of abnormal dialog detection

Parameters
paramsList of parameters where to set the abnormal dialog information

Reimplemented in SS7TCAPTransactionITU.

◆ addSCCPAddressing()

void addSCCPAddressing ( NamedList & fillParams,
bool local )

Add SCCP Addressing information

Parameters
fillParamsNamedList to fill with addressing information
localTrue if the information is for the user, otherwise

◆ basicEnd()

bool basicEnd ( )
inline

Check if a basic end was set for this transaction

Returns
True if basic end was specified by the user, false if prearranged end was specified

◆ buildComponentError()

virtual SS7TCAPError buildComponentError ( SS7TCAPError & error,
NamedList & params,
DataBlock & data )
virtual

Build a Reject component in answer to an encoutered error during decoding of the component portion

Parameters
errorThe encountered error
paramsDecoded TCAP message parameters
dataDataBlock containing the rest of the coded TCAP message
Returns
A report error

◆ checkComponents()

virtual void checkComponents ( )
virtual

Check components for timeouts

◆ decodeComponents()

virtual SS7TCAPError decodeComponents ( NamedList & params,
DataBlock & data )
pure virtual
Parameters
paramsNamedList reference to fill with the decoded component information
dataDataBlock reference from which to decode the component information
Returns
A TCAP error encountered whilst decoding

◆ decodeDialogPortion()

virtual SS7TCAPError decodeDialogPortion ( NamedList & params,
DataBlock & data )
pure virtual
Parameters
paramsNamedList reference to fill with the decoded dialog information
dataDataBlock reference from which to decode the dialog information
Returns
A TCAP error encountered whilst decoding

Implemented in SS7TCAPTransactionITU.

◆ encodeComponents()

virtual void encodeComponents ( NamedList & params,
DataBlock & data )
pure virtual
Parameters
paramsNamedList reference from which to take the component information to encode
dataDataBlock reference into which to put the encoded component information

◆ encodeDialogPortion()

virtual void encodeDialogPortion ( NamedList & params,
DataBlock & data )
pure virtual
Parameters
paramsNamedList reference from which to take the dialog information to encode
dataDataBlock reference into which to put the encoded dialog information

Implemented in SS7TCAPTransactionITU.

◆ endNow() [1/2]

bool endNow ( )
inline

Check if the flag to end this transaction immediately was set

Returns
True if the end flag was set, false otherwise

Referenced by endNow().

◆ endNow() [2/2]

void endNow ( bool endNow)
inline

Set the flag to end this transaction immediately

Parameters
endNowBoolean value to set to the end flag

References endNow().

◆ findComponent()

SS7TCAPComponent * findComponent ( const String & id)

Find a component with given id

Parameters
idId of component to find
Returns
The component with given id or null

◆ handleComponents()

virtual SS7TCAPError handleComponents ( NamedList & params,
bool updateByUser = true )
virtual

Update components

Parameters
paramsNamedList reference containing the update information
updateByUserFlag if the update was issued by local user or by remote
Returns
A report error

◆ handleData()

virtual SS7TCAPError handleData ( NamedList & params,
DataBlock & data )
pure virtual

Process transaction data and fill the NamedList with the decoded data

Parameters
paramsNamedList to fill with decoded data
dataData to decode
Returns
A TCAP error encountered whilst decoding

Implemented in SS7TCAPTransactionANSI, and SS7TCAPTransactionITU.

◆ handleDialogPortion()

virtual SS7TCAPError handleDialogPortion ( NamedList & params,
bool byUser = true )
pure virtual

Handle TCAP relevant dialog data

Parameters
paramsNamedList containing (if present) dialog information
byUserTrue if the dialog information is provided by the local user, false otherwise
Returns
A report error

Implemented in SS7TCAPTransactionANSI, and SS7TCAPTransactionITU.

◆ requestComponents()

virtual void requestComponents ( NamedList & params,
DataBlock & data )
virtual

Request encoding for the components of this transaction

Parameters
paramsComponents parameters to encode
dataDataBlock reference in which to insert the encoded components

◆ requestContent()

virtual void requestContent ( NamedList & params,
DataBlock & data )
pure virtual

Request content for this transaction

Parameters
paramsList of parameters of this tranaction
dataData block to fill with encoded content

Implemented in SS7TCAPTransactionANSI, and SS7TCAPTransactionITU.

◆ setState()

void setState ( TransactionState state)
inline

Set the state of this transaction, trigger a transmission pending state

Parameters
stateThe state to set for the transaction

◆ setTransactionType()

void setTransactionType ( SS7TCAP::TCAPUserTransActions type)
inline

Set the current type of transaction primitive

Parameters
typeThe transaction primitive to be set

◆ setTransmitState()

void setTransmitState ( TransactionTransmit state)

Set the transmission state for this transaction

Parameters
stateThe transmission state to be set

◆ setUserName()

void setUserName ( const String & name)
inline

Set the TCAP username to which this transaction belongs

Parameters
nameThe name of the user to set

◆ tcap()

SS7TCAP * tcap ( )
inline

The TCAP to which this transaction belongs

Returns
A pointer to the TCAP component

Referenced by SS7TCAPTransaction(), SS7TCAPTransactionANSI::SS7TCAPTransactionANSI(), and SS7TCAPTransactionITU::SS7TCAPTransactionITU().

◆ timedOut()

bool timedOut ( )
inline

Check if the transaction has timed out

Returns
True if the transaction timed out, false otherwise

◆ toString()

const String & toString ( ) const
inlinevirtual

Get the ID of the transaction so it can be used for list searches

Returns
A reference to the ID

Reimplemented from GenObject.

◆ transactionData()

virtual void transactionData ( NamedList & params)
virtual

Fill the NamedList with transaction portion parameters

Parameters
paramsNamedList reference to fill with transaction portion parameters

◆ transactionState()

TransactionState transactionState ( )
inline

Retrieve the state of this transaction

Returns
The state of this transaction

◆ transactionType()

SS7TCAP::TCAPUserTransActions transactionType ( )
inline

Retrieve the current type of primitive that is set for this transaction

Returns
The transaction primitive type

◆ transmitState()

TransactionTransmit transmitState ( )
inline

The transmission state for this transaction

Returns
The current transmission state

◆ update()

virtual SS7TCAPError update ( SS7TCAP::TCAPUserTransActions type,
NamedList & params,
bool updateByUser = true )
pure virtual

An update request for this transaction

Parameters
typeThe type of transaction to which this transaction should be updated
paramsUpdate parameter
updateByUserTrue if the update is made by the local user, false if it's made by the remote end
Returns
A TCAP Error

Implemented in SS7TCAPTransactionANSI, and SS7TCAPTransactionITU.

◆ updateState()

virtual void updateState ( bool byUser = true)
pure virtual

Update transaction state

Parameters
byUserTrue if update is requested by user, false if by remote

Implemented in SS7TCAPTransactionANSI, and SS7TCAPTransactionITU.

◆ updateToEnd()

virtual void updateToEnd ( )
virtual

Update the state of this transaction to end the transaction

Reimplemented in SS7TCAPTransactionANSI, and SS7TCAPTransactionITU.

◆ userName()

const String & userName ( )
inline

Return the name of the TCAP user to which this transaction belongs

Returns
The name of the user

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