hbrp

package
v1.0.60 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOpenSocket   = errors.New("Error opening socket")
	ErrSocketBuffer = errors.New("Error setting socket buffer size")
)

Functions

This section is empty.

Types

type Server

type Server struct {
	Buffer        []byte
	SocketAddress net.UDPAddr
	Server        *net.UDPConn
	Started       bool
	Parrot        *parrot.Parrot
	DB            *gorm.DB
	Redis         *servers.RedisClient
	CallTracker   *calltracker.CallTracker
	Version       string
	Commit        string
}

Server is the DMR server.

func MakeServer

func MakeServer(db *gorm.DB, redis *redis.Client, redisClient *servers.RedisClient, callTracker *calltracker.CallTracker, version, commit string) Server

MakeServer creates a new DMR server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the DMR server.

func (*Server) Stop

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

Stop stops the DMR server.

func (*Server) TrackCall

func (s *Server) TrackCall(ctx context.Context, packet models.Packet, isVoice bool)

type SubscriptionManager

type SubscriptionManager struct {
	// contains filtered or unexported fields
}

func GetSubscriptionManager

func GetSubscriptionManager(db *gorm.DB) *SubscriptionManager

func (*SubscriptionManager) CancelAllRepeaterSubscriptions

func (m *SubscriptionManager) CancelAllRepeaterSubscriptions(repeaterID uint)

func (*SubscriptionManager) CancelAllSubscriptions

func (m *SubscriptionManager) CancelAllSubscriptions()

func (*SubscriptionManager) CancelSubscription

func (m *SubscriptionManager) CancelSubscription(repeaterID uint, talkgroupID uint, slot dmrconst.Timeslot)

func (*SubscriptionManager) ListenForCalls

func (m *SubscriptionManager) ListenForCalls(redis *redis.Client, repeaterID uint)

func (*SubscriptionManager) ListenForCallsOn

func (m *SubscriptionManager) ListenForCallsOn(redis *redis.Client, repeaterID uint, talkgroupID uint)

func (*SubscriptionManager) ListenForWebsocket added in v1.0.15

func (m *SubscriptionManager) ListenForWebsocket(ctx context.Context, redis *redis.Client, userID uint)

Jump to

Keyboard shortcuts

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