Module smuview

The SmuView 0.0.4 Python bindings.

The Python bindings are a scripting extension for SmuView to automate, setup and control complex or repetitive measurements, to process the incoming data and to create a standardized user interface for those measurements.

The smuview module offers two default object instances: Session and UiProxy. The Session object gives access to already connected devices or connects new devices. The returned device object can then be used to read data from the device or control the device. The UiProxy object instance is used to modify the user interface, for example adding tabs or views.

Here is a short example that connects the HP 3378A DMM via GPIB, reads a sample and creates the default tab for the device:

import smuview
import time

# Connect device.
dmm_dev = Session.connect_device("hp-3478a:conn=libgpib/hp3478a")[0]
# Sleep 1s to give the devices the chance to create signals
time.sleep(1)
# Get last sample from channel P1
sample = dmm_dev.channels()["P1"].actual_signal().get_last_sample(True)
print(sample)

# Add default tab for the DMM device.
UiProxy.add_device_tab(dmm_dev)

For more example scripts, please have a look into the smuscript folder.

Classes

class AnalogSampleSignal (...)

A signal with key-value pairs.

Ancestors

Methods

def get_sample(self: AnalogSampleSignal, pos: int) -> Tuple[int, float]

Return the sample for the given position.

Parameters

pos : int
The position/number of the sample.

Returns

Tuple[int, float]
The sample with 1. the key and 2. the sample value.
def push_sample(self: AnalogSampleSignal, sample: None, pos: int, unit_size: int, digits: int, decimal_places: int)

Push a new sample to the signal.

Parameters

sample : float or double
The sample value.
pos : int
The key (position) of the new sample.
unit_size : int
The size of the floating point data type (float=4, double=8) for the sample argument.
digits : int
The total number of digits.
decimal_places : int
The number of decimal places.

Inherited members

class AnalogTimeSignal (...)

A signal with time-value pairs.

Ancestors

Methods

def get_last_sample(self: AnalogTimeSignal, relative_time: bool) -> Tuple[float, float]

Return the last sample of the signal.

Parameters

relative_time : bool
When true, the returned timestamp is relative to the start of the SmuView session.

Returns

Tuple[float, float]
The sample with 1. timestamp in milliseconds and 2. the sample value.
def get_sample(self: AnalogTimeSignal, pos: int, relative_time: bool) -> Tuple[float, float]

Return the sample at the given position.

Parameters

pos : int
The position/number of the sample.
relative_time : bool
When true, the returned timestamp is relative to the start of the SmuView session.

Returns

Tuple[float, float]
The sample with 1. timestamp in milliseconds and 2. the sample value.
def push_sample(self: AnalogTimeSignal, sample: None, timestamp: float, unit_size: int, digits: int, decimal_places: int)

Push a new sample to the signal.

Parameters

sample : float or double
The sample value.
timestamp : float
The absolute timestamp in milliseconds.
unit_size : int
The size of the floating point data type (float=4, double=8) for the sample argument.
digits : int
The total number of digits.
decimal_places : int
The number of decimal places.

Inherited members

class BaseChannel (...)

The base class for all channel types.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Methods

def actual_signal(self: BaseChannel) -> BaseSignal

Return the actual signal of the channel.

Returns

BaseSignal
The actual signal object.
def add_signal(self: BaseChannel, quantity: Quantity, quantity_flags: Set[QuantityFlag], unit: Unit) -> BaseSignal

Add a new signal to the channel.

Parameters

quantity : Quantity
The Quantity of the new signal.
quantity_flags : Set[QuantityFlag]
The QuantityFlags of the new signal.
unit : Unit
The Unit of the new signal.

Returns

BaseSignal
The new signal object.
def name(self: BaseChannel) -> str

Return the name of the channel.

Returns

str
The name of the channel.
def signals(self: BaseChannel) -> List[BaseSignal]

Return all signals of the channel.

Returns

List[BaseSignal]
All signals of the channel.
class BaseDevice (...)

The base class for all device types.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Methods

def add_user_channel(self: BaseDevice, channel_name: str, channel_group_name: str) -> UserChannel

