shepherd-core 2025.4.2__tar.gz → 2025.5.2__tar.gz
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-2025.4.2 → shepherd_core-2025.5.2}/PKG-INFO +1 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/experiment_generic_var1.py +8 -15
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/experiment_generic_var2.py +6 -13
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/experiment_models.py +12 -17
- shepherd_core-2025.5.2/examples/inventory.py +20 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/simulate_vharvester.py +3 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/__init__.py +2 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/_external_fixtures.yaml +32 -32
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/energy_environment.py +2 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/virtual_harvester.py +4 -4
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/virtual_harvester_fixture.yaml +2 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/virtual_source.py +4 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/virtual_source_fixture.yaml +3 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/experiment/experiment.py +2 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/experiment/observer_features.py +102 -8
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/experiment/target_config.py +5 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/__init__.py +6 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/emulation.py +19 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/programming.py +2 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/mcu_fixture.yaml +4 -4
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/virtual_source_doc.txt +3 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/fw_tools/converter.py +6 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/fw_tools/validation.py +8 -4
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/reader.py +75 -46
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/testbed_client/client_abc_fix.py +2 -3
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/testbed_client/fixtures.py +2 -6
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/version.py +1 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/virtual_harvester_simulation.py +1 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/virtual_source_simulation.py +1 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/writer.py +8 -8
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core.egg-info/PKG-INFO +1 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_config_emulator.yaml +3 -4
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_config_harvester.yaml +1 -1
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_content_models.py +2 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/test_reader.py +6 -6
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/test_writer.py +4 -4
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/vsource/conftest.py +2 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/vsource/test_converter.py +2 -2
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/vsource/test_harvester.py +1 -1
- shepherd_core-2025.4.2/examples/inventory.py +0 -24
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/README.md +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/eenv_generator.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/experiment_from_yaml.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/firmware_model.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/firmware_modification.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/simulate_vsource.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/uart_decode_waveform.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/uart_raw2.csv +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/examples/vsource_debug_sim.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/pyproject.toml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/setup.cfg +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/calibration_hw_def.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/commons.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/cal_measurement.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/calibration.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/content.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/shepherd.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/timezone.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/base/wrapper.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/energy_environment_fixture.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/firmware.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/content/firmware_datatype.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/experiment/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/readme.md +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/firmware_mod.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/harvest.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/observer_tasks.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/task/testbed_tasks.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/cape.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/cape_fixture.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/gpio.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/gpio_fixture.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/mcu.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/observer.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/observer_fixture.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/target.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/target_fixture.old1 +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/target_fixture.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/testbed.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/testbed/testbed_fixture.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/decoder_waveform/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/decoder_waveform/uart.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/fw_tools/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/fw_tools/converter_elf.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/fw_tools/patcher.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/inventory/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/inventory/python.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/inventory/system.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/inventory/target.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/logger.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/testbed_client/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/testbed_client/cache_path.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/testbed_client/client_web.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/testbed_client/user_model.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/target_model.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/virtual_converter_model.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/virtual_harvester_model.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/vsource/virtual_source_model.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core.egg-info/SOURCES.txt +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core.egg-info/dependency_links.txt +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core.egg-info/requires.txt +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core.egg-info/top_level.txt +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core.egg-info/zip-safe +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/conftest.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/conftest.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_cal_data.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_cal_data_faulty.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_cal_meas.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_cal_meas_faulty1.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_cal_meas_faulty2.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_config_experiment.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_config_experiment_alternative.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_config_testbed.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/example_config_virtsource.yaml +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_base_models.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_content_fixtures.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_examples.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_experiment_models.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_task_generation.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_task_models.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_testbed_fixtures.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/data_models/test_testbed_models.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/decoder_waveform/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/decoder_waveform/test_decoder.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/build_msp.elf +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/build_nrf.elf +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/conftest.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/test_converter.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/test_patcher.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/fw_tools/test_validation.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/inventory/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/inventory/test_inventory.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/test_cal_hw.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/test_examples.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/test_logger.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/testbed_client/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/vsource/__init__.py +0 -0
- {shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/tests/vsource/test_z.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shepherd_core
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.5.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>
|
|
@@ -15,13 +15,8 @@ What the code does:
|
|
|
15
15
|
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
|
|
18
|
+
import shepherd_core.data_models as sm
|
|
18
19
|
from shepherd_core import WebClient
|
|
19
|
-
from shepherd_core.data_models import FirmwareDType
|
|
20
|
-
from shepherd_core.data_models import GpioTracing
|
|
21
|
-
from shepherd_core.data_models.content import EnergyEnvironment
|
|
22
|
-
from shepherd_core.data_models.content import Firmware
|
|
23
|
-
from shepherd_core.data_models.experiment import Experiment
|
|
24
|
-
from shepherd_core.data_models.experiment import TargetConfig
|
|
25
20
|
from shepherd_core.data_models.task import TestbedTasks
|
|
26
21
|
from shepherd_core.data_models.testbed import MCU
|
|
27
22
|
|
|
@@ -34,28 +29,26 @@ do_connect = False
|
|
|
34
29
|
if do_connect:
|
|
35
30
|
WebClient()
|
|
36
31
|
|
|
37
|
-
xp = Experiment(
|
|
32
|
+
xp = sm.Experiment(
|
|
38
33
|
id="4567",
|
|
39
34
|
name="meaningful_TestName",
|
|
40
35
|
# time_start could be "2033-03-13 14:15:16" or "datetime.now() + timedelta(minutes=30)"
|
|
41
36
|
duration=30,
|
|
42
37
|
target_configs=[
|
|
43
|
-
TargetConfig(
|
|
38
|
+
sm.TargetConfig(
|
|
44
39
|
target_IDs=range(7, 12),
|
|
45
40
|
custom_IDs=range(1, 100), # note: longer list is OK
|
|
46
|
-
energy_env=EnergyEnvironment(name="eenv_static_3000mV_50mA_3600s"),
|
|
47
|
-
firmware1=Firmware(
|
|
41
|
+
energy_env=sm.EnergyEnvironment(name="eenv_static_3000mV_50mA_3600s"),
|
|
42
|
+
firmware1=sm.Firmware(
|
|
48
43
|
name="FW_TestXYZ",
|
|
49
44
|
data=Path("/var/shepherd/content/fw/nes_lab/nrf52_demo_rf/build.elf"),
|
|
50
|
-
data_type=FirmwareDType.path_elf,
|
|
45
|
+
data_type=sm.FirmwareDType.path_elf,
|
|
51
46
|
data_local=False,
|
|
52
47
|
mcu=MCU(name="nRF52"),
|
|
53
48
|
),
|
|
54
49
|
power_tracing=None,
|
|
55
|
-
gpio_tracing=GpioTracing(
|
|
56
|
-
|
|
57
|
-
uart_baudrate=115_200,
|
|
58
|
-
),
|
|
50
|
+
gpio_tracing=sm.GpioTracing(),
|
|
51
|
+
uart_tracing=sm.UartTracing(baudrate=115_200),
|
|
59
52
|
),
|
|
60
53
|
],
|
|
61
54
|
)
|
|
@@ -14,12 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
|
|
17
|
+
import shepherd_core.data_models as sm
|
|
17
18
|
from shepherd_core import WebClient
|
|
18
|
-
from shepherd_core.data_models import GpioTracing
|
|
19
|
-
from shepherd_core.data_models.content import EnergyEnvironment
|
|
20
|
-
from shepherd_core.data_models.content import Firmware
|
|
21
|
-
from shepherd_core.data_models.experiment import Experiment
|
|
22
|
-
from shepherd_core.data_models.experiment import TargetConfig
|
|
23
19
|
from shepherd_core.data_models.task import TestbedTasks
|
|
24
20
|
|
|
25
21
|
# For online-queries the lib can be connected to the testbed-server.
|
|
@@ -31,24 +27,21 @@ do_connect = False
|
|
|
31
27
|
if do_connect:
|
|
32
28
|
WebClient()
|
|
33
29
|
|
|
34
|
-
xp = Experiment(
|
|
30
|
+
xp = sm.Experiment(
|
|
35
31
|
id="4567",
|
|
36
32
|
name="meaningful_TestName",
|
|
37
33
|
# time_start could be "2033-03-13 14:15:16" or "datetime.now() + timedelta(minutes=30)"
|
|
38
34
|
duration=30,
|
|
39
35
|
target_configs=[
|
|
40
|
-
TargetConfig(
|
|
36
|
+
sm.TargetConfig(
|
|
41
37
|
target_IDs=range(7, 12),
|
|
42
38
|
custom_IDs=range(1, 100), # note: longer list is OK
|
|
43
|
-
energy_env=EnergyEnvironment(name="eenv_static_3000mV_50mA_3600s"),
|
|
44
|
-
firmware1=Firmware.from_firmware(
|
|
39
|
+
energy_env=sm.EnergyEnvironment(name="eenv_static_3000mV_50mA_3600s"),
|
|
40
|
+
firmware1=sm.Firmware.from_firmware(
|
|
45
41
|
file=Path("./firmware_nrf.elf").absolute(),
|
|
46
42
|
),
|
|
47
43
|
power_tracing=None,
|
|
48
|
-
gpio_tracing=GpioTracing(
|
|
49
|
-
uart_decode=True, # enables logging uart from userspace
|
|
50
|
-
uart_baudrate=115_200,
|
|
51
|
-
),
|
|
44
|
+
gpio_tracing=sm.GpioTracing(),
|
|
52
45
|
),
|
|
53
46
|
],
|
|
54
47
|
)
|
|
@@ -18,17 +18,12 @@ How to define an experiment:
|
|
|
18
18
|
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
+
import shepherd_core.data_models as sm
|
|
21
22
|
from shepherd_core import WebClient
|
|
22
|
-
from shepherd_core.data_models.content import EnergyEnvironment
|
|
23
|
-
from shepherd_core.data_models.content import Firmware
|
|
24
|
-
from shepherd_core.data_models.content import VirtualHarvesterConfig
|
|
25
|
-
from shepherd_core.data_models.content import VirtualSourceConfig
|
|
26
|
-
from shepherd_core.data_models.experiment import Experiment
|
|
27
|
-
from shepherd_core.data_models.experiment import TargetConfig
|
|
28
23
|
from shepherd_core.data_models.task import TestbedTasks
|
|
29
24
|
|
|
30
25
|
# generate description for all parameters -> base for web-forms
|
|
31
|
-
Experiment.schema_to_file("experiment_schema.yaml")
|
|
26
|
+
sm.Experiment.schema_to_file("experiment_schema.yaml")
|
|
32
27
|
|
|
33
28
|
# For online-queries the lib can be connected to the testbed-server.
|
|
34
29
|
# NOTE: there are 3 states:
|
|
@@ -40,11 +35,11 @@ if do_connect:
|
|
|
40
35
|
WebClient()
|
|
41
36
|
|
|
42
37
|
# Defining an Experiment in Python
|
|
43
|
-
hrv = VirtualHarvesterConfig(name="mppt_bq_thermoelectric")
|
|
38
|
+
hrv = sm.VirtualHarvesterConfig(name="mppt_bq_thermoelectric")
|
|
44
39
|
|
|
45
40
|
target_cfgs = [
|
|
46
41
|
# first Instance similar to yaml-syntax
|
|
47
|
-
TargetConfig(
|
|
42
|
+
sm.TargetConfig(
|
|
48
43
|
target_IDs=[9, 10, 11],
|
|
49
44
|
custom_IDs=[0, 1, 2],
|
|
50
45
|
energy_env={"name": "SolarSunny"},
|
|
@@ -52,17 +47,17 @@ target_cfgs = [
|
|
|
52
47
|
firmware1={"name": "nrf52_demo_rf"},
|
|
53
48
|
),
|
|
54
49
|
# second Instance fully object-oriented (recommended)
|
|
55
|
-
TargetConfig(
|
|
50
|
+
sm.TargetConfig(
|
|
56
51
|
target_IDs=list(range(1, 5)),
|
|
57
52
|
custom_IDs=list(range(7, 18)), # note: longer list is OK
|
|
58
|
-
energy_env=EnergyEnvironment(name="ThermoelectricWashingMachine"),
|
|
59
|
-
virtual_source=VirtualSourceConfig(name="BQ25570-Schmitt", harvester=hrv),
|
|
60
|
-
firmware1=Firmware(name="nrf52_demo_rf"),
|
|
61
|
-
firmware2=Firmware(name="msp430_deep_sleep"),
|
|
53
|
+
energy_env=sm.EnergyEnvironment(name="ThermoelectricWashingMachine"),
|
|
54
|
+
virtual_source=sm.VirtualSourceConfig(name="BQ25570-Schmitt", harvester=hrv),
|
|
55
|
+
firmware1=sm.Firmware(name="nrf52_demo_rf"),
|
|
56
|
+
firmware2=sm.Firmware(name="msp430_deep_sleep"),
|
|
62
57
|
),
|
|
63
58
|
]
|
|
64
59
|
|
|
65
|
-
xperi1 = Experiment(
|
|
60
|
+
xperi1 = sm.Experiment(
|
|
66
61
|
id="4567",
|
|
67
62
|
name="meaningful Test-Name",
|
|
68
63
|
time_start="2033-03-13 14:15:16", # or: datetime.now() + timedelta(minutes=30)
|
|
@@ -71,12 +66,12 @@ xperi1 = Experiment(
|
|
|
71
66
|
|
|
72
67
|
# Safe, reload and compare content
|
|
73
68
|
xperi1.to_file("experiment_from_py.yaml", minimal=False)
|
|
74
|
-
xperi2 = Experiment.from_file("experiment_from_py.yaml")
|
|
69
|
+
xperi2 = sm.Experiment.from_file("experiment_from_py.yaml")
|
|
75
70
|
print(f"xp1 hash: {xperi1.get_hash()}")
|
|
76
71
|
print(f"xp2 hash: {xperi2.get_hash()}")
|
|
77
72
|
|
|
78
73
|
# comparison to same config (in yaml) fails due to internal variables, BUT:
|
|
79
|
-
xperi3 = Experiment.from_file("experiment_from_yaml.yaml")
|
|
74
|
+
xperi3 = sm.Experiment.from_file("experiment_from_yaml.yaml")
|
|
80
75
|
print(f"xp3 hash: {xperi3.get_hash()} (won't match)")
|
|
81
76
|
|
|
82
77
|
# Create a tasks-list for the testbed
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Shows how to use inventory functionality."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import shepherd_core.inventory as si
|
|
6
|
+
|
|
7
|
+
pyt_inv = si.PythonInventory.collect()
|
|
8
|
+
print(f"PyInv: {pyt_inv}")
|
|
9
|
+
sys_inv = si.SystemInventory.collect()
|
|
10
|
+
print(f"SysInv: {sys_inv}")
|
|
11
|
+
tgt_inv = si.TargetInventory.collect()
|
|
12
|
+
print(f"TgtInv: {tgt_inv}")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
inv = si.Inventory.collect()
|
|
16
|
+
print(f"Complete Inventory: {inv}")
|
|
17
|
+
inv.to_file("inventory.yaml", minimal=True, comment="just a test")
|
|
18
|
+
|
|
19
|
+
inl = si.InventoryList(elements=[inv])
|
|
20
|
+
inl.to_csv(Path(__file__).parent / "inventory.csv")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Demonstrate behavior of Virtual Harvester Algorithms.
|
|
2
2
|
|
|
3
|
-
- simulation is based on
|
|
3
|
+
- simulation is based on IVTrace derived from a solar-isc-voc-recording during a jogging-trip
|
|
4
4
|
- harvesting is done by various algorithms and preconfigured virtual harvesters
|
|
5
5
|
- results are printed on console (harvested energy)
|
|
6
6
|
|
|
@@ -44,13 +44,13 @@ save_files: bool = False
|
|
|
44
44
|
# convert IVonne to IVCurve
|
|
45
45
|
if not file_ivcurve.exists():
|
|
46
46
|
with ivonne.Reader(file_ivonne) as db:
|
|
47
|
-
db.
|
|
47
|
+
db.convert_2_ivsurface(file_ivcurve, duration_s=sim_duration)
|
|
48
48
|
|
|
49
49
|
# Input Statistics
|
|
50
50
|
with Reader(file_ivcurve, verbose=False) as file:
|
|
51
51
|
window_size = file.get_window_samples()
|
|
52
52
|
I_in_max = 0.0
|
|
53
|
-
for _t, _v, _i in file.
|
|
53
|
+
for _t, _v, _i in file.read():
|
|
54
54
|
I_in_max = max(I_in_max, _i.max())
|
|
55
55
|
print(
|
|
56
56
|
f"Input-file: \n"
|
|
@@ -31,6 +31,7 @@ from .experiment.observer_features import GpioLevel
|
|
|
31
31
|
from .experiment.observer_features import GpioTracing
|
|
32
32
|
from .experiment.observer_features import PowerTracing
|
|
33
33
|
from .experiment.observer_features import SystemLogging
|
|
34
|
+
from .experiment.observer_features import UartTracing
|
|
34
35
|
from .experiment.target_config import TargetConfig
|
|
35
36
|
|
|
36
37
|
__all__ = [
|
|
@@ -54,6 +55,7 @@ __all__ = [
|
|
|
54
55
|
"ShpModel",
|
|
55
56
|
"SystemLogging",
|
|
56
57
|
"TargetConfig",
|
|
58
|
+
"UartTracing",
|
|
57
59
|
"VirtualHarvesterConfig",
|
|
58
60
|
"VirtualSourceConfig",
|
|
59
61
|
"Wrapper",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
- datatype: EnergyEnvironment
|
|
2
|
-
created:
|
|
2
|
+
created: 2025-05-12 17:28:39.756999+02:00
|
|
3
3
|
parameters:
|
|
4
4
|
id: 2639560972524229652
|
|
5
5
|
name: eenv_static_2000mV_10mA_3600s
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
indoor: true
|
|
23
23
|
location: Lab-VSrc
|
|
24
24
|
- datatype: EnergyEnvironment
|
|
25
|
-
created:
|
|
25
|
+
created: 2025-05-12 17:28:39.764595+02:00
|
|
26
26
|
parameters:
|
|
27
27
|
id: 9823394105967169626
|
|
28
28
|
name: eenv_static_2000mV_1mA_3600s
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
indoor: true
|
|
46
46
|
location: Lab-VSrc
|
|
47
47
|
- datatype: EnergyEnvironment
|
|
48
|
-
created:
|
|
48
|
+
created: 2025-05-12 17:28:39.772144+02:00
|
|
49
49
|
parameters:
|
|
50
50
|
id: 3900615675169501222
|
|
51
51
|
name: eenv_static_2000mV_50mA_3600s
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
indoor: true
|
|
69
69
|
location: Lab-VSrc
|
|
70
70
|
- datatype: EnergyEnvironment
|
|
71
|
-
created:
|
|
71
|
+
created: 2025-05-12 17:28:39.779737+02:00
|
|
72
72
|
parameters:
|
|
73
73
|
id: 14796673729431137386
|
|
74
74
|
name: eenv_static_2000mV_5mA_3600s
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
indoor: true
|
|
92
92
|
location: Lab-VSrc
|
|
93
93
|
- datatype: EnergyEnvironment
|
|
94
|
-
created:
|
|
94
|
+
created: 2025-05-12 17:28:39.787329+02:00
|
|
95
95
|
parameters:
|
|
96
96
|
id: 6648482606607441403
|
|
97
97
|
name: eenv_static_3000mV_10mA_3600s
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
indoor: true
|
|
115
115
|
location: Lab-VSrc
|
|
116
116
|
- datatype: EnergyEnvironment
|
|
117
|
-
created:
|
|
117
|
+
created: 2025-05-12 17:28:39.794922+02:00
|
|
118
118
|
parameters:
|
|
119
119
|
id: 13566000951043177991
|
|
120
120
|
name: eenv_static_3000mV_1mA_3600s
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
indoor: true
|
|
138
138
|
location: Lab-VSrc
|
|
139
139
|
- datatype: EnergyEnvironment
|
|
140
|
-
created:
|
|
140
|
+
created: 2025-05-12 17:28:39.802410+02:00
|
|
141
141
|
parameters:
|
|
142
142
|
id: 7977778327156610158
|
|
143
143
|
name: eenv_static_3000mV_50mA_3600s
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
indoor: true
|
|
161
161
|
location: Lab-VSrc
|
|
162
162
|
- datatype: EnergyEnvironment
|
|
163
|
-
created:
|
|
163
|
+
created: 2025-05-12 17:28:39.810147+02:00
|
|
164
164
|
parameters:
|
|
165
165
|
id: 4900162978999238419
|
|
166
166
|
name: eenv_static_3000mV_5mA_3600s
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
indoor: true
|
|
184
184
|
location: Lab-VSrc
|
|
185
185
|
- datatype: Firmware
|
|
186
|
-
created:
|
|
186
|
+
created: 2025-05-12 17:28:39.825659+02:00
|
|
187
187
|
parameters:
|
|
188
188
|
id: 3000
|
|
189
189
|
name: msp430_deep_sleep
|
|
@@ -198,10 +198,10 @@
|
|
|
198
198
|
mcu:
|
|
199
199
|
id: 1002
|
|
200
200
|
name: MSP430FR
|
|
201
|
-
description: 16MHz Ultra-Low-Pwr MCU with
|
|
201
|
+
description: 16MHz Ultra-Low-Pwr MCU with 256 KB FRAM
|
|
202
202
|
comment: null
|
|
203
203
|
platform: MSP430
|
|
204
|
-
core:
|
|
204
|
+
core: MSP430FR5994
|
|
205
205
|
prog_protocol: SBW
|
|
206
206
|
prog_voltage: 3.0
|
|
207
207
|
prog_datarate: 500000
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
data_hash: null
|
|
212
212
|
data_local: false
|
|
213
213
|
- datatype: Firmware
|
|
214
|
-
created:
|
|
214
|
+
created: 2025-05-12 17:28:39.834276+02:00
|
|
215
215
|
parameters:
|
|
216
216
|
id: 3001
|
|
217
217
|
name: msp430_spi_fram
|
|
@@ -226,10 +226,10 @@
|
|
|
226
226
|
mcu:
|
|
227
227
|
id: 1002
|
|
228
228
|
name: MSP430FR
|
|
229
|
-
description: 16MHz Ultra-Low-Pwr MCU with
|
|
229
|
+
description: 16MHz Ultra-Low-Pwr MCU with 256 KB FRAM
|
|
230
230
|
comment: null
|
|
231
231
|
platform: MSP430
|
|
232
|
-
core:
|
|
232
|
+
core: MSP430FR5994
|
|
233
233
|
prog_protocol: SBW
|
|
234
234
|
prog_voltage: 3.0
|
|
235
235
|
prog_datarate: 500000
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
data_hash: null
|
|
240
240
|
data_local: false
|
|
241
241
|
- datatype: Firmware
|
|
242
|
-
created:
|
|
242
|
+
created: 2025-05-12 17:28:39.842993+02:00
|
|
243
243
|
parameters:
|
|
244
244
|
id: 3002
|
|
245
245
|
name: msp430_testable
|
|
@@ -254,10 +254,10 @@
|
|
|
254
254
|
mcu:
|
|
255
255
|
id: 1002
|
|
256
256
|
name: MSP430FR
|
|
257
|
-
description: 16MHz Ultra-Low-Pwr MCU with
|
|
257
|
+
description: 16MHz Ultra-Low-Pwr MCU with 256 KB FRAM
|
|
258
258
|
comment: null
|
|
259
259
|
platform: MSP430
|
|
260
|
-
core:
|
|
260
|
+
core: MSP430FR5994
|
|
261
261
|
prog_protocol: SBW
|
|
262
262
|
prog_voltage: 3.0
|
|
263
263
|
prog_datarate: 500000
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
data_hash: null
|
|
268
268
|
data_local: false
|
|
269
269
|
- datatype: Firmware
|
|
270
|
-
created:
|
|
270
|
+
created: 2025-05-12 17:28:39.851412+02:00
|
|
271
271
|
parameters:
|
|
272
272
|
id: 7163917825449888392
|
|
273
273
|
name: nrf52_deep_sleep
|
|
@@ -282,20 +282,20 @@
|
|
|
282
282
|
mcu:
|
|
283
283
|
id: 1001
|
|
284
284
|
name: nRF52
|
|
285
|
-
description:
|
|
285
|
+
description: MCU with RF, 802.15.4, Bluetooth v5.0, 2.4GHz
|
|
286
286
|
comment: null
|
|
287
287
|
platform: nRF52
|
|
288
288
|
core: nRF52840
|
|
289
289
|
prog_protocol: SWD
|
|
290
290
|
prog_voltage: 3.0
|
|
291
291
|
prog_datarate: 500000
|
|
292
|
-
fw_name_default:
|
|
292
|
+
fw_name_default: nrf52_deep_sleep
|
|
293
293
|
data: /var/shepherd/content/fw/nes_lab/nrf52_deep_sleep/build.elf
|
|
294
294
|
data_type: path_elf
|
|
295
295
|
data_hash: null
|
|
296
296
|
data_local: false
|
|
297
297
|
- datatype: Firmware
|
|
298
|
-
created:
|
|
298
|
+
created: 2025-05-12 17:28:39.859962+02:00
|
|
299
299
|
parameters:
|
|
300
300
|
id: 2000
|
|
301
301
|
name: nrf52_demo_rf
|
|
@@ -310,20 +310,20 @@
|
|
|
310
310
|
mcu:
|
|
311
311
|
id: 1001
|
|
312
312
|
name: nRF52
|
|
313
|
-
description:
|
|
313
|
+
description: MCU with RF, 802.15.4, Bluetooth v5.0, 2.4GHz
|
|
314
314
|
comment: null
|
|
315
315
|
platform: nRF52
|
|
316
316
|
core: nRF52840
|
|
317
317
|
prog_protocol: SWD
|
|
318
318
|
prog_voltage: 3.0
|
|
319
319
|
prog_datarate: 500000
|
|
320
|
-
fw_name_default:
|
|
320
|
+
fw_name_default: nrf52_deep_sleep
|
|
321
321
|
data: /var/shepherd/content/fw/nes_lab/nrf52_demo_rf/build.elf
|
|
322
322
|
data_type: path_elf
|
|
323
323
|
data_hash: null
|
|
324
324
|
data_local: false
|
|
325
325
|
- datatype: Firmware
|
|
326
|
-
created:
|
|
326
|
+
created: 2025-05-12 17:28:39.868340+02:00
|
|
327
327
|
parameters:
|
|
328
328
|
id: 3174430733058172825
|
|
329
329
|
name: nrf52_rf_survey
|
|
@@ -339,20 +339,20 @@
|
|
|
339
339
|
mcu:
|
|
340
340
|
id: 1001
|
|
341
341
|
name: nRF52
|
|
342
|
-
description:
|
|
342
|
+
description: MCU with RF, 802.15.4, Bluetooth v5.0, 2.4GHz
|
|
343
343
|
comment: null
|
|
344
344
|
platform: nRF52
|
|
345
345
|
core: nRF52840
|
|
346
346
|
prog_protocol: SWD
|
|
347
347
|
prog_voltage: 3.0
|
|
348
348
|
prog_datarate: 500000
|
|
349
|
-
fw_name_default:
|
|
349
|
+
fw_name_default: nrf52_deep_sleep
|
|
350
350
|
data: /var/shepherd/content/fw/nes_lab/nrf52_rf_survey/build.elf
|
|
351
351
|
data_type: path_elf
|
|
352
352
|
data_hash: null
|
|
353
353
|
data_local: false
|
|
354
354
|
- datatype: Firmware
|
|
355
|
-
created:
|
|
355
|
+
created: 2025-05-12 17:28:39.876819+02:00
|
|
356
356
|
parameters:
|
|
357
357
|
id: 16381936580724580968
|
|
358
358
|
name: nrf52_rf_test
|
|
@@ -367,20 +367,20 @@
|
|
|
367
367
|
mcu:
|
|
368
368
|
id: 1001
|
|
369
369
|
name: nRF52
|
|
370
|
-
description:
|
|
370
|
+
description: MCU with RF, 802.15.4, Bluetooth v5.0, 2.4GHz
|
|
371
371
|
comment: null
|
|
372
372
|
platform: nRF52
|
|
373
373
|
core: nRF52840
|
|
374
374
|
prog_protocol: SWD
|
|
375
375
|
prog_voltage: 3.0
|
|
376
376
|
prog_datarate: 500000
|
|
377
|
-
fw_name_default:
|
|
377
|
+
fw_name_default: nrf52_deep_sleep
|
|
378
378
|
data: /var/shepherd/content/fw/nes_lab/nrf52_rf_test/build.elf
|
|
379
379
|
data_type: path_elf
|
|
380
380
|
data_hash: null
|
|
381
381
|
data_local: false
|
|
382
382
|
- datatype: Firmware
|
|
383
|
-
created:
|
|
383
|
+
created: 2025-05-12 17:28:39.885271+02:00
|
|
384
384
|
parameters:
|
|
385
385
|
id: 2002
|
|
386
386
|
name: nrf52_testable
|
|
@@ -396,14 +396,14 @@
|
|
|
396
396
|
mcu:
|
|
397
397
|
id: 1001
|
|
398
398
|
name: nRF52
|
|
399
|
-
description:
|
|
399
|
+
description: MCU with RF, 802.15.4, Bluetooth v5.0, 2.4GHz
|
|
400
400
|
comment: null
|
|
401
401
|
platform: nRF52
|
|
402
402
|
core: nRF52840
|
|
403
403
|
prog_protocol: SWD
|
|
404
404
|
prog_voltage: 3.0
|
|
405
405
|
prog_datarate: 500000
|
|
406
|
-
fw_name_default:
|
|
406
|
+
fw_name_default: nrf52_deep_sleep
|
|
407
407
|
data: /var/shepherd/content/fw/nes_lab/nrf52_testable/build.elf
|
|
408
408
|
data_type: path_elf
|
|
409
409
|
data_hash: null
|
|
@@ -15,8 +15,8 @@ from shepherd_core.testbed_client import tb_client
|
|
|
15
15
|
class EnergyDType(str, Enum):
|
|
16
16
|
"""Data-Type-Options for energy environments."""
|
|
17
17
|
|
|
18
|
-
ivsample = ivsamples = "ivsample"
|
|
19
|
-
|
|
18
|
+
ivtrace = ivsample = ivsamples = "ivsample"
|
|
19
|
+
ivsurface = ivcurve = ivcurves = "ivcurve"
|
|
20
20
|
isc_voc = "isc_voc"
|
|
21
21
|
|
|
22
22
|
|
|
@@ -23,9 +23,9 @@ from .energy_environment import EnergyDType
|
|
|
23
23
|
class AlgorithmDType(str, Enum):
|
|
24
24
|
"""Options for choosing a harvesting algorithm."""
|
|
25
25
|
|
|
26
|
-
direct = disable = neutral = "neutral"
|
|
27
|
-
isc_voc = "isc_voc"
|
|
28
|
-
ivcurve = ivcurves =
|
|
26
|
+
direct = disable = neutral = "neutral" # for just using IVTrace / samples
|
|
27
|
+
isc_voc = "isc_voc" # only recordable ATM
|
|
28
|
+
ivcurve = ivcurves = ivsurface = "ivcurve"
|
|
29
29
|
constant = cv = "cv"
|
|
30
30
|
# ci .. constant current -> is this desired?
|
|
31
31
|
mppt_voc = "mppt_voc"
|
|
@@ -37,7 +37,7 @@ class VirtualHarvesterConfig(ContentModel, title="Config for the Harvester"):
|
|
|
37
37
|
"""A vHrv makes a source-characterization (i.e. ivcurve) usable for the vSrc.
|
|
38
38
|
|
|
39
39
|
Mostly used when the file-based energy environment of the virtual source
|
|
40
|
-
is not already supplied as pre-harvested
|
|
40
|
+
is not already supplied as pre-harvested ivtrace.
|
|
41
41
|
"""
|
|
42
42
|
|
|
43
43
|
# General Metadata & Ownership -> ContentModel
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
parameters:
|
|
22
22
|
id: 1100
|
|
23
23
|
name: ivcurve
|
|
24
|
-
description: Postpone harvesting by sampling
|
|
24
|
+
description: Postpone harvesting by sampling ivsurface / curves (voltage stepped as sawtooth-wave)
|
|
25
25
|
comment: ~110 Hz, Between 50 & 60 Hz line-frequency to avoid standing waves
|
|
26
26
|
inherit_from: neutral
|
|
27
27
|
algorithm: ivcurve
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
- datatype: VirtualHarvesterConfig
|
|
37
37
|
parameters:
|
|
38
38
|
id: 1101
|
|
39
|
-
name:
|
|
39
|
+
name: ivsurface # synonym
|
|
40
40
|
inherit_from: ivcurve
|
|
41
41
|
|
|
42
42
|
- datatype: VirtualHarvesterConfig
|
|
@@ -33,7 +33,7 @@ class VirtualSourceConfig(ContentModel, title="Config for the virtual Source"):
|
|
|
33
33
|
The converter-stage is software defined and offers:
|
|
34
34
|
- buck-boost-combinations,
|
|
35
35
|
- a simple diode + resistor and
|
|
36
|
-
- an intermediate
|
|
36
|
+
- an intermediate storage capacitor.
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
39
|
# TODO: I,V,R should be in regular unit (V, A, Ohm)
|
|
@@ -82,6 +82,8 @@ class VirtualSourceConfig(ContentModel, title="Config for the virtual Source"):
|
|
|
82
82
|
C_output_uF: Annotated[float, Field(ge=0, le=4.29e6)] = 1.0
|
|
83
83
|
# TODO: C_output is handled internally as delta-V, but should be a I_transient
|
|
84
84
|
# that makes it visible in simulation as additional i_out_drain
|
|
85
|
+
# TODO: potential weakness, ACD lowpass is capturing transient,
|
|
86
|
+
# but energy is LOST with this model
|
|
85
87
|
|
|
86
88
|
# Extra
|
|
87
89
|
V_output_log_gpio_threshold_mV: Annotated[float, Field(ge=0, le=4.29e6)] = 1_400
|
|
@@ -105,7 +107,7 @@ class VirtualSourceConfig(ContentModel, title="Config for the virtual Source"):
|
|
|
105
107
|
# Buck Converter
|
|
106
108
|
V_output_mV: Annotated[float, Field(ge=0, le=5_000)] = 2_400
|
|
107
109
|
V_buck_drop_mV: Annotated[float, Field(ge=0, le=5_000)] = 0
|
|
108
|
-
# ⤷ simulate LDO min voltage differential or output-diode
|
|
110
|
+
# ⤷ simulate LDO / diode min voltage differential or output-diode
|
|
109
111
|
|
|
110
112
|
LUT_output_efficiency: LUT1D = 12 * [1.00]
|
|
111
113
|
# ⤷ array[12] depending on output_current
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
parameters:
|
|
94
94
|
id: 1011
|
|
95
95
|
name: diode+capacitor
|
|
96
|
-
description: Simple Converter based on diode and
|
|
96
|
+
description: Simple Converter based on diode and storage capacitor
|
|
97
97
|
inherit_from: neutral
|
|
98
98
|
V_input_drop_mV: 300 # simulate input-diode
|
|
99
99
|
C_intermediate_uF: 47 # primary storage-Cap
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
parameters:
|
|
115
115
|
id: 1013
|
|
116
116
|
name: diode+resistor+capacitor
|
|
117
|
-
description: Simple Converter based on diode, current limiting resistor and
|
|
117
|
+
description: Simple Converter based on diode, current limiting resistor and storage capacitor
|
|
118
118
|
inherit_from: diode+capacitor
|
|
119
119
|
R_input_mOhm: 10000
|
|
120
120
|
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
enable_boost: true # if false -> v_intermediate = v_input, output-switch-hysteresis is still usable
|
|
134
134
|
|
|
135
135
|
harvester:
|
|
136
|
-
name: mppt_bq_solar # harvester only active if input is
|
|
136
|
+
name: mppt_bq_solar # harvester only active if input is ivsurface / curves
|
|
137
137
|
|
|
138
138
|
V_input_max_mV: 3000
|
|
139
139
|
I_input_max_mA: 100
|
{shepherd_core-2025.4.2 → shepherd_core-2025.5.2}/shepherd_core/data_models/experiment/experiment.py
RENAMED
|
@@ -46,7 +46,7 @@ class Experiment(ShpModel, title="Config of an Experiment"):
|
|
|
46
46
|
# feedback
|
|
47
47
|
email_results: bool = False
|
|
48
48
|
|
|
49
|
-
sys_logging: SystemLogging = SystemLogging(
|
|
49
|
+
sys_logging: SystemLogging = SystemLogging() # = all active
|
|
50
50
|
|
|
51
51
|
# schedule
|
|
52
52
|
time_start: Optional[datetime] = None # = ASAP
|
|
@@ -56,7 +56,7 @@ class Experiment(ShpModel, title="Config of an Experiment"):
|
|
|
56
56
|
# targets
|
|
57
57
|
target_configs: Annotated[list[TargetConfig], Field(min_length=1, max_length=128)]
|
|
58
58
|
|
|
59
|
-
#
|
|
59
|
+
# debug
|
|
60
60
|
lib_ver: Optional[str] = version
|
|
61
61
|
|
|
62
62
|
@model_validator(mode="after")
|