sensor

package
v0.0.0-...-46c35f9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFlags = CommandFlags{
	Command: "orfs_sensor",
}

Functions

func CampaignId

func CampaignId() string

Returns the current campaign ID (assigned by the backend).

func Err

func Err() <-chan error

Open channel where command errors are sent after completion.

func Init

func Init(config *koanf.Koanf) error

Initializes a SensorManager singleton. Also loads default command line flags from the configuration.

func Output

func Output() <-chan string

Open channel where command output is sent after completion.

func WithAggregated

func WithAggregated(amr types.AggregatedMeasurementRequest, flags ...CommandFlags) *sensorManager

Starts an aggregated measurement campaign by running orfs_sensor with the given flags.

func WithRaw

func WithRaw(rmr types.RawMeasurementRequest, flags ...CommandFlags) *sensorManager

Starts a raw measurement campaign by running orfs_sensor with the given flags

Types

type CommandFlags

type CommandFlags struct {
	AvgFactor       string `yaml:"averagingFactor" flag:"-a"`
	FftBatchLen     string `yaml:"fftBatchLength" flag:"-b"`
	ClkOffset       string `yaml:"clockOffset" flag:"-c"`
	DevIndex        string `yaml:"devIndex" flag:"-d"`
	Log2FFTsize     string `yaml:"log2FFTsize" flag:"-f"`
	Gain            string `yaml:"gain" flag:"-g"`
	ClkCorrPeriod   string `yaml:"clockCorrectionPeriod" flag:"-k"`
	SchemaFile      string `yaml:"schemaFile" flag:"-m"`
	SslCollector    string `yaml:"sslCollector" flag:"-n"`
	SOverlap        string `yaml:"segmentOverlap" flag:"-o"`
	FreqOverlap     string `yaml:"frequencyOverlap" flag:"-q"`
	MinTimeRes      string `yaml:"minTimeResolution" flag:"-r"`
	SampRate        string `yaml:"samplingRate" flag:"-s"`
	MonitorTime     string `yaml:"monitorTime" flag:"-t"`
	Window          string `yaml:"windowingFunction" flag:"-w"`
	AbsoluteTime    string `yaml:"absoluteTime" flag:"-x"`
	HoppingStrategy string `yaml:"hoppingStrategy" flag:"-y"`
	MeasurementType string `yaml:"measurementType" flag:"-z"`

	// These should be ignored by koanf even if found in the configuration
	SensorId   string
	CampaignId string
	MinFreq    string
	MaxFreq    string
	Command    string
}

type StatusEnum

type StatusEnum string

Type StatusEnum describes the current status of the sensor

const (
	Free  StatusEnum = "FREE"
	Busy  StatusEnum = "BUSY"
	Error StatusEnum = "ERROR"
)

func Status

func Status() StatusEnum

Returns the current status of the sensor manager.

Jump to

Keyboard shortcuts

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