0

When creating bus object, how do I know path of something advertising?

asked 2015-07-15 23:06:10 -0800

eekshs16 gravatar image

In sample code(basic_client), path is already determined.

Should path be fixed?

Is there any methods to know path of advertising one?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-16 02:37:09 -0800

trandatnh gravatar image

updated 2015-07-16 02:37:47 -0800

You can use ajn::AboutObjectDescription::GetPaths to get paths.

This is an example of how to use GetPaths from method TimeServiceClient::analyzeObjectDescriptions of TimeServiceClient.cc

size_t numPaths = aboutObjectDescription.GetPaths(NULL, 0);
const char** paths = new const char*[numPaths];
aboutObjectDescription.GetPaths(paths, numPaths);
for (size_t p = 0; p < numPaths; p++) {
    qcc::String objectPath(paths[p]);
    size_t numInterfaces = aboutObjectDescription.GetInterfaces(objectPath.c_str(), NULL, 0);
edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-07-15 23:06:10 -0800

Seen: 28 times

Last updated: Jul 16 '15