Documentation ¶
Overview ¶
package dcs provides a client for the DCS-gRPC server. This client can be used to query and manipulate the sim.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfiguration ¶
ClientConfiguration configures the DCS-gRPC client.
type DCSClient ¶
type DCSClient interface { // WorldClient returns a WorldServiceClient, which can be used to query the sim world state. This includes the theatre name, airbases, and map markers. WorldClient() world.WorldServiceClient // MissionClient returns a MissionServiceClient, which can be used to query and manipulate the mission scenario. This includes commands to manipulate the Communications menu. MissionClient() mission.MissionServiceClient // CoalitionClient returns a CoalitionServiceClient, which can be used to query coalition data. This includes the bullseye, groups and player units on the blue and red coalitions. CoalitionClient() coalition.CoalitionServiceClient // GroupClient returns a GroupServiceClient, which can be used to query the units within a group. GroupClient() group.GroupServiceClient // UnitClient returns a UnitServiceClient, which can be used to query a unit's name, description and position. UnitClient() unit.UnitServiceClient // Close closes the DCS-gRPC client connection. This is anti-idomatic Go and should be refactored... Close() error }
DCSClient wraps the DCS-gRPC client.
func NewDCSClient ¶
func NewDCSClient(ctx context.Context, config ClientConfiguration) (DCSClient, error)
type Sim ¶
type Sim interface { // Stream aircraft updates from the sim to the provided channels. // The first channel receives updates for active aircraft. // The second channel receives messages when an aircraft disappears. // This function blocks until the context is cancelled. Stream(context.Context, chan<- Updated, chan<- Faded) error // Bullseye returns the coalition's bullseye center. Bullseye(context.Context) (*orb.Point, error) }
func NewSim ¶
func NewSim(missionClient mission.MissionServiceClient, coalitionClient coalition.CoalitionServiceClient, coalition common.Coalition) Sim
Click to show internal directories.
Click to hide internal directories.