Documentation ¶
Overview ¶
Package transport provides access to various connected modes common in amateur radio.
The modes is made available through common interfaces and idioms from the net package.
Index ¶
- Variables
- func DialURL(url *URL) (net.Conn, error)
- func DialURLContext(ctx context.Context, url *URL) (net.Conn, error)
- func RegisterContextDialer(scheme string, dialer ContextDialer)
- func RegisterDialer(scheme string, dialer Dialer)
- func UnregisterDialer(scheme string)
- type BusyChannelChecker
- type ContextDialer
- type Dialer
- type Flusher
- type PTTController
- type Robust
- type TxBuffer
- type URL
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidTarget = errors.New("Invalid or missing target callsign") ErrDigisUnsupported = errors.New("Digipeater path is not supported by this scheme") ErrMissingDialer = errors.New("No dialer has been registered for this scheme") ErrUnsupportedScheme = errors.New("Unsupported URL scheme") )
Functions ¶
func DialURL ¶ added in v0.7.0
DialURL calls the url.Scheme's Dialer.
If the URL's scheme is not registered, ErrMissingDialer is returned.
func DialURLContext ¶ added in v0.10.0
DialURLContext calls the url.Scheme's ContextDialer.
If the URL's scheme is not registered, ErrMissingDialer is returned.
func RegisterContextDialer ¶ added in v0.10.0
func RegisterContextDialer(scheme string, dialer ContextDialer)
RegisterContextDialer registers a new scheme and it's ContextDialer.
The list of registered dialers is used by DialURL and DialURLContext.
func RegisterDialer ¶ added in v0.7.0
RigisterDialer registers a new scheme and it's Dialer.
The list of registered dialers is used by DialURL and DialURLContext.
func UnregisterDialer ¶ added in v0.7.0
func UnregisterDialer(scheme string)
UnregisterDialer removes the given scheme's dialer from the list of dialers.
Types ¶
type BusyChannelChecker ¶
type BusyChannelChecker interface { // Returns true if the channel is not clear Busy() bool }
A BusyChannelChecker is a generic busy detector for a physical transmission medium.
type ContextDialer ¶ added in v0.10.0
type ContextDialer interface { // DiaulURLContext dials a connection. // // If the given context is cancelled before the connection is made, the operation is aborted and an error returned. // Once successfully connected, any expiration of the context will not affect the connection. DialURLContext(ctx context.Context, url *URL) (net.Conn, error) }
ContextDialer is implemented by transports that supports dialing with cancellation.
type Dialer ¶ added in v0.7.0
Dialer is implemented by transports that supports dialing a transport.URL.
type Flusher ¶
type Flusher interface { // Flush flushes the transmit buffers of the underlying modem. Flush() error }
type PTTController ¶
type TxBuffer ¶
type TxBuffer interface { // TransmitBufferLen returns the number of bytes in the out buffer queue. TxBufferLen() int }
type URL ¶ added in v0.7.0
type URL struct { // TNC/modem/interface/network type. Scheme string // The host interface address. Host string // Host username (typically the local stations callsign) and password information. User *url.Userinfo // Target callsign. Target string // List of digipeaters ("path" between origin and target). Digis []string // List of query parameters. Params url.Values }
URL contains all information needed to dial a remote node.
func ParseURL ¶ added in v0.7.0
ParseURL parses a raw urlstring into an URL.
scheme://(mycall(:password)@)(host)(/digi1/...)/targetcall Examples:
- winmor:///LA1B (Addresses LA1B on WINMOR).
- ax25://mycall@myaxport/LD5SK/LA1B-10 (Addresses LA1B-10 via LD5SK using AX.25-port "myaxport" and "MYCALL" as source callsign).
The special query parameter host will override the host part of the path. (E.g. ax25:///LA1B?host=ax0 == ax25://ax0/LA1B).
Directories ¶
Path | Synopsis |
---|---|
Package ardop provides means of establishing a connection to a remote node using ARDOP TNC
|
Package ardop provides means of establishing a connection to a remote node using ARDOP TNC |
Package ardop provides means of establishing a connection to a remote node using ARDOP TNC
|
Package ardop provides means of establishing a connection to a remote node using ARDOP TNC |
Package ax25 provides a net.Conn and net.Listener interfaces for AX.25.
|
Package ax25 provides a net.Conn and net.Listener interfaces for AX.25. |
Package telnet provides a method of connecting to Winlink CMS over tcp ("telnet-mode")
|
Package telnet provides a method of connecting to Winlink CMS over tcp ("telnet-mode") |
Package winmor provides means of establishing a connection to a remote node using WINMOR TNC
|
Package winmor provides means of establishing a connection to a remote node using WINMOR TNC |