sensors

package
v0.0.0-...-2f1770f Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BatteryModel = resource.NewModel("viamlabs", "ros", "yahboombattery")
View Source
var EditionModel = resource.NewModel("viamlabs", "ros", "yahboomedition")

Functions

func NewBatterySensor

func NewBatterySensor(
	ctx context.Context,
	deps resource.Dependencies,
	conf resource.Config,
	logger golog.Logger,
) (sensor.Sensor, error)

func NewEditionSensor

func NewEditionSensor(
	ctx context.Context,
	deps resource.Dependencies,
	conf resource.Config,
	logger golog.Logger,
) (sensor.Sensor, error)

Types

type BatterySensor

type BatterySensor struct {
	resource.Named
	// contains filtered or unexported fields
}

func (*BatterySensor) Close

func (b *BatterySensor) Close(_ context.Context) error

func (*BatterySensor) Readings

func (b *BatterySensor) Readings(
	_ context.Context,
	_ map[string]interface{},
) (map[string]interface{}, error)

func (*BatterySensor) Reconfigure

func (b *BatterySensor) Reconfigure(
	_ context.Context,
	_ resource.Dependencies,
	conf resource.Config,
) error

type BatterySensorConfig

type BatterySensorConfig struct {
	NodeName   string `json:"node_name"`
	PrimaryUri string `json:"primary_uri"`
	Topic      string `json:"topic"`
}

func (*BatterySensorConfig) Validate

func (cfg *BatterySensorConfig) Validate(path string) ([]string, error)

type EditionSensor

type EditionSensor struct {
	resource.Named
	// contains filtered or unexported fields
}

func (*EditionSensor) Close

func (e *EditionSensor) Close(_ context.Context) error

func (*EditionSensor) Readings

func (e *EditionSensor) Readings(
	_ context.Context,
	_ map[string]interface{},
) (map[string]interface{}, error)

func (*EditionSensor) Reconfigure

func (e *EditionSensor) Reconfigure(
	_ context.Context,
	_ resource.Dependencies,
	conf resource.Config,
) error

type EditionSensorConfig

type EditionSensorConfig struct {
	NodeName   string `json:"node_name"`
	PrimaryUri string `json:"primary_uri"`
	Topic      string `json:"topic"`
}

func (*EditionSensorConfig) Validate

func (cfg *EditionSensorConfig) Validate(path string) ([]string, error)

Jump to

Keyboard shortcuts

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