Physical Scenario¶
- class PhysicalScenario(seed=None, devices=None)[source]¶
Bases:
Generic
[PDT
],Scenario
[PDT
,DeviceState
,Drop
]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, states=None, notify=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.
states (Sequence[DeviceState | None], optional) – States of the transmitting devices. If not specified, the current device states will be queried by calling :meth:`Device.state
notify (bool, optional) – Notify the receiving DSP layer’s callbacks about the reception results. 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.