turbine

package
v0.0.0-...-fff4e01 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioOutput

type AudioOutput interface {
	// Start receives a context and should run in a loop, terminating upon ctx closing or on any errors.
	Start(ctx context.Context) error
	// Receive returns a channel that receives tagged audio sample input.
	Receive() chan<- *types.TaggedAudioSampleFloat32
}

AudioOutput handles incoming tagged audio samples.

type ControlFrequency

type ControlFrequency struct {
	SystemID int

	SystemType op25.SystemType

	Frequency  int
	SymbolRate int
	// contains filtered or unexported fields
}

func NewControlFrequency

func NewControlFrequency(
	t *Turbine,
	sys *internalSystem,
	freq int,
) *ControlFrequency

type Options

type Options struct {
	CenterFreq            int
	SampleRate            int
	VoiceOutputSampleRate int
	Gain                  int
	Squelch               int
	Systems               []config.System
	AudioOutputs          []AudioOutput
	FrequencyTimeout      time.Duration
	RecordLocation        string
	PlaybackLocation      string
}

type SystemManager

type SystemManager struct {
	VMs map[int]*VoiceManager
	// contains filtered or unexported fields
}

func NewSystemManager

func NewSystemManager() *SystemManager

func (*SystemManager) VMForSystemID

func (s *SystemManager) VMForSystemID(systemID int) *VoiceManager

type Turbine

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

func NewTurbine

func NewTurbine(device device.Device, options Options, opts ...TurbineOption) (*Turbine, error)

func (*Turbine) Start

func (t *Turbine) Start(ctx context.Context) error

func (*Turbine) Stop

func (t *Turbine) Stop() error

type TurbineOption

type TurbineOption func(t *Turbine) error

func WithImageServer

func WithImageServer(vizServer *viz.Server) TurbineOption

func WithInfluxDB

func WithInfluxDB(influxClient api.WriteAPI) TurbineOption

func WithLogger

func WithLogger(logger zerolog.Logger) TurbineOption

type VoiceFrequency

type VoiceFrequency struct {
	Frequency int
	Bandwidth int
	LastSeen  time.Time
	SystemID  int
	// contains filtered or unexported fields
}

type VoiceManager

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

func NewVoiceManager

func NewVoiceManager(systemID int) *VoiceManager

func (*VoiceManager) TalkGroupForFrequency

func (v *VoiceManager) TalkGroupForFrequency(freq int) *types.TalkGroup

func (*VoiceManager) TalkGroupForID

func (v *VoiceManager) TalkGroupForID(id int) *types.TalkGroup

func (*VoiceManager) TalkGroupForSourceID

func (v *VoiceManager) TalkGroupForSourceID(sid int) *types.TalkGroup

func (*VoiceManager) UpdateGroup

func (v *VoiceManager) UpdateGroup(tgid, sourceID, freq int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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