<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Wialon Playground - Get units</title>
<script type="text/javascript" src="//code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="//hst-api.wialon.com/wsdk/script/wialon.js"></script>
</head>
<body>
<pre id="log"></pre>
</body>
</html>
#log { border: 1px solid #c6c6c6; }
.icon {float:left; margin:10px;}
// Print message to log
function msg(text) { $("#log").prepend(text + "<br/>"); }
function init() { // Execute after login succeed
var s = wialon.core.Session.getInstance(); // get instance of current Session
var r = wialon.core.Remote.getInstance();
var UNIT_ID = 734477;
r.remoteCall('messages/load_last', {
itemId: UNIT_ID,
lastTime: s.getServerTime(),
lastCount: 1,
flags: 0,
flagsMask: 0,
loadCount: 1
}, function(error) {
/*source*/