burst

package
v0.0.0-...-e6ee764 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Burst

type Burst interface {
	GetBurstType() DataType
	GetPayload() []byte
}

Burst Represents the data/voice sent in this packet

type CSBKBurst

type CSBKBurst struct {
	DataType    DataType
	RSSIOk      bool
	RSParity    bool
	CRCParity   bool
	LCParity    bool
	Unknown     uint16
	HasRSSI     bool
	BurstSource bool
	HardSync    bool
	HasSlotType bool
	SyncType    byte
	ColorCode   byte
	SlotType    byte
	RSSI        float32
	LastBlock   bool
	ProtectFlag bool //This isn't used yet...
	CSBKOpCode  CSBKOpCode
	FeatureID   byte
	CRC         uint16
	Payload     []byte
}

func NewCSBKBurstFromArray

func NewCSBKBurstFromArray(data []byte) CSBKBurst

func (CSBKBurst) GetBurstType

func (p CSBKBurst) GetBurstType() DataType

func (CSBKBurst) GetPayload

func (p CSBKBurst) GetPayload() []byte

type CSBKOpCode

type CSBKOpCode byte
const (
	//These CSBK Opcodes are from TS-102 361-2
	CSBKVoiceServiceRequest  CSBKOpCode = 0x04
	CSBKVoiceServiceAnswer   CSBKOpCode = 0x05
	CSBKNak                  CSBKOpCode = 0x26
	CSBKBSOutboundActivation CSBKOpCode = 0x38
	CSBKPreamble             CSBKOpCode = 0x3D

	//Other CSBK Opcodes (presumably Mototrbo specific)
	CSBKMototrboRadioCheck CSBKOpCode = 0x24
)

type ContentType

type ContentType byte
const (
	UnifiedData          ContentType = 0x00
	TCPHeaderCompression ContentType = 0x02
	UDPHeaderCompression ContentType = 0x03
	IPPacket             ContentType = 0x04
	ARP                  ContentType = 0x05
	ProprietaryData      ContentType = 0x09
	ShortData            ContentType = 0x0A
)

type DataBurst

type DataBurst struct {
	DataType    DataType
	RSSIOk      bool
	RSParity    bool
	CRCParity   bool
	LCParity    bool
	Unknown     uint16
	HasRSSI     bool
	BurstSource bool
	HardSync    bool
	HasSlotType bool
	SyncType    byte
	ColorCode   byte
	SlotType    byte
	RSSI        float32
	Payload     []byte
	CRC         uint16
}

func NewDataBurstFromArray

func NewDataBurstFromArray(data []byte) DataBurst

func (DataBurst) GetBurstType

func (p DataBurst) GetBurstType() DataType

func (DataBurst) GetPayload

func (p DataBurst) GetPayload() []byte

type DataHeaderBurst

type DataHeaderBurst struct {
	DataType          DataType
	RSSIOk            bool
	RSParity          bool
	CRCParity         bool
	LCParity          bool
	Unknown           uint16
	HasRSSI           bool
	BurstSource       bool
	HardSync          bool
	HasSlotType       bool
	SyncType          byte
	ColorCode         byte
	SlotType          byte
	RSSI              float32
	IsGroup           bool
	ResponseRequested bool
	Compressed        bool
	HeaderDataType    byte
	PadOctectCount    byte
	ContentType       ContentType
	To                uint32
	From              uint32
	FullMessage       bool
	BlocksFollow      byte
	CRC               uint16
}

func NewDataHeaderBurstFromArray

func NewDataHeaderBurstFromArray(data []byte) DataHeaderBurst

func (DataHeaderBurst) GetBurstType

func (p DataHeaderBurst) GetBurstType() DataType

func (DataHeaderBurst) GetPayload

func (p DataHeaderBurst) GetPayload() []byte

type DataType

type DataType byte

DataType describes the type of data in the packet

