Signals Helpers

Helpers for working with DAQ plugins and signals.proto.

bosdyn.client.signals_helpers.build_max_alert_spec(value: float, severity: <google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x72c3d035bca0>) AlertConditionSpec[source]

Builds a max AlertConditionSpec.

Parameters:
  • value (float) – Max threshold.

  • severity (str) – Severity of alert.

Returns:

AlertConditionSpec

bosdyn.client.signals_helpers.build_simple_signal(name: str, value: float, units: str, max_warning: float | None = None, max_critical: float | None = None) Signal[source]

Builds a simple signal with a float value, string units, and optional max alerts.

Parameters:
  • name (str) – Name of the signal.

  • value (float) – Signal data value.

  • units (str) – Simple units.

  • max_warning (float) – Max warning threshold.

  • max_critical (float) – Max critical threshold.

Returns:

Signal

bosdyn.client.signals_helpers.build_capability_live_data(signals: dict, capability_name: str) CapabilityLiveData[source]

Takes a dictionary of signals and copies them into a CapabilityLiveData message.

Parameters:
  • signals (dict[str, Signal]) – A dictionary of signal id to Signal.

  • capability_name (str) – The capability name.

Returns:

CapabilityLiveData

bosdyn.client.signals_helpers.build_live_data_response(live_data_capabilities: list) LiveDataResponse[source]

Takes a list of CapabilityLiveData and adds them to a LiveDataResponse.

Parameters:

live_data_capabilities (list[LiveDataResponse.CapabilityLiveData]) – A list of CapabilityLiveData.

Returns:

LiveDataResponse

bosdyn.client.signals_helpers.get_data(signal_data: SignalData)[source]

Checks type of SignalData and returns the value.

Parameters:

signal_data (SignalData) – Signal data.

Returns:

The data value.