You are here: SwitchKit TCAP Interface User’s Guide > 6 SKTAL Parameter Classes > Class TCAP_Invoke : public TCAP_Component
Class TCAP_Invoke : public TCAP_Component
Purpose
The purpose of the TCAP_Invoke component is to define the basic interface for applications wishing to invoke remote operations.
The following methods are used within the TCAP_Invoke component:
// Operation
// If defined(CCITT)
void SetOperation(const SKTAL_LONG code);
void GetOperation(SKTAL_LONG& code) const;
// If defined(ANSI)
void SetOperation(const bool isNational,
const SKTAL_OCTET family,
const SKTAL_OCTET code);
void GetOperation(bool& isNational,
SKTAL_OCTET& family,
SKTAL_OCTET& code) const;
// Parameter
void SetParameter(const SKTAL_OCTET* buf, const int len);
void GetParameter(SKTAL_OCTET* buf, int& len) const;
void SetParameter(const SKTAL_ByteArray& buf);
void GetParameter(SKTAL_ByteArray& buf) const;
// Timeout
void SetTimeOut(const SKTAL_USHORT val);
SKTAL_USHORT GetTimeOut() const;
// Operation class
// If defined(CCITT)
void SetClass(const SKTAL_USHORT val);
SKTAL_USHORT GetClass() const;
// Linked id (aka "correlation id")
void SetLinkedID(const SKTAL_OCTET val);
SKTAL_OCTET GetLinkedID() const;
void LinkInvoke(const TCAP_Invoke linkTo);
Description
This method sets the operation field of an invoke component. The signature and behavior of this method is different depending on the standard used. For national use, the values of the operation family are defined in Appendix C.
Syntax
If defined ITU:
void SetOperation (const SKTAL_LONG code);
If defined ANSI:
void SetOperation (const bool isNational,
const SKTAL_OCTET family,
const SKTAL_OCTET code);
Input Parameters (ITU)
code: The operation code
Input Parameters (ANSI)
isNational: indicates whether this operation is national or private
family: the operation family
Input/Output Parameters and Output Parameters
None
Return Value
None
Description
This method gets the operation field of an invoke component. The signature and behavior of this method is different depending on the standard used. If the operation is not present, an error code is returned.
Syntax
If defined ITU:
void GetOperation(SKTAL_LONG& code) const;
If defined ANSI:
void GetOperation(bool& isNational,
SKTAL_OCTET& family,
SKTAL_OCTET& code) const;
Input Parameters and Input/Output Parameters
None
Output Parameters (ITU)
code: The operation code
Output Parameters (ANSI):
isNational: indicates whether this operation is national or private
family: the operation family
code: the operation code
Return Value
None
Description
This method copies a user-defined parameter into the invoke component. If an invoke does not have User Payload, the user need not call this method; the parameter is assumed to not be present unless this method is called with a non-zero length. The default space for the "parameter". Parameter is 256 bytes.
Syntax
void SetParameter(const SKTAL_OCTET* buf, const int len);
void SetParameter(const SKTAL_ByteArray& buf);
Input Parameters
buf: a buffer containing the parameter to copy into this component
len: the length of the parameter in the buffer
Input/Output Parameters
None
Output Parameters
None
Return Value
None
Description
This method copies the parameter in an invoke component into a user supplied buffer. The len parameter will become an in/out parameter and should be set to the maximum size of the buffer to copy to; this method will then check to make sure the parameter to copy is smaller than the buffer supplied. Users should therefore set the length now to avoid problems in the future.Returning a length of zero indicates that no parameter is present.
Syntax
void GetParameter(SKTAL_OCTET* buf, int& len) const;
void GetParameter (SKTAL_ByteArray& buf) const;
Input Parameters
buf: a buffer to copy the parameter into
Input/Output Parameters
None
Output Parameters
len: The length of the parameter in the buffer
Return Value
None
Description
Sets the timeout value for TCAP invokes. (ITU only.)
Syntax
void SetTimeOut(const SKTAL_USHORT val);
Input Parameters
val: The timeout value. Range is 1-500 seconds
Input/Output Parameters and Output Parameters
None
Return Value
None
Description
Retrieves the timeout value for TCAP invokes. (ITU only.)
Syntax
SKTAL_USHORT GetTimeOut() const;
Input Parameters, Input/Output Parameters, & Output Parameters
None
Return Value
The timeout value. Range is 1-500 seconds
Description
This method sets the operation class for TCAP components. The SetClass method is for ITU TCAP only.
Syntax
void SetClass(const SKTAL_USHORT val);
Input Parameters
val: a number from 1 to 4 indicating the operation class:
• Class 1 - Both success and failure are reported
• Class 2 - Only failure is reported
• Class 3 - Only success is reported
• Class 4 - Neither success, nor failure is reported
Input/Output Parameters and Output Parameters
None
Return Value
None
Description
This method retrieves the operation class for TCAP invokes. The GetClass method is for ITU TCAP only.
Syntax
SKTAL_USHORT GetClass() const;
Input Parameters, Input/Output Parameters, & Output Parameters
None
Return Value
A number from 1 to 4 indicating the operation class:
• Class 1 - Both success and failure are reported
• Class 2 - Only failure is reported
• Class 3 - Only success is reported
• Class 4 - Neither success, nor failure is reported
Description
This method sets the Linked ID (ITU) or Correlation ID (ANSI) to the value supplied. The SetLinkedID method is not called if the Linked ID is not relevant. It is assumed that no Linked ID is present unless this method is called.
Syntax
void SetLinkedID(const SKTAL_OCTET val);
Input Parameters
val: The linked ID value. Range is 0-255
Input/Output Parameters and Output Parameters
None
Return Value
None
Description
HasLinkedId method returns true if linked ID (ITU) or correlation ID (ANSI).is present in invoke operation.
Syntax
bool HasLinkedID();
Input Parameters, Input/Output Parameters, & Output Parameters
None
Return Value
true - Linked ID present.
false - Linked ID not present
Description
This method gets the Linked ID (ITU) or Correlation ID (ANSI) of an invoke, if supplied. If the invoke does not have a Linked ID, a Link ID of zero is returned.
Syntax
SKTAL_OCTET GetLinkedID() const;
Input Parameters, Input/Output Parameters, & Output Parameters
None
Return Value
The linked ID as an unsigned character. Range is 0-255
Description
This method sets the Linked ID (ITU) or Correlation ID (ANSI) to the Invoke ID from the invoke component supplied. The LinkInvoke method is not called if the Linked ID is not relevant. It is assumed that no Linked ID is present unless this method is called.
Syntax
void LinkInvoke(const TCAP_Invoke* linkTo);
Input Parameters
linkTo: the invoke component to correlate to
Input/Output Parameters and Output Parameters
None
Return Value
None