module.exports = class DeviceCheck{
static isWindowsRemote(DeviceString){
var strDevString = DeviceString.toString().split(",")
if (strDevString[0] === "Windows_Voice_Remote") return true
return false;
};
static isLinuxRemote(DeviceString){
var strDevString = DeviceString.toString().split(",")
if (strDevString[0] === "Linux_Voice_Remote") return true
return false;
};
static isWebRequest(DeviceString){
var strDevString = DeviceString.toString().split(",")
if (strDevString[0] === "WebRequest") return true
return false;
};
static isIoTControler(DeviceString){
var strDevString = DeviceString.toString().split(",")
if (strDevString[0] === "IoTControler") return true
return false;
};
static isGED(DeviceString){
var strDevString = DeviceString.toString().split(",")
if (strDevString[0] === "GED v3") return true
return false;
};
static Type(DeviceString){
if (this.isWindowsRemote(DeviceString) == true) return new String("WindowsRemote");
if (this.isLinuxRemote(DeviceString) == true) return new String("LinuxRemote");
if (this.isWebRequest(DeviceString) == true) return new String("WebRequest");
if (this.isIoTControler(DeviceString) == true) return new String("IoTControler");
if (this.isGED(DeviceString) == true) return new String("GED");
return new String("unknown");
};// Type
static Account(DeviceString){
if (this.isWindowsRemote(DeviceString) == true) return new String(DeviceString.toString().split(",")[2]);
if (this.isLinuxRemote(DeviceString) == true) return new String(DeviceString.toString().split(",")[2]);
if (this.isWebRequest(DeviceString) == true) return new String(DeviceString.toString().split(",")[2]);
if (this.isIoTControler(DeviceString) == true) return new String(DeviceString.toString().split(",")[2]);
if (this.isGED(DeviceString) == true) return new String(DeviceString.toString().split(",")[2]);
return new String("unknown");
}; // Account
static ID(DeviceString){
if (this.isWindowsRemote(DeviceString) == true) return new String(DeviceString.toString().split(",")[1]);
if (this.isLinuxRemote(DeviceString) == true) return new String(DeviceString.toString().split(",")[1]);
if (this.isWebRequest(DeviceString) == true) return new String(DeviceString.toString().split(",")[1]);
if (this.isIoTControler(DeviceString) == true) return new String(DeviceString.toString().split(",")[1]);
if (this.isGED(DeviceString) == true) return String(DeviceString.toString().split(",")[1]);
return new String("unknown");
}; // Account
}; // class