Physical Scenario¶
- class PhysicalScenario(seed=None, devices=None)[source]¶
Bases:
Generic
[PDT
],Scenario
[PDT
]Scenario of physical device bindings.
Managing physical devices by a scenario enables synchronized triggering and shared random seed configuration.
- Parameters:
- add_device(device)[source]¶
Add a new device to the scenario.
- Parameters:
device (Device) – New device to be added to the scenario.
- Raises:
ValueError – If the device already exists.
RuntimeError – If the scenario is not in default mode.
- Return type:
- receive_devices(impinging_signals=None, cache=True)[source]¶
Receive over all scenario devices.
Internally calls
Scenario.process_inputs()
andScenario.receive_devices()
.- Parameters:
impinging_signals (Sequence[DeviceInput | Signal | Sequence[Signal]] | None, optional) – List of signals impinging onto the devices. If not specified, the device will download the signal samples from its binding.
cache (bool, optional) – Cache the operator inputs at the registered receive operators for further processing. Enabled by default.
- Return type:
Returns: List of the processed device input information.
- Raises:
ValueError – If the number of impinging_signals does not match the number of registered devices.