Programming interface
3.5 Code examples
SIMATIC RTLS4083T
Operating Instructions, 08/2021, C79000-G8976-C646-02
23
console.error(e)
process.exit(1);
}
console.log("connect to wamp-router", config.wamp.name)
var connection = new autobahn.Connection({
url: config.wamp.url,
realm: config.wamp.realm,
max_retries: 1,
authmethods: ['wampcra'],
authid: config.wamp.user,
onchallenge: function (session, method, extra) {
if (method === "wampcra") {
return autobahn.auth_cra.sign(config.wamp.key,
extra.challenge);
}
}
});
connection.onopen = function (session) {
console.log("connected to wamp-router", config.wamp.name)
if ( config.debug ) console.info("check epaper api tags")
session.call("agilion.wls.epaper.get_tags").then(
function (res) {
/*if ( config.debug ) console.log("epaperapi response:",
res);*/
for (let etag of config.tagwhitelist){
var isin = false
for (let epaper of res["args"][1]){
if ( config.debug ) console.log("check epaperadr", epaper[0]);
if (epaper[0] == etag.addr){
isin = true
break
}
}
if (isin == false){