Looking for Minimal C++ Server-Client Example to Get Started with libcyphal. (OpenCyphal Beginner)

Hi,

I’m learning OpenCyphal and libcyphal. I’ve set up my development environment via DevContainer and cloned the libcyphal repository successfully.

However, I’ve tried to cmake and make but cannot build a minimal runnable application on my own.

My goal is: implement two independent Cyphal nodes running as separate Linux processes, a RPC server (thermostat device) and a RPC client (temperature controller). The client sends target temperature values to the server to adjust its internal temperature via OpenCyphal communication over UDP (local inter-process communication without physical CAN hardware).

Could anyone share a ready-to-compile minimal C++ sample project or provide a complete CMake setup tailored for libcyphal? A simple out-of-box example would help me quickly understand the core API, transport initialization, DSDL code generation and service RPC workflow of libcyphal.

If you are building from scratch, I strongly suggest starting with Cy instead of libcyphal; it comes with examples and offers a much easier to use API: GitHub - OpenCyphal-Garage/cy: Cyphal v1.1 in C: robust decentralized pub/sub with optional reliability and service discovery in a few thousand lines of code. · GitHub

We also have a new Python implementation if you’re interested: GitHub - OpenCyphal/pycyphal: Python implementation of the Cyphal protocol stack. · GitHub

This is all marked as a work in progress but it is approaching the point where one could call it reasonably stable. Additional context here: V1.1 early draft preview by pavel-kirienko · Pull Request #151 · OpenCyphal/specification · GitHub

1 Like