Skip to content
Snippets Groups Projects
Commit 9ef52610 authored by jkerdreu's avatar jkerdreu
Browse files

Back from the old style refresh attributes


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/fork@1810 b32b6428-25c9-4566-ad07-03861ab6144f
parent 6483f959
Branches
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ sio.on('disconnect', function() {
sio.on('event_attributeChanges', function(data) {
msg_cnt ++ ;
updateStatusCnt();
//updateStatusCnt();
for (t in tags) {
var attrs = tags[t].root.attributes;
if (attrs.hasOwnProperty('xaal_addr')) {
......@@ -115,7 +115,7 @@ sio.on('event_attributeChanges', function(data) {
//================ SocketIO emit ================================================
function sio_refresh_attributes() {
function sio_refresh_attributes_old() {
console.log('refresh_attributes');
var addrs = [];
for (t in tags) {
......@@ -127,6 +127,19 @@ function sio_refresh_attributes() {
sio.emit('refresh_attributes',addrs);
}
function sio_refresh_attributes() {
console.log('refresh_attributes');
for (t in tags) {
var attrs = tags[t].root.attributes;
if (attrs.hasOwnProperty('xaal_addr')) {
sio.emit('query_attributes',attrs.xaal_addr.value);
}
}
}
function sio_send_request(addr,action,body) {
//console.log('Sending :' + addr + ' ' + action + ' ' + body);
sio.emit('send_request',addr,action,body);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment