config

package
v0.0.0-...-0b552ba Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFirmwareOptionsByName

func GetConfigFirmwareOptionsByName(cfg Config) map[string][]uint64

return all FirmwareOptions and their possible values as map

Types

type Config

type Config struct {
	TraceLog struct {
		StartSignal struct {
			Type      string `yaml:"type"`
			Offset    uint   `yaml:"offset"`
			Value     uint64 `yaml:"value"`
			Direction string `yaml:"direction"`
			DataWidth uint   `yaml:"datawidth"`
		} `yaml:"startsignal"`
		StopSignal struct {
			Type      string `yaml:"type"`
			Offset    uint   `yaml:"offset"`
			Value     uint64 `yaml:"value"`
			Direction string `yaml:"direction"`
			DataWidth uint   `yaml:"datawidth"`
		} `yaml:"stopsignal"`
		Serial struct {
			Type                 string `yaml:"type"`
			Port                 string `yaml:"port"`
			BaudRate             int    `yaml:"baudrate"`
			ReadWriteTimeout     uint   `yaml:"timeout"`
			DeviceHotplugTimeout uint   `yaml:"hotplugtimeout"`
		} `yaml:"serial"`
		DutControl struct {
			StartCmd   string `yaml:"startcmd"`
			StopCmd    string `yaml:"stopcmd"`
			RestartCmd string `yaml:"restartcmd"`
			InitCmd    string `yaml:"initcmd"`
		} `yaml:"dutcontrol"`
		VariableFirmareOptions []struct {
			Name       string `yaml:"name"`
			ByteOffset uint   `yaml:"byteoffset"`
			BitWidth   uint   `yaml:"bitwidth"`
			Min        uint64 `yaml:"min"`
			Max        uint64 `yaml:"max"`
		} `yaml:"variable_options"`
		OptionsDefaultTable string `yaml:"options_default_table"`
	}
	Database struct {
		HostName string `yaml:"hostname"` // Ignoring for now
		Port     uint   `yaml:"port"`     // Ignoring for now
		Username string `yaml:"username"`
		Password string `yaml:"password"`
	} `yaml:"database"`
}

func GetConfig

func GetConfig() (Config, error)

Jump to

Keyboard shortcuts

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