[MALOS] C++ Examples?

Is there any example like test_humidity of MATRIX CORE in C++?

I want to run a example to connect and get sensor data from MATRIX from another PC via zmq.

Thank you in advance!

Good question @Mikelmen,

No, currently we don’t have C++ examples that can talk to MALOS. You can use the NodeJS and python as reference and for a more close example use the MALOS code itself. For example, take a look at the everloop driver:

Maybe we can add c++ examples later. Thanks for the feedback.

-Yoel

Ok, thank you.

I do not know if I am doing well, I have configured the humidity driver, put a ping request every 5 seconds as in the example, but I have another thread trying to receive a message_t however the data is encoded I thing. How can I decode it?

And another question, Why are the ports not equals in the js and python examples ? (js: humidity_port = 20013 + 4, data port +3, but in python not adding +3)

Miguel

Regarding the question about the humidity port check in file the test_humidity.py line 69 the use of humidity_port and then inside the utils.py line 23 :

data_port = sensor_port + 3

-Yoel

Sorry, I should’ve shared this before

Thats how the data from ZMQ is parsed into a protobuf message … in C++

Let me know if you need more help

Ok, I did not see it, my fault.

Thank you.

Miguel