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:
  • seed (int, optional) – Random seed used to initialize the pseudo-random number generator.

  • devices (Sequence[Device], optional) – Devices to be added to the scenario during initialization.

add_device(device)[source]

Add a new device to the scenario.

Parameters:

device (Device) – New device to be added to the scenario.

Raises:
Return type:

None

receive_devices(impinging_signals=None, cache=True)[source]

Receive over all scenario devices.

Internally calls Scenario.process_inputs() and Scenario.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:

Sequence[DeviceReception]

Returns: List of the processed device input information.

Raises:

ValueError – If the number of impinging_signals does not match the number of registered devices.