Add a new user channel to the device.

Parameters

channel_name : str
The name of the new user channel.
channel_group_name : str
The name of the channel group where to create the user channel. Can be empty.

Returns

UserChannel
The new user channel object.
def channels(self: BaseDevice) -> Dict[str, BaseChannel]

Return all channels of the device.

Returns

Dict[str, BaseChannel]
A Dict where the key is the id of the channel and the value is the channel object.
def configurables(self: BaseDevice) -> Dict[str, Configurable]

Return all configurables of the device.

Returns

Dict[str, Configurable]
A Dict where the key is the id of the Configurable and the value is the Configurable object.
def id(self: BaseDevice) -> str

Return the unique id of the device.

Returns

str
The id of the device.
def name(self: BaseDevice) -> str

Return the name of the device.

Returns

str
The name of the device.
class BaseSignal (...)

The base class for all signal types.

Ancestors

  • pybind11_builtins.pybind11_object

Subclasses

Methods

def name(self: BaseSignal) -> str

Return the name of the signal.

Returns

str
The name of the signal.
def sample_count(self: BaseSignal) -> int

Return the number of samples of the signal.

Returns

int
The number of samples.
class ConfigKey (...)

Enum of all available config keys for controlling a device.

init(self: smuview.ConfigKey, arg0: int) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Class variables

var ADCPowerlineCycles

Number of powerline cycles for ADC integration time.

var Amplitude

Amplitude of a source without strictly-defined ConfigKey.MeasuredQuantity.

var Averaging

Averaging.

var AvgSamples

The number of samples to be averaged over.

var BufferSize

Buffer size.

var CaptureFile

The capturefile to inject.

var CaptureRatio

The pre/post-trigger capture ratio.

var CaptureUnitSize

The capturefile unit size.

var CenterFrequency

Center frequency.

var ChannelConfig

Channel configuration.

var ClockEdge

Choice of clock edge for external clock (r or f).

var Coupling

Coupling.

var Current

Current current.

var CurrentLimit

Current limit.

var DataLog

The device has internal storage, into which data is logged.

var DataSource

Data source for acquisition.

var DeviceMode

Device mode for multi-function devices.

var Digits

The number of digits (e.g. for a DMM).

var Enabled

Enabling/disabling a channel (group).

var EquivCircuitModel

Equivalent circuit model.

var ExternalClock

Using an external clock.

var ExternalClockSource

Which external clock source to use if the device supports multiple external clock channels.

var Filter

Filter.

var HighResolution

High resolution mode.

var HoldMax

Max hold mode.

var HoldMin

Min hold mode.

var HorizTriggerPos

Horizontal trigger position.

var LogicThreshold

Logic threshold: predefined levels (TTL, ECL, CMOS, etc).

var LogicThresholdCustom

Logic threshold: custom numerical value.

var MeasuredQuantity

Measured quantity.

var NumAnalogChannels

The number of analog channels.

var NumHDiv

Number of horizontal divisions, as related to ConfigKey.TimeBase.

var NumLogicChannels

The number of logic channels.

var NumVDiv

Number of vertical divisions, as related to ConfigKey.VDiv.

var Offset

Offset of a source without strictly-defined ConfigKey.MeasuredQuantity.

var OutputFrequency

Output frequency in Hz.

var OutputFrequencyTarget

Output frequency target in Hz.

var OverCurrentProtectionActive

Status of over current protection (OCP).

var OverCurrentProtectionEnabled

Enabling/disable over current protection (OCP) feature.

var OverCurrentProtectionThreshold

Over current protection (OCP) threshold.

var OverTemperatureProtectionActive

Status of over temperature protection (OTP).

var OverTemperatureProtectionEnabled

Enabling/disable over temperature protection (OTP) feature.

var OverVoltageProtectionActive

Status of over voltage protection (OVP).

var OverVoltageProtectionEnabled

Enabling/disable over voltage protection (OVP) feature.

var OverVoltageProtectionThreshold

Over voltage protection (OVP) threshold.

var PatternMode

A pattern (pattern generator mode).

var PeakDetection

Peak detection.

var PowerOff

Power off the device.

