Documentation ¶
Overview ¶
Package controller implements high-level logic for Ground-Controlled Interception (GCI).
Index ¶
- type Call
- type Controller
- func (c *Controller) HandleAlphaCheck(ctx context.Context, request *brevity.AlphaCheckRequest)
- func (c *Controller) HandleBogeyDope(ctx context.Context, request *brevity.BogeyDopeRequest)
- func (c *Controller) HandleCheckIn(ctx context.Context, request *brevity.CheckInRequest)
- func (c *Controller) HandleDeclare(ctx context.Context, request *brevity.DeclareRequest)
- func (c *Controller) HandlePicture(ctx context.Context, request *brevity.PictureRequest)
- func (c *Controller) HandleRadioCheck(ctx context.Context, request *brevity.RadioCheckRequest)
- func (c *Controller) HandleShopping(ctx context.Context, request *brevity.ShoppingRequest)
- func (c *Controller) HandleSnaplock(ctx context.Context, request *brevity.SnaplockRequest)
- func (c *Controller) HandleSpiked(ctx context.Context, request *brevity.SpikedRequest)
- func (c *Controller) HandleTripwire(ctx context.Context, request *brevity.TripwireRequest)
- func (c *Controller) HandleUnableToUnderstand(ctx context.Context, request *brevity.UnableToUnderstandRequest)
- func (c *Controller) Run(ctx context.Context, calls chan<- Call)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller handles requests for GCI service.
func New ¶
func New( rdr *radar.Radar, srsClient simpleradio.Client, coalition coalitions.Coalition, enableAutomaticPicture bool, pictureBroadcastInterval time.Duration, enableThreatMonitoring bool, threatMonitoringCooldown time.Duration, threatMonitoringRequiresSRS bool, ) *Controller
New creates a new GCI controller.
func (*Controller) HandleAlphaCheck ¶
func (c *Controller) HandleAlphaCheck(ctx context.Context, request *brevity.AlphaCheckRequest)
HandleAlphaCheck handles an ALPHA CHECK by reporting the position of the requesting aircraft.
func (*Controller) HandleBogeyDope ¶
func (c *Controller) HandleBogeyDope(ctx context.Context, request *brevity.BogeyDopeRequest)
HandleBogeyDope handles a BOGEY DOPE by reporting the closest enemy group to the requesting aircraft.
func (*Controller) HandleCheckIn ¶ added in v0.12.0
func (c *Controller) HandleCheckIn(ctx context.Context, request *brevity.CheckInRequest)
HandleCheckIn handles an ambiguous CHECK IN by asking the player to clarify their call.
func (*Controller) HandleDeclare ¶
func (c *Controller) HandleDeclare(ctx context.Context, request *brevity.DeclareRequest)
HandleDeclare handles a DECLARE by reporting information about the target group.
func (*Controller) HandlePicture ¶
func (c *Controller) HandlePicture(ctx context.Context, request *brevity.PictureRequest)
HandlePicture handles a PICTURE by reporting a tactical air picture.
func (*Controller) HandleRadioCheck ¶
func (c *Controller) HandleRadioCheck(ctx context.Context, request *brevity.RadioCheckRequest)
HandleRadioCheck handles a RADIO CHECK by responding to the requesting aircraft.
func (*Controller) HandleShopping ¶ added in v0.10.0
func (c *Controller) HandleShopping(ctx context.Context, request *brevity.ShoppingRequest)
HandleShopping handles a SHOPPING request... by not implementing it, since it's not an air-to-air call!
func (*Controller) HandleSnaplock ¶
func (c *Controller) HandleSnaplock(ctx context.Context, request *brevity.SnaplockRequest)
HandleSnaplock handles a SNAPLOCK by reporting information about the target group.
func (*Controller) HandleSpiked ¶
func (c *Controller) HandleSpiked(ctx context.Context, request *brevity.SpikedRequest)
HandleSpiked handles a SPIKED request by reporting any enemy groups in the direction of the radar spike.
func (*Controller) HandleTripwire ¶
func (c *Controller) HandleTripwire(ctx context.Context, request *brevity.TripwireRequest)
HandleTripwire handles a TRIPWIRE... by not implementing it LOL!
func (*Controller) HandleUnableToUnderstand ¶
func (c *Controller) HandleUnableToUnderstand(ctx context.Context, request *brevity.UnableToUnderstandRequest)
HandleUnableToUnderstand handles requests where the wake word was recognized but the request could not be understood, by asking players on the channel to repeat their message.