-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathWledInfo.cs
156 lines (110 loc) · 3.83 KB
/
WledInfo.cs
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// ReSharper disable InconsistentNaming
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace RGB.NET.Devices.WLED;
public class WledInfo
{
[JsonPropertyName("ver")]
public string Version { get; set; } = "";
[JsonPropertyName("vid")]
public uint BuildId { get; set; }
[JsonPropertyName("leds")]
public LedsInfo Leds { get; set; } = new();
[JsonPropertyName("str")]
public bool SyncReceive { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; } = "";
[JsonPropertyName("udpport")]
public ushort UDPPort { get; set; }
[JsonPropertyName("live")]
public bool IsLive { get; set; }
[JsonPropertyName("liveseg")]
public short MainSegment { get; set; }
[JsonPropertyName("lm")]
public string RealtimeDataSource { get; set; } = "";
[JsonPropertyName("lip")]
public string RealtimeDataSourceIpAddress { get; set; } = "";
[JsonPropertyName("ws")]
public byte ConnectedWebSocketCount { get; set; }
[JsonPropertyName("fxcount")]
public byte EffectCount { get; set; }
[JsonPropertyName("palcount")]
public short PaletteCount { get; set; }
[JsonPropertyName("maps")]
public List<Map> LedMaps { get; set; } = [];
[JsonPropertyName("wifi")]
public Wifi WifiInfo { get; set; } = new();
[JsonPropertyName("fs")]
public Fs FilesystemInfo { get; set; } = new();
[JsonPropertyName("ndc")]
public short DiscoveredDeviceCount { get; set; }
[JsonPropertyName("arch")]
public string PlatformName { get; set; } = "";
[JsonPropertyName("core")]
public string ArduinoCoreVersion { get; set; } = "";
[JsonPropertyName("freeheap")]
public uint FreeHeap { get; set; }
[JsonPropertyName("uptime")]
public uint Uptime { get; set; }
[JsonPropertyName("time")]
public string Time { get; set; } = "";
[JsonPropertyName("brand")]
public string Brand { get; set; } = "";
[JsonPropertyName("product")]
public string Product { get; set; } = "";
[JsonPropertyName("ip")]
public string IpAddress { get; set; } = "";
public class LedsInfo
{
[JsonPropertyName("count")]
public ushort Count { get; set; }
[JsonPropertyName("pwr")]
public ushort PowerUsage { get; set; }
[JsonPropertyName("fps")]
public ushort RefreshRate { get; set; }
[JsonPropertyName("maxpwr")]
public ushort MaxPower { get; set; }
[JsonPropertyName("maxseg")]
public byte MaxSegments { get; set; }
[JsonPropertyName("matrix")]
public MatrixDims? Matrix { get; set; }
[JsonPropertyName("seglc")]
public List<byte> SegmentLightCapabilities { get; set; } = [];
[JsonPropertyName("lc")]
public byte CombinedSegmentLightCapabilities { get; set; }
}
public class Map
{
[JsonPropertyName("id")]
public byte Id { get; set; }
[JsonPropertyName("n")]
public string Name { get; set; } = "";
}
public class Wifi
{
[JsonPropertyName("bssid")]
public string BSSID { get; set; } = "";
[JsonPropertyName("rssi")]
public long RSSI { get; set; }
[JsonPropertyName("signal")]
public byte SignalQuality { get; set; }
[JsonPropertyName("channel")]
public int Channel { get; set; }
}
public class Fs
{
[JsonPropertyName("u")]
public uint UsedSpace { get; set; }
[JsonPropertyName("t")]
public uint TotalSpace { get; set; }
[JsonPropertyName("pmt")]
public ulong LastPresetsJsonModificationTime { get; set; }
}
public class MatrixDims
{
[JsonPropertyName("w")]
public ushort Width { get; set; }
[JsonPropertyName("h")]
public ushort Height { get; set; }
}
}