
Programming interface
3.5 Code examples
SIMATIC RTLS4083T
22
Operating Instructions, 08/2021, C79000-G8976-C646-02
Code example WAMP connection with RPC call
console.log("start")
var config = null
function changetheme(session, addr, themeid, param){
console.log("change zone for etag (zoneid,etag)",themeid,addr)
var epapercmd = [parseInt(addr,10),parseInt(themeid,10),param]
if ( config.debug ) console.log("send epapercmd: ",epapercmd)
session.call("agilion.wls.epaper.set_display_theme",
epapercmd).then(
function (res) {
if ( config.debug ) console.log("epaperapi response:", res);
/*
Code Bedeutung
* 0x0000 No error
* 0x0011 TransponderID invalid
* 0x0012 ThemeID invalid
* 0x0013 FieldID invalid
* 0x0101 Text length invalid
* 0x0102 Text contains invalid characters or characters not
supported
*/
}
);
}
console.log("load configuration")
try {
var config = require('./config.json')
} catch (e) {
console.error(e)
process.exit(1);
}
console.log("load autobahn")
try {
var autobahn = require('autobahn')
} catch (e) {