Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • cameo cameo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Cameo
  • cameocameo
  • Wiki
  • Linux examples

Last edited by yannick legoc Feb 24, 2022
Page history

Linux examples

Setup

The Java, C++ and Python examples can be run using either jzmq or jeromq.

Open a shell and go to the root Cameo directory:

Set the PATH variable so that the C++ programs are found:

$ export PATH=build/examples/cpp:$PATH

If necessary, set the PYTHONPATH variable so that the cameopy module is found. The path is dependent on the system e.g.:

$ export PYTHONPATH=<cameo-build-path>/lib/python3/dist-packages:$PYTHONPATH

Select jzmq or jeromq Java library.

Case jzmq:

$ export CLASSPATH=examples/java/jzmq/target/cameo-examples-jzmq-full.jar

You shall define the variable LD_LIBRARY_PATH so that libjzmq.so is found:

$ export LD_LIBRARY_PATH=<path-to-libjzmq>

In each new shell, create the alias for cmo:

$ alias cmo="java -jar java/console-jzmq/target/cameo-console-jzmq-2.0.0-full.jar"

Case jeromq:

$ export CLASSPATH=examples/java/jeromq/target/cameo-tests-jeromq-full.jar

In each new shell, create the alias for cmo:

$ alias cmo="java -jar java/console/target/cameo-console-2.0.0-full.jar"

Requester/Responder

Java

The requester/responder in Java can be tested. First start the Cameo server:

$ java fr.ill.ics.cameo.server.Server examples/java/config.xml --log-console

Then start the responder in a new shell:

$ cmo -p 10000 exec responder

Execute a requester in a new shell:

$ cmo -p 10000 exec requester my-request 10

C++

The requester/responder in C++ can be tested. First start the Cameo server:

$ java fr.ill.ics.cameo.server.Server examples/cpp/config.xml --log-console

Then start the responder in a new shell:

$ cmo -p 10000 exec responder

Execute a requester in a new shell:

$ cmo -p 10000 exec requester my-request 10

Execute the requester with the Java responder:

$ cmo -p 10000 exec requester my-request 10 tcp://localhost:10000

Python

First start the Cameo server:

$ java fr.ill.ics.cameo.server.Server examples/python/config.xml --log-console

In a shell, start the responderpy test:

$ cmo -p 10000 exec responderpy

In a shell, start the requesterpy application:

$ cmo -p 10000 exec requesterpy 1000

Publisher/Subscriber

Java

The publisher/subscriber in Java can be tested. First start the Cameo server:

$ java fr.ill.ics.cameo.server.Server examples/java/config.xml --log-console

Then start the publisher in a new shell:

$ cmo -p 10000 exec publisher

Execute a subscriber in a new shell:

$ cmo -p 10000 exec subscriber

C++

The publisher/subscriber in C++ can be tested. First start the Cameo server:

$ java fr.ill.ics.cameo.server.Server examples/cpp/config.xml --log-console

Then start the publisher in a new shell:

$ cmo -p 10000 exec publisher

Execute a subscriber in a new shell:

$ cmo -p 10000 exec subscriber

Execute the requester with the Java publisher:

$ cmo -p 10000 exec subscriber tcp://localhost:10000

Python

First start the Cameo server:

$ java fr.ill.ics.cameo.server.Server examples/python/config.xml --log-console

In a shell, start the publisherpy test:

$ cmo -p 10000 exec publisherpy

In a shell, start the subscriberpy application:

$ cmo -p 10000 exec subscriberpy
Clone repository
  • Cameo 2.0
  • Configure a server
  • Control the apps
  • Developments
  • First example
  • Implementation
  • Installation
  • JZMQ or JeroMQ?
  • Linux examples
  • Linux tests
  • Make the apps communicate
  • Synchronization
  • Test all the components
  • Windows compilation
  • Windows tests
View All Pages