Documentation ¶
Overview ¶
Package api is a generated GoMock package.
Index ¶
- Constants
- Variables
- func BatteryModeStrings() []string
- func FeatureStrings() []string
- func TariffTypeStrings() []string
- type ActionConfig
- type AuthProvider
- type Authorizer
- type Battery
- type BatteryCapacity
- type BatteryController
- type BatteryMode
- type ChargeController
- type ChargeMode
- type ChargeRater
- type ChargeState
- type ChargeStatus
- type ChargeTimer
- type Charger
- type ChargerEx
- type Circuit
- type CircuitLoad
- type CircuitMeasurements
- type CsvWriter
- type CurrentController
- type CurrentGetter
- type CurrentLimiter
- type Diagnosis
- type Feature
- type FeatureDescriber
- type IconDescriber
- type Identifier
- type Meter
- type MeterEnergy
- type MockBattery
- type MockBatteryController
- type MockBatteryControllerMockRecorder
- type MockBatteryMockRecorder
- type MockChargeRater
- type MockChargeRaterMockRecorder
- type MockChargeState
- type MockChargeStateMockRecorder
- type MockCharger
- type MockChargerMockRecorder
- type MockCircuit
- func (m *MockCircuit) EXPECT() *MockCircuitMockRecorder
- func (m *MockCircuit) GetChargePower() float64
- func (m *MockCircuit) GetMaxCurrent() float64
- func (m *MockCircuit) GetMaxPhaseCurrent() float64
- func (m *MockCircuit) GetMaxPower() float64
- func (m *MockCircuit) GetParent() Circuit
- func (m *MockCircuit) GetTitle() string
- func (m *MockCircuit) HasMeter() bool
- func (m *MockCircuit) RegisterChild(arg0 Circuit)
- func (m *MockCircuit) SetMaxCurrent(arg0 float64)
- func (m *MockCircuit) SetMaxPower(arg0 float64)
- func (m *MockCircuit) SetTitle(arg0 string)
- func (m *MockCircuit) Update(arg0 []CircuitLoad) error
- func (m *MockCircuit) ValidateCurrent(arg0, arg1 float64) float64
- func (m *MockCircuit) ValidatePower(arg0, arg1 float64) float64
- type MockCircuitMockRecorder
- func (mr *MockCircuitMockRecorder) GetChargePower() *gomock.Call
- func (mr *MockCircuitMockRecorder) GetMaxCurrent() *gomock.Call
- func (mr *MockCircuitMockRecorder) GetMaxPhaseCurrent() *gomock.Call
- func (mr *MockCircuitMockRecorder) GetMaxPower() *gomock.Call
- func (mr *MockCircuitMockRecorder) GetParent() *gomock.Call
- func (mr *MockCircuitMockRecorder) GetTitle() *gomock.Call
- func (mr *MockCircuitMockRecorder) HasMeter() *gomock.Call
- func (mr *MockCircuitMockRecorder) RegisterChild(arg0 any) *gomock.Call
- func (mr *MockCircuitMockRecorder) SetMaxCurrent(arg0 any) *gomock.Call
- func (mr *MockCircuitMockRecorder) SetMaxPower(arg0 any) *gomock.Call
- func (mr *MockCircuitMockRecorder) SetTitle(arg0 any) *gomock.Call
- func (mr *MockCircuitMockRecorder) Update(arg0 any) *gomock.Call
- func (mr *MockCircuitMockRecorder) ValidateCurrent(arg0, arg1 any) *gomock.Call
- func (mr *MockCircuitMockRecorder) ValidatePower(arg0, arg1 any) *gomock.Call
- type MockCurrentGetter
- type MockCurrentGetterMockRecorder
- type MockCurrentLimiter
- type MockCurrentLimiterMockRecorder
- type MockIdentifier
- type MockIdentifierMockRecorder
- type MockMeter
- type MockMeterEnergy
- type MockMeterEnergyMockRecorder
- type MockMeterMockRecorder
- type MockPhaseCurrents
- type MockPhaseCurrentsMockRecorder
- type MockPhaseGetter
- type MockPhaseGetterMockRecorder
- type MockPhaseSwitcher
- type MockPhaseSwitcherMockRecorder
- type MockTariff
- type MockTariffMockRecorder
- type MockVehicle
- func (m *MockVehicle) Capacity() float64
- func (m *MockVehicle) EXPECT() *MockVehicleMockRecorder
- func (m *MockVehicle) Features() []Feature
- func (m *MockVehicle) Icon() string
- func (m *MockVehicle) Identifiers() []string
- func (m *MockVehicle) OnIdentified() ActionConfig
- func (m *MockVehicle) Phases() int
- func (m *MockVehicle) SetTitle(arg0 string)
- func (m *MockVehicle) Soc() (float64, error)
- func (m *MockVehicle) Title() string
- type MockVehicleMockRecorder
- func (mr *MockVehicleMockRecorder) Capacity() *gomock.Call
- func (mr *MockVehicleMockRecorder) Features() *gomock.Call
- func (mr *MockVehicleMockRecorder) Icon() *gomock.Call
- func (mr *MockVehicleMockRecorder) Identifiers() *gomock.Call
- func (mr *MockVehicleMockRecorder) OnIdentified() *gomock.Call
- func (mr *MockVehicleMockRecorder) Phases() *gomock.Call
- func (mr *MockVehicleMockRecorder) SetTitle(arg0 any) *gomock.Call
- func (mr *MockVehicleMockRecorder) Soc() *gomock.Call
- func (mr *MockVehicleMockRecorder) Title() *gomock.Call
- type PhaseCurrents
- type PhaseDescriber
- type PhaseGetter
- type PhasePowers
- type PhaseSwitcher
- type PhaseVoltages
- type Rate
- type Rates
- type Resurrector
- type SocLimiter
- type Tariff
- type TariffType
- type Vehicle
- type VehicleClimater
- type VehicleFinishTimer
- type VehicleOdometer
- type VehiclePosition
- type VehicleRange
Constants ¶
const Custom = "custom"
Custom meter/charger/vehicle type
Variables ¶
var ErrAsleep error = errAsleep{}
ErrAsleep indicates that vehicle is asleep. Caller may chose to wake up the vehicle and retry.
var ErrMissingCredentials = errors.New("missing credentials")
ErrMissingCredentials indicates that user/password are missing
var ErrMustRetry = errors.New("must retry")
ErrMustRetry indicates that a rate-limited operation should be retried
var ErrNotAvailable = errors.New("not available")
ErrNotAvailable indicates that a feature is not available
var ErrOutdated = errors.New("outdated")
ErrOutdated indicates that result is outdated
var ErrSponsorRequired = errors.New("sponsorship required, see https://github.com/madmat17/evcc-delta-smart#sponsorship")
ErrSponsorRequired indicates that a sponsor token is required
var ErrTimeout error = errTimeoutError{}
ErrTimeout is the error returned when a timeout happened. Modeled after context.DeadlineError
var StatusEasA = map[ChargeStatus]ChargeStatus{StatusE: StatusA}
Functions ¶
func BatteryModeStrings ¶
func BatteryModeStrings() []string
BatteryModeStrings returns a slice of all String values of the enum
func FeatureStrings ¶
func FeatureStrings() []string
FeatureStrings returns a slice of all String values of the enum
func TariffTypeStrings ¶
func TariffTypeStrings() []string
TariffTypeStrings returns a slice of all String values of the enum
Types ¶
type ActionConfig ¶
type ActionConfig struct { Mode ChargeMode `mapstructure:"mode,omitempty"` // Charge Mode Priority int `mapstructure:"priority,omitempty"` // Priority MinCurrent float64 `mapstructure:"minCurrent,omitempty"` // Minimum Current MaxCurrent float64 `mapstructure:"maxCurrent,omitempty"` // Maximum Current }
ActionConfig defines an action to take on event
func (ActionConfig) GetMaxCurrent ¶
func (a ActionConfig) GetMaxCurrent() (float64, bool)
func (ActionConfig) GetMinCurrent ¶
func (a ActionConfig) GetMinCurrent() (float64, bool)
func (ActionConfig) GetMode ¶
func (a ActionConfig) GetMode() (ChargeMode, bool)
func (ActionConfig) GetPriority ¶
func (a ActionConfig) GetPriority() (int, bool)
func (ActionConfig) String ¶
func (a ActionConfig) String() string
String implements Stringer and returns the ActionConfig as comma-separated key:value string
type AuthProvider ¶
type AuthProvider interface { SetCallbackParams(baseURL, redirectURL string, authenticated chan<- bool) LoginHandler() http.HandlerFunc LogoutHandler() http.HandlerFunc }
AuthProvider is the ability to provide OAuth authentication through the ui
type Authorizer ¶
Authorizer authorizes a charging session by supplying RFID credentials
type BatteryCapacity ¶
type BatteryCapacity interface {
Capacity() float64
}
BatteryCapacity provides a capacity in kWh
type BatteryController ¶
type BatteryController interface {
SetBatteryMode(BatteryMode) error
}
BatteryController optionally allows to control home battery (dis)charging behaviour
type BatteryMode ¶
type BatteryMode int
BatteryMode is the home battery operation mode. Valid values are normal, locked and charge
const ( BatteryUnknown BatteryMode = iota BatteryNormal BatteryHold BatteryCharge )
func BatteryModeString ¶
func BatteryModeString(s string) (BatteryMode, error)
BatteryModeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func BatteryModeValues ¶
func BatteryModeValues() []BatteryMode
BatteryModeValues returns all values of the enum
func (BatteryMode) IsABatteryMode ¶
func (i BatteryMode) IsABatteryMode() bool
IsABatteryMode returns "true" if the value is listed in the enum definition. "false" otherwise
func (BatteryMode) String ¶
func (i BatteryMode) String() string
type ChargeController ¶
ChargeController allows to start/stop the charging session on the vehicle side
type ChargeMode ¶
type ChargeMode string
ChargeMode is the charge operation mode. Valid values are off, now, minpv and pv
const ( ModeEmpty ChargeMode = "" ModeOff ChargeMode = "off" ModeNow ChargeMode = "now" ModeMinPV ChargeMode = "minpv" ModePV ChargeMode = "pv" )
Charge modes
func ChargeModeString ¶
func ChargeModeString(mode string) (ChargeMode, error)
ChargeModeString converts string to ChargeMode
func (*ChargeMode) UnmarshalText ¶
func (c *ChargeMode) UnmarshalText(text []byte) error
type ChargeRater ¶
ChargeRater provides charged energy amount in kWh
type ChargeState ¶
type ChargeState interface {
Status() (ChargeStatus, error)
}
ChargeState provides current charging status
type ChargeStatus ¶
type ChargeStatus string
ChargeStatus is the EV's charging status from A to F
const ( StatusNone ChargeStatus = "" StatusA ChargeStatus = "A" // Fzg. angeschlossen: nein Laden aktiv: nein Ladestation betriebsbereit, Fahrzeug getrennt StatusB ChargeStatus = "B" // Fzg. angeschlossen: ja Laden aktiv: nein Fahrzeug verbunden, Netzspannung liegt nicht an StatusC ChargeStatus = "C" // Fzg. angeschlossen: ja Laden aktiv: ja Fahrzeug lädt, Netzspannung liegt an StatusD ChargeStatus = "D" // Fzg. angeschlossen: ja Laden aktiv: ja Fahrzeug lädt mit externer Belüfungsanforderung (für Blei-Säure-Batterien) StatusE ChargeStatus = "E" // Fzg. angeschlossen: ja Laden aktiv: nein Fehler Fahrzeug / Kabel (CP-Kurzschluss, 0V) StatusF ChargeStatus = "F" // Fzg. angeschlossen: ja Laden aktiv: nein Fehler EVSE oder Abstecken simulieren (CP-Wake-up, -12V) )
Charging states
func ChargeStatusString ¶
func ChargeStatusString(status string) (ChargeStatus, error)
ChargeStatusString converts a string to ChargeStatus
func ChargeStatusStringWithMapping ¶
func ChargeStatusStringWithMapping(s string, m map[ChargeStatus]ChargeStatus) (ChargeStatus, error)
ChargeStatusStringWithMapping converts a string to ChargeStatus. In case of error, mapping is applied.
type ChargeTimer ¶
ChargeTimer provides current charge cycle duration
type Charger ¶
type Charger interface { ChargeState Enabled() (bool, error) Enable(enable bool) error CurrentController }
Charger provides current charging status and enable/disable charging
type Circuit ¶
type Circuit interface { CircuitMeasurements GetTitle() string SetTitle(string) GetParent() Circuit RegisterChild(child Circuit) HasMeter() bool GetMaxPower() float64 GetMaxCurrent() float64 SetMaxPower(float64) SetMaxCurrent(float64) Update([]CircuitLoad) error ValidateCurrent(old, new float64) float64 ValidatePower(old, new float64) float64 }
Circuit defines the load control domain
type CircuitLoad ¶
type CircuitLoad interface { CircuitMeasurements GetCircuit() Circuit }
CircuitLoad represents a loadpoint attached to a circuit
type CircuitMeasurements ¶
CircuitMeasurements is the measurements a circuit or load must deliver
type CurrentController ¶
CurrentController provides settings charging maximum charging current
type CurrentGetter ¶
CurrentGetter provides getting charging maximum charging current for validation
type CurrentLimiter ¶
CurrentLimiter returns the current limits
type Diagnosis ¶
type Diagnosis interface {
Diagnose()
}
Diagnosis is a helper interface that allows to dump diagnostic data to console
type Feature ¶
type Feature int
const ( Offline Feature CoarseCurrent IntegratedDevice Heating Retryable )
func FeatureString ¶
FeatureString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Feature) IsAFeature ¶
IsAFeature returns "true" if the value is listed in the enum definition. "false" otherwise
func (Feature) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Feature
func (*Feature) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Feature
type FeatureDescriber ¶
type FeatureDescriber interface {
Features() []Feature
}
FeatureDescriber optionally provides a list of supported non-api features
type IconDescriber ¶
type IconDescriber interface {
Icon() string
}
IconDescriber optionally provides an icon
type Identifier ¶
Identifier identifies a vehicle and is implemented by the charger
type MeterEnergy ¶
MeterEnergy provides total energy in kWh
type MockBattery ¶
type MockBattery struct {
// contains filtered or unexported fields
}
MockBattery is a mock of Battery interface.
func NewMockBattery ¶
func NewMockBattery(ctrl *gomock.Controller) *MockBattery
NewMockBattery creates a new mock instance.
func (*MockBattery) EXPECT ¶
func (m *MockBattery) EXPECT() *MockBatteryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockBatteryController ¶
type MockBatteryController struct {
// contains filtered or unexported fields
}
MockBatteryController is a mock of BatteryController interface.
func NewMockBatteryController ¶
func NewMockBatteryController(ctrl *gomock.Controller) *MockBatteryController
NewMockBatteryController creates a new mock instance.
func (*MockBatteryController) EXPECT ¶
func (m *MockBatteryController) EXPECT() *MockBatteryControllerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBatteryController) SetBatteryMode ¶
func (m *MockBatteryController) SetBatteryMode(arg0 BatteryMode) error
SetBatteryMode mocks base method.
type MockBatteryControllerMockRecorder ¶
type MockBatteryControllerMockRecorder struct {
// contains filtered or unexported fields
}
MockBatteryControllerMockRecorder is the mock recorder for MockBatteryController.
func (*MockBatteryControllerMockRecorder) SetBatteryMode ¶
func (mr *MockBatteryControllerMockRecorder) SetBatteryMode(arg0 any) *gomock.Call
SetBatteryMode indicates an expected call of SetBatteryMode.
type MockBatteryMockRecorder ¶
type MockBatteryMockRecorder struct {
// contains filtered or unexported fields
}
MockBatteryMockRecorder is the mock recorder for MockBattery.
func (*MockBatteryMockRecorder) Soc ¶
func (mr *MockBatteryMockRecorder) Soc() *gomock.Call
Soc indicates an expected call of Soc.
type MockChargeRater ¶
type MockChargeRater struct {
// contains filtered or unexported fields
}
MockChargeRater is a mock of ChargeRater interface.
func NewMockChargeRater ¶
func NewMockChargeRater(ctrl *gomock.Controller) *MockChargeRater
NewMockChargeRater creates a new mock instance.
func (*MockChargeRater) ChargedEnergy ¶
func (m *MockChargeRater) ChargedEnergy() (float64, error)
ChargedEnergy mocks base method.
func (*MockChargeRater) EXPECT ¶
func (m *MockChargeRater) EXPECT() *MockChargeRaterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockChargeRaterMockRecorder ¶
type MockChargeRaterMockRecorder struct {
// contains filtered or unexported fields
}
MockChargeRaterMockRecorder is the mock recorder for MockChargeRater.
func (*MockChargeRaterMockRecorder) ChargedEnergy ¶
func (mr *MockChargeRaterMockRecorder) ChargedEnergy() *gomock.Call
ChargedEnergy indicates an expected call of ChargedEnergy.
type MockChargeState ¶
type MockChargeState struct {
// contains filtered or unexported fields
}
MockChargeState is a mock of ChargeState interface.
func NewMockChargeState ¶
func NewMockChargeState(ctrl *gomock.Controller) *MockChargeState
NewMockChargeState creates a new mock instance.
func (*MockChargeState) EXPECT ¶
func (m *MockChargeState) EXPECT() *MockChargeStateMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockChargeState) Status ¶
func (m *MockChargeState) Status() (ChargeStatus, error)
Status mocks base method.
type MockChargeStateMockRecorder ¶
type MockChargeStateMockRecorder struct {
// contains filtered or unexported fields
}
MockChargeStateMockRecorder is the mock recorder for MockChargeState.
func (*MockChargeStateMockRecorder) Status ¶
func (mr *MockChargeStateMockRecorder) Status() *gomock.Call
Status indicates an expected call of Status.
type MockCharger ¶
type MockCharger struct {
// contains filtered or unexported fields
}
MockCharger is a mock of Charger interface.
func NewMockCharger ¶
func NewMockCharger(ctrl *gomock.Controller) *MockCharger
NewMockCharger creates a new mock instance.
func (*MockCharger) EXPECT ¶
func (m *MockCharger) EXPECT() *MockChargerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCharger) Enable ¶
func (m *MockCharger) Enable(arg0 bool) error
Enable mocks base method.
func (*MockCharger) Enabled ¶
func (m *MockCharger) Enabled() (bool, error)
Enabled mocks base method.
func (*MockCharger) MaxCurrent ¶
func (m *MockCharger) MaxCurrent(arg0 int64) error
MaxCurrent mocks base method.
func (*MockCharger) Status ¶
func (m *MockCharger) Status() (ChargeStatus, error)
Status mocks base method.
type MockChargerMockRecorder ¶
type MockChargerMockRecorder struct {
// contains filtered or unexported fields
}
MockChargerMockRecorder is the mock recorder for MockCharger.
func (*MockChargerMockRecorder) Enable ¶
func (mr *MockChargerMockRecorder) Enable(arg0 any) *gomock.Call
Enable indicates an expected call of Enable.
func (*MockChargerMockRecorder) Enabled ¶
func (mr *MockChargerMockRecorder) Enabled() *gomock.Call
Enabled indicates an expected call of Enabled.
func (*MockChargerMockRecorder) MaxCurrent ¶
func (mr *MockChargerMockRecorder) MaxCurrent(arg0 any) *gomock.Call
MaxCurrent indicates an expected call of MaxCurrent.
func (*MockChargerMockRecorder) Status ¶
func (mr *MockChargerMockRecorder) Status() *gomock.Call
Status indicates an expected call of Status.
type MockCircuit ¶
type MockCircuit struct {
// contains filtered or unexported fields
}
MockCircuit is a mock of Circuit interface.
func NewMockCircuit ¶
func NewMockCircuit(ctrl *gomock.Controller) *MockCircuit
NewMockCircuit creates a new mock instance.
func (*MockCircuit) EXPECT ¶
func (m *MockCircuit) EXPECT() *MockCircuitMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCircuit) GetChargePower ¶
func (m *MockCircuit) GetChargePower() float64
GetChargePower mocks base method.
func (*MockCircuit) GetMaxCurrent ¶
func (m *MockCircuit) GetMaxCurrent() float64
GetMaxCurrent mocks base method.
func (*MockCircuit) GetMaxPhaseCurrent ¶
func (m *MockCircuit) GetMaxPhaseCurrent() float64
GetMaxPhaseCurrent mocks base method.
func (*MockCircuit) GetMaxPower ¶
func (m *MockCircuit) GetMaxPower() float64
GetMaxPower mocks base method.
func (*MockCircuit) GetParent ¶
func (m *MockCircuit) GetParent() Circuit
GetParent mocks base method.
func (*MockCircuit) RegisterChild ¶
func (m *MockCircuit) RegisterChild(arg0 Circuit)
RegisterChild mocks base method.
func (*MockCircuit) SetMaxCurrent ¶
func (m *MockCircuit) SetMaxCurrent(arg0 float64)
SetMaxCurrent mocks base method.
func (*MockCircuit) SetMaxPower ¶
func (m *MockCircuit) SetMaxPower(arg0 float64)
SetMaxPower mocks base method.
func (*MockCircuit) SetTitle ¶
func (m *MockCircuit) SetTitle(arg0 string)
SetTitle mocks base method.
func (*MockCircuit) Update ¶
func (m *MockCircuit) Update(arg0 []CircuitLoad) error
Update mocks base method.
func (*MockCircuit) ValidateCurrent ¶
func (m *MockCircuit) ValidateCurrent(arg0, arg1 float64) float64
ValidateCurrent mocks base method.
func (*MockCircuit) ValidatePower ¶
func (m *MockCircuit) ValidatePower(arg0, arg1 float64) float64
ValidatePower mocks base method.
type MockCircuitMockRecorder ¶
type MockCircuitMockRecorder struct {
// contains filtered or unexported fields
}
MockCircuitMockRecorder is the mock recorder for MockCircuit.
func (*MockCircuitMockRecorder) GetChargePower ¶
func (mr *MockCircuitMockRecorder) GetChargePower() *gomock.Call
GetChargePower indicates an expected call of GetChargePower.
func (*MockCircuitMockRecorder) GetMaxCurrent ¶
func (mr *MockCircuitMockRecorder) GetMaxCurrent() *gomock.Call
GetMaxCurrent indicates an expected call of GetMaxCurrent.
func (*MockCircuitMockRecorder) GetMaxPhaseCurrent ¶
func (mr *MockCircuitMockRecorder) GetMaxPhaseCurrent() *gomock.Call
GetMaxPhaseCurrent indicates an expected call of GetMaxPhaseCurrent.
func (*MockCircuitMockRecorder) GetMaxPower ¶
func (mr *MockCircuitMockRecorder) GetMaxPower() *gomock.Call
GetMaxPower indicates an expected call of GetMaxPower.
func (*MockCircuitMockRecorder) GetParent ¶
func (mr *MockCircuitMockRecorder) GetParent() *gomock.Call
GetParent indicates an expected call of GetParent.
func (*MockCircuitMockRecorder) GetTitle ¶
func (mr *MockCircuitMockRecorder) GetTitle() *gomock.Call
GetTitle indicates an expected call of GetTitle.
func (*MockCircuitMockRecorder) HasMeter ¶
func (mr *MockCircuitMockRecorder) HasMeter() *gomock.Call
HasMeter indicates an expected call of HasMeter.
func (*MockCircuitMockRecorder) RegisterChild ¶
func (mr *MockCircuitMockRecorder) RegisterChild(arg0 any) *gomock.Call
RegisterChild indicates an expected call of RegisterChild.
func (*MockCircuitMockRecorder) SetMaxCurrent ¶
func (mr *MockCircuitMockRecorder) SetMaxCurrent(arg0 any) *gomock.Call
SetMaxCurrent indicates an expected call of SetMaxCurrent.
func (*MockCircuitMockRecorder) SetMaxPower ¶
func (mr *MockCircuitMockRecorder) SetMaxPower(arg0 any) *gomock.Call
SetMaxPower indicates an expected call of SetMaxPower.
func (*MockCircuitMockRecorder) SetTitle ¶
func (mr *MockCircuitMockRecorder) SetTitle(arg0 any) *gomock.Call
SetTitle indicates an expected call of SetTitle.
func (*MockCircuitMockRecorder) Update ¶
func (mr *MockCircuitMockRecorder) Update(arg0 any) *gomock.Call
Update indicates an expected call of Update.
func (*MockCircuitMockRecorder) ValidateCurrent ¶
func (mr *MockCircuitMockRecorder) ValidateCurrent(arg0, arg1 any) *gomock.Call
ValidateCurrent indicates an expected call of ValidateCurrent.
func (*MockCircuitMockRecorder) ValidatePower ¶
func (mr *MockCircuitMockRecorder) ValidatePower(arg0, arg1 any) *gomock.Call
ValidatePower indicates an expected call of ValidatePower.
type MockCurrentGetter ¶
type MockCurrentGetter struct {
// contains filtered or unexported fields
}
MockCurrentGetter is a mock of CurrentGetter interface.
func NewMockCurrentGetter ¶
func NewMockCurrentGetter(ctrl *gomock.Controller) *MockCurrentGetter
NewMockCurrentGetter creates a new mock instance.
func (*MockCurrentGetter) EXPECT ¶
func (m *MockCurrentGetter) EXPECT() *MockCurrentGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCurrentGetter) GetMaxCurrent ¶
func (m *MockCurrentGetter) GetMaxCurrent() (float64, error)
GetMaxCurrent mocks base method.
type MockCurrentGetterMockRecorder ¶
type MockCurrentGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockCurrentGetterMockRecorder is the mock recorder for MockCurrentGetter.
func (*MockCurrentGetterMockRecorder) GetMaxCurrent ¶
func (mr *MockCurrentGetterMockRecorder) GetMaxCurrent() *gomock.Call
GetMaxCurrent indicates an expected call of GetMaxCurrent.
type MockCurrentLimiter ¶
type MockCurrentLimiter struct {
// contains filtered or unexported fields
}
MockCurrentLimiter is a mock of CurrentLimiter interface.
func NewMockCurrentLimiter ¶
func NewMockCurrentLimiter(ctrl *gomock.Controller) *MockCurrentLimiter
NewMockCurrentLimiter creates a new mock instance.
func (*MockCurrentLimiter) EXPECT ¶
func (m *MockCurrentLimiter) EXPECT() *MockCurrentLimiterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCurrentLimiter) GetMinMaxCurrent ¶
func (m *MockCurrentLimiter) GetMinMaxCurrent() (float64, float64, error)
GetMinMaxCurrent mocks base method.
type MockCurrentLimiterMockRecorder ¶
type MockCurrentLimiterMockRecorder struct {
// contains filtered or unexported fields
}
MockCurrentLimiterMockRecorder is the mock recorder for MockCurrentLimiter.
func (*MockCurrentLimiterMockRecorder) GetMinMaxCurrent ¶
func (mr *MockCurrentLimiterMockRecorder) GetMinMaxCurrent() *gomock.Call
GetMinMaxCurrent indicates an expected call of GetMinMaxCurrent.
type MockIdentifier ¶
type MockIdentifier struct {
// contains filtered or unexported fields
}
MockIdentifier is a mock of Identifier interface.
func NewMockIdentifier ¶
func NewMockIdentifier(ctrl *gomock.Controller) *MockIdentifier
NewMockIdentifier creates a new mock instance.
func (*MockIdentifier) EXPECT ¶
func (m *MockIdentifier) EXPECT() *MockIdentifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIdentifier) Identify ¶
func (m *MockIdentifier) Identify() (string, error)
Identify mocks base method.
type MockIdentifierMockRecorder ¶
type MockIdentifierMockRecorder struct {
// contains filtered or unexported fields
}
MockIdentifierMockRecorder is the mock recorder for MockIdentifier.
func (*MockIdentifierMockRecorder) Identify ¶
func (mr *MockIdentifierMockRecorder) Identify() *gomock.Call
Identify indicates an expected call of Identify.
type MockMeter ¶
type MockMeter struct {
// contains filtered or unexported fields
}
MockMeter is a mock of Meter interface.
func NewMockMeter ¶
func NewMockMeter(ctrl *gomock.Controller) *MockMeter
NewMockMeter creates a new mock instance.
func (*MockMeter) CurrentPower ¶
CurrentPower mocks base method.
func (*MockMeter) EXPECT ¶
func (m *MockMeter) EXPECT() *MockMeterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockMeterEnergy ¶
type MockMeterEnergy struct {
// contains filtered or unexported fields
}
MockMeterEnergy is a mock of MeterEnergy interface.
func NewMockMeterEnergy ¶
func NewMockMeterEnergy(ctrl *gomock.Controller) *MockMeterEnergy
NewMockMeterEnergy creates a new mock instance.
func (*MockMeterEnergy) EXPECT ¶
func (m *MockMeterEnergy) EXPECT() *MockMeterEnergyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMeterEnergy) TotalEnergy ¶
func (m *MockMeterEnergy) TotalEnergy() (float64, error)
TotalEnergy mocks base method.
type MockMeterEnergyMockRecorder ¶
type MockMeterEnergyMockRecorder struct {
// contains filtered or unexported fields
}
MockMeterEnergyMockRecorder is the mock recorder for MockMeterEnergy.
func (*MockMeterEnergyMockRecorder) TotalEnergy ¶
func (mr *MockMeterEnergyMockRecorder) TotalEnergy() *gomock.Call
TotalEnergy indicates an expected call of TotalEnergy.
type MockMeterMockRecorder ¶
type MockMeterMockRecorder struct {
// contains filtered or unexported fields
}
MockMeterMockRecorder is the mock recorder for MockMeter.
func (*MockMeterMockRecorder) CurrentPower ¶
func (mr *MockMeterMockRecorder) CurrentPower() *gomock.Call
CurrentPower indicates an expected call of CurrentPower.
type MockPhaseCurrents ¶
type MockPhaseCurrents struct {
// contains filtered or unexported fields
}
MockPhaseCurrents is a mock of PhaseCurrents interface.
func NewMockPhaseCurrents ¶
func NewMockPhaseCurrents(ctrl *gomock.Controller) *MockPhaseCurrents
NewMockPhaseCurrents creates a new mock instance.
func (*MockPhaseCurrents) Currents ¶
func (m *MockPhaseCurrents) Currents() (float64, float64, float64, error)
Currents mocks base method.
func (*MockPhaseCurrents) EXPECT ¶
func (m *MockPhaseCurrents) EXPECT() *MockPhaseCurrentsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPhaseCurrentsMockRecorder ¶
type MockPhaseCurrentsMockRecorder struct {
// contains filtered or unexported fields
}
MockPhaseCurrentsMockRecorder is the mock recorder for MockPhaseCurrents.
func (*MockPhaseCurrentsMockRecorder) Currents ¶
func (mr *MockPhaseCurrentsMockRecorder) Currents() *gomock.Call
Currents indicates an expected call of Currents.
type MockPhaseGetter ¶
type MockPhaseGetter struct {
// contains filtered or unexported fields
}
MockPhaseGetter is a mock of PhaseGetter interface.
func NewMockPhaseGetter ¶
func NewMockPhaseGetter(ctrl *gomock.Controller) *MockPhaseGetter
NewMockPhaseGetter creates a new mock instance.
func (*MockPhaseGetter) EXPECT ¶
func (m *MockPhaseGetter) EXPECT() *MockPhaseGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPhaseGetter) GetPhases ¶
func (m *MockPhaseGetter) GetPhases() (int, error)
GetPhases mocks base method.
type MockPhaseGetterMockRecorder ¶
type MockPhaseGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockPhaseGetterMockRecorder is the mock recorder for MockPhaseGetter.
func (*MockPhaseGetterMockRecorder) GetPhases ¶
func (mr *MockPhaseGetterMockRecorder) GetPhases() *gomock.Call
GetPhases indicates an expected call of GetPhases.
type MockPhaseSwitcher ¶
type MockPhaseSwitcher struct {
// contains filtered or unexported fields
}
MockPhaseSwitcher is a mock of PhaseSwitcher interface.
func NewMockPhaseSwitcher ¶
func NewMockPhaseSwitcher(ctrl *gomock.Controller) *MockPhaseSwitcher
NewMockPhaseSwitcher creates a new mock instance.
func (*MockPhaseSwitcher) EXPECT ¶
func (m *MockPhaseSwitcher) EXPECT() *MockPhaseSwitcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPhaseSwitcher) Phases1p3p ¶
func (m *MockPhaseSwitcher) Phases1p3p(arg0 int) error
Phases1p3p mocks base method.
type MockPhaseSwitcherMockRecorder ¶
type MockPhaseSwitcherMockRecorder struct {
// contains filtered or unexported fields
}
MockPhaseSwitcherMockRecorder is the mock recorder for MockPhaseSwitcher.
func (*MockPhaseSwitcherMockRecorder) Phases1p3p ¶
func (mr *MockPhaseSwitcherMockRecorder) Phases1p3p(arg0 any) *gomock.Call
Phases1p3p indicates an expected call of Phases1p3p.
type MockTariff ¶
type MockTariff struct {
// contains filtered or unexported fields
}
MockTariff is a mock of Tariff interface.
func NewMockTariff ¶
func NewMockTariff(ctrl *gomock.Controller) *MockTariff
NewMockTariff creates a new mock instance.
func (*MockTariff) EXPECT ¶
func (m *MockTariff) EXPECT() *MockTariffMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockTariffMockRecorder ¶
type MockTariffMockRecorder struct {
// contains filtered or unexported fields
}
MockTariffMockRecorder is the mock recorder for MockTariff.
func (*MockTariffMockRecorder) Rates ¶
func (mr *MockTariffMockRecorder) Rates() *gomock.Call
Rates indicates an expected call of Rates.
func (*MockTariffMockRecorder) Type ¶
func (mr *MockTariffMockRecorder) Type() *gomock.Call
Type indicates an expected call of Type.
type MockVehicle ¶
type MockVehicle struct {
// contains filtered or unexported fields
}
MockVehicle is a mock of Vehicle interface.
func NewMockVehicle ¶
func NewMockVehicle(ctrl *gomock.Controller) *MockVehicle
NewMockVehicle creates a new mock instance.
func (*MockVehicle) EXPECT ¶
func (m *MockVehicle) EXPECT() *MockVehicleMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVehicle) Features ¶
func (m *MockVehicle) Features() []Feature
Features mocks base method.
func (*MockVehicle) Identifiers ¶
func (m *MockVehicle) Identifiers() []string
Identifiers mocks base method.
func (*MockVehicle) OnIdentified ¶
func (m *MockVehicle) OnIdentified() ActionConfig
OnIdentified mocks base method.
func (*MockVehicle) SetTitle ¶
func (m *MockVehicle) SetTitle(arg0 string)
SetTitle mocks base method.
type MockVehicleMockRecorder ¶
type MockVehicleMockRecorder struct {
// contains filtered or unexported fields
}
MockVehicleMockRecorder is the mock recorder for MockVehicle.
func (*MockVehicleMockRecorder) Capacity ¶
func (mr *MockVehicleMockRecorder) Capacity() *gomock.Call
Capacity indicates an expected call of Capacity.
func (*MockVehicleMockRecorder) Features ¶
func (mr *MockVehicleMockRecorder) Features() *gomock.Call
Features indicates an expected call of Features.
func (*MockVehicleMockRecorder) Icon ¶
func (mr *MockVehicleMockRecorder) Icon() *gomock.Call
Icon indicates an expected call of Icon.
func (*MockVehicleMockRecorder) Identifiers ¶
func (mr *MockVehicleMockRecorder) Identifiers() *gomock.Call
Identifiers indicates an expected call of Identifiers.
func (*MockVehicleMockRecorder) OnIdentified ¶
func (mr *MockVehicleMockRecorder) OnIdentified() *gomock.Call
OnIdentified indicates an expected call of OnIdentified.
func (*MockVehicleMockRecorder) Phases ¶
func (mr *MockVehicleMockRecorder) Phases() *gomock.Call
Phases indicates an expected call of Phases.
func (*MockVehicleMockRecorder) SetTitle ¶
func (mr *MockVehicleMockRecorder) SetTitle(arg0 any) *gomock.Call
SetTitle indicates an expected call of SetTitle.
func (*MockVehicleMockRecorder) Soc ¶
func (mr *MockVehicleMockRecorder) Soc() *gomock.Call
Soc indicates an expected call of Soc.
func (*MockVehicleMockRecorder) Title ¶
func (mr *MockVehicleMockRecorder) Title() *gomock.Call
Title indicates an expected call of Title.
type PhaseCurrents ¶
PhaseCurrents provides per-phase current A
type PhaseDescriber ¶
type PhaseDescriber interface {
Phases() int
}
PhaseDescriber returns the number of availablephases
type PhaseGetter ¶
type PhasePowers ¶
PhasePowers provides signed per-phase power W
type PhaseSwitcher ¶
PhaseSwitcher provides 1p3p switching
type PhaseVoltages ¶
PhaseVoltages provides per-phase voltage V
type Rate ¶
type Rate struct { Start time.Time `json:"start"` End time.Time `json:"end"` Price float64 `json:"price"` }
Rate is a grid tariff rate
type Rates ¶
type Rates []Rate
Rates is a slice of (future) tariff rates
type Resurrector ¶
type Resurrector interface {
WakeUp() error
}
Resurrector provides wakeup calls to the vehicle with an API call or a CP interrupt from the charger
type SocLimiter ¶
SocLimiter returns the soc limit
type Tariff ¶
type Tariff interface { Rates() (Rates, error) Type() TariffType }
Tariff is a tariff capable of retrieving tariff rates
type TariffType ¶
type TariffType int
const ( TariffTypePriceStatic TariffType TariffTypePriceDynamic TariffTypePriceForecast TariffTypeCo2 )
func TariffTypeString ¶
func TariffTypeString(s string) (TariffType, error)
TariffTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func TariffTypeValues ¶
func TariffTypeValues() []TariffType
TariffTypeValues returns all values of the enum
func (TariffType) IsATariffType ¶
func (i TariffType) IsATariffType() bool
IsATariffType returns "true" if the value is listed in the enum definition. "false" otherwise
func (TariffType) String ¶
func (i TariffType) String() string
type Vehicle ¶
type Vehicle interface { Battery BatteryCapacity IconDescriber FeatureDescriber PhaseDescriber Title() string SetTitle(string) Identifiers() []string OnIdentified() ActionConfig }
Vehicle represents the EV and it's battery
type VehicleClimater ¶
VehicleClimater provides climatisation data
type VehicleFinishTimer ¶
VehicleFinishTimer provides estimated charge cycle finish time. Finish time is normalized for charging to 100% and may deviate from vehicle display if soc limit is effective.
type VehicleOdometer ¶
VehicleOdometer returns the vehicles milage
type VehiclePosition ¶
VehiclePosition returns the vehicles position in latitude and longitude
type VehicleRange ¶
VehicleRange provides the vehicles remaining km range