7.2.2. String: Hello World
In the good habit of every tutorial, we will write a Hello World application, that sends the string “Hello World” to an eCAL topic. It will utilize the eCAL string publisher to send the message, which is a really thin layer on top of the binary. The second part will be all about the subscriber, which will receive the message and print it to the console.
Basically, by using eCAL’s message API, we no longer send raw binary data, but utf-8 encoded strings. Hence, depending on the native string handling in the programming language, the serialization is “just” an utf-8 encoding / decoding of a string.
All other available methods for binary publishers and subscribers are also available for message publishers and subscribers.
7.2.2.1. Hello World Publisher
7.2.2.2. Hello World Publisher Files
|fa-folder-open| Publisher samples ├─ |fa-folder-open| C++ │ └─ |fa-file-alt|hello_send.cpp
│ ├─ |fa-folder-open| C │ └─ |fa-file-alt|hello_send.c
│ ├─ |fa-folder-open| C# │ └─ |fa-file-alt|hello_send.cs
│ ├─ |fa-folder-open| Python │ └─ |fa-file-alt|hello_send.py
│ └─ |fa-folder-open| Python (legacy) └─ |fa-file-alt|hello_send.py
7.2.2.3. Hello World Subscriber
7.2.2.4. Hello World Subscriber Files
|fa-folder-open| Subscriber samples ├─ |fa-folder-open| C++ │ └─ |fa-file-alt|hello_receive.cpp
│ ├─ |fa-folder-open| C │ └─ |fa-file-alt|hello_receive.c
│ ├─ |fa-folder-open| C# │ └─ |fa-file-alt|hello_receive.cs
│ ├─ |fa-folder-open| Python │ └─ |fa-file-alt|hello_receive.py
│ └─ |fa-folder-open| Python (legacy) └─ |fa-file-alt|hello_receive.py