Documentation
¶
Index ¶
- Constants
- Variables
- func CreateLaunchConfig(scenario *scenario, scenarioGroup *scenarioGroup) sim.LaunchConfig
- func CreateNewSimConfiguration(config *Configuration, scenarioGroup *scenarioGroup, scenarioName string) (*sim.NewSimConfiguration, error)
- func LaunchServer(config ServerLaunchConfig, lg *log.Logger)
- func LaunchServerAsync(config ServerLaunchConfig, lg *log.Logger) (int, util.ErrorLogger, string)
- func ListAllScenarios(scenarioFilename, videoMapFilename string, lg *log.Logger) ([]string, error)
- func LoadScenarioGroups(extraScenarioFilename string, extraVideoMapFilename string, ...) (map[string]map[string]*scenarioGroup, map[string]map[string]*Configuration, ...)
- func MakeGCSProvider(lg *log.Logger) (wx.Provider, error)
- func MakeRPCProvider(serverAddress string, lg *log.Logger) (wx.Provider, error)
- func MakeResourcesWXProvider(lg *log.Logger) wx.Provider
- func MakeWXProvider(serverAddress string, lg *log.Logger) (wx.Provider, error)
- func NewGoogleTTSProvider(lg *log.Logger) (sim.TTSProvider, error)
- func PostDeserializeFacilityAdaptation(s *sim.FacilityAdaptation, e *util.ErrorLogger, sg *scenarioGroup, ...)
- func TryDecodeError(e error) error
- func TryDecodeErrorString(s string) error
- type ACIDSpecifier
- type AcceptHandoffArgs
- type ActivateFlightPlanArgs
- type AircraftCommandsArgs
- type AircraftCommandsResult
- type AircraftSpecifier
- type AssociateFlightPlanArgs
- type CancelHandoffArgs
- type ChangeControlPositionArgs
- type Configuration
- type ConnectResult
- type CreateArrivalArgs
- type CreateDepartureArgs
- type CreateFlightPlanArgs
- type CreateOverflightArgs
- type CreateRestrictionAreaResultArgs
- type DeleteAircraftArgs
- type DeleteAircraftListArgs
- type DeleteFlightPlanArgs
- type FlightPlanDirectArgs
- type ForceQLArgs
- type GCSProvider
- func (g *GCSProvider) GetAtmosGrid(tracon string, t time.Time) (atmos *wx.AtmosByPointSOA, atmosTime time.Time, nextTime time.Time, err error)
- func (g *GCSProvider) GetAvailableTimeIntervals() []util.TimeInterval
- func (g *GCSProvider) GetMETAR(airports []string) (map[string]wx.METARSOA, error)
- func (g *GCSProvider) GetPrecipURL(tracon string, t time.Time) (string, time.Time, error)
- type GetAtmosArgs
- type GetAtmosResult
- type GlobalMessageArgs
- type GoogleTTSProvider
- type HandoffArgs
- type HeldDepartureArgs
- type LaunchAircraftArgs
- type ModifyFlightPlanArgs
- type NewSimConfiguration
- type NewSimResult
- type PointOutArgs
- type PrecipURL
- type PrecipURLArgs
- type RPCProvider
- func (r *RPCProvider) GetAtmosGrid(tracon string, t time.Time) (atmos *wx.AtmosByPointSOA, time time.Time, nextTime time.Time, err error)
- func (r *RPCProvider) GetAvailableTimeIntervals() []util.TimeInterval
- func (r *RPCProvider) GetMETAR(airports []string) (map[string]wx.METARSOA, error)
- func (r *RPCProvider) GetPrecipURL(tracon string, t time.Time) (string, time.Time, error)
- type RemoteSim
- type RemoteTTSProvider
- type RepositionTrackArgs
- type ResourcesWXProvider
- func (r *ResourcesWXProvider) GetAtmosGrid(tracon string, tGet time.Time) (*wx.AtmosByPointSOA, time.Time, time.Time, error)
- func (r *ResourcesWXProvider) GetAvailableTimeIntervals() []util.TimeInterval
- func (r *ResourcesWXProvider) GetMETAR(airports []string) (map[string]wx.METARSOA, error)
- func (r *ResourcesWXProvider) GetPrecipURL(tracon string, t time.Time) (string, time.Time, error)
- type RestrictionAreaArgs
- type SendRouteCoordinatesArgs
- type ServerLaunchConfig
- type SetLaunchConfigArgs
- type SetSimRateArgs
- type SetWaypointCommandsArgs
- type SimBroadcastMessage
- type SimConnectionConfiguration
- type SimManager
- func (sm *SimManager) Add(session *simSession, result *NewSimResult, initialTCP string, instructor bool, ...) error
- func (sm *SimManager) AddLocal(sim *sim.Sim, result *NewSimResult) error
- func (sm *SimManager) Broadcast(m *SimBroadcastMessage, _ *struct{}) error
- func (sm *SimManager) Connect(version int, result *ConnectResult) error
- func (sm *SimManager) ConnectToSim(config *SimConnectionConfiguration, result *NewSimResult) error
- func (sm *SimManager) GetAllVoices(_ struct{}, voices *[]sim.Voice) error
- func (sm *SimManager) GetAtmosGrid(args GetAtmosArgs, result *GetAtmosResult) error
- func (sm *SimManager) GetAvailableWX(unused int, result *[]util.TimeInterval) error
- func (sm *SimManager) GetMETAR(airports []string, result *map[string]wx.METARSOA) error
- func (sm *SimManager) GetPrecipURL(args PrecipURLArgs, result *PrecipURL) error
- func (sm *SimManager) GetRunningSims(_ int, result *map[string]*RemoteSim) error
- func (sm *SimManager) GetSerializeSim(token string, s *sim.Sim) error
- func (sm *SimManager) GetSimStatus() []simStatus
- func (sm *SimManager) GetStateUpdate(token string, update *sim.StateUpdate) error
- func (sm *SimManager) GetTTSStats() []ttsClientStats
- func (sm *SimManager) GetTimeIntervals(_ struct{}, result *[]util.TimeInterval) error
- func (sm *SimManager) HandleSpeechWSConnection(w http.ResponseWriter, r *http.Request)
- func (sm *SimManager) LookupController(token string) (string, *sim.Sim, bool)
- func (sm *SimManager) NewSim(config *NewSimConfiguration, result *NewSimResult) error
- func (sm *SimManager) SignOff(token string) error
- func (sm *SimManager) SimShouldExit(sim *sim.Sim) bool
- func (sm *SimManager) TextToSpeech(req *TTSRequest, speechMp3 *[]byte) error
- func (sm *SimManager) UpdateTTSUsage(ip, text string) error
- type SimScenarioConfiguration
- type TTSRequest
- type VideoMapsArgs
Constants ¶
const AcceptHandoffRPC = "Sim.AcceptHandoff"
const AcceptRedirectedHandoffRPC = "Sim.AcceptRedirectedHandoff"
const AcknowledgePointOutRPC = "Sim.AcknowledgePointOut"
const ActivateFlightPlanRPC = "Sim.ActivateFlightPlan"
const AddLocalRPC = "SimManager.AddLocal"
const AssociateFlightPlanRPC = "Sim.AssociateFlightPlan"
const BroadcastRPC = "SimManager.Broadcast"
const CancelHandoffRPC = "Sim.CancelHandoff"
const ChangeControlPositionRPC = "Sim.ChangeControlPosition"
const ConnectRPC = "SimManager.Connect"
const ConnectToSimRPC = "SimManager.ConnectToSim"
const CreateArrivalRPC = "Sim.CreateArrival"
const CreateDepartureRPC = "Sim.CreateDeparture"
const CreateFlightPlanRPC = "Sim.CreateFlightPlan"
const CreateOverflightRPC = "Sim.CreateOverflight"
const CreateRestrictionAreaRPC = "Sim.CreateRestrictionArea"
const DeleteAircraftRPC = "Sim.DeleteAircraft"
const DeleteAllAircraftRPC = "Sim.DeleteAllAircraft"
const DeleteFlightPlanRPC = "Sim.DeleteFlightPlan"
const DeleteRestrictionAreaRPC = "Sim.DeleteRestrictionArea"
const FastForwardRPC = "Sim.FastForward"
const FlightPlanDirectRPC = "Sim.FlightPlanDirect"
const ForceQLRPC = "Sim.ForceQL"
const GetAircraftDisplayStateRPC = "Sim.GetAircraftDisplayState"
const GetAllVoicesRPC = "SimManager.GetAllVoices"
const GetAtmosGridRPC = "SimManager.GetAtmosGrid"
const GetAvailableWXRPC = "SimManager.GetAvailableWX"
const GetMETARRPC = "SimManager.GetMETAR"
const GetPrecipURLRPC = "SimManager.GetPrecipURL"
const GetRunningSimsRPC = "SimManager.GetRunningSims"
const GetSerializeSimRPC = "SimManager.GetSerializeSim"
const GetStateUpdateRPC = "Sim.GetStateUpdate"
const GetTimeIntervalsRPC = "SimManager.GetTimeIntervals"
const GetVideoMapLibraryRPC = "Sim.GetVideoMapLibrary"
const GlobalMessageRPC = "Sim.GlobalMessage"
const HandoffTrackRPC = "Sim.HandoffTrack"
const LaunchAircraftRPC = "Sim.LaunchAircraft"
const ModifyFlightPlanRPC = "Sim.ModifyFlightPlan"
const NewSimRPC = "SimManager.NewSim"
const PointOutRPC = "Sim.PointOut"
const RecallPointOutRPC = "Sim.RecallPointOut"
const RedirectHandoffRPC = "Sim.RedirectHandoff"
const RejectPointOutRPC = "Sim.RejectPointOut"
const ReleaseDepartureRPC = "Sim.ReleaseDeparture"
const RepositionTrackRPC = "Sim.RepositionTrack"
const RequestFlightFollowingRPC = "Sim.RequestFlightFollowing"
const RunAircraftCommandsRPC = "Sim.RunAircraftCommands"
const SendRouteCoordinatesRPC = "Sim.SendRouteCoordinates"
const SetLaunchConfigRPC = "Sim.SetLaunchConfig"
const SetSimRateRPC = "Sim.SetSimRate"
const SetWaypointCommandsRPC = "Sim.SetWaypointCommands"
const SignOffRPC = "Sim.SignOff"
const TakeOrReturnLaunchControlRPC = "Sim.TakeOrReturnLaunchControl"
const TextToSpeechRPC = "SimManager.TextToSpeech"
const TogglePauseRPC = "Sim.TogglePause"
const UpdateRestrictionAreaRPC = "Sim.UpdateRestrictionArea"
const ViceHTTPServerPort = 6502
const ViceRPCVersion = ViceSerializeVersion
const ViceSerializeVersion = 45
Version history 0-7 not explicitly recorded 8: STARSPane DCB improvements, added DCB font size control 9: correct STARSColors, so update brightness settings to compensate 10: stop being clever about JSON encoding Waypoint arrays to strings 11: expedite, intercept localizer, fix airspace serialization 12: set 0 DCB brightness to 50 (WAR not setting a default for it) 13: update departure handling for multi-controllers (and rename some members) 14: Aircraft ArrivalHandoffController -> WaypointHandoffController 15: audio engine rewrite 16: cleared/assigned alt for departures, minor nav changes 17: weather intensity default bool 18: STARS ATPA 19: runway waypoints now per-airport 20: "stars_config" and various scenario fields moved there, plus STARSFacilityAdaptation 21: STARS DCB drawing changes, so system list positions changed 22: draw points using triangles, remove some CommandBuffer commands 23: video map format update 24: packages, audio to platform, flight plan processing 25: remove ArrivalGroup/Index from Aircraft 26: make allow_long_scratchpad a single bool 27: rework prefs, videomaps 28: new departure flow 29: TFR cache 30: video map improvements 31: audio squelch for pilot readback 32: VFRs, custom spcs, pilot reported altitude, ... 33: VFRs v2 34: sim/server refactor, signon flow 35: VFRRunways in sim.State, METAR Wind struct changes 36: STARS center representation changes 37: rework STARS flight plan (et al) 38: rework STARS flight plan (et al) ongoing 39: speech v0.1 40: clean up what's transmitted server->client at initial connect/spawn, gob->msgpack 41: sim.State.SimStartTime 42: server.NewSimConfiguration.StartTime 43: WX rework (scrape, etc.) 44: store pane instances and split positions separately, rather than the entire DisplayNode hierarchy 45: Change STARSFacilityAdaptation to FacilityAdaptation
const ViceServerAddress = "vice.pharr.org"
const ViceServerPort = 8000 + ViceRPCVersion
Variables ¶
var ( ErrControllerAlreadySignedIn = errors.New("Controller with that callsign already signed in") ErrDuplicateSimName = errors.New("A sim with that name already exists") ErrInvalidCommandSyntax = errors.New("Invalid command syntax") ErrInvalidControllerToken = errors.New("Invalid controller token") ErrInvalidPassword = errors.New("Invalid password") ErrInvalidSSimConfiguration = errors.New("Invalid SimConfiguration") ErrNoNamedSim = errors.New("No Sim with that name") ErrNoSimForControllerToken = errors.New("No Sim running for controller token") ErrRPCTimeout = errors.New("RPC call timed out") ErrRPCVersionMismatch = errors.New("Client and server RPC versions don't match") ErrServerDisconnected = errors.New("Server disconnected") )
var ErrMissingTTSCredentials = errors.New("VICE_GCS_CREDENTIALS not set")
Functions ¶
func CreateLaunchConfig ¶
func CreateLaunchConfig(scenario *scenario, scenarioGroup *scenarioGroup) sim.LaunchConfig
CreateLaunchConfig creates a properly initialized LaunchConfig from scenario data
func CreateNewSimConfiguration ¶
func CreateNewSimConfiguration(config *Configuration, scenarioGroup *scenarioGroup, scenarioName string) (*sim.NewSimConfiguration, error)
CreateNewSimConfiguration creates a NewSimConfiguration from scenario components
func LaunchServer ¶
func LaunchServer(config ServerLaunchConfig, lg *log.Logger)
func LaunchServerAsync ¶
func LaunchServerAsync(config ServerLaunchConfig, lg *log.Logger) (int, util.ErrorLogger, string)
func ListAllScenarios ¶
ListAllScenarios returns a sorted list of all available scenarios in TRACON/scenario format
func LoadScenarioGroups ¶
func LoadScenarioGroups(extraScenarioFilename string, extraVideoMapFilename string, e *util.ErrorLogger, lg *log.Logger) (map[string]map[string]*scenarioGroup, map[string]map[string]*Configuration, map[string]*sim.VideoMapManifest, string)
LoadScenarioGroups loads all of the available scenarios, both from the scenarios/ directory in the source code distribution as well as, optionally, a scenario file provided on the command line. It doesn't try to do any sort of meaningful error handling but it does try to continue on in the presence of errors; all errors will be printed and the program will exit if there are any. We'd rather force any errors due to invalid scenario definitions to be fixed...
Returns: scenarioGroups, simConfigurations, mapManifests, extraScenarioErrors If the extra scenario file has errors, they are returned in extraScenarioErrors and that scenario is not loaded, but execution continues.
func MakeRPCProvider ¶ added in v0.13.0
func MakeResourcesWXProvider ¶ added in v0.13.0
func MakeWXProvider ¶ added in v0.13.0
func NewGoogleTTSProvider ¶
func NewGoogleTTSProvider(lg *log.Logger) (sim.TTSProvider, error)
func PostDeserializeFacilityAdaptation ¶ added in v0.13.0
func PostDeserializeFacilityAdaptation(s *sim.FacilityAdaptation, e *util.ErrorLogger, sg *scenarioGroup, manifest *sim.VideoMapManifest)
func TryDecodeError ¶
func TryDecodeErrorString ¶
Types ¶
type ACIDSpecifier ¶
type AcceptHandoffArgs ¶
type AcceptHandoffArgs ACIDSpecifier
type ActivateFlightPlanArgs ¶
type ActivateFlightPlanArgs struct {
ControllerToken string
TrackCallsign av.ADSBCallsign
FpACID sim.ACID
FlightPlanSpecifier *sim.FlightPlanSpecifier
}
type AircraftCommandsArgs ¶
type AircraftCommandsArgs struct {
ControllerToken string
Callsign av.ADSBCallsign
Commands string
}
type AircraftCommandsResult ¶
If an RPC call returns an error, then the result argument is not returned(!?). So we don't use the error type for syntax errors...
type AircraftSpecifier ¶
type AircraftSpecifier struct {
ControllerToken string
Callsign av.ADSBCallsign
}
type AssociateFlightPlanArgs ¶
type AssociateFlightPlanArgs struct {
ControllerToken string
Callsign av.ADSBCallsign
FlightPlanSpecifier sim.FlightPlanSpecifier
}
type CancelHandoffArgs ¶
type CancelHandoffArgs ACIDSpecifier
type Configuration ¶
type Configuration struct {
ScenarioConfigs map[string]*SimScenarioConfiguration
ControlPositions map[string]*av.Controller
DefaultScenario string
Facility string
ARTCC string
Area string
}
func LookupScenario ¶
func LookupScenario(tracon, scenarioName string, scenarioGroups map[string]map[string]*scenarioGroup, configs map[string]map[string]*Configuration) (*Configuration, *scenarioGroup, error)
LookupScenario finds a scenario configuration by TRACON/scenario name
type ConnectResult ¶
type CreateArrivalArgs ¶
type CreateDepartureArgs ¶
type CreateFlightPlanArgs ¶
type CreateFlightPlanArgs struct {
ControllerToken string
FlightPlanSpecifier sim.FlightPlanSpecifier
}
type CreateOverflightArgs ¶
type CreateRestrictionAreaResultArgs ¶
type CreateRestrictionAreaResultArgs struct {
Index int
StateUpdate sim.StateUpdate
}
type DeleteAircraftArgs ¶
type DeleteAircraftArgs AircraftSpecifier
type DeleteAircraftListArgs ¶
type DeleteFlightPlanArgs ¶
type DeleteFlightPlanArgs ACIDSpecifier
type FlightPlanDirectArgs ¶ added in v0.13.0
type ForceQLArgs ¶
type GCSProvider ¶ added in v0.13.0
type GCSProvider struct {
// contains filtered or unexported fields
}
func (*GCSProvider) GetAtmosGrid ¶ added in v0.13.0
func (*GCSProvider) GetAvailableTimeIntervals ¶ added in v0.13.0
func (g *GCSProvider) GetAvailableTimeIntervals() []util.TimeInterval
func (*GCSProvider) GetPrecipURL ¶ added in v0.13.0
type GetAtmosArgs ¶ added in v0.13.0
type GetAtmosResult ¶ added in v0.13.0
type GlobalMessageArgs ¶
type GoogleTTSProvider ¶
type GoogleTTSProvider struct {
// contains filtered or unexported fields
}
GoogleTTSProvider implements sim.TTSProvider using Google Cloud TTS
func (*GoogleTTSProvider) GetAllVoices ¶
func (g *GoogleTTSProvider) GetAllVoices() sim.TTSVoicesFuture
func (*GoogleTTSProvider) TextToSpeech ¶
func (g *GoogleTTSProvider) TextToSpeech(voice sim.Voice, text string) sim.TTSSpeechFuture
type HeldDepartureArgs ¶
type HeldDepartureArgs AircraftSpecifier
type LaunchAircraftArgs ¶
type ModifyFlightPlanArgs ¶
type ModifyFlightPlanArgs struct {
ControllerToken string
FlightPlanSpecifier sim.FlightPlanSpecifier
ACID sim.ACID
}
type NewSimConfiguration ¶
type NewSimConfiguration struct {
NewSimName string
GroupName string
ScenarioName string
ScenarioConfig *SimScenarioConfiguration
TFRs []av.TFR
TRACONName string
RequirePassword bool
Password string
EnforceUniqueCallsignSuffix bool
AllowInstructorRPO bool
Instructor bool
DisableTextToSpeech bool
StartTime time.Time
}
func MakeNewSimConfiguration ¶
func MakeNewSimConfiguration() NewSimConfiguration
type NewSimResult ¶
func (*NewSimResult) PruneForClient ¶
func (r *NewSimResult) PruneForClient()
PruneForClient tidies the NewSimResult, removing fields that are not used by client code in order to reduce the amount of bandwidth used to send the NewSimResult to the client.
type PointOutArgs ¶
type PrecipURLArgs ¶ added in v0.13.0
type RPCProvider ¶ added in v0.13.0
type RPCProvider struct {
// contains filtered or unexported fields
}
func (*RPCProvider) GetAtmosGrid ¶ added in v0.13.0
func (*RPCProvider) GetAvailableTimeIntervals ¶ added in v0.13.0
func (r *RPCProvider) GetAvailableTimeIntervals() []util.TimeInterval
func (*RPCProvider) GetPrecipURL ¶ added in v0.13.0
type RemoteSim ¶
type RemoteSim struct {
GroupName string
ScenarioName string
PrimaryController string
RequirePassword bool
AvailablePositions map[string]av.Controller
CoveredPositions map[string]av.Controller
}
type RemoteTTSProvider ¶
type RemoteTTSProvider struct {
// contains filtered or unexported fields
}
RemoteTTSProvider implements sim.TTSProvider by making RPC calls to a remote server
func NewRemoteTTSProvider ¶
func NewRemoteTTSProvider(serverAddress string, lg *log.Logger) (*RemoteTTSProvider, error)
NewRemoteTTSProvider creates a new RemoteTTSProvider that connects to the specified server
func (*RemoteTTSProvider) GetAllVoices ¶
func (r *RemoteTTSProvider) GetAllVoices() sim.TTSVoicesFuture
GetAllVoices returns all available voices from the remote server, cached after first call
func (*RemoteTTSProvider) TextToSpeech ¶
func (r *RemoteTTSProvider) TextToSpeech(voice sim.Voice, text string) sim.TTSSpeechFuture
TextToSpeech converts text to speech using the remote server
type RepositionTrackArgs ¶
type ResourcesWXProvider ¶ added in v0.13.0
type ResourcesWXProvider struct {
// contains filtered or unexported fields
}
ResourcesWXProvider implements the wx.Provider interface, providing information from the local resources directory (more or less intended for offline use of vice).
func (*ResourcesWXProvider) GetAtmosGrid ¶ added in v0.13.0
func (*ResourcesWXProvider) GetAvailableTimeIntervals ¶ added in v0.13.0
func (r *ResourcesWXProvider) GetAvailableTimeIntervals() []util.TimeInterval
func (*ResourcesWXProvider) GetPrecipURL ¶ added in v0.13.0
type RestrictionAreaArgs ¶
type RestrictionAreaArgs struct {
ControllerToken string
Index int
RestrictionArea av.RestrictionArea
}
type SendRouteCoordinatesArgs ¶ added in v0.13.0
type ServerLaunchConfig ¶
type SetLaunchConfigArgs ¶
type SetLaunchConfigArgs struct {
ControllerToken string
Config sim.LaunchConfig
}
type SetSimRateArgs ¶
type SetWaypointCommandsArgs ¶ added in v0.13.0
type SimBroadcastMessage ¶
type SimManager ¶
type SimManager struct {
// contains filtered or unexported fields
}
func NewSimManager ¶
func NewSimManager(scenarioGroups map[string]map[string]*scenarioGroup, simConfigurations map[string]map[string]*Configuration, manifests map[string]*sim.VideoMapManifest, serverAddress string, isLocal bool, lg *log.Logger) *SimManager
func (*SimManager) Add ¶
func (sm *SimManager) Add(session *simSession, result *NewSimResult, initialTCP string, instructor bool, prespawn bool, disableTextToSpeech bool) error
func (*SimManager) AddLocal ¶
func (sm *SimManager) AddLocal(sim *sim.Sim, result *NewSimResult) error
func (*SimManager) Broadcast ¶
func (sm *SimManager) Broadcast(m *SimBroadcastMessage, _ *struct{}) error
func (*SimManager) Connect ¶
func (sm *SimManager) Connect(version int, result *ConnectResult) error
func (*SimManager) ConnectToSim ¶
func (sm *SimManager) ConnectToSim(config *SimConnectionConfiguration, result *NewSimResult) error
func (*SimManager) GetAllVoices ¶
func (sm *SimManager) GetAllVoices(_ struct{}, voices *[]sim.Voice) error
GetAllVoices returns all available voices for TTS
func (*SimManager) GetAtmosGrid ¶ added in v0.13.0
func (sm *SimManager) GetAtmosGrid(args GetAtmosArgs, result *GetAtmosResult) error
func (*SimManager) GetAvailableWX ¶ added in v0.13.0
func (sm *SimManager) GetAvailableWX(unused int, result *[]util.TimeInterval) error
func (*SimManager) GetPrecipURL ¶ added in v0.13.0
func (sm *SimManager) GetPrecipURL(args PrecipURLArgs, result *PrecipURL) error
func (*SimManager) GetRunningSims ¶
func (sm *SimManager) GetRunningSims(_ int, result *map[string]*RemoteSim) error
func (*SimManager) GetSerializeSim ¶
func (sm *SimManager) GetSerializeSim(token string, s *sim.Sim) error
func (*SimManager) GetSimStatus ¶
func (sm *SimManager) GetSimStatus() []simStatus
func (*SimManager) GetStateUpdate ¶
func (sm *SimManager) GetStateUpdate(token string, update *sim.StateUpdate) error
func (*SimManager) GetTTSStats ¶
func (sm *SimManager) GetTTSStats() []ttsClientStats
func (*SimManager) GetTimeIntervals ¶ added in v0.13.0
func (sm *SimManager) GetTimeIntervals(_ struct{}, result *[]util.TimeInterval) error
func (*SimManager) HandleSpeechWSConnection ¶ added in v0.13.0
func (sm *SimManager) HandleSpeechWSConnection(w http.ResponseWriter, r *http.Request)
func (*SimManager) LookupController ¶
func (*SimManager) NewSim ¶
func (sm *SimManager) NewSim(config *NewSimConfiguration, result *NewSimResult) error
func (*SimManager) SignOff ¶
func (sm *SimManager) SignOff(token string) error
func (*SimManager) SimShouldExit ¶
func (sm *SimManager) SimShouldExit(sim *sim.Sim) bool
func (*SimManager) TextToSpeech ¶
func (sm *SimManager) TextToSpeech(req *TTSRequest, speechMp3 *[]byte) error
TextToSpeech converts text to speech and returns the audio data
func (*SimManager) UpdateTTSUsage ¶
func (sm *SimManager) UpdateTTSUsage(ip, text string) error
type SimScenarioConfiguration ¶
type SimScenarioConfiguration struct {
SelectedController string
SelectedSplit string
SplitConfigurations av.SplitConfigurationSet
PrimaryAirport string
MagneticVariation float32
WindSpecifier *wx.WindSpecifier
LaunchConfig sim.LaunchConfig
DepartureRunways []sim.DepartureRunway
ArrivalRunways []sim.ArrivalRunway
}
func (*SimScenarioConfiguration) AllAirports ¶ added in v0.13.0
func (s *SimScenarioConfiguration) AllAirports() []string
type TTSRequest ¶
type TTSRequest struct {
Voice sim.Voice
Text string
ClientIP string // Automatically populated by util.LoggingServerCodec
}
TTSRequest represents a text-to-speech request (shared between client and server)