godapnet

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 6 Imported by: 1

README

godapnet

Go Module to support sending messages on the DAPNet Network for Amateur Radio POCSAG Pagers

Documentation

Index

Constants

View Source
const (
	Alphapoc602RMaxMessageLength = 80
	DAPNetURL                    = "https://hampager.de/api/calls"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Text                  string   `json:"text"`
	CallsignNames         []string `json:"callSignNames"`
	TransmitterGroupNames []string `json:"transmitterGroupNames"`
	Emergency             bool     `json:"emergency"`
}

type MessageConfig added in v0.3.0

type MessageConfig struct {
	MaxMessageLength  int
	Prefix            string
	Callsigns         []string
	TransmitterGroups []string
	Emergency         bool
}

func NewMessageConfig added in v0.3.0

func NewMessageConfig(prefix string, maxMessageLength int, callsigns []string, transmitterGroups []string, emergency bool) *MessageConfig

type Sender

type Sender struct {
	URL      string
	Callsign string
	Username string
	Password string
	// contains filtered or unexported fields
}

func NewSender added in v0.3.0

func NewSender(client *http.Client, url string, callsign string, username string, password string) *Sender

func (*Sender) Send added in v0.3.0

func (s *Sender) Send(text string, messageConfig *MessageConfig) error

Send sends a message to the DAPNET network

Jump to

Keyboard shortcuts

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