hp437

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	*gpib.Device
}

Device represents a HP 437B to be used over the GPIB / HP-IB.

func New

func New(dev *gpib.Device) Device

New will create a new hp437.Device to use a Power Meter over HP-IP.

func (Device) DisplayUser

func (dev Device) DisplayUser(s string) error

DisplayUser will display a string to the user. This will only show a few chars, so be careful to not blather on too long.

func (Device) Offset

func (dev Device) Offset(offset float64) error

Offset controls for signal loss (e.g., couplers or attenuators).

func (Device) Power

func (dev Device) Power() (float64, error)

Power will return the power (in the configured units) as a floating point number.

func (Device) Reset

func (dev Device) Reset() error

Reset will do a soft-reset of the power meter.

func (Device) Unit

func (dev Device) Unit(units Units) error

Unit will set the Power Meter to read in terms of either Watts or dBm.

func (Device) Zero

func (dev Device) Zero() error

Zero will zero out the sensor against the ref power.

type Units

type Units string

Units are the accepted Power reading measures that this device can be configured to use.

var (
	// Watts can be passed to hp437.Device.Unit() to read power in terms of
	// Watts.
	Watts Units = "LN"

	// DBM can be passed to hp437.Device.Unit() to read power in terms of
	// dBm.
	DBM Units = "LG"
)

func (Units) String

func (u Units) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL