conf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

This package handles how the config is structrured

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Sensor: Sensor{
		OperationMode: OperationMode{
			Main:      "all",
			Secondary: "gas",
		},
		FanCleaningInterval: 604800,
		ForceCleanFan:       false,
		RthAccelerationMode: 0,
		TemperatureOffset:   0,
	},
	Measurement: Measurement{
		WaitBetweenMeasurements:           0,
		TakeMeasurementsFor:               300,
		SleepUntilNextBatchOfMeasurements: 300,
		IgnoreFirstXMeasurements:          30,
	},
	Console: Console{
		Enabled: true,
	},
	SensorCommunity: SensorCommunity{
		Enabled:      false,
		SensorNodeID: "raspi-123456789",
	},
	DataLogging: DataLogging{
		Enabled:  true,
		FileName: "",
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Sensor          Sensor
	Measurement     Measurement
	Console         Console
	DataLogging     DataLogging
	SensorCommunity SensorCommunity
}

func LoadConfig

func LoadConfig() (Config, error)

type Console

type Console struct {
	Enabled bool
}

type DataLogging

type DataLogging struct {
	Enabled  bool
	FileName string
}

type Measurement

type Measurement struct {
	WaitBetweenMeasurements           int
	TakeMeasurementsFor               int
	SleepUntilNextBatchOfMeasurements int
	IgnoreFirstXMeasurements          int
}

type OperationMode

type OperationMode struct {
	Main      string
	Secondary string
}

type Sensor

type Sensor struct {
	OperationMode       OperationMode
	FanCleaningInterval int
	ForceCleanFan       bool
	RthAccelerationMode int
	TemperatureOffset   float32
}

type SensorCommunity

type SensorCommunity struct {
	Enabled      bool
	SensorNodeID string
}

Jump to

Keyboard shortcuts

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