cgse-common 2023.1.4__py3-none-any.whl → 2024.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cgse_common-2023.1.4.dist-info → cgse_common-2024.1.4.dist-info}/METADATA +28 -25
- cgse_common-2024.1.4.dist-info/RECORD +36 -0
- {cgse_common-2023.1.4.dist-info → cgse_common-2024.1.4.dist-info}/WHEEL +1 -1
- cgse_common-2024.1.4.dist-info/entry_points.txt +2 -0
- egse/bits.py +266 -41
- egse/calibration.py +250 -0
- egse/command.py +10 -29
- egse/config.py +17 -12
- egse/control.py +0 -81
- egse/decorators.py +8 -8
- egse/device.py +3 -1
- egse/env.py +411 -106
- egse/hk.py +794 -0
- egse/metrics.py +106 -0
- egse/monitoring.py +1 -0
- egse/resource.py +70 -2
- egse/response.py +101 -0
- egse/settings.py +33 -31
- egse/settings.yaml +0 -973
- egse/setup.py +116 -81
- egse/system.py +33 -14
- cgse_common-2023.1.4.dist-info/RECORD +0 -32
- cgse_common-2023.1.4.dist-info/entry_points.txt +0 -3
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: cgse-common
|
|
3
|
-
Version:
|
|
4
|
-
Summary: Software framework to support testing
|
|
5
|
-
Author:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Requires-Dist:
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist:
|
|
16
|
-
Requires-Dist:
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist: pyzmq (>=25.1.1,<26.0.0)
|
|
23
|
-
Requires-Dist: rich (>=13.6.0,<14.0.0)
|
|
3
|
+
Version: 2024.1.4
|
|
4
|
+
Summary: Software framework to support hardware testing
|
|
5
|
+
Author: IVS KU Leuven
|
|
6
|
+
Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: CGSE,Common-EGSE,hardware testing,software framework
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Requires-Dist: click>=8.1.8
|
|
11
|
+
Requires-Dist: deepdiff>=8.1.1
|
|
12
|
+
Requires-Dist: distro>=1.9.0
|
|
13
|
+
Requires-Dist: gitpython>=3.1.44
|
|
14
|
+
Requires-Dist: numpy==1.22.4
|
|
15
|
+
Requires-Dist: pandas>=1.5.1
|
|
16
|
+
Requires-Dist: pip>=24.3.1
|
|
17
|
+
Requires-Dist: prometheus-client>=0.21.1
|
|
18
|
+
Requires-Dist: psutil>=6.1.1
|
|
19
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
20
|
+
Requires-Dist: pyzmq==23.2.1
|
|
21
|
+
Requires-Dist: rich>=13.9.4
|
|
24
22
|
Description-Content-Type: text/markdown
|
|
25
23
|
|
|
26
|
-
# Generic Functionality used in the PLATO Common-EGSE
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+

