Content
This is a one minute example showing how to use reme_bag_t, reme_bag_builder_t and reme_remote_t to communicate between two instances of ReconstructMe SDK running on different devices.
Boost is only used to generate examples and is not necessary for working with this SDK.
#include <boost/test/unit_test.hpp>
#include <iostream>
BOOST_AUTO_TEST_SUITE(example_reconstructmesdk)
BOOST_AUTO_TEST_CASE(remote_a)
{
const char *topics[] = { "system/shutdown", "system/greet" };
bool done = false;
while (!done) {
int topicIndex = -1;
const char *topicName = 0;
if (topicIndex == 0) {
done = true;
}
if (topicIndex == 1) {
}
}
}
BOOST_AUTO_TEST_CASE(remote_b)
{
const char *topics[] = { "system/shutdown", "system/greetings" };
bool done = false;
while (!done) {
int topicIndex = -1;
const char *topicName = 0;
if (topicIndex == 0) {
done = true;
}
if (topicIndex == 1) {
int i;
const char *str = 0;
printf("int: %d, string: %s\n", i, str);
}
}
}
BOOST_AUTO_TEST_SUITE_END()