Facility Control

 View Only
  • 1.  Dashboard Ping

    Posted 05-24-2018 13:57
    Hey Guys, does anyone know if there is a built in way to Ping an external device from Dashboard to see if it is online?

    Thanks,


  • 2.  RE: Dashboard Ping

    Posted 05-24-2018 14:09

    There is no equivalent to a ping command in ogScript. Many of our devices will either maintain an active connection, send 'heartbeat' (no-op) messages if the protocol supports it, or simply update status based on the result of trying to send the previous message.

    The callback of rosstalk.sendMessage contains a success flag which you can use to see if your message send was able to happen. If it wasn't, the reason can usually be found in the 'exception'

    function callback(success, sentData, resultString, exception)
    {
        if (!success)
        {
          ogscript.debug("UNABLE TO SEND MESSAGE: " + exception);
        }
    }
    rosstalk.sendMessage('[host]', [port], '[message]', callback);

    James


    #DashBoard


  • 3.  RE: Dashboard Ping

    Posted 05-24-2018 14:21
    Roger that James, Thanks!
    #DashBoard