dmr

package
v0.0.0-...-b5243b2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

package dmr implements DMR data frame parsing according to the TS 102 361-1, -2 and -3 specification.

There is no support for FEC, BPTC or interleaving in this library and is left as an exercise to the reader.

Index

Constants

View Source
const (
	TypePIHeader = 0x00 + iota
	TypeVoiceHeader
	TypeTerminatorLC
	TypeCSBK
	TypeMBCHeader
	TypeMBCContinuation
	TypeDataHeader
	TypeRate12Data
	TypeRate34Data
	TypeIdle
	/* pseudo types */
	TypeVoiceFrameA
	TypeVoiceFrameB
	TypeVoiceFrameC
	TypeVoiceFrameD
	TypeVoiceFrameE
	TypeVoiceFrameF
	TypeEmbeddedData = 0x11
)

DMR data types

Variables

This section is empty.

Functions

This section is empty.

Types

type EmbeddedData

type EmbeddedData struct {
	LC
	Target ID
	Source ID
}

EmbeddedData is an Embedded Data frame

type Frame

type Frame interface {
}

Frame is a DMR frame

func Parse

func Parse(dataType uint8, data []byte) (Frame, error)

Parse a DMR frame of the given dataType.

type FullLC

type FullLC struct {
	LC
	ServiceOptions uint8
	Target         ID
	Source         ID
}

FullLC is a Full Link Control frame

type ID

type ID [3]byte

ID is a DMR ID

func NewID

func NewID(id uint32) ID

func (ID) Int

func (id ID) Int() int

func (ID) String

func (id ID) String() string

func (ID) Uint32

func (id ID) Uint32() uint32

type LC

type LC struct {
	Options      uint8
	FeatureSetID uint8
}

LC is a Link Control header

func (LC) Opcode

func (lc LC) Opcode() uint8

Opcode returns the FLCO (Full Link Control Opcode)

func (LC) Protect

func (lc LC) Protect() bool

Protect indicates a private call

type TerminatorLC

type TerminatorLC struct {
	FullLC
}

TerminatorLC is a Terminator Link Control frame

type Voice

type Voice [33]byte

Voice is a voice frame

type VoiceHeader

type VoiceHeader struct {
	FullLC
}

VoiceHeader Link Control

Jump to

Keyboard shortcuts

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