-
Notifications
You must be signed in to change notification settings - Fork 0
/
lants-parser.d.ts
92 lines (92 loc) · 2.18 KB
/
lants-parser.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/// <reference types="node" />
import { udpParsed } from "./lants-udp.js";
import { Float, Integer } from "./lants-device.js";
export declare enum lifxMsgType {
GetService = 2,
StateService = 3,
GetHostInfo = 12,
StateHostInfo = 13,
GetHostFirmware = 14,
StateHostFirmware = 15,
GetWifiInfo = 16,
StateWifiInfo = 17,
GetWifiFirmware = 18,
StateWifiFirmware = 19,
GetPower = 20,
SetPower = 21,
StatePower = 22,
GetLabel = 23,
SetLabel = 24,
StateLabel = 25,
GetVersion = 32,
StateVersion = 33,
GetInfo = 34,
StateInfo = 35,
Acknowledgement = 45,
GetLocation = 48,
SetLocation = 49,
StateLocation = 50,
GetGroup = 51,
SetGroup = 52,
StateGroup = 53,
EchoRequest = 58,
EchoResponse = 59,
LightGet = 101,
SetColor = 102,
SetWaveform = 103,
SetWaveformOptional = 119,
State = 107,
GetLightPower = 116,
SetLightPower = 117,
StateLightPower = 118,
GetInfrared = 120,
StateInfrared = 121,
SetInfrared = 122,
SetColorZones = 501,
GetColorZones = 502,
StateZone = 503,
StateMultiZone = 506,
GetDeviceChain = 701,
StateDeviceChain = 702,
SetUserPositio = 703,
GetTileState64 = 707,
StateTileState64 = 711,
SetTileState64 = 715
}
export declare class LifxTile {
user_x: Float;
user_y: Float;
width: Integer;
height: Integer;
device_version_Vendor: Integer;
device_version_product: Integer;
device_version_version: Integer;
firmware_build: string;
firmware_version: Integer;
}
export declare class LifxLanHeader {
size: number;
origin: number;
tagged: boolean;
addressable: boolean;
protocol: number;
source: number;
target: string;
ack: boolean;
res: boolean;
sequence: number;
type: lifxMsgType;
}
declare class LifxLanParser {
parse(buf: Buffer): udpParsed;
private _parseHeader;
private _parsePayload;
private _convertBufferToString;
private _parseColor;
private _64BitToDate;
private _conv64BitTimeStampToMsec;
private _parseTile;
}
export declare const mParser: LifxLanParser;
export {};
//# sourceMappingURL=lants-parser.d.ts.map