proxy

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoneCh

func DoneCh(ch chan struct{}) func(*Proxy)

DoneCh is a functional option allows you to pass a channel to the proxy object. The channel will be closed and thus notifies you when the object has been deleted.

func EventHandler

func EventHandler(h func(rotator.Rotator, rotator.Heading)) func(*Proxy)

EventHandler sets a callback function through which the proxy rotator will report Events

func Host

func Host(host string) func(*Proxy)

Host is a functional option to set IP / dns name of the remote Rotators host.

func Port

func Port(port int) func(*Proxy)

Port is a functional option to set port of the remote Rotators on its host.

Types

type Proxy

type Proxy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Proxy is a proxy object representing a remote rotator. It implements the rotator.Rotator interface. Behind the scenes it sychronizes itself with the real rotator through a websocket.

func New

func New(opts ...func(*Proxy)) (*Proxy, error)

New returns the pointer to an initalized Rotator proxy object.

func (*Proxy) AzPreset

func (r *Proxy) AzPreset() int

func (*Proxy) Azimuth

func (r *Proxy) Azimuth() int

func (*Proxy) Close

func (r *Proxy) Close()

func (*Proxy) ElPreset

func (r *Proxy) ElPreset() int

func (*Proxy) Elevation

func (r *Proxy) Elevation() int

func (*Proxy) HasAzimuth

func (r *Proxy) HasAzimuth() bool

func (*Proxy) HasElevation

func (r *Proxy) HasElevation() bool

func (*Proxy) Name

func (r *Proxy) Name() string

func (*Proxy) Serialize

func (r *Proxy) Serialize() rotator.Object

Serialize the data of the rotator

func (*Proxy) SetAzimuth

func (r *Proxy) SetAzimuth(az int) error

func (*Proxy) SetElevation

func (r *Proxy) SetElevation(el int) error

func (*Proxy) Stop

func (r *Proxy) Stop() error

func (*Proxy) StopAzimuth

func (r *Proxy) StopAzimuth() error

func (*Proxy) StopElevation

func (r *Proxy) StopElevation() error

Jump to

Keyboard shortcuts

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