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