You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kevin Golding 9bb56dc6c8 add numeric message encoding 4 years ago
examples add numeric message encoding 4 years ago
README.md add numeric message encoding 4 years ago
helpers.go add BinStr() helper 5 years ago
options.go added options and example 5 years ago
pocsagencode.go add numeric message encoding 4 years ago
pocsagencode_test.go add numeric message encoding 4 years ago

README.md

Golang port of the POCSAG::Encode Perl module extended to support Numeric as well as AlphaNumeric messages.

Example usage

package main

import (
	"log"

	"github.com/kgolding/go-pocsagencode"
)

func main() {
	messages := []*pocsagencode.Message{
		&pocsagencode.Message{1300100, "Hello Pager!", false},
	}

	log.Println("Sending", len(messages), "messages")
	var burst pocsagencode.Burst
	for len(messages) > 0 {
		burst, messages = pocsagencode.Generate(messages)
		// Options can be set as below for MaxLen and PreambleBits
		// burst, messages = pocsagencode.Generate(messages, pocsagencode.OptionPreambleBits(250))
		log.Println("Burst", burst.String())
		// Send Burst to the FSK modem here...
	}
	log.Println("Done")
}