/
models.go
89 lines (78 loc) · 3.24 KB
/
models.go
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
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
package sagemcom
import (
"3e8.eu/go/dsl/models"
)
type dslWrapper struct {
DSL dslObj `json:"DSL"`
}
type dslObj struct {
Lines []line `json:"Lines"`
Channels []channel `json:"Channels"`
}
type line struct {
FirmwareVersion string `json:"FirmwareVersion"`
LinkStatus string `json:"LinkStatus"`
StandardUsed string `json:"StandardUsed"`
VectoringState string `json:"VectoringState"`
UpstreamMaxBitRate models.IntValue `json:"UpstreamMaxBitRate"`
DownstreamMaxBitRate models.IntValue `json:"DownstreamMaxBitRate"`
UpstreamNoiseMargin models.IntValue `json:"UpstreamNoiseMargin"`
DownstreamNoiseMargin models.IntValue `json:"DownstreamNoiseMargin"`
UpstreamAttenuation models.IntValue `json:"UpstreamAttenuation"`
DownstreamAttenuation models.IntValue `json:"DownstreamAttenuation"`
UpstreamPower models.IntValue `json:"UpstreamPower"`
DownstreamPower models.IntValue `json:"DownstreamPower"`
XTURVendor string `json:"XTURVendor"`
XTUCVendor string `json:"XTUCVendor"`
Stats lineStats `json:"Stats"`
TestParams lineTestParams `json:"TestParams"`
IDDSLAM string `json:"IDDSLAM"`
ModemChip string `json:"ModemChip"`
}
type lineStats struct {
ShowtimeStart models.IntValue `json:"ShowtimeStart"`
Showtime lineStatsCounters `json:"Showtime"`
}
type lineStatsCounters struct {
ErroredSecs models.IntValue `json:"ErroredSecs"`
TxErroredSecs models.IntValue `json:"TxErroredSecs"`
SeverelyErroredSecs models.IntValue `json:"SeverelyErroredSecs"`
TxSeverelyErroredSecs models.IntValue `json:"TxSeverelyErroredSecs"`
}
type lineTestParams struct {
HLOGGds int `json:"HLOGGds"`
HLOGGus int `json:"HLOGGus"`
HLOGpsds string `json:"HLOGpsds"`
HLOGpsus string `json:"HLOGpsus"`
QLNGds int `json:"QLNGds"`
QLNGus int `json:"QLNGus"`
QLNpsds string `json:"QLNpsds"`
QLNpsus string `json:"QLNpsus"`
SNRGds int `json:"SNRGds"`
SNRGus int `json:"SNRGus"`
SNRpsds string `json:"SNRpsds"`
SNRpsus string `json:"SNRpsus"`
LATNds string `json:"LATNds"`
LATNus string `json:"LATNus"`
}
type channel struct {
ActualInterleavingDelay models.IntValue `json:"ActualInterleavingDelay"`
ActualInterleavingDelayus models.IntValue `json:"ActualInterleavingDelayus"`
ACTINP models.IntValue `json:"ACTINP"`
ACTINPus models.IntValue `json:"ACTINPus"`
UpstreamCurrRate models.IntValue `json:"UpstreamCurrRate"`
DownstreamCurrRate models.IntValue `json:"DownstreamCurrRate"`
Stats channelStats `json:"Stats"`
}
type channelStats struct {
Showtime channelStatsCounters `json:"Showtime"`
}
type channelStatsCounters struct {
XTURFECErrors models.IntValue `json:"XTURFECErrors"`
XTUCFECErrors models.IntValue `json:"XTUCFECErrors"`
XTURCRCErrors models.IntValue `json:"XTURCRCErrors"`
XTUCCRCErrors models.IntValue `json:"XTUCCRCErrors"`
}