vara

package module
v0.0.0-...-1b4a220 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bandwidths

func Bandwidths() []string

Types

type Addr

type Addr struct {
	// contains filtered or unexported fields
}

func (Addr) Network

func (a Addr) Network() string

func (Addr) String

func (a Addr) String() string

type Modem

type Modem struct {
	// contains filtered or unexported fields
}

func NewModem

func NewModem(scheme string, myCall string, config ModemConfig) (*Modem, error)

NewModem initializes configuration for a new VARA modem client stub.

func (*Modem) Abort

func (m *Modem) Abort() error

Abort disconnects the link immediately.

func (*Modem) Accept

func (m *Modem) Accept() (net.Conn, error)

Accept waits for and returns the next connection to the listener.

func (*Modem) Addr

func (m *Modem) Addr() net.Addr

Addr returns the listener's network address.

func (*Modem) Busy

func (m *Modem) Busy() bool

Busy returns true if the channel is not clear.

func (*Modem) Close

func (m *Modem) Close() error

Close closes the RF and then the TCP connections to the VARA modem. Blocks until finished.

func (*Modem) DialURL

func (m *Modem) DialURL(url *transport.URL) (net.Conn, error)

func (*Modem) DialURLContext

func (m *Modem) DialURLContext(ctx context.Context, url *transport.URL) (net.Conn, error)

DialURLContext dials varafm/varahf URLs with cancellation support.

If the context is cancelled while dialing, the connection may be closed gracefully before returning an error. Use Abort() for immediate cancellation of a dial operation.

func (*Modem) Ping

func (m *Modem) Ping() bool

func (*Modem) SetPTT

func (m *Modem) SetPTT(ptt transport.PTTController)

SetPTT injects the PTTController (probably hooked to a transceiver) that should be controlled by the modem.

If nil, the PTT request from the TNC is ignored. VOX may still work.

func (*Modem) Version

func (m *Modem) Version() (string, error)

type ModemConfig

type ModemConfig struct {
	// Host on the network which is hosting VARA; defaults to `localhost`
	Host string
	// CmdPort is the TCP port on which to reach VARA; defaults to 8300
	CmdPort int
	// DataPort is the TCP port on which to exchange over-the-air payloads with VARA;
	// defaults to 8301
	DataPort int
}

ModemConfig defines configuration options for connecting with the VARA modem program.

Jump to

Keyboard shortcuts

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