How to map the DeviceId and busName in ControlPanelController in the same time?

asked 2014-10-07 04:58:06 -0700

StannisLin gravatar image

updated 2015-01-31 23:37:36 -0700


I am programming a ControlPanel App via C++. I can get the

  1. DeviceId of a controllee device (ControlPanelDevice) via AboutClient when announceHandlerCallback has been triggered.

  2. busName in ControlPanelController when ControlPanelListenerImpl::sessionEstablished be called.

But I can not get a DeviceId in ControlPanelDevice. My question is:

  1. How to map the DeviceId and busName in ControlPanelController?

  2. Can I get ControlPanelController's rootContainer (buy busName) and deviceId in the same time?



I have a idea and already finished it for busName - deviceId mapping and managing of the controllee device. There are two new class which are BusIdMap and IdData for busName, deviceId, and ControlPanelDevice managing in my App.

My idea as the following:

  1. Define a map object in global for busName and deviceId mapping at main code file: std::map<string, MyDevContextClass> aliveControllee; //busName, MyDevContextObj

  2. Manage this map obj in announceHandlerCallback, ControlPanelListenerImpl, and main loop et al.

It works well in my ControlPanelController App, but it seems not a safety solution.

Does any AllJoyn framework API could help me to do busName - deviceId mapping and managing ??


My new question of this implement:


edit retag flag offensive close merge delete


I'm using a similar mechanism - storing both busName and DeviceId when the Announce callback is called, then looking them up when needed.

anszom ( 2014-11-04 04:07:02 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-07 15:45:42 -0700

bspencer gravatar image

You are on the right path, there is no API or tracking a DeviceId to BusId mapping. You need to do the book keeping yourself. AllJoyn as a software stack does't care about the DeviceId, it just needs to know who to deliver an AllJoyn Message to, hence the BusId information that it uses to lookup how to route the packet to the destination. The Service frameworks make higher level use of information that is sent from other service frameworks. Their eventually may be a helper set of APIs that helps manage the information that one typically needs in a complex application, but at this time it does not exist.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-10-07 04:58:06 -0700

Seen: 113 times

Last updated: Jan 31 '15