Skip to content

Go POSCAG encoder ported from the Perl Encode::POCSAG module

Notifications You must be signed in to change notification settings

kgolding/go-pocsagencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, FunctionA, "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")
}

About

Go POSCAG encoder ported from the Perl Encode::POCSAG module

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages