How does the GposClient and Gpos look for each other and not a different class?

OpenJAUSTips and Tricks

Q: How does the GposClient and Gpos look for each other and not a different class? Is it correct to assume it involves the lookupService?

A: That is done in the ‘1’ case of the switch of the GposDemo.cpp file:
case '1':
{
gposList = component.getSystemTree()->lookupService("urn:jaus:jss:mobility:GlobalPoseSensor");
std::cout << "GPOS Services (" << gposList.size() << "):\n"; for(size_t i = 0; i < gposList.size(); i++) { std::cout << "\t" << gposList.at(i).toString() << std::endl; } break; }

The lookupService() function looks in the SystemTree for a component which has the URI provided. URIs are the globally unique identifiers for a given JAUS service. In this example you could also get the URI from the SDK by calling the following function: openjaus::mobility::GlobalPoseSensorInterface::GlobalPoseSensorUri();