const (
	//Taken from ETSI TS 102 361-1
	DataTypePIHeader         DataType = 0x00
	DataTypeVoiceLCHeader    DataType = 0x01
	DataTypeTerminatorWithLC DataType = 0x02
	DataTypeCSBK             DataType = 0x03
	DataTypeMBCHeader        DataType = 0x04
	DataTypeMBCContinuation  DataType = 0x05
	DataTypeDataHeader       DataType = 0x06
	DataTypeRateHalfData     DataType = 0x07
	DataTypeRateThreeQuarter DataType = 0x08
	DataTypeIdle             DataType = 0x09
	DataTypeRateFullData     DataType = 0x0a
	DataTypeUSBD             DataType = 0x0b

	//DataTypeUnknownSmall Don't know what this is... but it doesn't fit the regular format...
	DataTypeUnknownSmall DataType = 0x13
)

type FullLinkControlOpcode

type FullLinkControlOpcode byte
const (
	FLCOGroupVoiceChannelUser      FullLinkControlOpcode = 0x00
	FLCOUnitToUnitVoiceChannelUser FullLinkControlOpcode = 0x03
)

type UnknownBurst

type UnknownBurst struct {
	DataType DataType
	Payload  []byte
}

func NewUnknownBurstFromArray

func NewUnknownBurstFromArray(data []byte) UnknownBurst

func (UnknownBurst) GetBurstType

func (p UnknownBurst) GetBurstType() DataType

func (UnknownBurst) GetPayload

func (p UnknownBurst) GetPayload() []byte

type VoiceBurst

type VoiceBurst struct {
	Slot        byte
	DataType    DataType
	Unknown     byte
	Flags       byte
	Frames      [][]byte
	FrameErrors []bool
	LCHardBits  []byte
}

func NewVoiceBurstFromArray

func NewVoiceBurstFromArray(data []byte) VoiceBurst

func (VoiceBurst) GetBurstType

func (p VoiceBurst) GetBurstType() DataType

func (VoiceBurst) GetPayload

func (p VoiceBurst) GetPayload() []byte

type VoiceHeaderBurst

type VoiceHeaderBurst struct {
	DataType              DataType
	RSSIOk                bool
	RSParity              bool
	CRCParity             bool
	LCParity              bool
	Unknown               uint16
	HasRSSI               bool
	BurstSource           bool
	HardSync              bool
	HasSlotType           bool
	SyncType              byte
	ColorCode             byte
	SlotType              byte
	RSSI                  float32
	Protected             bool
	FullLinkControlOpcode FullLinkControlOpcode
	FeatureID             byte
	SerivceOptions        byte
	DestAddress           uint32
	SourceAddress         uint32
	CRC                   uint16
}

func NewVoiceHeaderBurstFromArray

func NewVoiceHeaderBurstFromArray(data []byte) VoiceHeaderBurst

func (VoiceHeaderBurst) GetBurstType

func (p VoiceHeaderBurst) GetBurstType() DataType

func (VoiceHeaderBurst) GetPayload

func (p VoiceHeaderBurst) GetPayload() []byte

type VoiceTerminatorBurst

type VoiceTerminatorBurst struct {
	DataType              DataType
	RSSIOk                bool
	RSParity              bool
	CRCParity             bool
	LCParity              bool
	Unknown               uint16
	HasRSSI               bool
	BurstSource           bool
	HardSync              bool
	HasSlotType           bool
	SyncType              byte
	ColorCode             byte
	SlotType              byte
	RSSI                  float32
	Protected             bool
	FullLinkControlOpcode FullLinkControlOpcode
	FeatureID             byte
	DestAddress           uint32
	SourceAddress         uint32
	Group                 bool
	ResponseRequested     bool
	FullMessageFlag       bool
	Reserved              bool
	Resync                bool
	SendSequnceNumber     byte
	CRC                   uint16
}

func NewVoiceTerminatorBurstFromArray

func NewVoiceTerminatorBurstFromArray(data []byte) VoiceTerminatorBurst

func (VoiceTerminatorBurst) GetBurstType

func (p VoiceTerminatorBurst) GetBurstType() DataType

func (VoiceTerminatorBurst) GetPayload

func (p VoiceTerminatorBurst) GetPayload() []byte

Jump to

Keyboard shortcuts

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