|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
# Generic Functionality used in the Common-EGSE
|
|
31
|
+
|
|
32
|
+
This package 'cgse-common' contains functionality that is used by all `cgse` sub-packages, but it is designed to be a stand-alone generic package that can be used also in any other project.
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
## Installation
|
|
@@ -56,4 +60,3 @@ A non-comprehensive list of available functionality:
|
|
|
56
60
|
* **egse.resource**: provides convenience functions to use resources in your code without the need to specify an absolute path
|
|
57
61
|
* **egse.system**: defines convenience functions that provide information on system specific functionality like, file system interactions, timing, operating system interactions, etc.
|
|
58
62
|
* **egse.version**: functionality to retrieve the package version information
|
|
59
|
-
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
egse/bits.py,sha256=1DPcC5R-8w-KLfbr2WLx-4Ezfwm6jpRMz-E5QfQ_YKw,11138
|
|
2
|
+
egse/calibration.py,sha256=DZ-LgEwamTWDukMqTr2JLCPt3M1lw6W0SfpHQfG7cXg,8989
|
|
3
|
+
egse/command.py,sha256=hGY-M618clxW5x5cLx79hHFiFgENkJ7S3Nj5Wacow4M,22879
|
|
4
|
+
egse/config.py,sha256=Ib1Ddt0wFwRrioBvMs7Md-wgEEPdK3eaXCt0H7HJEow,14888
|
|
5
|
+
egse/control.py,sha256=gM9II-BgtgJjG7NqxyY8nBtMiRD0b9azGYFeD9_WU6s,12816
|
|
6
|
+
egse/decorators.py,sha256=M0PavrPcTwhWS6yLlEo-mOS20lcy90Mym7HUVzPNmhs,13404
|
|
7
|
+
egse/device.py,sha256=SIMROwB9YdNdFowTcZp1HW_el8LWVWDJ5tDUxs58YuY,8500
|
|
8
|
+
egse/env.py,sha256=xVWhR4CKdGNho5sjIkfkXBj---VawHgD3ne029CWg-A,20960
|
|
9
|
+
egse/exceptions.py,sha256=Tc1xqUrWxV6SXxc9xB9viK_O-GVa_SpzqZUVEhZkwzA,1801
|
|
10
|
+
egse/hk.py,sha256=MOX9KgkBkEpAtWniHXc8IWHyravp3OqTV4ZIuzmr93s,31141
|
|
11
|
+
egse/metrics.py,sha256=cZKMEe3OTT2uomj7vXjEl54JD0CStfEC4nCgS6U5YSM,3794
|
|
12
|
+
egse/mixin.py,sha256=J3yu5lPnm0grJqIm5LiacBUCZujJsdcKBNRaOQcMnNo,17345
|
|
13
|
+
egse/monitoring.py,sha256=-pwXqPoiNKzQYKQSpKddFlaPkCTJZYdxvG1d2MBN3l0,3033
|
|
14
|
+
egse/observer.py,sha256=6faaLHqgpOQs_oEvdBygQ5HF7mGneKJEfyQEFUFA5VY,1069
|
|
15
|
+
egse/obsid.py,sha256=-HPuHApZrr3Nj1J2-qqnIiE814C-gm4FSHdM2afKdRY,5883
|
|
16
|
+
egse/persistence.py,sha256=Lx6LMJ1-dh8N43XF7tTM6RwD0sSETiGQ9DNqug-G-zQ,2160
|
|
17
|
+
egse/plugin.py,sha256=Fd_QnABm33_dLjaj1zDgEZr3RKy-N88U5Hz5OZm9Jj0,2684
|
|
18
|
+
egse/process.py,sha256=mQ2ojeL_9oE_QkMJlQDPd1290z0j2mOrGXrlrWtOtzI,16615
|
|
19
|
+
egse/protocol.py,sha256=Psy0iOLPTgARn1VqeKtPCSKepHr_S2KW58UYwjOA6J0,23827
|
|
20
|
+
egse/proxy.py,sha256=pMKdnF62SXm0quLoKfgvK9GFkH2mLMB5fWNrZenfqQQ,18100
|
|
21
|
+
egse/reload.py,sha256=rDT0bC6RFeRhW38wSgFcxr30h8FvaKkoGp_OE-AwBB4,4388
|
|
22
|
+
egse/resource.py,sha256=VoB7BVrQULT_SJ1XioDzB59-uH47nUcN-KNVLvFxiFE,15163
|
|
23
|
+
egse/response.py,sha256=WdUUgYe1ABhPAy1HL8lVCM3Gu0Vgy3niaRi_twZuLgo,2700
|
|
24
|
+
egse/services.py,sha256=ZgkF0Rx_PykOVHAOV1cKduJdUhuY6A4DgwjPJWRGj3U,7642
|
|
25
|
+
egse/services.yaml,sha256=p8QBF56zLI21iJ9skt65VlNz4rIqRoFfBTZxOIUZCZ4,1853
|
|
26
|
+
egse/settings.py,sha256=iu17w0xvLhZPXImOt_C3duy2XamClQpKuP-OkCEIZVo,13481
|
|
27
|
+
egse/settings.yaml,sha256=M6WMtTbNqNuXsdEf-OzKz0dAxkFTRabpugmIJ2HKyZk,290
|
|
28
|
+
egse/setup.py,sha256=NLS0RhMTvKpdHnnojSPCcfRJwPGkpijt5VLFcDfnbt8,42916
|
|
29
|
+
egse/state.py,sha256=ekcCZu_DZKkKYn-5iWG7ij7Aif2WYMNVs5h3cia-cVc,5352
|
|
30
|
+
egse/system.py,sha256=t2NrtTAPXbMgBxsqicGjti-b8oEmiHtQu2Ydm77q4lI,48941
|
|
31
|
+
egse/version.py,sha256=EigdH05E8pNtSQznUfqM_RxlOjuAVp3Oe6S6MM5xGIM,6132
|
|
32
|
+
egse/zmq_ser.py,sha256=2-nwVUBWZ3vvosKNmlWobHJrIJA2HlM3V5a63Gz2JY0,1819
|
|
33
|
+
cgse_common-2024.1.4.dist-info/METADATA,sha256=LHmBLvWnmMYftLr6hTg9Z3nbH3_kNoIr1RHNi_6XdEM,2574
|
|
34
|
+
cgse_common-2024.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
cgse_common-2024.1.4.dist-info/entry_points.txt,sha256=E-KaQ9NGWAP1XvLHncNxq5oa22EAf9sOpBZWphXcxiE,34
|
|
36
|
+
cgse_common-2024.1.4.dist-info/RECORD,,
|
egse/bits.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
This module contains a number of convenience functions to work with bits, bytes and integers.
|
|
3
3
|
"""
|
|
4
|
+
|
|
4
5
|
import ctypes
|
|
5
6
|
from typing import Union
|
|
6
7
|
|
|
@@ -111,7 +112,7 @@ def bits_set(value: int, *args) -> bool:
|
|
|
111
112
|
return all([bit_set(value, bit) for bit in args])
|
|
112
113
|
|
|
113
114
|
|
|
114
|
-
def beautify_binary(value: int, sep: str =
|
|
115
|
+
def beautify_binary(value: int, sep: str = " ", group: int = 8, prefix: str = "", size: int = 0):
|
|
115
116
|
"""
|
|
116
117
|
Returns a binary representation of the given value. The bits are presented
|
|
117
118
|
in groups of 8 bits for clarity by default (can be changed with the `group` keyword).
|
|
@@ -136,9 +137,9 @@ def beautify_binary(value: int, sep: str = ' ', group: int = 8, prefix: str = ''
|
|
|
136
137
|
while value > 2**size - 1:
|
|
137
138
|
size += 8
|
|
138
139
|
|
|
139
|
-
b_str = f
|
|
140
|
+
b_str = f"{value:0{size}b}"
|
|
140
141
|
|
|
141
|
-
return prefix + sep.join([b_str[i:i + group] for i in range(0, len(b_str), group)])
|
|
142
|
+
return prefix + sep.join([b_str[i : i + group] for i in range(0, len(b_str), group)])
|
|
142
143
|
|
|
143
144
|
|
|
144
145
|
def humanize_bytes(n: int, base: Union[int, str] = 2, precision: int = 3) -> str:
|
|
@@ -174,11 +175,11 @@ def humanize_bytes(n: int, base: Union[int, str] = 2, precision: int = 3) -> str
|
|
|
174
175
|
# By default we assume base == 2 or base == "binary"
|
|
175
176
|
|
|
176
177
|
one_kilo = 1024
|
|
177
|
-
units = [
|
|
178
|
+
units = ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
|
|
178
179
|
|
|
179
|
-
if base == 10 or base ==
|
|
180
|
+
if base == 10 or base == "decimal":
|
|
180
181
|
one_kilo = 1000
|
|
181
|
-
units = [
|
|
182
|
+
units = ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
|
182
183
|
|
|
183
184
|
_n = n
|
|
184
185
|
if _n < one_kilo:
|
|
@@ -193,38 +194,262 @@ def humanize_bytes(n: int, base: Union[int, str] = 2, precision: int = 3) -> str
|
|
|
193
194
|
|
|
194
195
|
|
|
195
196
|
CRC_TABLE = [
|
|
196
|
-
0x00,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
197
|
+
0x00,
|
|
198
|
+
0x91,
|
|
199
|
+
0xE3,
|
|
200
|
+
0x72,
|
|
201
|
+
0x07,
|
|
202
|
+
0x96,
|
|
203
|
+
0xE4,
|
|
204
|
+
0x75,
|
|
205
|
+
0x0E,
|
|
206
|
+
0x9F,
|
|
207
|
+
0xED,
|
|
208
|
+
0x7C,
|
|
209
|
+
0x09,
|
|
210
|
+
0x98,
|
|
211
|
+
0xEA,
|
|
212
|
+
0x7B,
|
|
213
|
+
0x1C,
|
|
214
|
+
0x8D,
|
|
215
|
+
0xFF,
|
|
216
|
+
0x6E,
|
|
217
|
+
0x1B,
|
|
218
|
+
0x8A,
|
|
219
|
+
0xF8,
|
|
220
|
+
0x69,
|
|
221
|
+
0x12,
|
|
222
|
+
0x83,
|
|
223
|
+
0xF1,
|
|
224
|
+
0x60,
|
|
225
|
+
0x15,
|
|
226
|
+
0x84,
|
|
227
|
+
0xF6,
|
|
228
|
+
0x67,
|
|
229
|
+
0x38,
|
|
230
|
+
0xA9,
|
|
231
|
+
0xDB,
|
|
232
|
+
0x4A,
|
|
233
|
+
0x3F,
|
|
234
|
+
0xAE,
|
|
235
|
+
0xDC,
|
|
236
|
+
0x4D,
|
|
237
|
+
0x36,
|
|
238
|
+
0xA7,
|
|
239
|
+
0xD5,
|
|
240
|
+
0x44,
|
|
241
|
+
0x31,
|
|
242
|
+
0xA0,
|
|
243
|
+
0xD2,
|
|
244
|
+
0x43,
|
|
245
|
+
0x24,
|
|
246
|
+
0xB5,
|
|
247
|
+
0xC7,
|
|
248
|
+
0x56,
|
|
249
|
+
0x23,
|
|
250
|
+
0xB2,
|
|
251
|
+
0xC0,
|
|
252
|
+
0x51,
|
|
253
|
+
0x2A,
|
|
254
|
+
0xBB,
|
|
255
|
+
0xC9,
|
|
256
|
+
0x58,
|
|
257
|
+
0x2D,
|
|
258
|
+
0xBC,
|
|
259
|
+
0xCE,
|
|
260
|
+
0x5F,
|
|
261
|
+
0x70,
|
|
262
|
+
0xE1,
|
|
263
|
+
0x93,
|
|
264
|
+
0x02,
|
|
265
|
+
0x77,
|
|
266
|
+
0xE6,
|
|
267
|
+
0x94,
|
|
268
|
+
0x05,
|
|
269
|
+
0x7E,
|
|
270
|
+
0xEF,
|
|
271
|
+
0x9D,
|
|
272
|
+
0x0C,
|
|
273
|
+
0x79,
|
|
274
|
+
0xE8,
|
|
275
|
+
0x9A,
|
|
276
|
+
0x0B,
|
|
277
|
+
0x6C,
|
|
278
|
+
0xFD,
|
|
279
|
+
0x8F,
|
|
280
|
+
0x1E,
|
|
281
|
+
0x6B,
|
|
282
|
+
0xFA,
|
|
283
|
+
0x88,
|
|
284
|
+
0x19,
|
|
285
|
+
0x62,
|
|
286
|
+
0xF3,
|
|
287
|
+
0x81,
|
|
288
|
+
0x10,
|
|
289
|
+
0x65,
|
|
290
|
+
0xF4,
|
|
291
|
+
0x86,
|
|
292
|
+
0x17,
|
|
293
|
+
0x48,
|
|
294
|
+
0xD9,
|
|
295
|
+
0xAB,
|
|
296
|
+
0x3A,
|
|
297
|
+
0x4F,
|
|
298
|
+
0xDE,
|
|
299
|
+
0xAC,
|
|
300
|
+
0x3D,
|
|
301
|
+
0x46,
|
|
302
|
+
0xD7,
|
|
303
|
+
0xA5,
|
|
304
|
+
0x34,
|
|
305
|
+
0x41,
|
|
306
|
+
0xD0,
|
|
307
|
+
0xA2,
|
|
308
|
+
0x33,
|
|
309
|
+
0x54,
|
|
310
|
+
0xC5,
|
|
311
|
+
0xB7,
|
|
312
|
+
0x26,
|
|
313
|
+
0x53,
|
|
314
|
+
0xC2,
|
|
315
|
+
0xB0,
|
|
316
|
+
0x21,
|
|
317
|
+
0x5A,
|
|
318
|
+
0xCB,
|
|
319
|
+
0xB9,
|
|
320
|
+
0x28,
|
|
321
|
+
0x5D,
|
|
322
|
+
0xCC,
|
|
323
|
+
0xBE,
|
|
324
|
+
0x2F,
|
|
325
|
+
0xE0,
|
|
326
|
+
0x71,
|
|
327
|
+
0x03,
|
|
328
|
+
0x92,
|
|
329
|
+
0xE7,
|
|
330
|
+
0x76,
|
|
331
|
+
0x04,
|
|
332
|
+
0x95,
|
|
333
|
+
0xEE,
|
|
334
|
+
0x7F,
|
|
335
|
+
0x0D,
|
|
336
|
+
0x9C,
|
|
337
|
+
0xE9,
|
|
338
|
+
0x78,
|
|
339
|
+
0x0A,
|
|
340
|
+
0x9B,
|
|
341
|
+
0xFC,
|
|
342
|
+
0x6D,
|
|
343
|
+
0x1F,
|
|
344
|
+
0x8E,
|
|
345
|
+
0xFB,
|
|
346
|
+
0x6A,
|
|
347
|
+
0x18,
|
|
348
|
+
0x89,
|
|
349
|
+
0xF2,
|
|
350
|
+
0x63,
|
|
351
|
+
0x11,
|
|
352
|
+
0x80,
|
|
353
|
+
0xF5,
|
|
354
|
+
0x64,
|
|
355
|
+
0x16,
|
|
356
|
+
0x87,
|
|
357
|
+
0xD8,
|
|
358
|
+
0x49,
|
|
359
|
+
0x3B,
|
|
360
|
+
0xAA,
|
|
361
|
+
0xDF,
|
|
362
|
+
0x4E,
|
|
363
|
+
0x3C,
|
|
364
|
+
0xAD,
|
|
365
|
+
0xD6,
|
|
366
|
+
0x47,
|
|
367
|
+
0x35,
|
|
368
|
+
0xA4,
|
|
369
|
+
0xD1,
|
|
370
|
+
0x40,
|
|
371
|
+
0x32,
|
|
372
|
+
0xA3,
|
|
373
|
+
0xC4,
|
|
374
|
+
0x55,
|
|
375
|
+
0x27,
|
|
376
|
+
0xB6,
|
|
377
|
+
0xC3,
|
|
378
|
+
0x52,
|
|
379
|
+
0x20,
|
|
380
|
+
0xB1,
|
|
381
|
+
0xCA,
|
|
382
|
+
0x5B,
|
|
383
|
+
0x29,
|
|
384
|
+
0xB8,
|
|
385
|
+
0xCD,
|
|
386
|
+
0x5C,
|
|
387
|
+
0x2E,
|
|
388
|
+
0xBF,
|
|
389
|
+
0x90,
|
|
390
|
+
0x01,
|
|
391
|
+
0x73,
|
|
392
|
+
0xE2,
|
|
393
|
+
0x97,
|
|
394
|
+
0x06,
|
|
395
|
+
0x74,
|
|
396
|
+
0xE5,
|
|
397
|
+
0x9E,
|
|
398
|
+
0x0F,
|
|
399
|
+
0x7D,
|
|
400
|
+
0xEC,
|
|
401
|
+
0x99,
|
|
402
|
+
0x08,
|
|
403
|
+
0x7A,
|
|
404
|
+
0xEB,
|
|
405
|
+
0x8C,
|
|
406
|
+
0x1D,
|
|
407
|
+
0x6F,
|
|
408
|
+
0xFE,
|
|
409
|
+
0x8B,
|
|
410
|
+
0x1A,
|
|
411
|
+
0x68,
|
|
412
|
+
0xF9,
|
|
413
|
+
0x82,
|
|
414
|
+
0x13,
|
|
415
|
+
0x61,
|
|
416
|
+
0xF0,
|
|
417
|
+
0x85,
|
|
418
|
+
0x14,
|
|
419
|
+
0x66,
|
|
420
|
+
0xF7,
|
|
421
|
+
0xA8,
|
|
422
|
+
0x39,
|
|
423
|
+
0x4B,
|
|
424
|
+
0xDA,
|
|
425
|
+
0xAF,
|
|
426
|
+
0x3E,
|
|
427
|
+
0x4C,
|
|
428
|
+
0xDD,
|
|
429
|
+
0xA6,
|
|
430
|
+
0x37,
|
|
431
|
+
0x45,
|
|
432
|
+
0xD4,
|
|
433
|
+
0xA1,
|
|
434
|
+
0x30,
|
|
435
|
+
0x42,
|
|
436
|
+
0xD3,
|
|
437
|
+
0xB4,
|
|
438
|
+
0x25,
|
|
439
|
+
0x57,
|
|
440
|
+
0xC6,
|
|
441
|
+
0xB3,
|
|
442
|
+
0x22,
|
|
443
|
+
0x50,
|
|
444
|
+
0xC1,
|
|
445
|
+
0xBA,
|
|
446
|
+
0x2B,
|
|
447
|
+
0x59,
|
|
448
|
+
0xC8,
|
|
449
|
+
0xBD,
|
|
450
|
+
0x2C,
|
|
451
|
+
0x5E,
|
|
452
|
+
0xCF,
|
|
228
453
|
]
|
|
229
454
|
|
|
230
455
|
|
|
@@ -251,10 +476,10 @@ def crc_calc(data, start: int, len: int) -> int:
|
|
|
251
476
|
# and the individual elements have then type 'bytes'.
|
|
252
477
|
|
|
253
478
|
if isinstance(data[0], bytes):
|
|
254
|
-
for idx in range(start, start+len):
|
|
255
|
-
crc = CRC_TABLE[crc ^ (int.from_bytes(data[idx], byteorder=
|
|
479
|
+
for idx in range(start, start + len):
|
|
480
|
+
crc = CRC_TABLE[crc ^ (int.from_bytes(data[idx], byteorder="big") & 0xFF)]
|
|
256
481
|
elif isinstance(data[0], int):
|
|
257
|
-
for idx in range(start, start+len):
|
|
482
|
+
for idx in range(start, start + len):
|
|
258
483
|
crc = CRC_TABLE[crc ^ (data[idx] & 0xFF)]
|
|
259
484
|
|
|
260
485
|
return crc
|