Launch DCOD example

Get DCOD Using PEM

See PEM for an idea of to download an environment and download dcod environment.

Load your environment, with the command (example for environment 'dcod-stable'):

PromptTerm1> . /opt/pem/bin/pem-source -e dcod-stable -d /opt/pem

Check your OS

PromptTerm1> check_dcod_conf

Configuring your OS

Linux Utilities needed:


As root do a :

sysctl fs.mqueue.msg_max=256

and for old linux distro :

mkdir /dev/mqueue
mount -t mqueue none /dev/mqueue

To keep this value after a reboot add in /etc/sysctl.conf :


and in your /etc/rc.local :

mkdir /dev/mqueue
mount -t mqueue none /dev/mqueue

Configuring Environnment for DCOD + Narval

export PATH=$(HOME)/where-I-want-to-install-dcod/bin/:$PATH
export NARVAL_LIBS=$(HOME)/where-I-want-to-install-dcod/lib/
export NARVAL_SCRIPTS=$(HOME)/where-I-want-to-install-dcod/narval_scripts/
export NARVAL_CONFIG=$(HOME)/where-I-want-to-install-dcod/narval_config/
export POLYORB_CONF=$(HOME)/narval.conf

you need to configure Polyorb by creating $(HOME)/narval.conf file :

Prompt> generate_narval_conf
Prompt> cat ~/narval.conf

Running Narval "Data rate" example

Start dcod with a domain named "narval"

PromptTerm1> dcod_launch -p -n -c -m -d narval -l -v

If you want to add central_log :

PromptTerm1> dcod_launch -p -n -c -m -d narval -l -v -S "central_log --port server_port;--server server_ip;--name toto;--log_level debug" 
PromptTerm1> dcod_launch -p -n -c -m -d narval -l -v -S "central_log --file_name File_Name;--max_size_file 16777216;--name toto;--log_level debug"
PromptTerm1> dcod_launch -p -n -c -m -d narval -l -v -S "central_log --console true;--name toto;--log_level debug"

Where server port is 4444 in GANIL configuration and server_ip may be

After you can launch in an other terminal to see logs:

PromptTerm2> screen -r dcod_launch

And then you can launch command to start the "acquisition":

PromptTerm1> narval_script_launch.bash sub_system_name conf_file.graphml

To stop the acquisition :

PromptTerm1> narval_script_stop.bash sub_system_name

To clean the subsystem after a stop :

PromptTerm1> narval_shell --end_point http://localhost:5487 set action reset_com toto | xmlstarlet fo -
PromptTerm1> narval_shell --end_point http://localhost:5487 set action unload toto | xmlstarlet fo -
PromptTerm1> narval_shell --end_point http://localhost:5487 set action finish toto | xmlstarlet fo -

Compare narval stand alone vs narval

Narval STD Alone Narval Comments
Basic DCOD Tool needed PMH needed PMH needed and or CTL CTL needed only if multi hosts
dcod_launch options dcod_launch -m -s -l dcod_launch -m -n -p -l One can add a -L $LD_LIBRARY_PATH:/path_to_your_non_pem_libs - (!) if your default interface isn't eth0 you must use -b option (ex: -b eno1)
visu logs screen -r screen -r

Get DCOD old way

Sources Based (Old way)

If you lack CC mercurial access

Use the following archives :

If you have CC mercurial access

go where you want to put sources and then :

Prompt> hg clone ssh:// p42-dev
Prompt> cd 42-dev
Prompt> hg update -r 192:d63855d81695

go back where you want to put sources and then :

Prompt> hg clone ssh:// dcod-dev
Prompt> cd dcod-dev
Prompt> hg update -r 1357:5fbb2715a65b



Prompt> cd p42-dev
Prompt> ./configure --prefix=$HOME/nice_place_to_install_p42
Prompt> make && make install

DCOD Launcher

  • --enable-narval option will set a narval build / optionnal
  • --enable-enx option will set an ENX build / optionnal also
Prompt> cd dcod-dev
Prompt> ADA_PROJECT_PATH=$HOME/nice_place_to_install_p42/include/:/Where_Is_My_Gnat_Pro_Compiler/gnat_pro-7.2.1/include/ ./configure --prefix=$HOME/where-I-want-to-install-dcod --enable-narval --enable-enx
Prompt> make && make install

Install GNAT and usuals libraries

  • For a Debian wheezy system
Prompt> tar xjf build-gnat_pro-7.3.1-narval-ganil-shared-5.tar.bz2
Prompt> cd build-gnat_pro-7.3.1-narval-ganil-shared-5/
Prompt> cat README
Prompt> export PATH=$HOME/tools/gnat_pro-7.3.1/bin:$PATH
Prompt> export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
Prompt> export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
Prompt> export CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
Prompt> sed -e 's/xavier/YOUR_USER_NAME_HERE/' -i
Prompt> make base64 libs

Then add the 4 export lines to your ~/.bashrc for future use