Skip to content

expploitt/zenoh-pico

 
 

Repository files navigation

zenoh banner

Build Crossbuild integration Documentation Status Gitter License License

Eclipse zenoh C Client API

Eclipse zenoh is an extremely efficient and fault-tolerant Named Data Networking (NDN) protocol that is able to scale down to extremely constrainded devices and networks.

zenoh-pico targets constrained devices and offers a C API for pure clients, i.e., it does not support peer-to-peer communication. zenoh-pico can be easily tested against a zenoh router running in a Docker container (see https://github.com/eclipse-zenoh/zenoh#how-to-test-it).


How to install it

The Eclipse zenoh-pico library is available as Debian, RPM, and tgz packages in the Eclipse zenoh-pico download area. Those packages are built using manylinux2010 x86-32 and x86-64 to be compatible with most of the Linux platforms. There are 2 kind of packages:

  • libzenohpico: only contains the library file (.so)
  • libzenohpico-dev: contains the zenoh-pico header files for development. Depends on libzenohpico package

For other platforms, you will need to clone and build the sources.

WARNING: Note that zenoh-pico has not been ported on Windows yet!


How to build it

To build the zenoh-pico client API you need to ensure that cmake is available on your platform -- if not please install it.

Once the cmake dependency is satisfied, just do the following for CMake version 3 and higher:

-- CMake version 3 and higher --

$ cd /path/to/zenoh-pico
$ make
$ make install # on Linux use **sudo**

If you want to build with debug symbols set the BUILD_TYPE=Debugenvironment variable before to run make:

$ cd /path/to/zenoh-pico
$ BUILD_TYPE=Debug make
$ make install # on Linux use **sudo**

For those that still have CMake version 2.8, do the following commands:

$ cd /path/to/zenoh-pico
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ../cmake-2.8
$ make 
$ make install # on Linux use **sudo**

Running the Examples

The simplest way to run some of the example is to get a Docker image of the zenoh network router (see http://zenoh.io/docs/getting-started/quick-test/) and then to run the examples on your machine.

Starting the zenoh Network Service

Assuming you've pulled the Docker image of the zenoh network router, then simply do:

$ docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp eclipse/zenoh

To see the zenoh manual page, simply do:

$ docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp eclipse/zenoh --help

Basic Pub/Sub Example

Assuming that (1) you are running the zenoh network router, and (2) you are under the build directory, do:

$ ./zn_sub

And on another shell, do:

$ ./zn_pub

Basic Eval/Query Example

Assuming you are running the zenoh network service, do:

$ ./zn_eval

And on another shell, do:

$ ./zn_query

About

Eclipse zenoh for pico devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 93.3%
  • CMake 3.1%
  • C++ 2.7%
  • Other 0.9%