I'm trying to understand DDS and learn it. I've been reading tutorials here and there about OpenSplice DDS, and there's something there puzzling me.
In this tutorial, the tutor mentions that there's some kind of "Magic" in page 8 that the publisher and subscriber are decoupled where participants are automatically detected.
But what if I have a participant in another computer? Or maybe in another country?
Taking a look at this example of a publisher:
dds::Topic<TempSensorType> tsTopic("TempSensorTopic");
dds::DataWriter<TempSensorType> dw(tsTopic);
TempSensorTypets = {1, 26.0F, 70.0F, CELSIUS};
dw.write(ts);
and this example of a subscriber:
dds::Topic<TempSensorType> tsTopic("TempSensorTopic");
dds::DataReader<TempSensorType> dr(tsTopic);
dds::SampleInfoSeq info;TempSensorSeq data;
while (true)
{ dr.read(data, info);
for (inti =0; i < data.length(); ++i)
std::cout << data[i] << std::endl;sleep(1);
}
and this full working example of both (tspub.cpp
is publisher, and tssub.cpp
is subscriber), I don't understand how people could connect remotely. How can I subscribe to another machine? How can I get this nice and simple example to work remotely?
Please ask if you require more information or details.