Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DebugFlag bool TmpDir string FreqOffset uint32 )
global debug flag and path to tmp dir and OSD freq offset
Functions ¶
func CheckAdapters ¶
CheckAdapters checks for the availability of DVB adapters and delete all adapter and service files If programmed happened to crash in a previous instance.
func CheckDependencies ¶
func CheckDependencies() error
CheckDependencies checks if tsduck is installed. We need TSduck cmd line to run.
func KillRunningTSPProcesses ¶
func KillRunningTSPProcesses() error
KillRunningTSPProcesses checks for and kills any running tsp processes
func SetupTempDir ¶
func SetupTempDir()
func ValidateConfig ¶
ValidateConfig validates the configuration using go-playground/validator
Types ¶
type Config ¶
type Config struct { Network NetworkConfig `yaml:"network" validate:"required"` Dvbt_offset DvbtOffset `yaml:"dvbt_offset" validate:"required"` DVB []DVBConfig `yaml:"dvb" validate:"required,dive"` }
Config represents the configuration for the network and DVB-T and DVB-S
func ReadConfig ¶
ReadConfig reads the configuration from a YAML file
type DVBConfig ¶
type DVBConfig struct { Type string `yaml:"type" validate:"required,oneof= 'AUTO-T' 'DVB-T' 'DVB-T2' 'DVB-S' 'DVB-S2' 'DVB-S-Turbo' 'AUTO-S' 'ATSC'"` Frequency uint32 `yaml:"frequency" validate:"required,min=0"` Bandwidth uint8 `yaml:"bandwidth,omitempty" validate:"min=0,max=8"` SymbolRate uint32 `yaml:"symbol_rate,omitempty" validate:"min=0"` IP string `yaml:"ip" validate:"required,ip"` Port int `yaml:"port" validate:"required,min=1024,max=65535"` }
DVBConfig represents the configuration for a single DVB type
type DvbtOffset ¶
type DvbtOffset struct {
FreqOffset uint32 `yaml:"freq_offset" validate:"required,min=600000000,max=700000000"`
}
type NetworkConfig ¶
type NetworkConfig struct { StatsIP string `yaml:"stats_ip" validate:"required,ip"` Port int `yaml:"port" validate:"required,min=1024,max=65535"` InterfaceIP string `yaml:"interface_ip" validate:"omitempty,ip"` WebIP string `yaml:"web_ip" validate:"required,ip"` }
NetworkConfig represents the network configuration