34 lines
601 B
JavaScript
34 lines
601 B
JavaScript
'use strict';
|
|
const UNINIT = 0;
|
|
const INIT = 1;
|
|
const ONLINE = 2;
|
|
const OFFLINE = 3;
|
|
|
|
class SystemServices {
|
|
constructor(){
|
|
this.SystemServiceState = UNINIT;
|
|
}
|
|
|
|
async setup(){
|
|
this.SystemServiceState = UNINIT;
|
|
}
|
|
|
|
async init(){
|
|
this.SystemServiceState = INIT;
|
|
}
|
|
|
|
async connect(){
|
|
this.SystemServiceState = ONLINE;
|
|
}
|
|
|
|
async disconnect(){
|
|
this.SystemServiceState = OFFLINE;
|
|
}
|
|
|
|
async deinit(){
|
|
this.SystemServiceState = UNINIT;
|
|
}
|
|
}
|
|
|
|
module.exports = new SystemServices();
|