Skip to content

Commit 3eceb26

Browse files
committed
Test for gaps in modbus-tcp
Known gaps are stored in test/baseline.json. New gaps will be reported via the github action workflow. Closes issue victronenergy/venus-private#183
1 parent 335867a commit 3eceb26

File tree

3 files changed

+515
-0
lines changed

3 files changed

+515
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Check Register Gaps
2+
3+
on:
4+
push:
5+
paths:
6+
- 'attributes.csv'
7+
- 'test/check_register_gaps.py'
8+
- 'test/baseline.json'
9+
- '.github/workflows/check-register-gaps.yml'
10+
pull_request:
11+
paths:
12+
- 'attributes.csv'
13+
- 'test/check_register_gaps.py'
14+
- 'test/baseline.json'
15+
- '.github/workflows/check-register-gaps.yml'
16+
17+
jobs:
18+
check-gaps:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Check for register gaps
30+
run: python test/check_register_gaps.py attributes.csv --baseline test/baseline.json
31+

test/baseline.json

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
{
2+
"com.victronenergy.acload": [
3+
[
4+
3923,
5+
3923
6+
]
7+
],
8+
"com.victronenergy.acsystem": [
9+
[
10+
4926,
11+
4929
12+
],
13+
[
14+
4932,
15+
4939
16+
]
17+
],
18+
"com.victronenergy.battery": [
19+
[
20+
327,
21+
329
22+
],
23+
[
24+
332,
25+
1281
26+
],
27+
[
28+
1325,
29+
1327
30+
]
31+
],
32+
"com.victronenergy.dcgenset": [
33+
[
34+
5202,
35+
5202
36+
],
37+
[
38+
5217,
39+
5217
40+
]
41+
],
42+
"com.victronenergy.evcharger": [
43+
[
44+
3801,
45+
3801
46+
]
47+
],
48+
"com.victronenergy.genset": [
49+
[
50+
3210,
51+
3211
52+
],
53+
[
54+
3214,
55+
3214
56+
],
57+
[
58+
3225,
59+
3227
60+
],
61+
[
62+
3229,
63+
3229
64+
],
65+
[
66+
3240,
67+
4999
68+
]
69+
],
70+
"com.victronenergy.hub4": [
71+
[
72+
2710,
73+
2715
74+
]
75+
],
76+
"com.victronenergy.inverter": [
77+
[
78+
3103,
79+
3104
80+
],
81+
[
82+
3107,
83+
3109
84+
],
85+
[
86+
3118,
87+
3124
88+
],
89+
[
90+
3129,
91+
3129
92+
],
93+
[
94+
3139,
95+
3139
96+
],
97+
[
98+
3144,
99+
3147
100+
]
101+
],
102+
"com.victronenergy.multi": [
103+
[
104+
4616,
105+
4619
106+
],
107+
[
108+
4621,
109+
4629
110+
]
111+
],
112+
"com.victronenergy.platform": [
113+
[
114+
5803,
115+
5809
116+
]
117+
],
118+
"com.victronenergy.settings": [
119+
[
120+
2709,
121+
2709
122+
],
123+
[
124+
2716,
125+
2717
126+
],
127+
[
128+
2719,
129+
2899
130+
],
131+
[
132+
2904,
133+
4700
134+
],
135+
[
136+
4705,
137+
5419
138+
]
139+
],
140+
"com.victronenergy.solarcharger": [
141+
[
142+
777,
143+
777
144+
],
145+
[
146+
782,
147+
783
148+
],
149+
[
150+
794,
151+
3699
152+
],
153+
[
154+
3704,
155+
3707
156+
]
157+
],
158+
"com.victronenergy.system": [
159+
[
160+
827,
161+
839
162+
],
163+
[
164+
847,
165+
849
166+
],
167+
[
168+
852,
169+
854
170+
],
171+
[
172+
856,
173+
859
174+
],
175+
[
176+
861,
177+
864
178+
],
179+
[
180+
867,
181+
867
182+
],
183+
[
184+
920,
185+
5399
186+
]
187+
],
188+
"com.victronenergy.vebus": [
189+
[
190+
110,
191+
199
192+
],
193+
[
194+
212,
195+
212
196+
],
197+
[
198+
223,
199+
229
200+
]
201+
]
202+
}

0 commit comments

Comments
 (0)