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.

29 lines
529 B
Go

package repeater
import (
"github.com/pd0mz/go-dmr/bptc"
"github.com/pd0mz/go-dmr/dmr"
"github.com/pd0mz/go-dmr/ipsc"
)
func (r *Repeater) HandleDataHeader(p *ipsc.Packet) error {
var (
h dmr.DataHeader
err error
payload = make([]byte, 12)
)
if err = bptc.Process(dmr.ExtractInfoBits(p.PayloadBits), payload); err != nil {
return err
}
if h, err = dmr.ParseDataHeader(payload, false); err != nil {
return err
}
// TODO(maze): handle receiving of data blocks
switch h.(type) {
}
return nil
}