# class SS7TCAP | SS7 TCAP implementation. More...
Contains pure virtuals
Full name | `TelEngine::SS7TCAP`
Definition | `#include <libs/ysig/yatesig.h>`
Inherits | TelEngine::SCCPUser [public ]
Inherited by | SS7TCAPANSI, SS7TCAPITU
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum TCAPType { UnknownTCAP, ITUTCAP, ANSITCAP, }
- enum TCAPUserCompActions { TC_Invoke = 1, TC_ResultLast = 2, TC_U_Error = 3, TC_U_Reject = 4, TC_R_Reject = 5, TC_L_Reject = 6, TC_InvokeNotLast = 7, TC_ResultNotLast = 8, TC_L_Cancel = 9, TC_U_Cancel = 10, TC_TimerReset = 11, }
- enum TCAPUserTransActions { TC_Unknown = 0, TC_Unidirectional = 1, TC_Begin, TC_QueryWithPerm, TC_QueryWithoutPerm, TC_Continue, TC_ConversationWithPerm, TC_ConversationWithoutPerm, TC_End, TC_Response, TC_U_Abort, TC_P_Abort, TC_Notice, }
- enum TCAPComponentOperationClass { SuccessOrFailureReport = 1, FailureOnlyReport = 2, SuccessOnlyReport = 3, NoReport = 4, }
- enum TCAPCounter { IncomingMsgs, OutgoingMsgs, DiscardedMsgs, NormalMsgs, AbnormalMsgs, }

#### Public Methods

- SS7TCAP (const NamedList& params)
- virtual ~SS7TCAP ()
- virtual bool initialize (const NamedList* config)
- virtual bool sendData (DataBlock& data, NamedList& params)
- virtual HandledMSU receivedData (DataBlock& data, NamedList& params)
- virtual HandledMSU notifyData (DataBlock& data, NamedList& params)
- bool managementNotify (SCCP::Type type, NamedList& params)
- void attach (TCAPUser* user)
- void detach (TCAPUser* user)
- virtual SS7TCAPError userRequest (NamedList& requestParams)
- virtual HandledMSU processSCCPData (SS7TCAPMessage* sccpData)
- inline TCAPType tcapType ()
- inline void setTCAPType (TCAPType type)
- virtual void enqueue (SS7TCAPMessage* msg)
- virtual SS7TCAPMessage* dequeue ()
- virtual const String allocTransactionID ()
- void allocTransactionID (String& str)
- virtual SS7TCAPTransaction* buildTransaction (SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params, bool initLocal = true)
- SS7TCAPTransaction* getTransaction (const String& tid)
- void removeTransaction (SS7TCAPTransaction* tr)
- virtual void timerTick (const Time& when)
- virtual bool sendToUser (NamedList& params)
- virtual void buildSCCPData (NamedList& params, SS7TCAPTransaction* tr)
- virtual void status (NamedList& status)
- virtual void userStatus (NamedList& status)
- virtual HandledMSU handleError (SS7TCAPError& error, NamedList& params, DataBlock& data, SS7TCAPTransaction* tr = 0)
- virtual void updateUserStatus (TCAPUser* user, SCCPManagement::LocalBroadcast status, NamedList& params)
- inline void incCounter (TCAPCounter counterType)
- inline unsigned int count (TCAPCounter counterType)

#### Public Static Methods

- static inline const char* lookupTransaction (int tr)
- static inline int lookupTransaction (const char* tr)
- static inline const char* lookupComponent (int comp)
- static inline int lookupComponent (const char* comp)

#### Public Members

- static const TokenDict s_tcapVersion[]
- static const TokenDict s_compPrimitives[]
- static const TokenDict s_transPrimitives[]
- static const TokenDict s_compOperClasses[]

#### Protected Methods

- virtual SS7TCAPError decodeTransactionPart (NamedList& params, DataBlock& data)
- virtual void encodeTransactionPart (NamedList& params, DataBlock& data)
- bool sendSCCPNotify (NamedList& params)

#### Protected Members

- ObjList m_users
- Mutex m_usersMtx
- ObjList m_inQueue
- Mutex m_inQueueMtx
- unsigned int m_SSN
- unsigned int m_defaultRemoteSSN
- unsigned int m_defaultHopCounter
- SS7PointCode m_defaultRemotePC
- SS7PointCode::Type m_remoteTypePC
- u_int64_t m_trTimeout
- Mutex m_transactionsMtx
- ObjList m_transactions
- TCAPType m_tcapType
- u_int32_t m_idsPool
- unsigned int m_recvMsgs
- unsigned int m_sentMsgs
- unsigned int m_discardMsgs
- unsigned int m_normalMsgs
- unsigned int m_abnormalMsgs
- SCCPManagement::LocalBroadcast m_ssnStatus

## Detailed Description

Implementation of SS7 Transactional Capabilities Application Part

enum TCAPType { UnknownTCAP, ITUTCAP, ANSITCAP, } | ### TCAPType

TCAP implementation variant

