|
// TTCN-3
// TUTORIAL
// USAGE
// INTERFACES
// DOWNLOAD
// ABOUT
THE TTCN-3 INTERFACES// INTERFACES // STIMULI // RESPONSES // CODEC // ADAPTER TYPES // CODEC TYPES // STANDARDSSTIMULUS ADAPTERThis section describes the methods of the interface TriCommunicationSA. The adapter provided by the user must implement this interface (or be derived from class Adapter which provides dummy implementations for the methods of TriCommunicationSA, it then must override those methods that are actually used by the application).The methods are called when certain statements in a TTCN-3 program are executed. For example, if a send statement is executed, the method triSend will be called. The methods are defined in Part 5 of the TTCN-3 Standard: TTCN-3 Runtime Interface (TRI). The data types of the parameters are described in Types for Adapter Implementation
triSAResetTriStatus triSAReset ()This function may be called at any time by the test environment to reset the system adapter. However, code generated with TTXP does not invoke this function. triExecuteTestCaseTriStatus triExecuteTestCase ( TriTestCaseId testcase, TriPortIdList tsiList )This method is invoked when a test case is started. If the test case is declared as testcase TC() runs on MTC system SYSthen the parameter testcase refers to the identifier TC and tsiList holds a lists of the ports defined in the component type SYS (in the order of their definition). The return value indicates the success of the operation. triMapTriStatus triMap ( TriPortId compPortId, TriPortId tsiPortId )This method is invoked when a statement map (Component:ComponentPort, system:SystemPort)is executed. The parameter compPortId refers to Component:ComponentPort and tsiPortId refers to system:SystemPort. The return value indicates the success of the operation. triUnmapTriStatus triUnmap ( TriPortId compPortId, TriPortId tsiPortId )This method is invoked when a statement unmap (Component:ComponentPort, system:SystemPort)is executed. The parameter compPortId refers to Component:ComponentPort and tsiPortId refers to system:SystemPort. The return value indicates the success of the operation. triSendTriStatus triSend ( TriComponentId componentId, TriPortId tsiPortId, TriAddress address, TriMessage sendMessage )This method is invoked when a statement Port.send(Message) to Addressis executed and Port is mapped to test system port. The parameter componentId indicates the sending component. tsiPortId indicates Port. sendMessage contains the encoded Message. address contains the encoded Address if present, otherwise null. The return value indicates the success of the operation. triCallTriStatus triCall ( TriComponentId componentId, TriPortId tsiPortId, TriAddress sutAddress, TriSignatureId signatureId, TriParameterList parameterList )This method is invoked when a statement
Port.call(Signature:{Parameters}) to Address
is executed and Port is mapped to a test system port.
The parameter componentId indicates the calling component. tsiPortId indicates Port. signatureId refers to Signature. parameterList hold a list of the encoded Parameters. address contains the encoded Address if present, otherwise null. The return value indicates the success of the operation. triReplyTriStatus triReply ( TriComponentId componentId, TriPortId tsiPortId, TriAddress sutAddress, TriSignatureId signatureId, TriParameterList parameterList, TriParameter returnValue )This method is invoked when a statement
Port.reply(Signature:{Parameters} value Result) to Address
is executed and Port is mapped to a test system port.
The parameter componentId indicates the replying component. tsiPortId indicates Port. signatureId refers to Signature. parameterList holds a list of the encoded Parameters. returnValue holds the encoded Result if present, otherwise null. sutAddress contains the encoded Address if present, otherwise null. The return value indicates the success of the operation. triRaiseTriStatus triRaise ( TriComponentId componentId, TriPortId tsiPortId, TriAddress sutAddress, TriSignatureId signatureId, TriException exception )This method is invoked when a statement Port.raise(Signature, Exception) to Addressis executed and Port is mapped to a test system port. The parameter componentId indicates the component that raises the exception. tsiPortId indicates Port. signatureId refers to Signature. exception holds the encoded Exception value. address contains the encoded Address if present, otherwise null. The return value indicates the success of the operation. triSUTActionInformalTriStatus triSutActionInformal ( string description )This method is invoked when a statement action(Description)is executed. The parameter description contains the Description. The return value indicates the success of the operation. |