var ProbeFactor

The probe factor.

var RLE

Run-length encoding (RLE).

var Range

The measurement range of a DMM or the output range of a power supply.

var Regulation

Channel regulation. CV, CC or UR, denoting constant voltage, constant current or unregulated. CC- denotes a power supply in current sink mode (e.g. HP 66xxB). An empty string is used when there is no regulation, e.g. the output is disabled.

var SampleInterval

The sample interval, in ms.

var Samplerate

The samplerate, in Hz.

var SessionFile

Session filename.

var SplMeasurementRange

Sound pressure level measurement range.

var SplWeightFreq

Sound pressure level frequency weighting.

var SplWeightTime

Sound pressure level time weighting.

var Swap

Swapping channels.

var TestMode

Self test mode.

var TimeBase

Time base.

var TriggerLevel

Trigger level.

var TriggerMatch

Trigger matches.

var TriggerPattern

The pattern for the logic trigger.

var TriggerSlope

The trigger slope.

var TriggerSource

Trigger source.

var UnderVoltageConditionActive

Status of under voltage condition (UVC).

var UnderVoltageConditionEnabled

Enabling/disable under voltage condition (UVC) feature.

var UnderVoltageConditionThreshold

Under voltage condition threshold (UVC).

var Unknown

Unknown config key.

var VDiv

Volts/div.

var Voltage

Current voltage.

var VoltageTarget

Maximum target voltage.

var VoltageThreshold

Logic low-high threshold range.

Instance variables

var name

(self: handle) -> str

class Configurable (...)

A configurable for controlling a device with config keys.

Ancestors

  • pybind11_builtins.pybind11_object

Methods

def get_config(*args, **kwargs)

Overloaded function.

  1. get_config(self: smuview.Configurable, config_key: smuview.ConfigKey) -> bool

Return a boolean value from the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to get.

Returns

bool
The bool value of the config key.
2. get_config(self: smuview.Configurable, config_key: smuview.ConfigKey) -> int
 

Return an integer value from the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to get.

Returns

int
The int value of the config key.
3. get_config(self: smuview.Configurable, config_key: smuview.ConfigKey) -> int
 

Return an unsigned integer value from the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to get.

Returns

int
The (unsigned) int value of the config key.
4. get_config(self: smuview.Configurable, config_key: smuview.ConfigKey) -> float
 

Return a double value from the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to get.

Returns

float
The float value of the config key.
5. get_config(self: smuview.Configurable, config_key: smuview.ConfigKey) -> str
 

Return a string value from the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to get.

Returns

str
The string value of the config key.
def name(self: Configurable) -> str

Return the name of the configurable.

Returns

str
The name of the configurable.
def set_config(*args, **kwargs)

Overloaded function.

  1. set_config(self: smuview.Configurable, config_key: smuview.ConfigKey, value: bool) -> None

Set a boolean value to the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to set.
value : bool
The bool value to set.
  1. set_config(self: smuview.Configurable, config_key: smuview.ConfigKey, value: int) -> None

Set an integer value to the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to set.
value : int
The int value to set.
  1. set_config(self: smuview.Configurable, config_key: smuview.ConfigKey, value: int) -> None

Set an unsigned integer value to the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to set.
value : int
The (unsigned) int value to set.
  1. set_config(self: smuview.Configurable, config_key: smuview.ConfigKey, value: float) -> None

Set a double value to the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to set.
value : float
The float value to set.
  1. set_config(self: smuview.Configurable, config_key: smuview.ConfigKey, value: str) -> None

Set a string value to the given config key.

Parameters

config_key : ConfigKey
The ConfigKey to set.
value : str
The string value to set.
class DockArea (...)

Enum of all possible docking locations for a view.

init(self: smuview.DockArea, arg0: int) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Class variables

var BottomDockArea

Dock to the bottom dock area.

var LeftDocktArea

Dock to the left dock area.

var RightDockArea

Dock to the right dock area.

var TopDockArea

Dock to the top dock area.

Instance variables

var name

(self: handle) -> str

class HardwareChannel (...)

An actual hardware channel

Ancestors

Inherited members