enum TCAPUserCompActions { TC_Invoke = 1, TC_ResultLast = 2, TC_U_Error = 3, TC_U_Reject = 4, TC_R_Reject = 5, TC_L_Reject = 6, TC_InvokeNotLast = 7, TC_ResultNotLast = 8, TC_L_Cancel = 9, TC_U_Cancel = 10, TC_TimerReset = 11, } | ### TCAPUserCompActions

Component handling primitives between TCAP and TCAP user (TC-user)

enum TCAPUserTransActions { TC_Unknown = 0, TC_Unidirectional = 1, TC_Begin, TC_QueryWithPerm, TC_QueryWithoutPerm, TC_Continue, TC_ConversationWithPerm, TC_ConversationWithoutPerm, TC_End, TC_Response, TC_U_Abort, TC_P_Abort, TC_Notice, } | ### TCAPUserTransActions

TCAP message primitives

enum TCAPComponentOperationClass { SuccessOrFailureReport = 1, FailureOnlyReport = 2, SuccessOnlyReport = 3, NoReport = 4, } | ### TCAPComponentOperationClass

Component Operation Classes

enum TCAPCounter { IncomingMsgs, OutgoingMsgs, DiscardedMsgs, NormalMsgs, AbnormalMsgs, } | ### TCAPCounter

Type of message counters

SS7TCAP (const NamedList& params) | ### SS7TCAP

Constructor

Parameters:

params | Parameters for building this TCAP

~SS7TCAP () | ### ~SS7TCAP

[virtual]

Destructor

bool initialize (const NamedList* config) | ### initialize

[virtual]

Configure and initialize the component and any subcomponents it may have

Parameters:

config | Optional configuration parameters override

Returns: True if the component was initialized properly

Reimplemented from SCCPUser.

bool sendData (DataBlock& data, NamedList& params) | ### sendData

[virtual]

Send a message to SCCP for transport, inherited from SCCPUser

Parameters:

data | User data
params | SCCP parameters

Reimplemented from SCCPUser.

HandledMSU receivedData (DataBlock& data, NamedList& params) | ### receivedData

[virtual]

Notification from SCCP that a message has arrived, inherited from SCCPUser

Parameters:

data | Received user data
params | SCCP parameters

Returns: True if this user has processed the message, false otherwise

Reimplemented from SCCPUser.

HandledMSU notifyData (DataBlock& data, NamedList& params) | ### notifyData

[virtual]

Notification from SCCP that a message failed to arrive to its destination, inherited from SCCPUser

Parameters:

data | User data sent.
params | SCCP parameters Note! The data may not contain the full message block previously sent (in case of SCCP segmentation), but it must always must contain the first segment

Reimplemented from SCCPUser.

bool managementNotify (SCCP::Type type, NamedList& params) | ### managementNotify

Notification from SCCP layer about management status

Parameters:

type | Type of management notification
params | Notification params

Reimplemented from SCCPUser.

void attach (TCAPUser* user) | ### attach

Attach a SS7 TCAP user

Parameters:

user | Pointer to the TCAP user to attach

Reimplemented from SCCPUser.

void detach (TCAPUser* user) | ### detach

Detach a SS7 TCAP user

Parameters:

user | TCAP user to detach

Reimplemented from SignallingComponent.

SS7TCAPError userRequest (NamedList& requestParams) | ### userRequest

[virtual]

A TCAP user made a request

Parameters:

requestParams | NamedList containing all the necessary data for the TCAP request

Returns: A SS7TCAPError reporting the status of the request

HandledMSU processSCCPData (SS7TCAPMessage* sccpData) | ### processSCCPData

[virtual]

Process received SCCP data

Parameters:

sccpData | A TCAP message received from SCCP to process

Returns: A code specifying if this message was handled

inline TCAPType tcapType () | ### tcapType

Report which TCAP implementation is in use

inline void setTCAPType (TCAPType type) | ### setTCAPType

Set TCAP version

Parameters:

type | TCAP version

void enqueue (SS7TCAPMessage* msg) | ### enqueue

[virtual]

Enqueue data received from SCCP as a TCAP message, kept in a processing queue

Parameters:

msg | A SS7TCAPMessage pointer containing all data received from SSCP

SS7TCAPMessage* dequeue () | ### dequeue

[virtual]

Dequeue a TCAP message when ready to process it

Returns: A SS7TCAPMessage pointer dequeued from the queue

const String allocTransactionID () | ### allocTransactionID

[virtual]

Get a new transaction ID

Returns: A transaction ID

void allocTransactionID (String& str) | ### allocTransactionID

Get a new transaction ID

Parameters:

str | String into which to put the id

static const TokenDict s_tcapVersion[] | ### s_tcapVersion[]

static const TokenDict s_compPrimitives[] | ### s_compPrimitives[]

static const TokenDict s_transPrimitives[] | ### s_transPrimitives[]

static const TokenDict s_compOperClasses[] | ### s_compOperClasses[]

SS7TCAPTransaction* buildTransaction (SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params, bool initLocal = true) | ### buildTransaction

[pure virtual]

Build a transaction

