client

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LowLevelProtocol        = "XtraLib.Stream"
	LowLevelProtocolVersion = "0"
)
View Source
const (
	HighLevelProtocol        = "Tacview.RealTimeTelemetry"
	HighLevelProtocolVersion = "0"
)

Variables

This section is empty.

Functions

func IsAircraft added in v0.6.2

func IsAircraft(taglist []string) bool

func IsBullseye added in v0.6.2

func IsBullseye(taglist []string) bool

func IsRelevantObject added in v0.6.2

func IsRelevantObject(taglist []string) bool

func NewClient added in v0.6.2

func NewClient(
	updateInterval time.Duration,
) *client

Types

type Client

type Client interface {
	Run(context.Context, *sync.WaitGroup) error
	Stream(context.Context, *sync.WaitGroup, chan<- sim.Started, chan<- sim.Updated, chan<- sim.Faded)
	Bullseye(coalitions.Coalition) (orb.Point, error)
	Time() time.Time
}

type ClientHandshake added in v0.6.2

type ClientHandshake struct {
	LowLevelProtocolVersion  string
	HighLevelProtocolVersion string
	Hostname                 string
	PasswordHash             string
}

func DecodeClientHandshake added in v0.6.2

func DecodeClientHandshake(packet string) (*ClientHandshake, error)

func NewClientHandshake added in v0.6.2

func NewClientHandshake(hostname string, password string) (handshake *ClientHandshake)

func (*ClientHandshake) Encode added in v0.6.2

func (h *ClientHandshake) Encode() (packet string)

type FileReader added in v0.6.2

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

func NewFileClient

func NewFileClient(
	filePath string,
	updateInterval time.Duration,
) *FileReader

func (*FileReader) Bullseye added in v0.6.2

func (c *FileReader) Bullseye(coalition coalitions.Coalition) (orb.Point, error)

func (*FileReader) Run added in v0.6.2

func (r *FileReader) Run(ctx context.Context, wg *sync.WaitGroup) error

func (*FileReader) Stream added in v0.6.2

func (c *FileReader) Stream(ctx context.Context, wg *sync.WaitGroup, starts chan<- sim.Started, updates chan<- sim.Updated, fades chan<- sim.Faded)

func (*FileReader) Time added in v0.6.2

func (c *FileReader) Time() time.Time

type HostHandshake added in v0.6.2

type HostHandshake struct {
	LowLevelProtocolVersion  string
	HighLevelProtocolVersion string
	Hostname                 string
}

func DecodeHostHandshake added in v0.6.2

func DecodeHostHandshake(packet string) (HostHandshake, error)

func (*HostHandshake) Encode added in v0.6.2

func (h *HostHandshake) Encode() (packet string)

type TelemetryClient added in v0.6.2

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

func NewTelemetryClient

func NewTelemetryClient(
	address,
	clientHostname,
	password string,
	connectionTimeout time.Duration,
	updateInterval time.Duration,
) *TelemetryClient

func (*TelemetryClient) Bullseye added in v0.6.2

func (c *TelemetryClient) Bullseye(coalition coalitions.Coalition) (orb.Point, error)

func (*TelemetryClient) Run added in v0.6.2

func (*TelemetryClient) Stream added in v0.6.2

func (c *TelemetryClient) Stream(ctx context.Context, wg *sync.WaitGroup, starts chan<- sim.Started, updates chan<- sim.Updated, fades chan<- sim.Faded)

func (*TelemetryClient) Time added in v0.6.2

func (c *TelemetryClient) Time() time.Time

Jump to

Keyboard shortcuts

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