You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
525 B
24 lines
525 B
6 months ago
|
export namespace core {
|
||
|
|
||
|
export class Device {
|
||
|
Name: string;
|
||
|
Description: string;
|
||
|
Flags: number;
|
||
|
Addresses: string[];
|
||
|
|
||
|
static createFrom(source: any = {}) {
|
||
|
return new Device(source);
|
||
|
}
|
||
|
|
||
|
constructor(source: any = {}) {
|
||
|
if ('string' === typeof source) source = JSON.parse(source);
|
||
|
this.Name = source["Name"];
|
||
|
this.Description = source["Description"];
|
||
|
this.Flags = source["Flags"];
|
||
|
this.Addresses = source["Addresses"];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|