dmr

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallTracker

type CallTracker struct {
	DB            *gorm.DB
	Redis         *redis.Client
	CallEndTimers map[uint]*time.Timer
	InFlightCalls map[uint]*models.Call
}

func NewCallTracker

func NewCallTracker(db *gorm.DB, redis *redis.Client) *CallTracker

func (*CallTracker) EndCall

func (c *CallTracker) EndCall(ctx context.Context, packet models.Packet)

func (*CallTracker) IsCallActive

func (c *CallTracker) IsCallActive(packet models.Packet) bool

func (*CallTracker) ProcessCallPacket

func (c *CallTracker) ProcessCallPacket(ctx context.Context, packet models.Packet)

func (*CallTracker) StartCall

func (c *CallTracker) StartCall(ctx context.Context, packet models.Packet)

type DMRServer

type DMRServer struct {
	Buffer        []byte
	SocketAddress net.UDPAddr
	Server        *net.UDPConn
	Started       bool
	Parrot        *Parrot
	DB            *gorm.DB
	Redis         redisRepeaterStorage
	CallTracker   *CallTracker
}

func MakeServer

func MakeServer(db *gorm.DB, redis *redis.Client) DMRServer

func (*DMRServer) Listen

func (s *DMRServer) Listen(ctx context.Context)

func (*DMRServer) Stop

func (s *DMRServer) Stop(ctx context.Context)

type Parrot

type Parrot struct {
	Redis redisParrotStorage
}

func NewParrot

func NewParrot(redis *redis.Client) *Parrot

func (*Parrot) GetStream

func (p *Parrot) GetStream(ctx context.Context, streamId uint) []models.Packet

func (*Parrot) IsStarted

func (p *Parrot) IsStarted(ctx context.Context, streamId uint) bool

func (*Parrot) RecordPacket

func (p *Parrot) RecordPacket(ctx context.Context, streamId uint, packet models.Packet)

func (*Parrot) StartStream

func (p *Parrot) StartStream(ctx context.Context, streamId uint, repeaterId uint) bool

func (*Parrot) StopStream

func (p *Parrot) StopStream(ctx context.Context, streamId uint)

Jump to

Keyboard shortcuts

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