svghmi/svghmi.js
branchsvghmi
changeset 2788 2ed9ff826d03
parent 2783 5ee6967f721d
child 2798 ddb2c4668a6b
equal deleted inserted replaced
2787:86a572fb05f8 2788:2ed9ff826d03
     7     // Register message reception handler 
     7     // Register message reception handler 
     8     ws.onmessage = function (evt) {
     8     ws.onmessage = function (evt) {
     9         // TODO : dispatch and cache hmi tree updates
     9         // TODO : dispatch and cache hmi tree updates
    10 
    10 
    11         var received_msg = evt.data;
    11         var received_msg = evt.data;
       
    12         // TODO : check for hmitree hash header
       
    13         //        if not matching, reload page
    12         alert("Message is received..."+received_msg); 
    14         alert("Message is received..."+received_msg); 
    13     };
    15     };
    14 
    16 
    15     // Once connection established
    17     // Once connection established
    16     ws.onopen = function (evt) {
    18     ws.onopen = function (evt) {
    17         // TODO : enable the HMI (was previously offline, or just starts)
    19         // TODO : enable the HMI (was previously offline, or just starts)
    18         //        show main page
    20         //        show main page
    19 
    21 
       
    22 
       
    23         // TODO : prefix with hmitree hash header
    20         ws.send("test");
    24         ws.send("test");
    21     };
    25     };
    22 })();
    26 })();