rotator

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzimuthGet

type AzimuthGet struct {
	HasAzimuth bool `json:"has_azimuth"`
	Azimuth    int  `json:"azimuth"`
	Preset     int  `json:"preset"`
}

type AzimuthPut

type AzimuthPut struct {
	Azimuth *int `json:"azimuth"`
}

type Config

type Config struct {
	HasAzimuth   bool `json:"has_azimuth"`
	AzimuthMin   int  `json:"azimuth_min"`
	AzimuthMax   int  `json:"azimuth_max"`
	AzimuthStop  int  `json:"azimuth_stop"`
	HasElevation bool `json:"has_elevation"`
	ElevationMin int  `json:"elevation_min"`
	ElevationMax int  `json:"elevation_max"`
}

type ElevationGet

type ElevationGet struct {
	HasElevation bool `json:"has_elevation"`
	Elevation    int  `json:"elevation"`
	Preset       int  `json:"preset"`
}

type ElevationPut

type ElevationPut struct {
	Elevation *int `json:"elevation"`
}

type EventHandler

type EventHandler func(Rotator, Heading)

EventHandler is called whenever a variable of a rotator changes

type Heading

type Heading struct {
	Azimuth   int `json:"azimuth"`
	AzPreset  int `json:"az_preset"`
	Elevation int `json:"elevation"`
	ElPreset  int `json:"el_preset"`
}

type Object

type Object struct {
	Name    string  `json:"name"`
	Heading Heading `json:"heading"`
	Config  Config  `json:"config"`
}

type Objects

type Objects map[string]Object

type Rotator

type Rotator interface {
	Name() string
	HasAzimuth() bool
	HasElevation() bool
	Azimuth() int
	AzPreset() int
	SetAzimuth(az int) error
	Elevation() int
	ElPreset() int
	SetElevation(el int) error
	StopAzimuth() error
	StopElevation() error
	Stop() error
	Serialize() Object
	Close()
}

Rotator is the interface which has to be implemented by each Rotator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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