Documentation ¶
Index ¶
- Constants
- func SetFs(f afero.Fs)
- func SetLockFilePath(f func(string) string)
- type Audio
- type Battery
- type Config
- func (c *Config) Get(key string) interface{}
- func (c *Config) Reload() error
- func (c *Config) Set(key string, value interface{}) error
- func (c *Config) SetField(sectionKey, valueKey, value string, force bool) error
- func (c *Config) SetFromMap(sectionKey string, newConfig map[string]interface{}, force bool) error
- func (c *Config) Unmarshal(key string, raw interface{}) error
- func (c *Config) Unset(key string) error
- func (c *Config) Update() error
- func (c *Config) Write() error
- type Device
- type DeviceSetup
- type GPIO
- type Lepton
- type Location
- type Modem
- type Modemd
- type Ports
- type Secrets
- type TestHosts
- type ThermalMotion
- type ThermalRecorder
- type ThermalThrottler
- type Windows
Constants ¶
View Source
const ( DefaultConfigDir = "/etc/cacophony" ConfigFileName = "config.toml" TimeFormat = time.RFC3339 )
View Source
const AudioKey = "audio"
View Source
const BatteryKey = "battery"
View Source
const DeviceKey = "device"
View Source
const GPIOKey = "gpio"
View Source
const LeptonKey = "lepton"
View Source
const LocationKey = "location"
View Source
const ModemdKey = "modemd"
View Source
const PortsKey = "ports"
View Source
const SecretsKey = "secrets"
View Source
const TestHostsKey = "test-hosts"
View Source
const ThermalMotionKey = "thermal-motion"
View Source
const ThermalRecorderKey = "thermal-recorder"
View Source
const ThermalThrottlerKey = "thermal-throttler"
View Source
const WindowsKey = "windows"
Variables ¶
This section is empty.
Functions ¶
func SetLockFilePath ¶
Types ¶
type Audio ¶
type Audio struct { Dir string `mapstructure:"directory"` Card int `mapstructure:"card"` VolumeControl string `mapstructure:"volume-control"` }
func DefaultAudio ¶
func DefaultAudio() Audio
type Battery ¶
type Battery struct { EnableVoltageReadings bool `mapstructure:"enable-voltage-readings"` NoBattery uint16 `mapstructure:"no-battery-reading"` LowBattery uint16 `mapstructure:"low-battery-reading"` FullBattery uint16 `mapstructure:"full-battery-reading"` }
func DefaultBattery ¶ added in v1.2.0
func DefaultBattery() Battery
type Config ¶
type Config struct { AutoWrite bool // contains filtered or unexported fields }
func (*Config) SetFromMap ¶
SetFromMap can only update one section at a time.
type DeviceSetup ¶ added in v1.9.0
type DeviceSetup struct {
// contains filtered or unexported fields
}
type GPIO ¶
type GPIO struct { ThermalCameraPower string `mapstructure:"thermal-camera-power"` ModemPower string `mapstructure:"modem-power"` }
func DefaultGPIO ¶
func DefaultGPIO() GPIO
type Lepton ¶
type Lepton struct { SPISpeed int64 `mapstructure:"spi-speed"` FrameOutput string `mapstructure:"frame-output"` }
func DefaultLepton ¶
func DefaultLepton() Lepton
type Location ¶
type Location struct { Timestamp time.Time Accuracy float32 Altitude float32 Latitude float32 Longitude float32 }
func DefaultWindowLocation ¶
func DefaultWindowLocation() Location
Default location used when setting windows relative to sunset/sunrise
type Modemd ¶
type Modemd struct { TestInterval time.Duration `mapstructure:"test-interval"` InitialOnDuration time.Duration `mapstructure:"initial-on-duration"` FindModemTimeout time.Duration `mapstructure:"find-modem-timeout"` ConnectionTimeout time.Duration `mapstructure:"connection-timeout"` RequestOnDuration time.Duration `mapstructure:"request-on-duration"` RetryInterval time.Duration `mapstructure:"retry-interval"` RetryFindModemInterval time.Duration `mapstructure:"retry-find-modem-interval"` MinConnDuration time.Duration `mapstructure:"min-connection-duration"` MaxOffDuration time.Duration `mapstructure:"max-off-duration"` Modems []Modem `mapstructure:"modems"` }
func DefaultModemd ¶
func DefaultModemd() Modemd
type TestHosts ¶
type TestHosts struct { URLs []string PingWaitTime time.Duration `mapstructure:"ping-wait-time"` PingRetries int `mapstructure:"ping-retries"` }
func DefaultTestHosts ¶
func DefaultTestHosts() TestHosts
type ThermalMotion ¶
type ThermalMotion struct { DynamicThreshold bool `mapstructure:"dynamic-threshold"` TempThreshMin uint16 `mapstructure:"temp-thresh-min"` TempThreshMax uint16 `mapstructure:"temp-thresh-max"` TempThresh uint16 `mapstructure:"temp-thresh"` DeltaThresh uint16 `mapstructure:"delta-thresh"` CountThresh int `mapstructure:"count-thresh"` FrameCompareGap int `mapstructure:"frame-compare-gap"` UseOneDiffOnly bool `mapstructure:"use-one-diff-only"` TriggerFrames int `mapstructure:"trigger-frames"` WarmerOnly bool `mapstructure:"warmer-only"` EdgePixels int `mapstructure:"edge-pixels"` Verbose bool `mapstructure:"verbose"` }
func DefaultLepton35Motion ¶ added in v1.5.0
func DefaultLepton35Motion() ThermalMotion
func DefaultLeptonMotion ¶ added in v1.5.0
func DefaultLeptonMotion() ThermalMotion
func DefaultThermalMotion ¶
func DefaultThermalMotion(cameraModel string) ThermalMotion
type ThermalRecorder ¶
type ThermalRecorder struct { OutputDir string `mapstructure:"output-dir"` MinDiskSpaceMB uint64 `mapstructure:"min-disk-space-mb"` MinSecs int `mapstructure:"min-secs"` MaxSecs int `mapstructure:"max-secs"` PreviewSecs int `mapstructure:"preview-secs"` ConstantRecorder bool `mapstructure:"constant-recorder"` }
func DefaultThermalRecorder ¶
func DefaultThermalRecorder() ThermalRecorder
type ThermalThrottler ¶
type ThermalThrottler struct { Activate bool BucketSize time.Duration `mapstructure:"bucket-size"` MinRefill time.Duration `mapstructure:"min-refill"` }
func DefaultThermalThrottler ¶
func DefaultThermalThrottler() ThermalThrottler
Source Files ¶
Click to show internal directories.
Click to hide internal directories.