Hi Michael.
The default implementation of rosstalk.sendMessage is used for "fire and forget" messages (messages that do not require a response".
To receive an acknowledgement from your device, you will need to either use a `
` tag, or take advantage of a feature we introduced in DashBoard 6.2.4 called `sendMessageWithResponse`:
`
function callback(success, sentData, resultString, exception)
{
}
rosstalk.sendMessageWithResponse('[host]', [port], '[message]', '[end of message indicator]', callback);
`
So, in your example, you would nee to know what terminates the response - here is an example where we would wait for a newline character `'n'`.
(NOTE: Due to an issue with this forum, I can't seem to make the character appear correctly. A newline is actually `[backslash]n`)
`rosstalk.sendMessageWithResponse(ogscript.getPriv ateString('hosts', 'CasparCG.host'), parseInt(ogscript.getPrivateString('hosts', 'CasparCG.port')), 'INFO', 'n', callback);
function callback(success, sentData, resultString, exception)
{
if (success) {
ogscript.debug("Sent Data: " + sentData);
ogscript.debug("TCP result: " + resultString);
} else{
ogscript.debug("exception: " + exception);
}
}`
#DashBoard