This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
arcs2:compiling_the_sample_library [2013/08/19 21:01] didier |
arcs2:compiling_the_sample_library [2013/08/20 15:57] (current) didier [Running an example associated to sample library] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Compiling and running the sample library ====== | ||
+ | Once ARCS is installed (see [[arcs2:installing_arcs|this page]]), you can check the behaviour of the engine by compiling a small sample. In the unpacked sources, you will find a ''sample'' directory that contains the necessary sources. **Please notice that 1/ you must be familiar with build processes involving Qt, 2/ the procedure below is given for Unix-like systems but may be easily transposed under Windows.** | ||
+ | |||
+ | ===== Compiling the sources ===== | ||
+ | In order to compile the sources, you will have to perform the following steps: | ||
+ | - move in ''sample'' subdirectory; | ||
+ | - launch the ''arcslibmaker'' utility. It will produce a project file; | ||
+ | - generate a ''Makefile'' (for unix): ''qmake''; | ||
+ | - launch the compilation itself: ''make''. | ||
+ | At the end of this procedure, you will find a library named ''libsample.so''. | ||
+ | |||
+ | ===== Running an example associated to sample library ===== | ||
+ | In the subfolder ''tests/xmlfiles'' you will find an XML file named ''loop.xml''. | ||
+ | This file contains the description of an application as seen by the ARCS engine. | ||
+ | If you want to run the example you will just have to run it with the ''arcsengine'' program. | ||
+ | A well behaved running session should look like this: | ||
+ | <code> | ||
+ | $ arcsengine loop.xml | ||
+ | Application loop.xml loaded. | ||
+ | ================================================== | ||
+ | [INF!arcsapplicationcomponent.cpp:96] $ Rev: 207 $ | ||
+ | [INF!arcsapplicationcomponent.cpp:63] needed to make "this" | ||
+ | [INF!Application mode] event | ||
+ | [Loop] Emitting iteration 0 | ||
+ | [DInt] Received integer 0 | ||
+ | [Loop] Emitting iteration 1 | ||
+ | [DInt] Received integer 1 | ||
+ | [Loop] Emitting iteration 2 | ||
+ | [DInt] Received integer 2 | ||
+ | [Loop] Emitting iteration 3 | ||
+ | [DInt] Received integer 3 | ||
+ | [Loop] Emitting iteration 4 | ||
+ | [DInt] Received integer 4 | ||
+ | [INF!arcsapplicationcomponent.cpp:121] main process has finished. | ||
+ | </code> | ||
+ | |||
+ | You can also try the following command lines and see how it affects the behaviour: | ||
+ | * ''arcsengine -d iterations=15 loop.xml'' | ||
+ | * ''arcsengine -p profile_2.xml loop.xml'' | ||
+ | For more information on arcsengine, you can consult its [[http://arcs.ibisc.univ-evry.fr/doc/arcsengine.html|manpage]]. | ||
+ | |||
+ | If you want additional explanations on the behaviour of this application, you may be interested by [[arcs2:understanding_the_example_application_loop.xml|this page]]. |