middle

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package middle coordinates the response to user requests that require the use of the rfswitch and calibration services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cal2Meas added in v0.1.0

func Cal2Meas(f []float64, s *pb.SParams) []pocket.SParam

func Meas2Cal added in v0.1.0

func Meas2Cal(s []pocket.SParam) *pb.SParams

func Meas2Freq added in v0.1.0

func Meas2Freq(s []pocket.SParam) []float64

Types

type Middle

type Middle struct {
	// contains filtered or unexported fields
}

Middle holds config and service pointers

func New

func New(ctx context.Context, addr, port string, baud int, timeoutUSB, timeoutRequest time.Duration, topic string, v *pocket.VNA) Middle

func (*Middle) CalibrateConfirm added in v0.2.0

func (m *Middle) CalibrateConfirm(request *pocket.RangeQuery) error

func (*Middle) CalibrateMeasure added in v0.2.0

func (m *Middle) CalibrateMeasure(request *pocket.RangeQuery) error

func CalibrateMeasure stores the frequency range and distribution

func (*Middle) CalibrateRange added in v0.1.0

func (m *Middle) CalibrateRange(request *pocket.RangeQuery) error

func CalibrateRange performs the calibration measurements

func (*Middle) CalibrateSetup added in v0.2.0

func (m *Middle) CalibrateSetup(request *pocket.RangeQuery) error

func CalibrateSetup stores the frequency range and distribution

func (*Middle) CalibrationOK added in v0.3.0

func (m *Middle) CalibrationOK() bool

func (*Middle) Handle added in v0.1.0

func (m *Middle) Handle(ctx context.Context, request interface{}) (response interface{}, err error)

func (*Middle) MeasureRangeCalibrated added in v0.1.0

func (m *Middle) MeasureRangeCalibrated(request *pocket.CalibratedRangeQuery) error

func MeasureRangeCalibrated measures and applies a calibration, returning calibrated results

func (*Middle) Run added in v0.1.0

func (m *Middle) Run()

type Ready added in v0.2.0

type Ready struct {
	Setup bool
	Short bool
	Open  bool
	Load  bool
	Thru  bool
}

type Response added in v0.1.0

type Response struct {
	Result interface{}
	Error  error
}

for the channel in Handle

Jump to

Keyboard shortcuts

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