Yate
Public Types | Public Member Functions | Protected Attributes
SS7TCAPTransaction Class Reference

SS7 TCAP transaction implementation. More...

#include <yatesig.h>

Inheritance diagram for SS7TCAPTransaction:
GenObject Mutex Lockable SS7TCAPTransactionANSI SS7TCAPTransactionITU

List of all members.

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

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

Detailed Description

SS7 TCAP transaction implementation.

Implementation of SS7 Transactional Capabilities Application Part Transaction


Constructor & Destructor Documentation

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

Destructor


Member Function Documentation

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.

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
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
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
virtual void checkComponents ( ) [virtual]

Check components for timeouts

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
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.

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
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.

bool endNow ( ) [inline]

Check if the flag to end this transaction immediately was set

Returns:
True if the end flag was set, false otherwise
void endNow ( bool  endNow) [inline]

Set the flag to end this transaction immediately

Parameters:
endNowBoolean value to set to the end flag

References SS7TCAPTransaction::endNow().

Referenced by SS7TCAPTransaction::endNow().

Find a component with given id

Parameters:
idId of component to find
Returns:
The component with given id or null
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
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 SS7TCAPTransactionITU, and SS7TCAPTransactionANSI.

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 SS7TCAPTransactionITU, and SS7TCAPTransactionANSI.

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
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 SS7TCAPTransactionITU, and SS7TCAPTransactionANSI.

void setState ( TransactionState  state) [inline]

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

Parameters:
stateThe state to set for the transaction

Set the current type of transaction primitive

Parameters:
typeThe transaction primitive to be set
void setTransmitState ( TransactionTransmit  state)

Set the transmission state for this transaction

Parameters:
stateThe transmission state to be set
void setUserName ( const String name) [inline]

Set the TCAP username to which this transaction belongs

Parameters:
nameThe name of the user to set
SS7TCAP* tcap ( ) [inline]

The TCAP to which this transaction belongs

Returns:
A pointer to the TCAP component
bool timedOut ( ) [inline]

Check if the transaction has timed out

Returns:
True if the transaction timed out, false otherwise
const String& toString ( ) const [inline, virtual]

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

Returns:
A reference to the ID

Reimplemented from GenObject.

virtual void transactionData ( NamedList params) [virtual]

Fill the NamedList with transaction portion parameters

Parameters:
paramsNamedList reference to fill with transaction portion parameters
TransactionState transactionState ( ) [inline]

Retrieve the state of this transaction

Returns:
The state of this transaction

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

Returns:
The transaction primitive type
TransactionTransmit transmitState ( ) [inline]

The transmission state for this transaction

Returns:
The current transmission state
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 SS7TCAPTransactionITU, and SS7TCAPTransactionANSI.

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 SS7TCAPTransactionITU, and SS7TCAPTransactionANSI.

virtual void updateToEnd ( ) [virtual]

Update the state of this transaction to end the transaction

Reimplemented in SS7TCAPTransactionITU, and SS7TCAPTransactionANSI.

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: