1

I am using About+session Listener to control my lamp device. To receive the lampstatechange notification i have registered the signal handler for lampstatechange at announce (after introspect is success). But my application is not receiving the state change notification. Following are the code snippet i did to register lamp state signal. I am not able to understand what is happening why the callback is not receiving!

    const InterfaceDescription* uniqueId = bus.GetInterface(LampServiceStateInterfaceName);
    const InterfaceDescription::Member* sig = uniqueId->GetMember("LampStateChanged");
    if (sig) {
        QStatus sstatus = bus.RegisterSignalHandler(this, static_cast<MessageReceiver::SignalHandler>(&AJDeviceHandler::LampsStateChagedHandler), sig, "/org/allseen/LSF/Lamp");
        printf("\n RegisterSignalHandler %s \n",QCC_StatusText(sstatus));
    }

I have inherited the following classes of Alljoyn: class AJDeviceHandler : public AboutListener, public SessionListener, public lsf::Thread, public PingListener, public MessageReceiver

[Note: The state change callback receives perfect when i run lighting_controller_service].

gilly
  • 23
  • 5
  • By changing the session opts to multi point, it got fixed. Now i am getting the lampstate change notification. Can someone validate is this alone is enough or something more i have to follow? – gilly Feb 03 '17 at 12:24

0 Answers0