Hi,
I have an application that is subscribing to data on a specific instance. Code to do this works fine, as per the RTI worked examples:
dds::sub::LoanedSamples<DataType> samples = reader.select().max_samples(1).instance(instance_handle).read();
for (const auto& sample : samples) {
if (sample.info().valid()) {
std::cout << "Subscribed to InstanceID: " << sample.data().InstanceID() << std::endl;
DataType dataOut = sample.data();
}
}