Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » How to use WIN32 librarys in cygwin+eclipse titan?
How to use WIN32 librarys in cygwin+eclipse titan? [message #1753498] Tue, 07 February 2017 09:29 Go to next message
Matt Li is currently offline Matt LiFriend
Messages: 5
Registered: February 2017
Junior Member
Dear all,
When I read the document Eclipse_Designer_userguide, I found the following two paragraphs:
On the platform specific libraries pages it is possible to specify the list of platform specific libraries that are needed to build the final executable for each supported platform.
The list of platform specific libraries is applied to the SOLARIS_LIB, SOLARIS8_LIBS, LINUX_LIBS, FREEBSD_LIBS and WIN32_LIBS macros respectively.
By default all lists are empty.

So I wish to know how to use WIN32_LIBS in this environment.


thanks!
Re: How to use WIN32 librarys in cygwin+eclipse titan? [message #1753562 is a reply to message #1753498] Tue, 07 February 2017 17:36 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Matt,

-first of all, please be aware that due to the incompatibility of EPL and GPL licenses, one may not link EPL and GPL code together
and distribute the result
. ( see https://mmilinkov.wordpress.com/2010/04/06/epl-gpl-commentary/). This means that we cannot build and distribute Titan for Cygwin which is GPL-licensed. However from pure technical standpoint Titan can be compiled on Cygwin ( for own use, without re-distributing it) as detailed in the README.cygwin file (https://github.com/eclipse/titan.core).

-projects you will build with this Titan will require a Makefile. This Makefile can be generated with the makefilegen command line utility or from within the Designer plug-in.
Such a Makefile will contain a section for platform specific libraries:

#
# Do not modify these unless you know what you are doing...
# Platform specific additional libraries:
#
SOLARIS_LIBS = -lsocket -lnsl -lxml2
SOLARIS8_LIBS = -lsocket -lnsl -lxml2
LINUX_LIBS = -lxml2 -lssl
FREEBSD_LIBS = -lxml2
WIN32_LIBS = -lxml2 



One will need to indicate here the libraries one wishes to use ;
for instance if your project will contain a test port that will use TLS/DTLS , which requires OpenSSL , you will have to indicate this by adding -lssl to WIN32_LIBS
WIN32_LIBS = -lxml2 -lssl


(-lxml2 is added automatically when generating the Makefile)

Once Titan installed in Cygwin, the Eclipse plug-ins can be installed and configured to use it. Recommendation is that you install Eclipse under Windows (not within the Cygwin environment).

Similarly, Titan can also be built for MinGW(see README.mingw) , but it's use is limited: it can compile TTCN-3 code, thus going through syntactic and semantic checks, but it cannot execute it.

These being said, let me add that Titan is most at home and performs best on Linux/Unix-like platforms. Cygwin, and obviously MinGW, are compromises which should be avoided if possible,


I hope this clarifies the issue.

Best regards
Elemer


Re: How to use WIN32 librarys in cygwin+eclipse titan? [message #1753651 is a reply to message #1753562] Wed, 08 February 2017 13:58 Go to previous messageGo to next message
Matt Li is currently offline Matt LiFriend
Messages: 5
Registered: February 2017
Junior Member
dear Elemer,
Thank you so much for your detailed answer, that solved my doubts. Besides, I want to build a GUI for my test system, but I dont know how to start, can you give me some suggestion or guidance ? Many thanks~


Matt
Re: How to use WIN32 librarys in cygwin+eclipse titan? [message #1753659 is a reply to message #1753651] Wed, 08 February 2017 14:58 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Matt,

by now of course you know that Titan has it's own IDE/GUI in form of Eclipse plug-ins; Designer, Executor, LogViewer and Titanium.
The Executor plug-in permits execution of test suites from the Eclipse environment.


As stated in the Eclipse Executor Userguide,


The TITAN Executor plug-in is built on the TITAN Executor and provides support for the following launch and execution modes:
• Single mode:
This mode executes the built executable, and parses its output for information that can be displayed.
There is no limitation on the amount of simultaneously running executions of this kind.
• Parallel mode:
This mode executes the mctr_cli program, and continuously parses its output for information that can be displayed.
Although some functions can be reached from the graphical user interface, the main advantage of this launch mode is
that it can be driven from its console window, just as mctr_cli could be driven from the command line.
The user interface reacts to console outputs by the mctr_cli. However, as the user is able to change every aspect
of the test execution system from outside the execution monitor view, an always consistent controlling environment
cannot be provided. There is no limitation on the amount of simultaneously running executions of this kind.
• JNI mode:
This mode executes the main controller through the JNI interface, and continuously parses its output for information that
can be displayed. The functions can be reached from the graphical user interface. The user interface reacts to the state
changes of the main controller through a pipe. There is no limitation on the amount of simultaneously running
executions of this kind.
NOTE: Execution in JNI mode is not supported on Windows


This means that for your own dedicated GUI you have also two options : use the CLI or the JNI interface.

The JNI execution interface API is exposed in the Titan Executor API, see
https://github.com/eclipse/titan.core/tree/master/titan_executor_api

which permits an external Java application to control and execute a Titan test suite.

Also , you can check the Titan Executor plug-in code in
https://github.com/eclipse/titan.EclipsePlug-ins



I hope this helps

Best regards
Elemer






Re: How to use WIN32 librarys in cygwin+eclipse titan? [message #1753691 is a reply to message #1753659] Thu, 09 February 2017 01:40 Go to previous messageGo to next message
Matt Li is currently offline Matt LiFriend
Messages: 5
Registered: February 2017
Junior Member
Dear Elemer,
That's a great answer for me. I had noticed CLI and JNI before, but I was not sure .
With your guidance, I believe I will do the right thing.

thanks a million!

Matt

[Updated on: Thu, 09 February 2017 02:09]

Report message to a moderator

Re: How to use WIN32 librarys in cygwin+eclipse titan? [message #1754618 is a reply to message #1753659] Tue, 21 February 2017 06:18 Go to previous messageGo to next message
Matt Li is currently offline Matt LiFriend
Messages: 5
Registered: February 2017
Junior Member
Dear Elemer,
Where can I get the cli user manual? I want to learn more about command line interface.
Thank you~



Matt.
Re: How to use WIN32 librarys in cygwin+eclipse titan? [message #1754639 is a reply to message #1754618] Tue, 21 February 2017 08:59 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Matt,

the documentation is contained in the binary package that you can download from https://projects.eclipse.org/projects/tools.titan/downloads
see directory /doc.
The documentation can also be downloaded as a separate package from https://www.eclipse.org/downloads/download.php?file=/titan/TitanDocuments.tgz

The CLI is described in the Titan userguide
and in parts of the reference guide e.g.:
6.1 Command line syntax
11 The TTCN-3 debugger


There's also an amount of on-line help available (more like a reminder)


 compiler 
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor, version CRL 113 200/6 R1A

usage: compiler [-abcdEfgijlLMnOpqrRsStuwxXyY] [-J file] [-K file] [-z file] [-V verb_level]
        [-o dir] [-U none|type|'number'] [-P modulename.top_level_pdu_name] [-Q number] ... 
        [-T] module.ttcn [-A] module.asn ...                                                
        or  compiler -v                                                                     
        or  compiler --ttcn2json [-jf] ... [-T] module.ttcn [-A] module.asn ... [- schema.json]

OPTIONS:
        -a:             force XER in ASN.1 files
        -b:             disable BER encoder/decoder functions
        -B:             allow selected union field to be unbound (legacy behavior)
        -c:             write out checksums in case of error                      
        -d:             treat default fields as omit                              
        -E:             display only warnings for unrecognized encoding variants  
        -f:             force overwriting of output files                         
        -g:             emulate GCC error/warning message format                  
        -i:             use only line numbers in error/warning messages
        -j:             disable JSON encoder/decoder functions
        -J file:        read input files from file
        -K file:        enable selective code coverage
        -l:             include source line info in C++ code
        -L:             add source line info for logging
        -M:             allow 'omit' in template value lists (legacy behavior)
        -n:             activate debugger (generates extra code for debugging)
        -o dir:         output files will be placed into dir
        -p:             parse only (no semantic check or code generation)
        -P pduname:     define top-level pdu
        -q:             suppress all messages (quiet mode)
        -Qn:            quit after n errors
        -r:             disable RAW encoder/decoder functions
        -R:             use function test runtime (TITAN_RUNTIME_2)
        -s:             parse and semantic check only (no code generation)
        -S:             suppress context information
        -t:             generate Test Port skeleton
        -u:             duplicate underscores in file names
        -U none|type|'number':  select code splitting mode for the generated C++ code
        -V verb_level:  set verbosity level bitmask (decimal)
        -w:             suppress warnings
        -x:             disable TEXT encoder/decoder functions
        -X:             disable XER encoder/decoder functions
        -y:             disable subtype checking
        -Y:             enforce legacy behaviour for "out" function parameters (see refguide)
        -z file:        enable profiling and code coverage for the TTCN-3 files in the argument
        -T file:        force interpretation of file as TTCN-3 module
        -A file:        force interpretation of file as ASN.1 module
        -v:             show version
        --ttcn2json:    generate JSON schema from input modules
JSON schema generator options:
        -j:             only include types with JSON encoding
        -f:             only generate references to types with JSON encoding/decoding functions




mctr_cli

*************************************************************************
* TTCN-3 Test Executor - Main Controller 2                              *
* Version: CRL 113 200/6 R1A                                            *
* Copyright (c) 2000-2017 Ericsson Telecom AB                           *
* All rights reserved. This program and the accompanying materials      *
* are made available under the terms of the Eclipse Public License v1.0 *
* which accompanies this distribution, and is available at              *
* http://www.eclipse.org/legal/epl-v10.html                             *
*************************************************************************

MC@esekilxxen1846: Unix server socket created successfully.
MC@esekilxxen1846: Listening on TCP port 38109.
MC2> help
Help is available for the following commands:
cmtc smtc stop pause continue emtc log info reconf help ! quit exit batch debug dsetbp drembp dautobp doutput dglobbatch dcallcfg dsettings dlistcomp dsetcomp dprintstack dstacklevel dlistvar dprintvar dsetvar dprintcalls dstepover dstepinto dstepout drunto dhalt dcont dexit
MC2>
MC2>
MC2>
MC2> help cmtc
cmtc usage: cmtc [hostname]
Create the MTC.
MC2>


I hope this helps

Best regards
Elemer
Previous Topic:Using TLS/DTLS with Titan test ports part2
Next Topic:Using TLS/DTLS with Titan test ports part3
Goto Forum:
  


Current Time: Thu Mar 28 18:56:27 GMT 2024

Powered by FUDForum. Page generated in 0.05292 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top