Home | Developer's corner | Knowledge base | Working documents | Documentation | Tutorials | Training | How do I | Frequently asked questions | Technical support |
Frequently asked questions
Contents |
Q: I get the following error when I try to run the adapter compiled using OpenTTCN SDK for Java:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no OTSDK in java.library.path
A: Since OpenTTCN SDK for Java uses Java Native Interface (JNI) internally, it comes with a Windows DLL as a part of the bundle. This DLL is used by the OpenTTCN SDK for Java JAR library through JNI. Therefore, you need to make this DLL visible in your DLL library search path. This can be done using java.library.path command-line property of Sun's java.exe.
If for example you have installed OpenTTCN SDK for Java to the following location:
C:\Program Files (x86)\OpenTTCN\JavaSDK
then the adapter can be launched from the command line like this:
java.exe -classpath "C:\Program Files (x86)\OpenTTCN\JavaSDK\OTSDK.jar;classes" -Djava.library.path="C:\Program Files (x86)\OpenTTCN\JavaSDK" com.example.Adapter
Note the use of java.library.path in the above script.
Q: I get the following error when I try to run the adapter compiled using OpenTTCN SDK for Java:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\OpenTTCN\JavaSDK\OTSDK.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
A: Please donwload and install the latest version of OpenTTCN SDK for Java. This issue is fixed in the most recent version. Please write us to sales@openttcn.fi to find out more about availability of the software.
A: Please make sure that you compile and run the adapter with JDK 1.5 or later. Please also make sure that you do not run the adapter with the JRE version that is older than the version of the Java compiler you have used to compile the adapter code.
Accurate and reliable decoding hypothesis is provided when you are decoding parameters and return value of a signature in procedure-based communication. Decoding hypothesis is not provided by default if you are decoding a message in message-based communication or an exception. You can change this by setting the following flags in the initialization part of your adapter code:
Please see the documentation for these two flags in include/tci/tci_ext.h for more details.
Q: I have the following sequence of calls in my system:
This works fine. But then I do the following:
And the test execution gives a test case error telling that test case 'TestCaseInMyModule2' is undefined. It seems that a test case list does not get updated properly. What went wrong and how do I fix this?
A: After you load a new TTCN-3 module or reload an old one, reselect the session again in your TCI-TM adapter using the following command (example in C):
otTMSelectSession(MySession);
This should enforce reallocation of the MTC and invalidation of internal system buffers it maintains, so that the test case list gets updated properly.
A: This indicates that creation of a parallel test component did not succeed. If you observe this behaviour, check the following:
A: It depends. In many cases you will need to recompile only the module in question. In some cases you need to recompile also dependent modules.
OpenTTCN uses a conceptual separation of each top-level definition in TTCN-3 source code into declaration part and definition part. Declaration part is also historically called "header part" of a definition, therefore by analogy with C++ each module is conceptually viewed as a logical combination of C++ header file and C++ source file.
The following is a regarded as a "header part" of a top-level definition (TLD):
The following is a regarded as a "definition part" of a top-level definition:
A general rule of thumb is such that whenever you change the "header part" of a definition, you also need to recompile modules dependent on the changed definition in question in addition to recompiling the changed module itself. If, however, you change only the "definition part", you need to recompile only the changed module itself.
Q: I have a requirement to build a complex test system consisting of multiple heterogeneous and highly independent components. It targets a diverse set of applications under test. It involves multiple types of communication (meaning protocols and bearers), multiple transfer syntaxes (meaning codecs), and maybe even multiple languages used to develop codecs and network interface code. Do you have any hints how I can handle this complexity with your tool?
A: Yes we have. We recommend that in this case you develop each component as a self-contained software project. Each such component technically implements one single adapter process. You can develop multiple adapters that are completely independent of each other and then plug them all into the same test system using our extended adapter registration syntax. Using this syntax each adapter would claim to serve only one dedicated TSI port.
You can develop, say, adapter A that serves protocol X in C language and plug it into the test system as serving TSI port p1 by using the following adapter registration syntax in the adapter code (C language):
otRegisterAdapter("MySession", "TRI:p1");
Then you can develop, say, adapter B that serves protocol Y in Java language and plug it into the same test system as serving TSI port p2 by using the following adapter registration syntax in the adapter code (Java language):
com.openttcn.sdk.core.CAPI.instance().
otRegisterAdapter("MySession", "TRI:p2");
Similar kind of registration is also possible with our SDK for .NET.
In this way you will be able to use all these diverse adapters in the same test suite at the same time.
Q: Why the following snippet of TTCN-3 code is illegal:
template T t_inst(in template integer arg) := { val := arg }
function MyFunc() return template T
{
return t_inst;
}
function MyCaller() runs on MyMTC
{
var template T loc_var := MyFunc();
p.send(loc_var(5));
}
A: When a function returning a template actually returns, it returns effective value of the template, not template definition. Unlike template definitions, template effective values cannot have formal parameters attached to them. Enabling a function to return template definitions may have deep and undesired impact on the consistency of TTCN-3 operational semantics, and this was obviously the reason why designers of the TTCN-3 language opted not doing so.