config

package
v0.0.0-...-04b7549 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Inputs  map[int]Input  `yaml:",flow"`
	Outputs map[int]Output `yaml:",flow"`

	ListenOn string `yaml:"listen_on"`

	PollEvery int

	EnableRTU   bool
	RTUAddress  string
	RTUBaudRate int
	RTUDataBits int
	RTUStopBits int
	RTUParity   string
	RTUTimeout  time.Duration
}

func Load

func Load(path string) (config *Config, err error)

type Input

type Input struct {
	Pin    gpio.Pin
	Poller *InputPoller
}

type InputPoller

type InputPoller struct {
	Type  string
	Value *string
}

type Output

type Output struct {
	Pin gpio.Pin
	Pwm *OutputPwm `yaml:",omitempty"`
}

type OutputPwm

type OutputPwm struct {
	Freq  *int    `yaml:",omitempty"`
	Cycle *uint32 `yaml:",omitempty"`
}

Jump to

Keyboard shortcuts

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