mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added MEI state exchange over CIRA-LMS.
This commit is contained in:
parent
0e23eaa881
commit
8b61f1d64c
11 changed files with 158 additions and 95 deletions
|
@ -894,6 +894,13 @@ module.exports.CreateMpsServer = function (parent, db, args, certificates) {
|
|||
if ((socket.tag.connType != 0) || (socket.tag.SystemId != null)) return; // Once set, the connection type can't be changed.
|
||||
if (typeof jsondata.value != 'number') return;
|
||||
socket.tag.connType = jsondata.value; // 0 = CIRA, 1 = Relay, 2 = LMS
|
||||
//obj.SendJsonControl(socket, { action: 'mestate' }); // Request an MEI state refresh
|
||||
break;
|
||||
case 'meiState':
|
||||
if (socket.tag.connType != 2) break; // Only accept MEI state on CIRA-LMS connection
|
||||
socket.tag.meiState = jsondata.value;
|
||||
//if (socket.tag.meiState.UUID != null) { console.log('MEI State', socket.tag.meiState.UUID); }
|
||||
//console.log('meiState', JSON.stringify(socket.tag.meiState, null, 2)); // DEBUG
|
||||
break;
|
||||
}
|
||||
return 5 + jsondatalen;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue