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 (
TypeVar(PDT, bound= PhysicalDevice)) – 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_inputsandScenario.receive_devices.- Parameters:
impinging_signals (
Sequence[DeviceInput] |Sequence[Signal] |Sequence[Sequence[Signal]] |None) – List of signals impinging onto the devices. If not specified, the device will download the signal samples from its binding.states (
Sequence[DeviceState|None] |None) – States of the transmitting devices. If not specified, the current device states will be queried by callingDevice.state.notify (
bool) – 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.
- class PhysicalScenarioType¶
Type of physical scenario
alias of TypeVar(‘PhysicalScenarioType’, bound=
PhysicalScenario)