shepherd-core 2024.9.1__py3-none-any.whl → 2024.11.2__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.
- shepherd_core/__init__.py +10 -10
- shepherd_core/data_models/__init__.py +11 -13
- shepherd_core/data_models/content/__init__.py +3 -4
- shepherd_core/data_models/content/virtual_source_fixture.yaml +1 -0
- shepherd_core/data_models/experiment/__init__.py +4 -6
- shepherd_core/data_models/task/__init__.py +6 -9
- shepherd_core/data_models/testbed/__init__.py +7 -9
- shepherd_core/data_models/testbed/observer_fixture.yaml +27 -25
- shepherd_core/data_models/testbed/target_fixture.old1 +137 -0
- shepherd_core/data_models/testbed/target_fixture.yaml +104 -78
- shepherd_core/data_models/testbed/testbed_fixture.yaml +3 -3
- shepherd_core/fw_tools/__init__.py +14 -17
- shepherd_core/testbed_client/__init__.py +2 -2
- shepherd_core/version.py +1 -1
- shepherd_core/vsource/__init__.py +3 -3
- shepherd_core/vsource/target_model.py +5 -4
- shepherd_core/vsource/virtual_converter_model.py +8 -5
- shepherd_core/vsource/virtual_harvester_model.py +2 -1
- shepherd_core/writer.py +47 -54
- {shepherd_core-2024.9.1.dist-info → shepherd_core-2024.11.2.dist-info}/METADATA +13 -13
- {shepherd_core-2024.9.1.dist-info → shepherd_core-2024.11.2.dist-info}/RECORD +24 -23
- {shepherd_core-2024.9.1.dist-info → shepherd_core-2024.11.2.dist-info}/WHEEL +1 -1
- {shepherd_core-2024.9.1.dist-info → shepherd_core-2024.11.2.dist-info}/top_level.txt +0 -0
- {shepherd_core-2024.9.1.dist-info → shepherd_core-2024.11.2.dist-info}/zip-safe +0 -0
shepherd_core/__init__.py
CHANGED
|
@@ -26,20 +26,20 @@ from .writer import Writer
|
|
|
26
26
|
__version__ = version
|
|
27
27
|
|
|
28
28
|
__all__ = [
|
|
29
|
-
"
|
|
30
|
-
"Writer",
|
|
31
|
-
"get_verbose_level",
|
|
32
|
-
"increase_verbose_level",
|
|
33
|
-
"logger",
|
|
29
|
+
"Calc_t",
|
|
34
30
|
"CalibrationCape",
|
|
35
|
-
"CalibrationSeries",
|
|
36
31
|
"CalibrationEmulator",
|
|
37
32
|
"CalibrationHarvester",
|
|
38
33
|
"CalibrationPair",
|
|
39
|
-
"
|
|
40
|
-
"local_now",
|
|
41
|
-
"Calc_t",
|
|
34
|
+
"CalibrationSeries",
|
|
42
35
|
"Compression",
|
|
43
|
-
"WebClient",
|
|
44
36
|
"Inventory",
|
|
37
|
+
"Reader",
|
|
38
|
+
"WebClient",
|
|
39
|
+
"Writer",
|
|
40
|
+
"get_verbose_level",
|
|
41
|
+
"increase_verbose_level",
|
|
42
|
+
"local_now",
|
|
43
|
+
"local_tz",
|
|
44
|
+
"logger",
|
|
45
45
|
]
|
|
@@ -34,29 +34,27 @@ from .experiment.observer_features import SystemLogging
|
|
|
34
34
|
from .experiment.target_config import TargetConfig
|
|
35
35
|
|
|
36
36
|
__all__ = [
|
|
37
|
-
# Core
|
|
38
|
-
"CapeData",
|
|
39
37
|
"CalibrationCape",
|
|
40
38
|
"CalibrationEmulator",
|
|
41
39
|
"CalibrationHarvester",
|
|
42
|
-
"CalibrationSeries",
|
|
43
40
|
"CalibrationPair",
|
|
41
|
+
"CalibrationSeries",
|
|
42
|
+
"CapeData",
|
|
44
43
|
"ContentModel",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
# User Content
|
|
44
|
+
"EnergyDType",
|
|
45
|
+
"EnergyEnvironment",
|
|
48
46
|
"Experiment",
|
|
49
|
-
"TargetConfig",
|
|
50
47
|
"Firmware",
|
|
51
48
|
"FirmwareDType",
|
|
52
|
-
"SystemLogging",
|
|
53
|
-
"PowerTracing",
|
|
54
|
-
"GpioTracing",
|
|
55
49
|
"GpioActuation",
|
|
56
50
|
"GpioEvent",
|
|
57
51
|
"GpioLevel",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
52
|
+
"GpioTracing",
|
|
53
|
+
"PowerTracing",
|
|
54
|
+
"ShpModel",
|
|
55
|
+
"SystemLogging",
|
|
56
|
+
"TargetConfig",
|
|
61
57
|
"VirtualHarvesterConfig",
|
|
58
|
+
"VirtualSourceConfig",
|
|
59
|
+
"Wrapper",
|
|
62
60
|
]
|
|
@@ -11,11 +11,10 @@ from .virtual_harvester import VirtualHarvesterConfig
|
|
|
11
11
|
from .virtual_source import VirtualSourceConfig
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
14
|
+
"EnergyDType",
|
|
14
15
|
"EnergyEnvironment",
|
|
15
|
-
"VirtualSourceConfig",
|
|
16
|
-
"VirtualHarvesterConfig",
|
|
17
16
|
"Firmware",
|
|
18
|
-
# Enums
|
|
19
|
-
"EnergyDType",
|
|
20
17
|
"FirmwareDType",
|
|
18
|
+
"VirtualHarvesterConfig",
|
|
19
|
+
"VirtualSourceConfig",
|
|
21
20
|
]
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
enable_feedback_to_hrv: true # src can control a cv-harvester for ivcurve
|
|
103
103
|
V_intermediate_enable_threshold_mV: 2000
|
|
104
104
|
V_intermediate_disable_threshold_mV: 1800 # nRF draw ~0.5 mA below that point
|
|
105
|
+
# TODO: put switch-output into special nRF Version
|
|
105
106
|
|
|
106
107
|
- datatype: VirtualSourceConfig
|
|
107
108
|
parameters:
|
|
@@ -14,13 +14,11 @@ from .target_config import TargetConfig
|
|
|
14
14
|
|
|
15
15
|
__all__ = [
|
|
16
16
|
"Experiment",
|
|
17
|
-
"TargetConfig",
|
|
18
|
-
# Features
|
|
19
|
-
"PowerTracing",
|
|
20
|
-
"GpioTracing",
|
|
21
17
|
"GpioActuation",
|
|
22
18
|
"GpioEvent",
|
|
23
|
-
"SystemLogging",
|
|
24
|
-
# Enums
|
|
25
19
|
"GpioLevel",
|
|
20
|
+
"GpioTracing",
|
|
21
|
+
"PowerTracing",
|
|
22
|
+
"SystemLogging",
|
|
23
|
+
"TargetConfig",
|
|
26
24
|
]
|
|
@@ -22,18 +22,15 @@ from .programming import ProgrammingTask
|
|
|
22
22
|
from .testbed_tasks import TestbedTasks
|
|
23
23
|
|
|
24
24
|
__all__ = [
|
|
25
|
-
|
|
26
|
-
"TestbedTasks",
|
|
27
|
-
"ObserverTasks",
|
|
28
|
-
"FirmwareModTask",
|
|
29
|
-
"ProgrammingTask",
|
|
25
|
+
"Compression",
|
|
30
26
|
"EmulationTask",
|
|
27
|
+
"FirmwareModTask",
|
|
31
28
|
"HarvestTask",
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
"prepare_task",
|
|
29
|
+
"ObserverTasks",
|
|
30
|
+
"ProgrammingTask",
|
|
31
|
+
"TestbedTasks",
|
|
36
32
|
"extract_tasks",
|
|
33
|
+
"prepare_task",
|
|
37
34
|
]
|
|
38
35
|
|
|
39
36
|
|
|
@@ -16,17 +16,15 @@ from .target import Target
|
|
|
16
16
|
from .testbed import Testbed
|
|
17
17
|
|
|
18
18
|
__all__ = [
|
|
19
|
-
"Testbed",
|
|
20
|
-
"Observer",
|
|
21
|
-
"Cape",
|
|
22
|
-
"Target",
|
|
23
|
-
"MCU",
|
|
24
19
|
"GPIO",
|
|
25
|
-
|
|
26
|
-
"
|
|
20
|
+
"MCU",
|
|
21
|
+
"Cape",
|
|
27
22
|
"Direction",
|
|
28
|
-
"TargetPort",
|
|
29
|
-
# custom types
|
|
30
23
|
"IdInt16",
|
|
31
24
|
"MACStr",
|
|
25
|
+
"Observer",
|
|
26
|
+
"ProgrammerProtocol",
|
|
27
|
+
"Target",
|
|
28
|
+
"TargetPort",
|
|
29
|
+
"Testbed",
|
|
32
30
|
]
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
latitude: 0
|
|
15
15
|
cape:
|
|
16
16
|
name: cape53
|
|
17
|
-
target_a:
|
|
18
|
-
name: nRF52_FRAM_018
|
|
17
|
+
# target_a:
|
|
18
|
+
# name: nRF52_FRAM_018
|
|
19
19
|
created: 2022-12-12 12:12:12
|
|
20
20
|
active: false
|
|
21
21
|
- datatype: observer
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
name: sheep01
|
|
25
25
|
ip: 192.168.165.201
|
|
26
26
|
mac: 18:62:E4:E4:41:8D
|
|
27
|
-
room:
|
|
28
|
-
eth_port:
|
|
29
|
-
description: mid
|
|
27
|
+
room: II69
|
|
28
|
+
eth_port: B14
|
|
29
|
+
description: lower mid on east-side
|
|
30
30
|
cape:
|
|
31
31
|
name: cape51
|
|
32
32
|
target_a:
|
|
33
|
-
name:
|
|
33
|
+
name: nRF52_FRAM_1392_386
|
|
34
34
|
created: 2023-09-22 12:12:12
|
|
35
35
|
- datatype: observer
|
|
36
36
|
parameters:
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
cape:
|
|
45
45
|
name: cape52
|
|
46
46
|
target_a:
|
|
47
|
-
name:
|
|
47
|
+
name: nRF52_FRAM_1392_378
|
|
48
48
|
created: 2023-09-22 12:12:12
|
|
49
49
|
- datatype: observer
|
|
50
50
|
parameters:
|
|
@@ -57,9 +57,10 @@
|
|
|
57
57
|
description: north-east-corner
|
|
58
58
|
cape:
|
|
59
59
|
name: cape63
|
|
60
|
-
target_a:
|
|
61
|
-
name:
|
|
60
|
+
# target_a:
|
|
61
|
+
# name:
|
|
62
62
|
created: 2023-09-22 12:12:12
|
|
63
|
+
active: false
|
|
63
64
|
- datatype: observer
|
|
64
65
|
parameters:
|
|
65
66
|
id: 4
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
cape:
|
|
73
74
|
name: cape54
|
|
74
75
|
target_a:
|
|
75
|
-
name:
|
|
76
|
+
name: nRF52_FRAM_1392_395
|
|
76
77
|
created: 2023-09-22 12:12:12
|
|
77
78
|
- datatype: observer
|
|
78
79
|
parameters:
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
cape:
|
|
87
88
|
name: cape55
|
|
88
89
|
target_a:
|
|
89
|
-
name:
|
|
90
|
+
name: nRF52_FRAM_1392_393
|
|
90
91
|
target_b:
|
|
91
92
|
name: target_nRF52_01 # ONLY VIRTUAL - for unittests
|
|
92
93
|
created: 2023-09-22 12:12:12
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
cape:
|
|
103
104
|
name: cape56
|
|
104
105
|
target_a:
|
|
105
|
-
name:
|
|
106
|
+
name: nRF52_FRAM_1392_396
|
|
106
107
|
created: 2023-09-22 12:12:12
|
|
107
108
|
- datatype: observer
|
|
108
109
|
parameters:
|
|
@@ -116,7 +117,7 @@
|
|
|
116
117
|
cape:
|
|
117
118
|
name: cape57
|
|
118
119
|
target_a:
|
|
119
|
-
name:
|
|
120
|
+
name: nRF52_FRAM_1392_387
|
|
120
121
|
created: 2023-09-22 12:12:12
|
|
121
122
|
- datatype: observer
|
|
122
123
|
parameters:
|
|
@@ -129,8 +130,8 @@
|
|
|
129
130
|
description: north-east-corner
|
|
130
131
|
cape:
|
|
131
132
|
name: cape58
|
|
132
|
-
target_a:
|
|
133
|
-
name:
|
|
133
|
+
# target_a:
|
|
134
|
+
# name:
|
|
134
135
|
created: 2023-09-22 12:12:12
|
|
135
136
|
active: false # TODO: cape is broken for now
|
|
136
137
|
- datatype: observer
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
cape:
|
|
146
147
|
name: cape65
|
|
147
148
|
target_a:
|
|
148
|
-
name:
|
|
149
|
+
name: nRF52_FRAM_1392_385
|
|
149
150
|
created: 2023-09-22 12:12:12
|
|
150
151
|
- datatype: observer
|
|
151
152
|
parameters:
|
|
@@ -159,7 +160,7 @@
|
|
|
159
160
|
cape:
|
|
160
161
|
name: cape59
|
|
161
162
|
target_a:
|
|
162
|
-
name:
|
|
163
|
+
name: nRF52_FRAM_1392_377
|
|
163
164
|
created: 2023-09-22 12:12:12
|
|
164
165
|
- datatype: observer
|
|
165
166
|
parameters:
|
|
@@ -167,14 +168,15 @@
|
|
|
167
168
|
name: sheep11
|
|
168
169
|
ip: 192.168.165.211
|
|
169
170
|
mac: 18:62:E4:E4:0E:5D
|
|
170
|
-
room:
|
|
171
|
-
eth_port:
|
|
172
|
-
description:
|
|
171
|
+
room: tbd
|
|
172
|
+
eth_port: tbd
|
|
173
|
+
description: tbd
|
|
173
174
|
cape:
|
|
174
175
|
name: cape61
|
|
175
|
-
target_a:
|
|
176
|
-
name:
|
|
176
|
+
# target_a:
|
|
177
|
+
# name:
|
|
177
178
|
created: 2023-09-22 12:12:12
|
|
179
|
+
active: false
|
|
178
180
|
- datatype: observer
|
|
179
181
|
parameters:
|
|
180
182
|
id: 12
|
|
@@ -187,7 +189,7 @@
|
|
|
187
189
|
cape:
|
|
188
190
|
name: cape62
|
|
189
191
|
target_a:
|
|
190
|
-
name:
|
|
192
|
+
name: nRF52_FRAM_1392_384
|
|
191
193
|
created: 2023-09-22 12:12:12
|
|
192
194
|
- datatype: observer
|
|
193
195
|
parameters:
|
|
@@ -202,7 +204,7 @@
|
|
|
202
204
|
cape:
|
|
203
205
|
name: cape60
|
|
204
206
|
target_a:
|
|
205
|
-
name:
|
|
207
|
+
name: nRF52_FRAM_1392_379
|
|
206
208
|
created: 2023-09-22 12:12:12
|
|
207
209
|
- datatype: observer
|
|
208
210
|
parameters:
|
|
@@ -217,5 +219,5 @@
|
|
|
217
219
|
cape:
|
|
218
220
|
name: cape64
|
|
219
221
|
target_a:
|
|
220
|
-
name:
|
|
222
|
+
name: nRF52_FRAM_1392_390
|
|
221
223
|
created: 2023-09-22 12:12:12
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
# more human-readable test-protocol @
|
|
3
|
+
# https://github.com/orgua/shepherd_v2_planning/blob/main/doc_testbed/Target_pre-deployment-tests.xlsx
|
|
4
|
+
- datatype: target
|
|
5
|
+
parameters:
|
|
6
|
+
id: 6 # Outer ID - selected by user for XP - can be rearranged
|
|
7
|
+
name: nRF52_FRAM_001 # inner ID - used to link all parts together
|
|
8
|
+
version: v1.0
|
|
9
|
+
description: nRF52 as MCU + Radio, MSP430FR as SPI-FRAM or additional MCU
|
|
10
|
+
comment: Test3 21nA sleep, msp-programming was flaky before -> monitor!
|
|
11
|
+
created: 2023-04-12
|
|
12
|
+
mcu1:
|
|
13
|
+
name: nRF52
|
|
14
|
+
mcu2:
|
|
15
|
+
name: MSP430FR
|
|
16
|
+
- datatype: target
|
|
17
|
+
parameters:
|
|
18
|
+
inherit_from: nRF52_FRAM_001
|
|
19
|
+
id: 10
|
|
20
|
+
name: nRF52_FRAM_002
|
|
21
|
+
comment: Test3 21nA sleep
|
|
22
|
+
- datatype: target
|
|
23
|
+
parameters:
|
|
24
|
+
inherit_from: nRF52_FRAM_001
|
|
25
|
+
id: 7
|
|
26
|
+
name: nRF52_FRAM_003
|
|
27
|
+
comment: Test3 21nA sleep
|
|
28
|
+
- datatype: target
|
|
29
|
+
parameters:
|
|
30
|
+
inherit_from: nRF52_FRAM_001
|
|
31
|
+
id: 3
|
|
32
|
+
name: nRF52_FRAM_004
|
|
33
|
+
comment: Test3 21nA sleep
|
|
34
|
+
- datatype: target
|
|
35
|
+
parameters:
|
|
36
|
+
inherit_from: nRF52_FRAM_001
|
|
37
|
+
id: 11
|
|
38
|
+
name: nRF52_FRAM_005
|
|
39
|
+
comment: Test3 21nA sleep, changed Antenna to lambda/4
|
|
40
|
+
- datatype: target
|
|
41
|
+
parameters:
|
|
42
|
+
inherit_from: nRF52_FRAM_001
|
|
43
|
+
id: 12
|
|
44
|
+
name: nRF52_FRAM_006
|
|
45
|
+
comment: Test3 21nA sleep, changed Antenna to lambda/4
|
|
46
|
+
- datatype: target
|
|
47
|
+
parameters:
|
|
48
|
+
inherit_from: nRF52_FRAM_001
|
|
49
|
+
id: 8
|
|
50
|
+
name: nRF52_FRAM_007
|
|
51
|
+
comment: msp-programming is failing -> defective, msp removed & changed Antenna to lambda/4
|
|
52
|
+
mcu2: null
|
|
53
|
+
active: true
|
|
54
|
+
- datatype: target
|
|
55
|
+
parameters:
|
|
56
|
+
inherit_from: nRF52_FRAM_001
|
|
57
|
+
id: 9
|
|
58
|
+
name: nRF52_FRAM_008
|
|
59
|
+
comment: msp-programming is failing -> defective, msp removed & changed Antenna to lambda/4
|
|
60
|
+
mcu2: null
|
|
61
|
+
active: true
|
|
62
|
+
- datatype: target
|
|
63
|
+
parameters:
|
|
64
|
+
inherit_from: nRF52_FRAM_001
|
|
65
|
+
id: 5
|
|
66
|
+
name: nRF52_FRAM_009
|
|
67
|
+
comment: Test3 21nA sleep
|
|
68
|
+
- datatype: target
|
|
69
|
+
parameters:
|
|
70
|
+
inherit_from: nRF52_FRAM_001
|
|
71
|
+
id: 2
|
|
72
|
+
name: nRF52_FRAM_010
|
|
73
|
+
comment: Test3 21nA sleep
|
|
74
|
+
- datatype: target
|
|
75
|
+
parameters:
|
|
76
|
+
inherit_from: nRF52_FRAM_001
|
|
77
|
+
id: 1
|
|
78
|
+
name: nRF52_FRAM_011
|
|
79
|
+
comment: Test3 21nA sleep, changed Antenna to lambda/4
|
|
80
|
+
- datatype: target
|
|
81
|
+
parameters:
|
|
82
|
+
inherit_from: nRF52_FRAM_001
|
|
83
|
+
id: 1312
|
|
84
|
+
name: nRF52_FRAM_012
|
|
85
|
+
comment: msp-programming is failing -> defective, Antenna-Port destroyed
|
|
86
|
+
active: false
|
|
87
|
+
- datatype: target
|
|
88
|
+
parameters:
|
|
89
|
+
inherit_from: nRF52_FRAM_001
|
|
90
|
+
id: 1313
|
|
91
|
+
name: nRF52_FRAM_013
|
|
92
|
+
comment: Test3 15nA sleep, Test1 fails - several cleanings -> defective
|
|
93
|
+
active: false
|
|
94
|
+
- datatype: target
|
|
95
|
+
parameters:
|
|
96
|
+
inherit_from: nRF52_FRAM_001
|
|
97
|
+
id: 4
|
|
98
|
+
name: nRF52_FRAM_014
|
|
99
|
+
comment: Test3 21nA sleep
|
|
100
|
+
- datatype: target
|
|
101
|
+
parameters:
|
|
102
|
+
inherit_from: nRF52_FRAM_001
|
|
103
|
+
id: 1315
|
|
104
|
+
name: nRF52_FRAM_015
|
|
105
|
+
comment: Test3 19nA sleep, Test1 fails - several cleanings - gpio error on nrf-side -> defective
|
|
106
|
+
active: false
|
|
107
|
+
- datatype: target
|
|
108
|
+
parameters:
|
|
109
|
+
inherit_from: nRF52_FRAM_001
|
|
110
|
+
id: 666
|
|
111
|
+
name: nRF52_FRAM_016
|
|
112
|
+
comment: Test3 21nA sleep
|
|
113
|
+
- datatype: target
|
|
114
|
+
parameters:
|
|
115
|
+
inherit_from: nRF52_FRAM_001
|
|
116
|
+
id: 13
|
|
117
|
+
name: nRF52_FRAM_017
|
|
118
|
+
comment: Test3 21nA sleep, nrf was miss-aligned -> hot air rework
|
|
119
|
+
- datatype: target
|
|
120
|
+
parameters:
|
|
121
|
+
inherit_from: nRF52_FRAM_001
|
|
122
|
+
id: 18
|
|
123
|
+
name: nRF52_FRAM_018
|
|
124
|
+
comment: Test3 21nA sleep, nrf was miss-aligned -> hot air rework
|
|
125
|
+
description: LabPrototype
|
|
126
|
+
|
|
127
|
+
- datatype: target
|
|
128
|
+
parameters:
|
|
129
|
+
id: 1001
|
|
130
|
+
name: target_nRF52_01
|
|
131
|
+
version: v2.1r0
|
|
132
|
+
description: single target PCB, v2.1r0
|
|
133
|
+
comment: ONLY VIRTUAL - NOT REAL
|
|
134
|
+
mcu1:
|
|
135
|
+
name: nRF52
|
|
136
|
+
mcu2: null
|
|
137
|
+
created: 2022-12-12 12:12:12
|
|
@@ -3,126 +3,152 @@
|
|
|
3
3
|
# https://github.com/orgua/shepherd_v2_planning/blob/main/doc_testbed/Target_pre-deployment-tests.xlsx
|
|
4
4
|
- datatype: target
|
|
5
5
|
parameters:
|
|
6
|
-
id:
|
|
7
|
-
name:
|
|
8
|
-
version: v1.
|
|
6
|
+
id: 2 # Outer ID - selected by user for XP - can be rearranged
|
|
7
|
+
name: nRF52_FRAM_1392_377 # inner ID - used to link all parts together
|
|
8
|
+
version: v1.3
|
|
9
9
|
description: nRF52 as MCU + Radio, MSP430FR as SPI-FRAM or additional MCU
|
|
10
|
-
comment:
|
|
11
|
-
created:
|
|
10
|
+
comment: slight scratches from manufacturing
|
|
11
|
+
created: 2024-11-29
|
|
12
12
|
mcu1:
|
|
13
13
|
name: nRF52
|
|
14
14
|
mcu2:
|
|
15
15
|
name: MSP430FR
|
|
16
16
|
- datatype: target
|
|
17
17
|
parameters:
|
|
18
|
-
inherit_from:
|
|
19
|
-
id:
|
|
20
|
-
name:
|
|
21
|
-
comment: Test3 21nA sleep
|
|
18
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
19
|
+
id: 8
|
|
20
|
+
name: nRF52_FRAM_1392_378
|
|
22
21
|
- datatype: target
|
|
23
22
|
parameters:
|
|
24
|
-
inherit_from:
|
|
25
|
-
id:
|
|
26
|
-
name:
|
|
27
|
-
comment: Test3 21nA sleep
|
|
23
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
24
|
+
id: 9
|
|
25
|
+
name: nRF52_FRAM_1392_379
|
|
28
26
|
- datatype: target
|
|
29
27
|
parameters:
|
|
30
|
-
inherit_from:
|
|
31
|
-
id:
|
|
32
|
-
name:
|
|
33
|
-
comment:
|
|
28
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
29
|
+
id: 1392380
|
|
30
|
+
name: nRF52_FRAM_1392_380
|
|
31
|
+
comment: msp fails to program
|
|
32
|
+
active: false
|
|
34
33
|
- datatype: target
|
|
35
34
|
parameters:
|
|
36
|
-
inherit_from:
|
|
37
|
-
id:
|
|
38
|
-
name:
|
|
39
|
-
comment:
|
|
35
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
36
|
+
id: 1392381
|
|
37
|
+
name: nRF52_FRAM_1392_381
|
|
38
|
+
comment: nrf failed to program in testbed (but was fine before)
|
|
40
39
|
- datatype: target
|
|
41
40
|
parameters:
|
|
42
|
-
inherit_from:
|
|
43
|
-
id:
|
|
44
|
-
name:
|
|
45
|
-
comment:
|
|
41
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
42
|
+
id: 1392382
|
|
43
|
+
name: nRF52_FRAM_1392_382
|
|
44
|
+
comment: msp fails to program
|
|
45
|
+
active: false
|
|
46
46
|
- datatype: target
|
|
47
47
|
parameters:
|
|
48
|
-
inherit_from:
|
|
49
|
-
id:
|
|
50
|
-
name:
|
|
51
|
-
comment:
|
|
52
|
-
mcu2: null
|
|
53
|
-
active: true
|
|
48
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
49
|
+
id: 1392383
|
|
50
|
+
name: nRF52_FRAM_1392_383
|
|
51
|
+
comment: nrf failed to program in testbed (but was fine before)
|
|
54
52
|
- datatype: target
|
|
55
53
|
parameters:
|
|
56
|
-
inherit_from:
|
|
57
|
-
id:
|
|
58
|
-
name:
|
|
59
|
-
comment: msp-programming is failing -> defective, msp removed & changed Antenna to lambda/4
|
|
60
|
-
mcu2: null
|
|
61
|
-
active: true
|
|
54
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
55
|
+
id: 4
|
|
56
|
+
name: nRF52_FRAM_1392_384
|
|
62
57
|
- datatype: target
|
|
63
58
|
parameters:
|
|
64
|
-
inherit_from:
|
|
59
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
65
60
|
id: 5
|
|
66
|
-
name:
|
|
67
|
-
comment: Test3 21nA sleep
|
|
61
|
+
name: nRF52_FRAM_1392_385
|
|
68
62
|
- datatype: target
|
|
69
63
|
parameters:
|
|
70
|
-
inherit_from:
|
|
71
|
-
id:
|
|
72
|
-
name:
|
|
73
|
-
comment: Test3 21nA sleep
|
|
64
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
65
|
+
id: 6
|
|
66
|
+
name: nRF52_FRAM_1392_386
|
|
74
67
|
- datatype: target
|
|
75
68
|
parameters:
|
|
76
|
-
inherit_from:
|
|
77
|
-
id:
|
|
78
|
-
name:
|
|
79
|
-
comment: Test3 21nA sleep, changed Antenna to lambda/4
|
|
69
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
70
|
+
id: 7
|
|
71
|
+
name: nRF52_FRAM_1392_387
|
|
80
72
|
- datatype: target
|
|
81
73
|
parameters:
|
|
82
|
-
inherit_from:
|
|
83
|
-
id:
|
|
84
|
-
name:
|
|
85
|
-
comment: msp
|
|
74
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
75
|
+
id: 1392388
|
|
76
|
+
name: nRF52_FRAM_1392_388
|
|
77
|
+
comment: msp fails to program, msp removed, in darmstadt
|
|
78
|
+
mcu2: null
|
|
86
79
|
active: false
|
|
87
80
|
- datatype: target
|
|
88
81
|
parameters:
|
|
89
|
-
inherit_from:
|
|
90
|
-
id:
|
|
91
|
-
name:
|
|
92
|
-
comment:
|
|
82
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
83
|
+
id: 1392389
|
|
84
|
+
name: nRF52_FRAM_1392_389
|
|
85
|
+
comment: msp fails to program, msp removed, in darmstadt
|
|
86
|
+
mcu2: null
|
|
93
87
|
active: false
|
|
94
88
|
- datatype: target
|
|
95
89
|
parameters:
|
|
96
|
-
inherit_from:
|
|
97
|
-
id:
|
|
98
|
-
name:
|
|
99
|
-
|
|
90
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
91
|
+
id: 10
|
|
92
|
+
name: nRF52_FRAM_1392_390
|
|
93
|
+
- datatype: target
|
|
94
|
+
parameters:
|
|
95
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
96
|
+
id: 1392391
|
|
97
|
+
name: nRF52_FRAM_1392_391
|
|
98
|
+
comment: nrf failed to program in testbed (but was fine before)
|
|
99
|
+
- datatype: target
|
|
100
|
+
parameters:
|
|
101
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
102
|
+
id: 1392392
|
|
103
|
+
name: nRF52_FRAM_1392_392
|
|
104
|
+
comment: msp fails to program
|
|
105
|
+
active: false
|
|
106
|
+
- datatype: target
|
|
107
|
+
parameters:
|
|
108
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
109
|
+
id: 1
|
|
110
|
+
name: nRF52_FRAM_1392_393
|
|
100
111
|
- datatype: target
|
|
101
112
|
parameters:
|
|
102
|
-
inherit_from:
|
|
103
|
-
id:
|
|
104
|
-
name:
|
|
105
|
-
comment:
|
|
113
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
114
|
+
id: 1392394
|
|
115
|
+
name: nRF52_FRAM_1392_394
|
|
116
|
+
comment: msp fails to program
|
|
106
117
|
active: false
|
|
107
118
|
- datatype: target
|
|
108
119
|
parameters:
|
|
109
|
-
inherit_from:
|
|
110
|
-
id:
|
|
111
|
-
name:
|
|
112
|
-
comment:
|
|
120
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
121
|
+
id: 3
|
|
122
|
+
name: nRF52_FRAM_1392_395
|
|
123
|
+
comment: initial test unit
|
|
113
124
|
- datatype: target
|
|
114
125
|
parameters:
|
|
115
|
-
inherit_from:
|
|
116
|
-
id:
|
|
117
|
-
name:
|
|
118
|
-
comment: Test3 21nA sleep, nrf was miss-aligned -> hot air rework
|
|
126
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
127
|
+
id: 11
|
|
128
|
+
name: nRF52_FRAM_1392_396
|
|
119
129
|
- datatype: target
|
|
120
130
|
parameters:
|
|
121
|
-
inherit_from:
|
|
122
|
-
id:
|
|
123
|
-
name:
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
132
|
+
id: 1392397
|
|
133
|
+
name: nRF52_FRAM_1392_397
|
|
134
|
+
- datatype: target
|
|
135
|
+
parameters:
|
|
136
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
137
|
+
id: 1392398
|
|
138
|
+
name: nRF52_FRAM_1392_398
|
|
139
|
+
- datatype: target
|
|
140
|
+
parameters:
|
|
141
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
142
|
+
id: 1392399
|
|
143
|
+
name: nRF52_FRAM_1392_399
|
|
144
|
+
comment: LabPrototype
|
|
145
|
+
- datatype: target
|
|
146
|
+
parameters:
|
|
147
|
+
inherit_from: nRF52_FRAM_1392_377
|
|
148
|
+
id: 1392400
|
|
149
|
+
name: nRF52_FRAM_1392_400
|
|
150
|
+
comment: in darmstadt
|
|
151
|
+
|
|
126
152
|
|
|
127
153
|
- datatype: target
|
|
128
154
|
parameters:
|
|
@@ -130,7 +156,7 @@
|
|
|
130
156
|
name: target_nRF52_01
|
|
131
157
|
version: v2.1r0
|
|
132
158
|
description: single target PCB, v2.1r0
|
|
133
|
-
comment: ONLY VIRTUAL - NOT REAL
|
|
159
|
+
comment: ONLY VIRTUAL - NOT REAL - for unittests
|
|
134
160
|
mcu1:
|
|
135
161
|
name: nRF52
|
|
136
162
|
mcu2: null
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
observers:
|
|
12
12
|
- name: sheep01
|
|
13
13
|
- name: sheep02
|
|
14
|
-
- name: sheep03
|
|
14
|
+
# - name: sheep03
|
|
15
15
|
- name: sheep04
|
|
16
16
|
- name: sheep05
|
|
17
17
|
- name: sheep06
|
|
18
18
|
- name: sheep07
|
|
19
|
-
- name: sheep08
|
|
19
|
+
# - name: sheep08
|
|
20
20
|
- name: sheep09
|
|
21
21
|
- name: sheep10
|
|
22
|
-
- name: sheep11
|
|
22
|
+
# - name: sheep11
|
|
23
23
|
- name: sheep12
|
|
24
24
|
- name: sheep13
|
|
25
25
|
- name: sheep14
|
|
@@ -53,28 +53,25 @@ from .validation import is_hex_msp430
|
|
|
53
53
|
from .validation import is_hex_nrf52
|
|
54
54
|
|
|
55
55
|
__all__ = [
|
|
56
|
-
# patcher
|
|
57
|
-
"read_uid",
|
|
58
|
-
"modify_uid",
|
|
59
|
-
"modify_symbol_value",
|
|
60
|
-
"find_symbol",
|
|
61
|
-
"read_symbol",
|
|
62
|
-
"read_arch",
|
|
63
|
-
# converter
|
|
64
|
-
"elf_to_hex",
|
|
65
|
-
"file_to_base64",
|
|
66
56
|
"base64_to_file",
|
|
67
|
-
"file_to_hash",
|
|
68
57
|
"base64_to_hash",
|
|
58
|
+
"determine_arch",
|
|
59
|
+
"determine_type",
|
|
60
|
+
"elf_to_hex",
|
|
69
61
|
"extract_firmware",
|
|
62
|
+
"file_to_base64",
|
|
63
|
+
"file_to_hash",
|
|
64
|
+
"find_symbol",
|
|
70
65
|
"firmware_to_hex",
|
|
71
|
-
# validation
|
|
72
|
-
"is_hex",
|
|
73
|
-
"is_hex_msp430",
|
|
74
|
-
"is_hex_nrf52",
|
|
75
66
|
"is_elf",
|
|
76
67
|
"is_elf_msp430",
|
|
77
68
|
"is_elf_nrf52",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
69
|
+
"is_hex",
|
|
70
|
+
"is_hex_msp430",
|
|
71
|
+
"is_hex_nrf52",
|
|
72
|
+
"modify_symbol_value",
|
|
73
|
+
"modify_uid",
|
|
74
|
+
"read_arch",
|
|
75
|
+
"read_symbol",
|
|
76
|
+
"read_uid",
|
|
80
77
|
]
|
shepherd_core/version.py
CHANGED
|
@@ -11,13 +11,13 @@ from .virtual_source_model import VirtualSourceModel
|
|
|
11
11
|
from .virtual_source_simulation import simulate_source
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
14
|
+
"ConstantCurrentTarget",
|
|
15
|
+
"ConstantPowerTarget",
|
|
14
16
|
"PruCalibration",
|
|
17
|
+
"ResistiveTarget",
|
|
15
18
|
"VirtualConverterModel",
|
|
16
19
|
"VirtualHarvesterModel",
|
|
17
20
|
"VirtualSourceModel",
|
|
18
21
|
"simulate_harvester",
|
|
19
22
|
"simulate_source",
|
|
20
|
-
"ResistiveTarget",
|
|
21
|
-
"ConstantCurrentTarget",
|
|
22
|
-
"ConstantPowerTarget",
|
|
23
23
|
]
|
|
@@ -79,10 +79,10 @@ class DiodeTarget(TargetABC):
|
|
|
79
79
|
|
|
80
80
|
def step(self, voltage_uV: int, *, pwr_good: bool) -> float:
|
|
81
81
|
if pwr_good or not self.ctrl:
|
|
82
|
-
V_CC = voltage_uV * 1e-
|
|
82
|
+
V_CC = voltage_uV * 1e-6
|
|
83
83
|
V_D = V_CC / 2
|
|
84
84
|
I_R = I_D = 0
|
|
85
|
-
# there is no direct formular, but this
|
|
85
|
+
# there is no direct formular, but this iteration converges fast
|
|
86
86
|
for _ in range(10):
|
|
87
87
|
# low voltages tend to produce log(x<0)=err
|
|
88
88
|
with suppress(ValueError):
|
|
@@ -90,8 +90,9 @@ class DiodeTarget(TargetABC):
|
|
|
90
90
|
# both currents are positive and should be identical
|
|
91
91
|
I_R = max(0.0, (V_CC - V_D) / self.R_Ohm)
|
|
92
92
|
I_D = max(0.0, self.I_S * math.expm1(V_D / self.c1))
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
with suppress(ZeroDivisionError):
|
|
94
|
+
if abs(I_R / I_D - 1) < 1e-6:
|
|
95
|
+
break
|
|
95
96
|
# take mean of both currents and determine a new V_D
|
|
96
97
|
V_D = V_CC - self.R_Ohm * (I_R + I_D) / 2
|
|
97
98
|
return 1e9 * (I_R + I_D) / 2 # = nA
|
|
@@ -101,7 +101,7 @@ class VirtualConverterModel:
|
|
|
101
101
|
|
|
102
102
|
# pulled from update_states_and_output() due to easier static init
|
|
103
103
|
self.sample_count: int = 0xFFFFFFF0
|
|
104
|
-
self.is_outputting: bool =
|
|
104
|
+
self.is_outputting: bool = False
|
|
105
105
|
self.vsource_skip_gpio_logging: bool = False
|
|
106
106
|
|
|
107
107
|
def calc_inp_power(self, input_voltage_uV: float, input_current_nA: float) -> int:
|
|
@@ -180,6 +180,7 @@ class VirtualConverterModel:
|
|
|
180
180
|
|
|
181
181
|
# TODO: add range-checks for add, sub Ops
|
|
182
182
|
def update_cap_storage(self) -> int:
|
|
183
|
+
# TODO: this calculation is wrong for everything beside boost-cnv
|
|
183
184
|
if self.enable_storage:
|
|
184
185
|
V_mid_prot_uV = max(1.0, self.V_mid_uV)
|
|
185
186
|
P_sum_fW = self.P_inp_fW - self.P_out_fW
|
|
@@ -194,22 +195,24 @@ class VirtualConverterModel:
|
|
|
194
195
|
def update_states_and_output(self) -> int:
|
|
195
196
|
self.sample_count += 1
|
|
196
197
|
check_thresholds = self.sample_count >= self._cfg.interval_check_thresholds_n
|
|
198
|
+
V_mid_uV_now = self.V_mid_uV
|
|
199
|
+
# copy avoids not enabling pwr_good (due to large dV_enable_output_uV)
|
|
197
200
|
|
|
198
201
|
if check_thresholds:
|
|
199
202
|
self.sample_count = 0
|
|
200
203
|
if self.is_outputting:
|
|
201
|
-
if
|
|
204
|
+
if V_mid_uV_now < self.V_disable_output_threshold_uV:
|
|
202
205
|
self.is_outputting = False
|
|
203
|
-
elif
|
|
206
|
+
elif V_mid_uV_now >= self.V_enable_output_threshold_uV:
|
|
204
207
|
self.is_outputting = True
|
|
205
208
|
self.V_mid_uV -= self.dV_enable_output_uV
|
|
206
209
|
|
|
207
210
|
if check_thresholds or self._cfg.immediate_pwr_good_signal:
|
|
208
211
|
# generate power-good-signal
|
|
209
212
|
if self.power_good:
|
|
210
|
-
if
|
|
213
|
+
if V_mid_uV_now <= self._cfg.V_pwr_good_disable_threshold_uV:
|
|
211
214
|
self.power_good = False
|
|
212
|
-
elif
|
|
215
|
+
elif V_mid_uV_now >= self._cfg.V_pwr_good_enable_threshold_uV:
|
|
213
216
|
self.power_good = self.is_outputting
|
|
214
217
|
# set batok pin to state ... TODO?
|
|
215
218
|
|
|
@@ -170,8 +170,9 @@ class VirtualHarvesterModel:
|
|
|
170
170
|
|
|
171
171
|
_voltage_uV, _current_nA = self.ivcurve_2_cv(_voltage_uV, _current_nA)
|
|
172
172
|
if self.interval_step < self._cfg.duration_n:
|
|
173
|
+
self.voltage_set_uV = self.voc_now
|
|
174
|
+
elif self.interval_step == self._cfg.duration_n:
|
|
173
175
|
self.voltage_set_uV = int(self.voc_now * self._cfg.setpoint_n8 / 256)
|
|
174
|
-
_current_nA = 0
|
|
175
176
|
|
|
176
177
|
return _voltage_uV, _current_nA
|
|
177
178
|
|
shepherd_core/writer.py
CHANGED
|
@@ -94,7 +94,7 @@ class Writer(Reader):
|
|
|
94
94
|
|
|
95
95
|
comp_default: int = 1
|
|
96
96
|
mode_default: str = "harvester"
|
|
97
|
-
datatype_default:
|
|
97
|
+
datatype_default: EnergyDType = EnergyDType.ivsample
|
|
98
98
|
|
|
99
99
|
_chunk_shape: tuple = (Reader.samples_per_buffer,)
|
|
100
100
|
|
|
@@ -137,79 +137,72 @@ class Writer(Reader):
|
|
|
137
137
|
self.file_path.name,
|
|
138
138
|
)
|
|
139
139
|
|
|
140
|
+
# open file
|
|
141
|
+
if self._modify:
|
|
142
|
+
self.h5file = h5py.File(self.file_path, "r+") # = rw
|
|
143
|
+
else:
|
|
144
|
+
if not self.file_path.parent.exists():
|
|
145
|
+
self.file_path.parent.mkdir(parents=True)
|
|
146
|
+
self.h5file = h5py.File(self.file_path, "w")
|
|
147
|
+
# ⤷ write, truncate if exist
|
|
148
|
+
self._create_skeleton()
|
|
149
|
+
|
|
150
|
+
# Handle Mode
|
|
140
151
|
if isinstance(mode, str) and mode not in self.mode_dtype_dict:
|
|
141
152
|
msg = f"Can't handle mode '{mode}' (choose one of {self.mode_dtype_dict})"
|
|
142
153
|
raise ValueError(msg)
|
|
143
154
|
|
|
144
|
-
|
|
155
|
+
if mode is not None:
|
|
156
|
+
self.h5file.attrs["mode"] = mode
|
|
157
|
+
if "mode" not in self.h5file.attrs:
|
|
158
|
+
self.h5file.attrs["mode"] = self.mode_default
|
|
159
|
+
|
|
160
|
+
_dtypes = self.mode_dtype_dict[self.get_mode()]
|
|
161
|
+
|
|
162
|
+
# Handle Datatype
|
|
145
163
|
if isinstance(datatype, str):
|
|
146
164
|
datatype = EnergyDType[datatype]
|
|
147
165
|
if isinstance(datatype, EnergyDType) and datatype not in _dtypes:
|
|
148
166
|
msg = f"Can't handle value '{datatype}' of datatype (choose one of {_dtypes})"
|
|
149
167
|
raise ValueError(msg)
|
|
150
168
|
|
|
151
|
-
if
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
self.
|
|
158
|
-
if not hasattr(self, "_datatype"):
|
|
159
|
-
self._datatype = self.datatype_default
|
|
160
|
-
if window_samples:
|
|
161
|
-
self._window_samples = window_samples
|
|
162
|
-
if not hasattr(self, "_window_samples"):
|
|
163
|
-
self._window_samples = 0
|
|
164
|
-
else:
|
|
165
|
-
self._mode = mode if isinstance(mode, str) else self.mode_default
|
|
166
|
-
self._datatype = (
|
|
167
|
-
datatype if isinstance(datatype, EnergyDType) else self.datatype_default
|
|
169
|
+
if isinstance(datatype, EnergyDType):
|
|
170
|
+
self.h5file["data"].attrs["datatype"] = datatype.name
|
|
171
|
+
if "datatype" not in self.h5file["data"].attrs:
|
|
172
|
+
self.h5file["data"].attrs["datatype"] = self.datatype_default.name
|
|
173
|
+
if self.get_datatype() not in _dtypes:
|
|
174
|
+
msg = (
|
|
175
|
+
f"Can't handle value '{self.get_datatype()}' of datatype (choose one of {_dtypes})"
|
|
168
176
|
)
|
|
169
|
-
|
|
177
|
+
raise ValueError(msg)
|
|
170
178
|
|
|
179
|
+
# Handle Window_samples
|
|
180
|
+
if window_samples is not None:
|
|
181
|
+
self.h5file["data"].attrs["window_samples"] = window_samples
|
|
182
|
+
if "window_samples" not in self.h5file["data"].attrs:
|
|
183
|
+
self.h5file["data"].attrs["window_samples"] = 0
|
|
184
|
+
|
|
185
|
+
if datatype == EnergyDType.ivcurve and self.get_window_samples() < 1:
|
|
186
|
+
raise ValueError("Window Size argument needed for ivcurve-Datatype")
|
|
187
|
+
|
|
188
|
+
# Handle Cal
|
|
171
189
|
if isinstance(cal_data, (CalEmu, CalHrv)):
|
|
172
|
-
|
|
173
|
-
elif isinstance(cal_data, CalSeries):
|
|
174
|
-
self._cal = cal_data
|
|
175
|
-
else:
|
|
176
|
-
self._cal = CalSeries()
|
|
190
|
+
cal_data = CalSeries.from_cal(cal_data)
|
|
177
191
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
192
|
+
if isinstance(cal_data, CalSeries):
|
|
193
|
+
for ds, param in product(["current", "voltage", "time"], ["gain", "offset"]):
|
|
194
|
+
self.h5file["data"][ds].attrs[param] = cal_data[ds][param]
|
|
181
195
|
else:
|
|
182
|
-
if
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
196
|
+
# check if there are unset cal-values and set them to default
|
|
197
|
+
cal_data = CalSeries()
|
|
198
|
+
for ds, param in product(["current", "voltage", "time"], ["gain", "offset"]):
|
|
199
|
+
if param not in self.h5file["data"][ds].attrs:
|
|
200
|
+
self.h5file["data"][ds].attrs[param] = cal_data[ds][param]
|
|
187
201
|
|
|
188
202
|
# show key parameters for h5-performance
|
|
189
203
|
settings = list(self.h5file.id.get_access_plist().get_cache())
|
|
190
204
|
self._logger.debug("H5Py Cache_setting=%s (_mdc, _nslots, _nbytes, _w0)", settings)
|
|
191
205
|
|
|
192
|
-
# Store the mode in order to allow user to differentiate harvesting vs emulation data
|
|
193
|
-
if isinstance(self._mode, str) and self._mode in self.mode_dtype_dict:
|
|
194
|
-
self.h5file.attrs["mode"] = self._mode
|
|
195
|
-
|
|
196
|
-
if (
|
|
197
|
-
isinstance(self._datatype, EnergyDType)
|
|
198
|
-
and self._datatype in self.mode_dtype_dict[self.get_mode()]
|
|
199
|
-
):
|
|
200
|
-
self.h5file["data"].attrs["datatype"] = self._datatype.name
|
|
201
|
-
elif not self._modify:
|
|
202
|
-
self._logger.error("datatype invalid? '%s' not written", self._datatype)
|
|
203
|
-
|
|
204
|
-
if isinstance(self._window_samples, int):
|
|
205
|
-
self.h5file["data"].attrs["window_samples"] = self._window_samples
|
|
206
|
-
if datatype == EnergyDType.ivcurve and (self._window_samples in {None, 0}):
|
|
207
|
-
raise ValueError("Window Size argument needed for ivcurve-Datatype")
|
|
208
|
-
|
|
209
|
-
# include cal-data
|
|
210
|
-
for ds, param in product(["current", "voltage", "time"], ["gain", "offset"]):
|
|
211
|
-
self.h5file["data"][ds].attrs[param] = self._cal[ds][param]
|
|
212
|
-
|
|
213
206
|
super().__init__(file_path=None, verbose=verbose)
|
|
214
207
|
|
|
215
208
|
def __enter__(self) -> Self:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: shepherd_core
|
|
3
|
-
Version: 2024.
|
|
3
|
+
Version: 2024.11.2
|
|
4
4
|
Summary: Programming- and CLI-Interface for the h5-dataformat of the Shepherd-Testbed
|
|
5
5
|
Author-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
|
|
6
6
|
Maintainer-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
|
|
@@ -33,27 +33,27 @@ Requires-Dist: h5py
|
|
|
33
33
|
Requires-Dist: numpy
|
|
34
34
|
Requires-Dist: pyYAML
|
|
35
35
|
Requires-Dist: chromalog
|
|
36
|
-
Requires-Dist: pydantic[email]
|
|
36
|
+
Requires-Dist: pydantic[email]>2.0.0
|
|
37
37
|
Requires-Dist: tqdm
|
|
38
38
|
Requires-Dist: intelhex
|
|
39
39
|
Requires-Dist: requests
|
|
40
40
|
Requires-Dist: pyelftools
|
|
41
41
|
Requires-Dist: zstandard
|
|
42
42
|
Requires-Dist: typing-extensions
|
|
43
|
-
Provides-Extra: dev
|
|
44
|
-
Requires-Dist: twine ; extra == 'dev'
|
|
45
|
-
Requires-Dist: pre-commit ; extra == 'dev'
|
|
46
|
-
Requires-Dist: pyright ; extra == 'dev'
|
|
47
|
-
Requires-Dist: ruff ; extra == 'dev'
|
|
48
|
-
Requires-Dist: mypy ; extra == 'dev'
|
|
49
|
-
Requires-Dist: types-PyYAML ; extra == 'dev'
|
|
50
43
|
Provides-Extra: elf
|
|
51
|
-
Requires-Dist: pwntools-elf-only
|
|
44
|
+
Requires-Dist: pwntools-elf-only; extra == "elf"
|
|
52
45
|
Provides-Extra: inventory
|
|
53
|
-
Requires-Dist: psutil
|
|
46
|
+
Requires-Dist: psutil; extra == "inventory"
|
|
47
|
+
Provides-Extra: dev
|
|
48
|
+
Requires-Dist: twine; extra == "dev"
|
|
49
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
50
|
+
Requires-Dist: pyright; extra == "dev"
|
|
51
|
+
Requires-Dist: ruff; extra == "dev"
|
|
52
|
+
Requires-Dist: mypy; extra == "dev"
|
|
53
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
54
54
|
Provides-Extra: test
|
|
55
|
-
Requires-Dist: pytest
|
|
56
|
-
Requires-Dist: coverage
|
|
55
|
+
Requires-Dist: pytest; extra == "test"
|
|
56
|
+
Requires-Dist: coverage; extra == "test"
|
|
57
57
|
|
|
58
58
|
# Core Library
|
|
59
59
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
shepherd_core/__init__.py,sha256=
|
|
1
|
+
shepherd_core/__init__.py,sha256=fCld2mcl0y0h6kRyPal3DP-sWXnKl_0aYWYBdg4QuUk,1270
|
|
2
2
|
shepherd_core/calibration_hw_def.py,sha256=_nMzgNzSnYyqcLnVCGd4tfA2e0avUXbccjmNpFhiDgo,2830
|
|
3
3
|
shepherd_core/commons.py,sha256=vymKXWcy_1bz7ChzzEATUkJ4p3czCzjIdsSehVjJOY8,218
|
|
4
4
|
shepherd_core/logger.py,sha256=4Q4hTI-nccOZ1_A68fo4UEctfu3pJx3IeHfa9VuDDEo,1804
|
|
5
5
|
shepherd_core/reader.py,sha256=Sg7s5UfV01CejI3_nolG7qrSDUBenmt1WPo2BPJee8o,27058
|
|
6
|
-
shepherd_core/version.py,sha256=
|
|
7
|
-
shepherd_core/writer.py,sha256=
|
|
8
|
-
shepherd_core/data_models/__init__.py,sha256=
|
|
6
|
+
shepherd_core/version.py,sha256=VcNt0axHoC1XdR-xRoXqeXfpY9UK9aTjZK9-wOWmzlc,76
|
|
7
|
+
shepherd_core/writer.py,sha256=GMR-7vkOgpTNPoknBWsRsC7-b7iGMtT60-KtSKunNe8,14636
|
|
8
|
+
shepherd_core/data_models/__init__.py,sha256=bnHSP_HBOYm4WuoiHs_vyiRsWlvkyDjsarMNfKedN-Q,1836
|
|
9
9
|
shepherd_core/data_models/readme.md,sha256=1bdfEypY_0NMhXLxOPRnLAsFca0HuHdq7_01yEWxvUs,2470
|
|
10
10
|
shepherd_core/data_models/virtual_source_doc.txt,sha256=KizMcfGKj7BnHIbaJHT7KeTF01SV__UXv01qV_DGHSs,6057
|
|
11
11
|
shepherd_core/data_models/base/__init__.py,sha256=PSJ6acWViqBm0Eiom8DIgKfFVrp5lzYr8OsDvP79vwI,94
|
|
@@ -15,7 +15,7 @@ shepherd_core/data_models/base/content.py,sha256=13j7GSgT73xn27jgDP508thUEJR4U-n
|
|
|
15
15
|
shepherd_core/data_models/base/shepherd.py,sha256=DNrx59o1VBuy_liJuUzZRzmTTYB73D_pUWiNyMQyjYY,6112
|
|
16
16
|
shepherd_core/data_models/base/timezone.py,sha256=2T6E46hJ1DAvmqKfu6uIgCK3RSoAKjGXRyzYNaqKyjY,665
|
|
17
17
|
shepherd_core/data_models/base/wrapper.py,sha256=Izp17HFCKNAS3TnWcPn3MM9fWdc3A-F7eDyAsYlyWCw,755
|
|
18
|
-
shepherd_core/data_models/content/__init__.py,sha256=
|
|
18
|
+
shepherd_core/data_models/content/__init__.py,sha256=69aiNG0h5t1OF7HsLg_ke5eaQKsKyMK8o6Kfaby5vlY,525
|
|
19
19
|
shepherd_core/data_models/content/_external_fixtures.yaml,sha256=0CH7YSWT_hzL-jcg4JjgN9ryQOzbS8S66_pd6GbMnHw,12259
|
|
20
20
|
shepherd_core/data_models/content/energy_environment.py,sha256=WuXMkKqnibGzM2WeW1_m2DAsc0fDqE9CkBYYPSw-7eA,1540
|
|
21
21
|
shepherd_core/data_models/content/energy_environment_fixture.yaml,sha256=UBXTdGT7MK98zx5w_RBCu-f9uNCKxRgiFBQFbmDUxPc,1301
|
|
@@ -24,19 +24,19 @@ shepherd_core/data_models/content/firmware_datatype.py,sha256=XPU9LOoT3h5qFOlE8W
|
|
|
24
24
|
shepherd_core/data_models/content/virtual_harvester.py,sha256=MXmSJ_nRp1mSzxfTNk60o9h5Yrp2lFMbLphUVSnNeNc,9999
|
|
25
25
|
shepherd_core/data_models/content/virtual_harvester_fixture.yaml,sha256=LZe5ue1xYhXZwB3a32sva-L4uKhkQA5AtG9JzW4B2hQ,4564
|
|
26
26
|
shepherd_core/data_models/content/virtual_source.py,sha256=PPAphxEXvgMM7OVZ2dBkYAvJQkmj5Kb2BYFogVUs7B8,15354
|
|
27
|
-
shepherd_core/data_models/content/virtual_source_fixture.yaml,sha256=
|
|
28
|
-
shepherd_core/data_models/experiment/__init__.py,sha256=
|
|
27
|
+
shepherd_core/data_models/content/virtual_source_fixture.yaml,sha256=1o-31mGgn7eyCNidKoOUp9vZh3K4Al0kJgmz54Q2DAE,11191
|
|
28
|
+
shepherd_core/data_models/experiment/__init__.py,sha256=lorsx0M-JWPIrt_UZfexsLwaITv5slFb3krBOt0idm8,618
|
|
29
29
|
shepherd_core/data_models/experiment/experiment.py,sha256=wnn6T3czuh4rz6OSYtMltCTbRpPX55TLVAtQcKO7Uhg,4044
|
|
30
30
|
shepherd_core/data_models/experiment/observer_features.py,sha256=qxnb7anuQz9ZW5IUlPdUXYPIl5U7O9uXkJqZtMnAb0Y,5156
|
|
31
31
|
shepherd_core/data_models/experiment/target_config.py,sha256=XIsjbbo7yn_A4q3GMxWbiNzEGA0Kk5gH7-XfQQ7Kg0E,3674
|
|
32
|
-
shepherd_core/data_models/task/__init__.py,sha256=
|
|
32
|
+
shepherd_core/data_models/task/__init__.py,sha256=qZPoLdqnU2ffqP08wUdXzf0MC5hEdv5X2_XOIui0MM8,3314
|
|
33
33
|
shepherd_core/data_models/task/emulation.py,sha256=tLb5auHOgdoG-e4hFljAYT49z7lMEaiimOy4UVZONi4,6440
|
|
34
34
|
shepherd_core/data_models/task/firmware_mod.py,sha256=Rw_TA1ykQ7abUd_U0snqZlpZyrS8Nx6f4BEax1Xnji0,2818
|
|
35
35
|
shepherd_core/data_models/task/harvest.py,sha256=HHnqWwRsJupaZJxuohs7NrK6VaDyoRzGOaG2h9y3s1Y,3360
|
|
36
36
|
shepherd_core/data_models/task/observer_tasks.py,sha256=XlH_-EGRrdodTn0c2pjGvpcauc0a9NOnLhysKw8iRwk,3511
|
|
37
37
|
shepherd_core/data_models/task/programming.py,sha256=Mg9_AZHIdG01FheEJAifIRPSB3iZ0UJITf8zeg2jyws,2323
|
|
38
38
|
shepherd_core/data_models/task/testbed_tasks.py,sha256=zvIitq0Ek1Ae7baWiBkSQN8nRugyw0N2P4SeVoj_QaY,2090
|
|
39
|
-
shepherd_core/data_models/testbed/__init__.py,sha256=
|
|
39
|
+
shepherd_core/data_models/testbed/__init__.py,sha256=t9nwml5pbu7ZWghimOyZ8ujMIgnRgFkl23pNb5d_KdU,581
|
|
40
40
|
shepherd_core/data_models/testbed/cape.py,sha256=D23ZKXpZRPIIOMn6LCoJrwHiRbSaYg-y7B6fAt1ap64,1246
|
|
41
41
|
shepherd_core/data_models/testbed/cape_fixture.yaml,sha256=uwZxe6hsqvofn5tzg4sffjbVtTVUkextL1GCri_z2A4,2197
|
|
42
42
|
shepherd_core/data_models/testbed/gpio.py,sha256=m4U8-KotpZbdSkRkXm2GqoADiubr_1-3BWOT1qlgQic,2195
|
|
@@ -44,14 +44,15 @@ shepherd_core/data_models/testbed/gpio_fixture.yaml,sha256=yXvoXAau2hancKi2yg1xI
|
|
|
44
44
|
shepherd_core/data_models/testbed/mcu.py,sha256=pUyT8gwPcqh18I7FC6iE6gYYISo69TvDfuq2zSwfmxs,1375
|
|
45
45
|
shepherd_core/data_models/testbed/mcu_fixture.yaml,sha256=lRZMLs27cTeERSFGkbMt5xgxbn11Gh9G1mQqOZK136I,522
|
|
46
46
|
shepherd_core/data_models/testbed/observer.py,sha256=hlj6buDzUQKYnlhCJZyxnrAPYKoL4zq9y14sKtYofOU,3246
|
|
47
|
-
shepherd_core/data_models/testbed/observer_fixture.yaml,sha256=
|
|
47
|
+
shepherd_core/data_models/testbed/observer_fixture.yaml,sha256=jqAatTebWrShXBlhqkCUQIrtVqEjl7RVDR9mosS2LJQ,4807
|
|
48
48
|
shepherd_core/data_models/testbed/target.py,sha256=KeJaLradQ3oHeeowCg_X0lDHDqyi3R3La0YPKC5Rv90,1838
|
|
49
|
-
shepherd_core/data_models/testbed/target_fixture.
|
|
49
|
+
shepherd_core/data_models/testbed/target_fixture.old1,sha256=ivH9uTgC2Z4L_J4KDHAyIHZnB7iy9EUu1yM3M0s1lQQ,3675
|
|
50
|
+
shepherd_core/data_models/testbed/target_fixture.yaml,sha256=LyOJa7yH17tHIGC25jlkLJ_DKnbFSoGhD-6Uh6q_HqQ,4132
|
|
50
51
|
shepherd_core/data_models/testbed/testbed.py,sha256=0uJ3OwqCKDn78OCJOaMa2XWxTLF1ultjmpHVSx3LyhE,3695
|
|
51
|
-
shepherd_core/data_models/testbed/testbed_fixture.yaml,sha256=
|
|
52
|
+
shepherd_core/data_models/testbed/testbed_fixture.yaml,sha256=LaaU8mXLQboYWYNPpA3CWmMPy2w6T6cve6gLgDaA3l0,717
|
|
52
53
|
shepherd_core/decoder_waveform/__init__.py,sha256=-ohGz0fA2tKxUJk4FAQXKtI93d6YGdy0CrkdhOod1QU,120
|
|
53
54
|
shepherd_core/decoder_waveform/uart.py,sha256=sHsXHOsDU1j9zMSZO7CCMTMinT4U_S5NgsEkl1lJK1U,11029
|
|
54
|
-
shepherd_core/fw_tools/__init__.py,sha256=
|
|
55
|
+
shepherd_core/fw_tools/__init__.py,sha256=D9GGj9TzLWZfPjG_iV2BsF-Q1TGTYTgEzWTUI5ReVAA,2090
|
|
55
56
|
shepherd_core/fw_tools/converter.py,sha256=3igRT33tghrBCao5njuPmePS-Y_lSa6EUHvwCakMo2s,3539
|
|
56
57
|
shepherd_core/fw_tools/converter_elf.py,sha256=GQDVqIqMW4twNMvZIV3sowFMezhs2TN-IYREjRP7Xt4,1089
|
|
57
58
|
shepherd_core/fw_tools/patcher.py,sha256=D6MHaCvKRRVQYSZozODAp_l7UnqxVsvnulPzpkfXWW8,4108
|
|
@@ -60,21 +61,21 @@ shepherd_core/inventory/__init__.py,sha256=nRO11HG4eJ_FaXebSkE0dd1H6qvjrX5n3OQHO
|
|
|
60
61
|
shepherd_core/inventory/python.py,sha256=OWNnyEt0IDPW9XGW-WloU0FExwgZzYNA05VpRj4cZGc,1250
|
|
61
62
|
shepherd_core/inventory/system.py,sha256=jRzko9QNPLaBiG7urVaeqqvb3GtCEYRwc0DAghRkLVo,3159
|
|
62
63
|
shepherd_core/inventory/target.py,sha256=Lq11j25tWieXheOxIDaQb-lc-2omxYVex5P6uGiLUyk,507
|
|
63
|
-
shepherd_core/testbed_client/__init__.py,sha256=
|
|
64
|
+
shepherd_core/testbed_client/__init__.py,sha256=QtbsBUzHwOoM6rk0qa21ywuz63YV7af1fwUtWW8Vg_4,234
|
|
64
65
|
shepherd_core/testbed_client/cache_path.py,sha256=tS0er9on5fw8wddMCt1jkc2uyYOdSTvX_UmfmYJf6tY,445
|
|
65
66
|
shepherd_core/testbed_client/client_abc_fix.py,sha256=BsSkpvJHURRejlS-YPF1f6QRPC_X0fYEsJpinzsx6Jc,4079
|
|
66
67
|
shepherd_core/testbed_client/client_web.py,sha256=iMh5T91152uugbFsqr2vvxLser0KIo5g426dp_6QWUE,5774
|
|
67
68
|
shepherd_core/testbed_client/fixtures.py,sha256=4Uk583R4r6I5IB78HxOn-9UNH3sbFha7OPEdcSXvMCU,9939
|
|
68
69
|
shepherd_core/testbed_client/user_model.py,sha256=5M3vWkAGBwdGDUYAanAjrZwpzMBlh3XLOVvNYWiLmms,2107
|
|
69
|
-
shepherd_core/vsource/__init__.py,sha256=
|
|
70
|
-
shepherd_core/vsource/target_model.py,sha256=
|
|
71
|
-
shepherd_core/vsource/virtual_converter_model.py,sha256=
|
|
72
|
-
shepherd_core/vsource/virtual_harvester_model.py,sha256=
|
|
70
|
+
shepherd_core/vsource/__init__.py,sha256=vTvFWuJn4eurPNzEiMd15c1Rd6o3DTWzCfbhOomflZU,771
|
|
71
|
+
shepherd_core/vsource/target_model.py,sha256=LaB5ppi2-IIpIepDqDvOliR-BupzccJl44yRxjlF-ms,5113
|
|
72
|
+
shepherd_core/vsource/virtual_converter_model.py,sha256=3TyxphUMunoGhMda7AWCHZQU8pjRSvxB-9R8lfZFnok,11592
|
|
73
|
+
shepherd_core/vsource/virtual_harvester_model.py,sha256=GyA0uGl3r42t5c4roYtEaj22b0-b5DAHUr2e9DuNn-c,9765
|
|
73
74
|
shepherd_core/vsource/virtual_harvester_simulation.py,sha256=EiBrvmc6D2N7Z0DqFBWPdRJK6hR8Q3iQaj7EYP9pLA0,2405
|
|
74
75
|
shepherd_core/vsource/virtual_source_model.py,sha256=-JSYUfsnYlNo5RfPBhx2G33fo5AjSeFSf2O6unroyFw,2945
|
|
75
76
|
shepherd_core/vsource/virtual_source_simulation.py,sha256=k1v2zpNdJTqiO9uY8TXaq-IUKK6m5l-LEWebYva0skk,5088
|
|
76
|
-
shepherd_core-2024.
|
|
77
|
-
shepherd_core-2024.
|
|
78
|
-
shepherd_core-2024.
|
|
79
|
-
shepherd_core-2024.
|
|
80
|
-
shepherd_core-2024.
|
|
77
|
+
shepherd_core-2024.11.2.dist-info/METADATA,sha256=yeF95R5lUvrrwsbogULe4EUG01YQYexCCOfjPhPJ4vo,7807
|
|
78
|
+
shepherd_core-2024.11.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
79
|
+
shepherd_core-2024.11.2.dist-info/top_level.txt,sha256=wy-t7HRBrKARZxa-Y8_j8d49oVHnulh-95K9ikxVhew,14
|
|
80
|
+
shepherd_core-2024.11.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
81
|
+
shepherd_core-2024.11.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|