ds

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: ISC Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NumberToMAC added in v0.1.2

func NumberToMAC(team, index int) net.HardwareAddr

NumberToMAC encodes the specified team number as a locally administered MAC addresses with the device index as specified.

Types

type ConfigureStep

type ConfigureStep func() error

A ConfigureStep performa various changes to the system to configure it.

type DriverStation

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

DriverStation binds all methods related to the driver station task, which is a complicated component consisting of service supervision, configuration, and all the normal components that make up a field server.

func New

func New(opts ...Option) *DriverStation

New returns a configured driverstation.

func (*DriverStation) Configure

func (ds *DriverStation) Configure() error

Configure installs configuration files into the correct locations to permit operation of the network components. It also restarts services as necessary.

func (*DriverStation) DieNow added in v0.1.2

func (ds *DriverStation) DieNow()

DieNow forces an immediate exit without cleaning up references. This may have side effects!

func (*DriverStation) Install

func (ds *DriverStation) Install() error

Install invokes xbps to install the necessary packages

func (*DriverStation) Run added in v0.0.12

func (ds *DriverStation) Run() error

Run starts up the processes that actually push control data, and if no external FMS is detected then it will also run the bare minimum of FMS services locally. The FMS detection happens once per startup, because every time the network link is cycled the DS process gets restarted.

func (*DriverStation) SetupBoot

func (ds *DriverStation) SetupBoot() error

SetupBoot installs the runtime hooks that startup the configuration jobs.

func (*DriverStation) Stop added in v0.0.12

func (ds *DriverStation) Stop()

Stop shuts down all the various components and requests the driver station to stop.

type FieldConfig added in v0.1.6

type FieldConfig struct {
	RadioMode    string
	RadioChannel string
	Field        int
	Location     string
}

FieldConfig contains information obtained from the field and is used to determine whether or not the driver's station needs to adjust its mode of operation.

type Option

type Option func(*DriverStation)

Option enables variadic configuration of the driver's station components.

func WithGSSConfig

func WithGSSConfig(cfg config.Config) Option

WithGSSConfig configures this driver station to use a particular GSS configuration set.

func WithLogger

func WithLogger(l hclog.Logger) Option

WithLogger configures the parent logging interface.

Jump to

Keyboard shortcuts

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