Parameters:

type | Type with which to build the transactions
transactID | ID for the transaction
params | Parameters for building the transaction
initLocal | True if built by user, false if by remote end

Returns: A transaction

SS7TCAPTransaction* getTransaction (const String& tid) | ### getTransaction

Find the transaction with the given id

Parameters:

tid | Searched local id

Returns: A pointer to the transaction or null if not found

void removeTransaction (SS7TCAPTransaction* tr) | ### removeTransaction

Remove transaction

Parameters:

tr | The transaction to remove

void timerTick (const Time& when) | ### timerTick

[virtual]

Method called periodically to do processing and timeout checks

Parameters:

when | Time to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

bool sendToUser (NamedList& params) | ### sendToUser

[virtual]

Send to TCAP users a decode message

Parameters:

params | Message in NamedList form

Returns: True if the message was handled by a user, false otherwise

void buildSCCPData (NamedList& params, SS7TCAPTransaction* tr) | ### buildSCCPData

[virtual]

Build SCCP data

Parameters:

params | NamedList containing the parameters to be given to SCCP
tr | Transaction for which to build SCCP data

void status (NamedList& status) | ### status

[virtual]

Status of TCAP

Parameters:

status | NamedList to fill with status information

void userStatus (NamedList& status) | ### userStatus

[virtual]

Status of TCAP users

Parameters:

status | NamedList to fill with user status information

HandledMSU handleError (SS7TCAPError& error, NamedList& params, DataBlock& data, SS7TCAPTransaction* tr = 0) | ### handleError

[virtual]

Handle an decoding error

Parameters:

error | The encoutered error
params | TCAP message parameters which where successfully decoded until the error was encoutered
data | Data block containing the rest of the message
tr | Transaction to which this message belongs to

Returns: Status if the error was handled or not

void updateUserStatus (TCAPUser* user, SCCPManagement::LocalBroadcast status, NamedList& params) | ### updateUserStatus

[virtual]

Update the SCCP Management state for this SSN when requested by a user

Parameters:

user | The TCAP user which changed its state
status | The state of the TCAP user
params | Additional parameters to be transmitted to the SCPP

inline void incCounter (TCAPCounter counterType) | ### incCounter

Increment one of the status counters

Parameters:

counterType | The type of the counter to increment

inline unsigned int count (TCAPCounter counterType) | ### count

Retrieve one of the status counters

Parameters:

counterType | The type of the counter to increment

Returns: The value of the counter

inline const char* lookupTransaction (int tr) | ### lookupTransaction

[static]

Get the type of transaction in string form

Parameters:

tr | Type of transaction

Returns: A string containing the string form of that type of transaction

inline int lookupTransaction (const char* tr) | ### lookupTransaction

[static]

Get the type of transaction from string form

Parameters:

tr | Type of transaction in string form

Returns: The type of transaction

inline const char* lookupComponent (int comp) | ### lookupComponent

[static]

Get the type of component in string form

Parameters:

comp | Type of component

Returns: A string containing the string form of that type of component

inline int lookupComponent (const char* comp) | ### lookupComponent

[static]

Get the type of component from string form

Parameters:

comp | Type of component

Returns: The type of component

SS7TCAPError decodeTransactionPart (NamedList& params, DataBlock& data) | ### decodeTransactionPart

[protected pure virtual]

void encodeTransactionPart (NamedList& params, DataBlock& data) | ### encodeTransactionPart

[protected pure virtual]

bool sendSCCPNotify (NamedList& params) | ### sendSCCPNotify

[protected]

ObjList m_users | ### m_users

[protected]

Mutex m_usersMtx | ### m_usersMtx

[protected]

ObjList m_inQueue | ### m_inQueue

[protected]

Mutex m_inQueueMtx | ### m_inQueueMtx

[protected]

unsigned int m_SSN | ### m_SSN

[protected]

unsigned int m_defaultRemoteSSN | ### m_defaultRemoteSSN

[protected]

unsigned int m_defaultHopCounter | ### m_defaultHopCounter

[protected]

SS7PointCode m_defaultRemotePC | ### m_defaultRemotePC

[protected]

SS7PointCode::Type m_remoteTypePC | ### m_remoteTypePC

[protected]

u_int64_t m_trTimeout | ### m_trTimeout

[protected]

Mutex m_transactionsMtx | ### m_transactionsMtx

[protected]

ObjList m_transactions | ### m_transactions

[protected]

TCAPType m_tcapType | ### m_tcapType

[protected]

u_int32_t m_idsPool | ### m_idsPool

[protected]

unsigned int m_recvMsgs | ### m_recvMsgs

[protected]

unsigned int m_sentMsgs | ### m_sentMsgs

[protected]

unsigned int m_discardMsgs | ### m_discardMsgs

[protected]

unsigned int m_normalMsgs | ### m_normalMsgs

[protected]

unsigned int m_abnormalMsgs | ### m_abnormalMsgs

[protected]

SCCPManagement::LocalBroadcast m_ssnStatus | ### m_ssnStatus

[protected]

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.