js/clients/SparkCore.js
function (showSignal, callback) {
        var timer = setTimeout(function () { callback(false); }, 30 * 1000);

        //TODO: that.stopListeningFor("RaiseYourHandReturn", listenHandler);
        //TODO:  var listenHandler = this.listenFor("RaiseYourHandReturn",  ... );

        //logger.log("RaiseYourHand: asking core to signal? " + showSignal);
        var token = this.sendMessage("RaiseYourHand", { _writeCoapUri: messages.raiseYourHandUrlGenerator(showSignal) }, null);
        this.listenFor("RaiseYourHandReturn", null, token, function () {
            clearTimeout(timer);
            callback(true);
        }, true);

    }
function (showSignal, callback) {
        var timer = setTimeout(function () { callback(false); }, 30 * 1000);

        //TODO: that.stopListeningFor("RaiseYourHandReturn", listenHandler);
        //TODO:  var listenHandler = this.listenFor("RaiseYourHandReturn",  ... );

        //logger.log("RaiseYourHand: asking core to signal? " + showSignal);
        var token = this.sendMessage("RaiseYourHand", { _writeCoapUri: messages.raiseYourHandUrlGenerator(showSignal) }, null);
        this.listenFor("RaiseYourHandReturn", null, token, function () {
            clearTimeout(timer);
            callback(true);
        }, true);

    }
function ( showSignal , callback ) { var timer = setTimeout ( function ( ) { callback ( false ) ; } , 30 * 1000 ) ; //TODO: that.stopListeningFor("RaiseYourHandReturn", listenHandler); //TODO:  var listenHandler = this.listenFor("RaiseYourHandReturn",  ... ); //logger.log("RaiseYourHand: asking core to signal? " + showSignal); var token = this . sendMessage ( "RaiseYourHand" , { _writeCoapUri : messages . raiseYourHandUrlGenerator ( showSignal ) } , null ) ; this . listenFor ( "RaiseYourHandReturn" , null , token , function ( ) { clearTimeout ( timer ) ; callback ( true ) ; } , true ) ; }
Asks the core to start or stop its "raise your hand" signal
@param showSignal - whether it should show the signal or not
@param callback - what to call when we're done or timed out...
Asks the core to start or stop its raise your hand signal