TTCN-3 TRI TYPES
           // TTCN-3 // TUTORIAL // USAGE // INTERFACES // DOWNLOAD // ABOUT

THE TTCN-3 INTERFACES

// INTERFACES // STIMULI // RESPONSES // CODEC // ADAPTER TYPES // CODEC TYPES // STANDARDS

TYPES FOR ADAPTER IMPLEMENTATION

This section describes the data types of adapter methods.

They are defined in Part 5 of the TTCN-3 Standard: TTCN-3 Runtime Interface (TRI).

TriComponentId

Objects of type TriComponentId are used to refer to components.

string getComponentId ()
C.getComponentId() returns a string representation of the component refered by C.
string getComponentTypeName ()
C.getComponentTypeName() returns the name of type of the component refered by C.
TriPortIdList getPortList ()
C.getPortList() returns a list of the ports of the component refered by C.
bool equals (TriComponentId component)
C1.equals(C2) returns true iff C1 and C2 refer to the same component.

TriPortId

Objects of type TriPortId represent component ports.

string getPortName ()
P.getPortName() returns the name of the port refered by P. If the port is an element of array, the name of the array ist returned.
TriComponentId getComponent ()
P.getComponent() getComponent returns the component identifier for the component that owns the port refered by P.
bool isArray ()
P.isArray() returns true iff the port refered by P is an element of an array.
int getPortIndex ()
P.getPortIndex() returns the index of the port refered by P if the the port is an element of an array, otherwise -1 is returned.

TriPortIdList

Objects of type TriPortIdList represent lists of component ports.

int size ()
L.size() returns the number of elements of the list L.
bool isEmpty ()
L.isEmpty() returns true if the list L is empty.
TriPortId get (
   int index
)
L.get(i) returns the i-th element of the list L.

TriMessage

Objects of type TriMessage hold encoded data: TTCN-3 values that are represented as arrays of bytes.

byte[] getEncodedMessage ()
M.getEncodedMessage() returns the byte array of M that holds the encoded value.
void setEncodedMessage (
   byte[] message
)
M.setEncodedMessage(message) sets the byte array of M to message.
bool equals (
   TriMessage message
)
M1.equals(M2) returns true iff the byte arrays of M1 and M2 are equal.

TriAddress

Objects of type TriAddress hold encoded data of type address: TTCN-3 values that are represented as arrays of bytes.

byte[] getEncodedAddress ()
A.getEncodedAddress() returns the byte array of A that holds the encoded address value.
void setEncodedAddress (
   byte[] address
)
A.setEncodedAddress(address) sets the byte array of A to address.
bool equals (
   TriAddress address
)
A1.equals(A2) returns true iff the byte arrays of A1 and A2 are equal.

TriSignatureId

Objects of type TriSignatureId represent signatures for procedure-based communication.

string getSignatureName ()
S.getSignatureName() returns the name the name of S.
void setSignatureName (
   string sigName
)
S.setSignatureName(sigName) sets the name of S to sigName.
bool equals (
   TriSignatureId sig
)
S1.equals(S2) returns true iff the names of the S1 and S2 are equal.

TriParameter

Objects of type TriParameter represent parameters in procudure-oriented communication.

string getParameterName ()
P.getParameterName() returns the name of the parameter P.
void setParameterName (
   string name
)
P.setParameterName(name) sets the name of the parameter P to name.
TriParameterPassingMode getParameterPassingMode ()
P.getParameterPassingMode() returns the passing mode of the parameter P.
void setParameterPassingMode (
   TriParameterPassingMode mode
)
P.setParameterPassingMode(mode) sets the passing mode of the parameter P to mode.
byte[] getEncodedParameter ()
P.getEncodedParameter() returns the encoded value of the parameter P.
void setEncodedParameter (
   byte[] parameter
)
P.setEncodedParameter(parameter) sets the encoded value of the parameter P to parameter.

TriParameterPassingMode

TriParameterPassingMode is an enumumeration the values of which indicate parameter passing modes.

TriParameterPassingMode.TRI_IN indicates the parameter passing mode in.

TriParameterPassingMode.TRI_INOUT indicates the parameter passing mode inout.

TriParameterPassingMode.TRI_OUT indicates the parameter passing mode out.

TriParameterList

Objects of type TriParameterList represent list of parameters in procedure-oriented communication.

int size ()
L.size() returns the number of elements of parameter list L.
bool isEmpty ()
L.isEmpty() returns true iff the number of elements of parameter list L is zero.
TriParameter get (
   int index
)
L.get(i) returns the i-th parameter of list L (the index of the first element is 0).
void clear ()
L.clear() defines L as an empty parameter list.
void add (
   TriParameter parameter
)
L.add(parameter) appends parameter to the list L.

TriException

Objects of type TriException represent exceptions in procedure-oriented communicated.

byte[] getEncodedException ()
E.getEncodedException() returns the encoded value of exception E.
void setEncodedException (
   byte[] message
)
E.setEncodedException(message) sets the encoded value of exception E to message.
bool equals (
   TriException exc
)
E1.equals(E2) returns true iff the encoded value of E1 equals the encoded value of E2.

TriFunctionId

Objects of type TriFunctionId represent names of external functions.

string getFunctionName ()
F.getFunctionsName() returns the name of function F.
bool equals (
   TriFunctionId fun
)
F1.equals(F2) returns true iff F1 and F2 represent the same function name.

TriTestCaseId

Objects of type TriTestCaseId represent names of test cases.

string getTestCaseName ()
T.getTestCaseName() returns the name of the test case T.
bool equals (
   TriTestCaseId tc
)
T1.equals(T2) returns true iff the names of T1 and T2 are equal.

TriStatus

Values of type TriStatus are returned by adapter functions to indicate success or failure of an operation.

TriStatus.TRI_OK indicates success.

TriStatus.TRI_ERROR indicates failure.