aprs

package
v0.0.0-...-b97d05d Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AprsIs

type AprsIs struct {
	Callsign string

	Conn *textproto.Conn
	// contains filtered or unexported fields
}

func New

func New(cfg config.AprsIs, callSign string, comment string, logger *log.Logger) (*AprsIs, error)

func (*AprsIs) Connect

func (a *AprsIs) Connect() error

func (*AprsIs) Disconnect

func (a *AprsIs) Disconnect()

func (*AprsIs) Upload

func (a *AprsIs) Upload(msg string) error

type Packet

type Packet struct {
	Src       string
	Dst       string
	Path      []string
	Payload   string
	Timestamp time.Time
}

func ParsePacket

func ParsePacket(p string) (*Packet, error)

func (*Packet) AckString

func (p *Packet) AckString() (string, error)

AckString returns a string representation of the packet for sending an acknowledgement

func (*Packet) CheckForRetransmit

func (p *Packet) CheckForRetransmit(stationCallsign string) (bool, error)

Check whether the packet should be retransmitted by the digipeater and if so, modifies the path.

func (*Packet) IsAckMessage

func (p *Packet) IsAckMessage() bool

func (*Packet) Type

func (p *Packet) Type() PacketType

type PacketType

type PacketType int
const (
	Unknown PacketType = iota
	PositionReport
	StatusReport
	Message
	Telemetry
	WeatherReport
	ObjectReport
	ItemReport
	Query
	ThirdPartyTraffic
	RawGPSData
)

func (PacketType) ForwardToAprsIs

func (t PacketType) ForwardToAprsIs() bool

Forward determines if a packet should be forwarded to APRS-IS

func (PacketType) NeedsAck

func (t PacketType) NeedsAck() bool

func (PacketType) String

func (t PacketType) String() string

Jump to

Keyboard shortcuts

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