Documentation ¶
Index ¶
- Constants
- Variables
- func Keys[K comparable, V any](m map[K]V) []K
- type CallHook
- type PostFunction
- type Pubsub
- type Wattpilot
- func (w *Wattpilot) Alias() []string
- func (w *Wattpilot) Connect() error
- func (w *Wattpilot) Disconnect()
- func (w *Wattpilot) GetCarIdentifier() (string, error)
- func (w *Wattpilot) GetCurrents() (float64, float64, float64, error)
- func (w *Wattpilot) GetHost() string
- func (w *Wattpilot) GetName() string
- func (w *Wattpilot) GetNotifications(prop string) <-chan interface{}
- func (w *Wattpilot) GetPower() (float64, error)
- func (w *Wattpilot) GetProperty(name string) (interface{}, error)
- func (w *Wattpilot) GetRFID() (string, error)
- func (w *Wattpilot) GetSerial() string
- func (w *Wattpilot) GetVoltages() (float64, float64, float64, error)
- func (w *Wattpilot) IsInitialized() bool
- func (w *Wattpilot) LookupAlias(name string) string
- func (w *Wattpilot) ParseLogLevel(level string) error
- func (w *Wattpilot) Properties() []string
- func (w *Wattpilot) RequestStatusUpdate() error
- func (w *Wattpilot) SetCurrent(current float64) error
- func (w *Wattpilot) SetLogLevel(level logrus.Level)
- func (w *Wattpilot) SetLogger(delegate func(string, string))
- func (w *Wattpilot) SetProperty(name string, value interface{}) error
- func (w *Wattpilot) StatusInfo()
Constants ¶
View Source
const ( ContextTimeout = 30 // seconds ReconnectTimeout = 5 // seconds )
Variables ¶
View Source
var PostProcess = map[string]struct { key string f PostFunction }{ "voltage1": {"nrg", voltage1Process}, "voltage2": {"nrg", voltage2Process}, "voltage3": {"nrg", voltage3Process}, "voltageN": {"nrg", voltageNProcess}, "amps1": {"nrg", amps1Process}, "amps2": {"nrg", amps2Process}, "amps3": {"nrg", amps3Process}, "power1": {"nrg", power1Process}, "power2": {"nrg", power2Process}, "power3": {"nrg", power3Process}, "powerM": {"nrg", powerNProcess}, "power": {"nrg", powerProcess}, }
Functions ¶
func Keys ¶ added in v1.6.1
func Keys[K comparable, V any](m map[K]V) []K
Types ¶
type PostFunction ¶
type Wattpilot ¶
type Wattpilot struct {
// contains filtered or unexported fields
}
func (*Wattpilot) Disconnect ¶ added in v1.2.0
func (w *Wattpilot) Disconnect()
func (*Wattpilot) GetCarIdentifier ¶ added in v1.6.0
func (*Wattpilot) GetCurrents ¶
func (*Wattpilot) GetNotifications ¶ added in v1.3.0
func (*Wattpilot) GetProperty ¶
func (*Wattpilot) GetVoltages ¶ added in v1.1.1
func (*Wattpilot) IsInitialized ¶
func (*Wattpilot) LookupAlias ¶ added in v1.1.2
func (*Wattpilot) ParseLogLevel ¶ added in v1.4.0
func (*Wattpilot) Properties ¶ added in v1.1.2
func (*Wattpilot) RequestStatusUpdate ¶ added in v1.6.3
func (*Wattpilot) SetCurrent ¶
func (*Wattpilot) SetLogLevel ¶ added in v1.4.0
func (*Wattpilot) SetProperty ¶
func (*Wattpilot) StatusInfo ¶
func (w *Wattpilot) StatusInfo()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.