system

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutCameraSystem added in v0.0.8

func PutCameraSystem(ctx context.Context, store datastore.Store, system *CameraSystem) error

PutCameraSystem puts a CameraSystem and all of its components into the datastore.

func PutRigSystem

func PutRigSystem(ctx context.Context, store datastore.Store, system *RigSystem) error

Put puts a RigSystem and all of its components into the datastore.

func WithActuators

func WithActuators(actuators ...*model.ActuatorV2) func(any) error

WithActuators is a functional option that adds the passed actuators to the RigSystem.

func WithLocation

func WithLocation(lat, long float64) func(any) error

WithLocation is a functional option which sets the latitude and longitude.

func WithPeripherals

func WithPeripherals(peripherals ...*model.Device) func(any) error

WithPeripherals is a functional option that adds the passed peripherals to the RigSystem.

func WithRigSystemDefaults

func WithRigSystemDefaults() func(any) error

WithRigSystemDefaults is a functional option that uses all of the current defaults for a rig system.

func WithSensors

func WithSensors(sensors ...*model.SensorV2) func(any) error

WithSensors is a functional option that adds the passed sensors to the RigSystem.

func WithVariables

func WithVariables(variables ...*model.Variable) func(any) error

WithVariables is a functional option that adds the passed variables to the RigSystem.

func WithWifi

func WithWifi(ssid, pass string) func(any) error

WithWifi is a functional option that sets the wifi name and password for a device.

Types

type CameraSystem added in v0.0.8

type CameraSystem struct {
	Cam  *model.Device
	Vars []*model.Variable
}

CameraSystem contains a camera device and the associated variables.

func NewCamera added in v0.0.8

func NewCamera(skey, dkey int64, name string, mac string, opts ...Option) (*CameraSystem, error)

NewCamera returns a new camera with the given name and mac address, with the given options applied.

func (*CameraSystem) AddVariables added in v0.0.8

func (sys *CameraSystem) AddVariables(variables ...*model.Variable)

AddVariables adds the associated variables to the system.

func (*CameraSystem) SetLocation added in v0.0.8

func (sys *CameraSystem) SetLocation(lat, long float64)

SetLocation sets the location fields of the camera.

func (*CameraSystem) SetWifi added in v0.0.8

func (sys *CameraSystem) SetWifi(ssid, pass string)

SetWifi sets the wifi field of the camera.

type Option

type Option func(any) error

Option represents functional options that can be passed to NewRigSystem.

func WithCameraDefaults added in v0.0.8

func WithCameraDefaults() Option

WithCameraDefaults applies all of the current defaults to the system.

type RigSystem

type RigSystem struct {
	Controller  model.Device
	Variables   []*model.Variable
	Sensors     []*model.SensorV2
	Actuators   []*model.ActuatorV2
	Peripherals []*model.Device
}

RigSystem represents a controller device which has associated variables, sensors, acuators, and peripherals.

func NewRigSystem

func NewRigSystem(skey, dkey int64, MAC, name string, options ...Option) (*RigSystem, error)

NewRigSystem returns a new RigSystem with the given options. It is the callers responsibility to put the components into the datastore.

dkey, MAC and name refer to the device key, MAC Address and name of the Controller which will be the heart of the RigSystem.

func (*RigSystem) AddVariables

func (sys *RigSystem) AddVariables(variables ...*model.Variable)

addVariables adds variables to the rig system controller. This implements the variableHolder interface.

func (*RigSystem) SetLocation

func (sys *RigSystem) SetLocation(lat, long float64)

SetLocation adds the location of the system to the system controller, as well as any defined peripherals.

func (*RigSystem) SetWifi

func (sys *RigSystem) SetWifi(ssid, pass string)

SetWifi adds the wifi name and password to the rig system Controller. This implements the wifiHolder interface.

Directories

Path Synopsis
package camera defines the default values for camera variables.
package camera defines the default values for camera variables.

Jump to

Keyboard shortcuts

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