Revision history [back]

click to hide/show revision 1
initial version

if you are making modifications to the basic_client sample all you should need to do to get a LostAdvertisedName signal is add the following code to the MyBusListener class:

void LostAdvertisedName(const char* name, TransportMask transport, const char* namePrefix) {
    printf("LostAdvertisedName(name='%s', prefix='%s')\n", name, namePrefix);
}

However, running the code you will see that the LostAdvertisedName is still not called this is simply because the basic_client exits before the routing node has time to send out the LostAdvertisedName signal.

if you are using the basic_client and basic_service samples. You will need to add some code that waits at the end of the basic_client before destroying the BusAttachment. Then run the service and client. When you exit the client you should get a LostAdvertisedName.

Side note:

  • RequestName and ReleaseName only specify local ownership the name can not be found till you do an AdvertiseName
  • AdvertiseName and CancelAdvertiseName is called once you already have local ownership of the name
  • you will not get the FoundAdvertisedName or the LostAdvertisedName signals till you have called the FindAdvertisedName method
  • NameOwnerChanged signal will not be sent for a remote name till you establish a session. The NameOwnerChanged signal is only reliable for locally owned names. You should use the functions/callbacs that specify Advertise or Advertised in the function name for anything that is going between two devices or two applications with routing nodes built into the application.

if you are making modifications to the basic_client sample all you should need to do to get a LostAdvertisedName signal is add the following code to the MyBusListener class:

void LostAdvertisedName(const char* name, TransportMask transport, const char* namePrefix) {
    printf("LostAdvertisedName(name='%s', prefix='%s')\n", name, namePrefix);
}

However, running the code you will see that the LostAdvertisedName is still not called this is simply because the basic_client exits before the routing node has time to send out the LostAdvertisedName signal.

if you are using the basic_client and basic_service samples. You will need to add some code that waits at the end of the basic_client before destroying the BusAttachment. Then run the service and client. When you exit the client you should get a LostAdvertisedName.

Side note:

  • RequestName and ReleaseName only specify local ownership the name can not be found till you do an AdvertiseName
  • AdvertiseName and CancelAdvertiseName is called once you already have local ownership of the name
  • you will not get the FoundAdvertisedName or the LostAdvertisedName signals till you have called the FindAdvertisedName method
  • NameOwnerChanged signal will not be sent for a remote name till you establish a session. The NameOwnerChanged signal is only reliable for locally owned names. You should use the functions/callbacs functions/callbacks that specify Advertise or Advertised in the function name for anything that is going between two devices or two applications with routing nodes built into the application.