wrapper

package
v0.0.0-...-175a4df Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string, other map[string]interface{}, err error) api.Vehicle

New creates a new Vehicle

Types

type Wrapper

type Wrapper struct {
	Features_ []api.Feature
	// contains filtered or unexported fields
}

Wrapper wraps an api.Vehicle to capture initialization errors

func (*Wrapper) Capacity

func (v *Wrapper) Capacity() float64

Capacity implements the api.Vehicle interface

func (*Wrapper) Error

func (v *Wrapper) Error() string

Error returns the initialization error

func (*Wrapper) Features

func (v *Wrapper) Features() []api.Feature

Features implements the api.FeatureDescriber interface

func (*Wrapper) Icon

func (v *Wrapper) Icon() string

Icon implements the api.Vehicle interface

func (*Wrapper) Identifiers

func (v *Wrapper) Identifiers() []string

Identifiers implements the api.Vehicle interface

func (*Wrapper) OnIdentified

func (v *Wrapper) OnIdentified() api.ActionConfig

OnIdentified implements the api.Vehicle interface

func (*Wrapper) Phases

func (v *Wrapper) Phases() int

Phases implements the api.Vehicle interface

func (*Wrapper) SetTitle

func (v *Wrapper) SetTitle(title string)

SetTitle implements the api.TitleSetter interface

func (*Wrapper) Soc

func (v *Wrapper) Soc() (float64, error)

Soc implements the api.Battery interface

func (*Wrapper) Title

func (v *Wrapper) Title() string

Title implements the api.Vehicle interface

Jump to

Keyboard shortcuts

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