class HardwareDevice (...)

An actual hardware device.

Ancestors

Inherited members

class PyStreamBuf (...)

Redirect Python output to SmuView console. This class is for internal SmuView use only!

init(self: smuview.PyStreamBuf, arg0: str, arg1: str) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Instance variables

var closed

True if the stream is closed.

var encoding

The name of the encoding that is used.

var errors

The error setting of the decoder or encoder.

Methods

def close(self: PyStreamBuf)

Flush and close this stream.

def fileno(self: PyStreamBuf) -> int

Raises an OSError, because PyStreamBuf doesn't use a file descriptor.

def flush(self: PyStreamBuf)

Flush the write buffers of the stream.

def isatty(self: PyStreamBuf) -> bool

Always return False.

def read(self: PyStreamBuf, size: int) -> str

Raises an OSError, because PyStreamBuf is write only.

def readable(self: PyStreamBuf) -> bool

Always return False.

def readline(self: PyStreamBuf, size: int) -> str

Raises an OSError, because PyStreamBuf is write only.

def readlines(self: PyStreamBuf, hint: int) -> List[str]

Raises an OSError, because PyStreamBuf is write only.

def seek(self: PyStreamBuf, offset: int, whence: int) -> int

Raises an OSError, because PyStreamBuf is not seekable.

def seekable(self: PyStreamBuf) -> bool

Always return False. PyStreamBuf is not seekable atm.

def tell(self: PyStreamBuf) -> int

Raises an OSError, because PyStreamBuf is not seekable.

def truncate(self: PyStreamBuf, size: int) -> int

Raises an OSError, because PyStreamBuf is not seekable.

def writable(self: PyStreamBuf) -> bool

Always return True.

def write(self: PyStreamBuf, s: str) -> int

Write the string s to the stream and return the number of characters written.

def writelines(self: PyStreamBuf, lines: List[str])

Write a list of lines to the stream.

class Quantity (...)

Enum of all available quantities.

init(self: smuview.Quantity, arg0: int) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Class variables

var ApparentPower

Apparent power

var Capacitance

Capacitance

var CarbonMonoxide

Carbon monoxide

var Conductance

Conductance

var Continuity

Continuity

var Count

Count

var Current

Current

var Difference

Difference from reference value.

var DissipationFactor

Dissipation factor

var DutyCyle

DutyCyle

var ElectricCharge

Electric charge

var Frequency

Frequency

var Gain

