OpenTTCN/2.56.0/ANSI C SDK library reference/TRI extensions/otRegisterAdapter
From OpenTTCN
otRegisterAdapter
The otRegisterAdapter function performs registration of SUT adapter or platform adapter running in this process into OpenTTCN Tester system.
int otRegisterAdapter(
const char* sessionName,
const char* id);
Parameters
|
sessionName |
|
Session into which this adapter is registered. |
|
id |
|
Adapter role (see Table 1 for more details). |
Return values
Returns 0 upon success, non-zero upon failure.
Remarks
The effect of calling this function is similar to the actions performed by the register command of the session command-line utility which is a part of the OpenTTCN Tester distribution.
Before this function is called, OpenTTCN Tester system references shall be resolved using otResolveInitialReferences() or otInitAdapter() function call.
The id parameter may have any of the following values: "TRI", "TRI_SA", "TRI_PA". The "TRI" parameter value indicates that this adapter contains collocated implementation of both SUT and platform adapters, i.e. both SA and PA. Note that SA and PA may be running in different processes, in which case each of them gets registered independently using "TRI_SA" and "TRI_PA" adapter identifiers, respectively. Full list of allowed values of the id parameter is presented in Table 1.
| Parameter value | Adapter role |
|---|---|
|
TRI |
TRI SUT and platform adapter |
|
TRI_SA |
TRI SUT adapter |
|
TRI_PA |
TRI platform adapter (except timers) |
|
TRI_PA_TIMER |
TRI platform timer adapter |
|
TCI_CD |
Standalone coding adapter (CD) |
|
TCI_TM |
TCI-TM adapter (log listener) |
|
TRI:myPort |
TRI SA implementing TSI port myPort |
|
TRI_PA:extFunc |
TRI PA implementing external function extFunc |
|
NOTES All interfaces have implicit colocation with CD unless standalone CD is registered, in which case all coding and decoding requests are redirected to this CD. | |
Requirements
|
Header |
Declared in <tri/tri_ext.h>; include <tri/tri.h>. |
|
Library |
openttcn-tsa-mt.lib |
|
Compatibility |
OpenTTCN ANSI C SDK 2.x and higher |
