spine-cpp
C++ bindings for the Spine communication framework. Used for low-level hardware modules including the STM32 embedded layer and real-time control systems.
Installation
git clone https://github.com/poisnoir/spine-cpp
Quick Start
#include "spine.h"
int main() {
spine::Node node("my-node");
// Subscribe to a topic
node.subscribe("sensor/data", [](const spine::Msg& msg) {
// handle incoming message
});
// Publish to a topic
node.publish("sensor/data", "hello");
// Start — begins mDNS discovery automatically
node.start();
return 0;
}
RPC
// Expose a service
node.handle("arm/move", [](const spine::Msg& req) -> spine::Msg {
return spine::Msg{"ok"};
});
// Call a remote service
auto resp = node.call("arm/move", "target");