Gain (a transistor's gain, or hFE, for example).

var HarmonicRatio

Harmonic ratio

var Mass

Mass

var ParallelCapacitance

Parallel capacitance

var ParallelInductance

Parallel inductance

var ParallelResistance

Parallel resistance

var PhaseAngle

Phase angle

var Power

Electrical power, usually in W, or dBm.

var PowerFactor

Power factor

var Pressure

Pressure

var PulseWidth

PulseWidth

var QualityFactor

Quality factor

var RelativeHumidity

Relative humidity

var Resistance

Resistance

var SeriesCapacitance

Series capacitance

var SeriesInductance

Series inductance

var SeriesResistance

Series resistance

var SoundPressureLevel

Logarithmic representation of sound pressure relative to a reference value.

var Temperature

Temperature

var Time

Time

var Unknown

Unknown

var Voltage

Voltage

var WindSpeed

Wind speed

var Work

Work, also Energy

Instance variables

var name

(self: handle) -> str

class QuantityFlag (...)

Enum of all available quantity flags.

init(self: smuview.QuantityFlag, arg0: int) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Class variables

var AC

Alternating current.

var Autorange

Device is in autoranging mode.

var Avg

Device is in average mode, averaging upon each new value.

var DC

Direct current.

var Diode

Value is voltage drop across a diode, or NAN.

var Duration

Time is duration (as opposed to epoch, …).

var FourWire

Device is in 4-wire mode.

var Hold

Device is in hold mode (repeating the last measurement).

var Max

Device is in max mode, only updating upon a new max value.

var Min

Device is in min mode, only updating upon a new min value.

var RMS

Root mean square (RMS).

var Reference

Reference value shown.

var Relative

Device is in relative mode.

var SplFreqWeightA

Sound pressure level is A-weighted in the frequency domain, according to IEC 61672:2003.

var SplFreqWeightC

Sound pressure level is C-weighted in the frequency domain, according to IEC 61672:2003.

var SplFreqWeightFlat

Sound pressure level is not weighted in the frequency domain, albeit without standards-defined low and high frequency limits.

var SplFreqWeightZ

Sound pressure level is Z-weighted.

var SplLAT

Sound pressure level is time-averaged (LAT), also known as Equivalent Continuous A-weighted Sound Level (LEQ).

var SplPctOverAlarm

Sound pressure level represented as a percentage of measurements that were over a preset alarm level.

var SplTimeWeightF

Sound pressure level measurement is F-weighted (125ms) in the time domain.

var SplTimeWeightS

Sound pressure level measurement is S-weighted (1s) in the time domain.

var Unknown

Unknown quantity flag.

var Unstable

Unstable value (hasn't settled yet).

Instance variables

var name

(self: handle) -> str

class Session (...)

The SmuView Session class for accessing the actual state of the application.

Ancestors

  • pybind11_builtins.pybind11_object

Methods

def add_user_device(self: Session) -> UserDevice

Create a new user device.

Returns

UserDevice
The created user device object.
def connect_device(self: Session, conn_str: str) -> List[HardwareDevice]

Connect a new device.

Parameters

conn_str : str
The connection string. See https://sigrok.org/wiki/Connection_parameters

Returns

List[HardwareDevice]
A List with the newly connected device objects.
def devices(self: Session) -> Dict[str, BaseDevice]

Return all connected devices.

Returns

Dict[str, BaseDevice]
A Dict where the key is the device id and the value is the device object.
class UiProxy (...)

Helper class for accessing the UI.

Ancestors

  • pybind11_builtins.pybind11_object

Methods

def add_control_view(self: UiProxy, device_id: str, area: DockArea, configurable: Configurable) -> str

Add a control view for a configurable to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
configurable : Configurable
The Configurable object.

Returns

str
The id of the new view.
def add_data_view(self: UiProxy, device_id: str, area: DockArea, signal: AnalogTimeSignal) -> str

Add a data view for a signal to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
signal : AnalogTimeSignal
The signal object.

Returns

str
The id of the new view.
def add_device_tab(self: UiProxy, device: BaseDevice)

Add a device tab with standard view for a device to the UI.

Parameters

device : BaseDevice
The device object.
def add_plot_view(*args, **kwargs)

Overloaded function.

  1. add_plot_view(self: smuview.UiProxy, device_id: str, area: smuview.DockArea, channel: smuview.BaseChannel) -> str

Add a time plot view for a channel to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
channel : BaseChannel
The channel object.

Returns

str
The id of the new view.
2. add_plot_view(self: smuview.UiProxy, device_id: str, area: smuview.DockArea, signal: smuview.AnalogTimeSignal) -> str
 

Add a time plot view for a signal to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
signal : AnalogTimeSignal
The signal object.

Returns

str
The id of the new view.
3. add_plot_view(self: smuview.UiProxy, device_id: str, area: smuview.DockArea, x_signal: smuview.AnalogTimeSignal, y_signal: smuview.AnalogTimeSignal) -> str
 

Add a x/y plot view for two signals to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
x_signal : AnalogTimeSignal
The x signal object.
y_signal : AnalogTimeSignal
The y signal object.

Returns

str
The id of the new view.
def add_power_panel_view(self: UiProxy, device_id: str, area: DockArea, voltage_signal: AnalogTimeSignal, current_signal: AnalogTimeSignal) -> str

Add a power panel view for a voltage and a current signal to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
voltage_signal : AnalogTimeSignal
The voltage signal object.
current_signal : AnalogTimeSignal
The current signal object.

Returns

str
The id of the new view.
def add_signal_to_data_view(self: UiProxy, device_id: str, view_id: str, signal: AnalogTimeSignal)

Add a signal to the given data view.

Parameters

device_id : str
The id (device id) of the tab.
view_id : str
The id of the data view.
signal : AnalogTimeSignal
The signal object.
def add_signal_to_plot_view(self: UiProxy, device_id: str, view_id: str, signal: AnalogTimeSignal)

Add a signal to the given plot view. If the plot is a x/y plot, the signal will be added as a new y signal.

Parameters

device_id : str
The id (device id) of the tab.
view_id : str
The id of the plot view.
signal : AnalogTimeSignal
The signal object.
def add_signals_to_xy_plot_view(self: UiProxy, device_id: str, view_id: str, x_signal: AnalogTimeSignal, y_signal: AnalogTimeSignal)

Add x/y signals to the given x/y plot view.

Parameters

device_id : str
The id (device id) of the tab.
view_id : str
The id of the plot view.
x_signal : AnalogTimeSignal
The x signal object.
y_signal : AnalogTimeSignal
The y signal object.
def add_value_panel_view(*args, **kwargs)

Overloaded function.

  1. add_value_panel_view(self: smuview.UiProxy, device_id: str, area: smuview.DockArea, channel: smuview.BaseChannel) -> str

Add a value panel view for a channel to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
channel : BaseChannel
The channel object.

Returns

str
The id of the new view.
2. add_value_panel_view(self: smuview.UiProxy, device_id: str, area: smuview.DockArea, signal: smuview.AnalogTimeSignal) -> str
 

Add a value panel view for a signal to the given tab.

Parameters

device_id : str
The id (device id) of the tab.
area : DockArea
Where to put the new view.
signal : AnalogTimeSignal
The signal object.

Returns

str
The id of the new view.
class Unit (...)

Enum of all available units.

init(self: smuview.Unit, arg0: int) -> None

Ancestors

  • pybind11_builtins.pybind11_object

Class variables

var Ampere

Ampere

var AmpereHour

AmpereHour (Ah)

var Boolean

Boolean

var Carat

Weight in carat.

var Celsius

Celsius

var Concentration

Concentration

var Coulomb

Coulomb

var Decibel

Decibel (dB)

var DecibelMW

Decibel milliWatt (dBm)

var DecibelSpl

Decibel sound pressure level

var DecibelVolt

Decibel Volt (dBV)

var Degree

Degree

var Fahrenheit

Fahrenheit

var Farad

Farad

var Grain

Weight in grain.

var Gram

Weight in gram (g).

var HectoPascal

HectoPascal (hPa)

var Henry

Henry

var Hertz

Hertz

var Humidity293K

Humidity at 293K

var Joule

Joule

var Kelvin

Kelvin

var MeterPerSecond

Meter per second (m/s)

var Momme

Weight in momme.

var Ohm

Ohm

var Ounce

Weight in avoirdupois ounce (oz).

var Pennyweight

Weight in pennyweight.

var Percentage

Percentage

var Piece

Piece

var Pound

Weight in avoirdupois pound (lb).

var RevolutionsPerMinute

Revolutions per minute (RPM)

var Second

Second

var Siemens

Siemens

var Tael

Weight in tael.

var Tola

Weight in tola.

var TroyOunce

Weight in troy ounce (oz t).

var Unitless

Unitless

var Unknown

Unknown

var Volt

Volt

var VoltAmpere

VoltAmpere (VA)

var Watt

Watt

var WattHour

WattHour (Wh)

Instance variables

var name

(self: handle) -> str

class UserChannel (...)

An user generated channel for storing custom data.

Ancestors

Methods

def push_sample(self: UserChannel, sample: float, timestamp: float, quantity: Quantity, quantity_flags: Set[QuantityFlag], unit: Unit, digits: int, decimal_places: int)

Push a single sample to the channel.

Parameters

sample : float
The sample value.
timestamp : float
The absolute timestamp in milliseconds.
quantity : Quantity
The Quantity of the new signal.
quantity_flags : Set[QuantityFlag]
The QuantityFlags of the new signal.
unit : Unit
The Unit of the new signal.
digits : int
The total number of digits.
decimal_places : int
The number of decimal places.

Inherited members

class UserDevice (...)

An user generated (virtual) device for storing custom data and showing a custom tab.

Ancestors

Inherited members