Documentation ¶
Overview ¶
Package loadpoint is a generated GoMock package.
Index ¶
- type API
- type Controller
- type MockAPI
- func (m *MockAPI) EXPECT() *MockAPIMockRecorder
- func (m *MockAPI) GetChargePower() float64
- func (m *MockAPI) GetChargePowerFlexibility() float64
- func (m *MockAPI) GetDisableThreshold() float64
- func (m *MockAPI) GetEnableThreshold() float64
- func (m *MockAPI) GetMaxCurrent() float64
- func (m *MockAPI) GetMaxPower() float64
- func (m *MockAPI) GetMinCurrent() float64
- func (m *MockAPI) GetMinPower() float64
- func (m *MockAPI) GetMinSoc() int
- func (m *MockAPI) GetMode() api.ChargeMode
- func (m *MockAPI) GetPhases() int
- func (m *MockAPI) GetPlan(arg0 time.Time, arg1 float64) (time.Duration, api.Rates, error)
- func (m *MockAPI) GetPriority() int
- func (m *MockAPI) GetRemainingDuration() time.Duration
- func (m *MockAPI) GetRemainingEnergy() float64
- func (m *MockAPI) GetStatus() api.ChargeStatus
- func (m *MockAPI) GetTargetEnergy() float64
- func (m *MockAPI) GetTargetSoc() int
- func (m *MockAPI) GetTargetTime() time.Time
- func (m *MockAPI) GetVehicle() api.Vehicle
- func (m *MockAPI) HasChargeMeter() bool
- func (m *MockAPI) RemoteControl(arg0 string, arg1 RemoteDemand)
- func (m *MockAPI) SetDisableThreshold(arg0 float64)
- func (m *MockAPI) SetEnableThreshold(arg0 float64)
- func (m *MockAPI) SetMaxCurrent(arg0 float64)
- func (m *MockAPI) SetMinCurrent(arg0 float64)
- func (m *MockAPI) SetMinSoc(arg0 int)
- func (m *MockAPI) SetMode(arg0 api.ChargeMode)
- func (m *MockAPI) SetPhases(arg0 int) error
- func (m *MockAPI) SetPriority(arg0 int)
- func (m *MockAPI) SetTargetEnergy(arg0 float64)
- func (m *MockAPI) SetTargetSoc(arg0 int)
- func (m *MockAPI) SetTargetTime(arg0 time.Time) error
- func (m *MockAPI) SetVehicle(arg0 api.Vehicle)
- func (m *MockAPI) StartVehicleDetection()
- func (m *MockAPI) Title() string
- type MockAPIMockRecorder
- func (mr *MockAPIMockRecorder) GetChargePower() *gomock.Call
- func (mr *MockAPIMockRecorder) GetChargePowerFlexibility() *gomock.Call
- func (mr *MockAPIMockRecorder) GetDisableThreshold() *gomock.Call
- func (mr *MockAPIMockRecorder) GetEnableThreshold() *gomock.Call
- func (mr *MockAPIMockRecorder) GetMaxCurrent() *gomock.Call
- func (mr *MockAPIMockRecorder) GetMaxPower() *gomock.Call
- func (mr *MockAPIMockRecorder) GetMinCurrent() *gomock.Call
- func (mr *MockAPIMockRecorder) GetMinPower() *gomock.Call
- func (mr *MockAPIMockRecorder) GetMinSoc() *gomock.Call
- func (mr *MockAPIMockRecorder) GetMode() *gomock.Call
- func (mr *MockAPIMockRecorder) GetPhases() *gomock.Call
- func (mr *MockAPIMockRecorder) GetPlan(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) GetPriority() *gomock.Call
- func (mr *MockAPIMockRecorder) GetRemainingDuration() *gomock.Call
- func (mr *MockAPIMockRecorder) GetRemainingEnergy() *gomock.Call
- func (mr *MockAPIMockRecorder) GetStatus() *gomock.Call
- func (mr *MockAPIMockRecorder) GetTargetEnergy() *gomock.Call
- func (mr *MockAPIMockRecorder) GetTargetSoc() *gomock.Call
- func (mr *MockAPIMockRecorder) GetTargetTime() *gomock.Call
- func (mr *MockAPIMockRecorder) GetVehicle() *gomock.Call
- func (mr *MockAPIMockRecorder) HasChargeMeter() *gomock.Call
- func (mr *MockAPIMockRecorder) RemoteControl(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetDisableThreshold(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetEnableThreshold(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetMaxCurrent(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetMinCurrent(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetMinSoc(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetMode(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetPhases(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetPriority(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetTargetEnergy(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetTargetSoc(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetTargetTime(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetVehicle(arg0 interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) StartVehicleDetection() *gomock.Call
- func (mr *MockAPIMockRecorder) Title() *gomock.Call
- type RemoteDemand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // Title returns the defined loadpoint title Title() string // GetStatus returns the charging status GetStatus() api.ChargeStatus // GetPriority returns the loadpoint priority GetPriority() int // SetPriority sets the loadpoint priority SetPriority(int) // GetMode returns the charge mode GetMode() api.ChargeMode // SetMode sets the charge mode SetMode(api.ChargeMode) // GetMinSoc returns the charge minimum soc GetMinSoc() int // SetMinSoc sets the charge minimum soc SetMinSoc(int) // GetPhases returns the enabled phases GetPhases() int // SetPhases sets the enabled phases SetPhases(int) error // GetTargetTime returns the target time GetTargetTime() time.Time // SetTargetTime sets the target time SetTargetTime(time.Time) error // GetTargetEnergy returns the charge target energy GetTargetEnergy() float64 // SetTargetEnergy sets the charge target energy SetTargetEnergy(float64) // GetTargetSoc returns the charge target soc GetTargetSoc() int // SetTargetSoc sets the charge target soc SetTargetSoc(int) // GetPlan creates a charging plan GetPlan(targetTime time.Time, maxPower float64) (time.Duration, api.Rates, error) // GetEnableThreshold gets the loadpoint enable threshold GetEnableThreshold() float64 // SetEnableThreshold sets loadpoint enable threshold SetEnableThreshold(threshold float64) // GetDisableThreshold gets the loadpoint disable threshold GetDisableThreshold() float64 // SetDisableThreshold sets loadpoint disable threshold SetDisableThreshold(threshold float64) // RemoteControl sets remote status demand RemoteControl(string, RemoteDemand) // HasChargeMeter determines if a physical charge meter is attached HasChargeMeter() bool // GetChargePower returns the current charging power GetChargePower() float64 // GetChargePowerFlexibility returns the flexible amount of current charging power GetChargePowerFlexibility() float64 // GetMinCurrent returns the min charging current GetMinCurrent() float64 // SetMinCurrent sets the min charging current SetMinCurrent(float64) // GetMaxCurrent returns the max charging current GetMaxCurrent() float64 // SetMaxCurrent sets the max charging current SetMaxCurrent(float64) // GetMinPower returns the min charging power for a single phase GetMinPower() float64 // GetMaxPower returns the max charging power taking active phases into account GetMaxPower() float64 // GetRemainingDuration is the estimated remaining charging duration GetRemainingDuration() time.Duration // GetRemainingEnergy is the remaining charge energy in Wh GetRemainingEnergy() float64 // GetVehicle gets the active vehicle GetVehicle() api.Vehicle // SetVehicle sets the active vehicle SetVehicle(vehicle api.Vehicle) // StartVehicleDetection allows triggering vehicle detection for debugging purposes StartVehicleDetection() }
API is the external loadpoint API
type Controller ¶
type Controller interface {
LoadpointControl(API)
}
Controller gives access to loadpoint
type MockAPI ¶
type MockAPI struct {
// contains filtered or unexported fields
}
MockAPI is a mock of API interface.
func NewMockAPI ¶
func NewMockAPI(ctrl *gomock.Controller) *MockAPI
NewMockAPI creates a new mock instance.
func (*MockAPI) EXPECT ¶
func (m *MockAPI) EXPECT() *MockAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAPI) GetChargePower ¶
GetChargePower mocks base method.
func (*MockAPI) GetChargePowerFlexibility ¶
GetChargePowerFlexibility mocks base method.
func (*MockAPI) GetDisableThreshold ¶
GetDisableThreshold mocks base method.
func (*MockAPI) GetEnableThreshold ¶
GetEnableThreshold mocks base method.
func (*MockAPI) GetMaxCurrent ¶
GetMaxCurrent mocks base method.
func (*MockAPI) GetMaxPower ¶
GetMaxPower mocks base method.
func (*MockAPI) GetMinCurrent ¶
GetMinCurrent mocks base method.
func (*MockAPI) GetMinPower ¶
GetMinPower mocks base method.
func (*MockAPI) GetRemainingDuration ¶
GetRemainingDuration mocks base method.
func (*MockAPI) GetRemainingEnergy ¶
GetRemainingEnergy mocks base method.
func (*MockAPI) GetStatus ¶
func (m *MockAPI) GetStatus() api.ChargeStatus
GetStatus mocks base method.
func (*MockAPI) GetTargetEnergy ¶
GetTargetEnergy mocks base method.
func (*MockAPI) GetTargetTime ¶
GetTargetTime mocks base method.
func (*MockAPI) GetVehicle ¶
GetVehicle mocks base method.
func (*MockAPI) HasChargeMeter ¶
HasChargeMeter mocks base method.
func (*MockAPI) RemoteControl ¶
func (m *MockAPI) RemoteControl(arg0 string, arg1 RemoteDemand)
RemoteControl mocks base method.
func (*MockAPI) SetDisableThreshold ¶
SetDisableThreshold mocks base method.
func (*MockAPI) SetEnableThreshold ¶
SetEnableThreshold mocks base method.
func (*MockAPI) SetMaxCurrent ¶
SetMaxCurrent mocks base method.
func (*MockAPI) SetMinCurrent ¶
SetMinCurrent mocks base method.
func (*MockAPI) SetPriority ¶
SetPriority mocks base method.
func (*MockAPI) SetTargetEnergy ¶
SetTargetEnergy mocks base method.
func (*MockAPI) SetTargetSoc ¶
SetTargetSoc mocks base method.
func (*MockAPI) SetTargetTime ¶
SetTargetTime mocks base method.
func (*MockAPI) SetVehicle ¶
SetVehicle mocks base method.
func (*MockAPI) StartVehicleDetection ¶
func (m *MockAPI) StartVehicleDetection()
StartVehicleDetection mocks base method.
type MockAPIMockRecorder ¶
type MockAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockAPIMockRecorder is the mock recorder for MockAPI.
func (*MockAPIMockRecorder) GetChargePower ¶
func (mr *MockAPIMockRecorder) GetChargePower() *gomock.Call
GetChargePower indicates an expected call of GetChargePower.
func (*MockAPIMockRecorder) GetChargePowerFlexibility ¶
func (mr *MockAPIMockRecorder) GetChargePowerFlexibility() *gomock.Call
GetChargePowerFlexibility indicates an expected call of GetChargePowerFlexibility.
func (*MockAPIMockRecorder) GetDisableThreshold ¶
func (mr *MockAPIMockRecorder) GetDisableThreshold() *gomock.Call
GetDisableThreshold indicates an expected call of GetDisableThreshold.
func (*MockAPIMockRecorder) GetEnableThreshold ¶
func (mr *MockAPIMockRecorder) GetEnableThreshold() *gomock.Call
GetEnableThreshold indicates an expected call of GetEnableThreshold.
func (*MockAPIMockRecorder) GetMaxCurrent ¶
func (mr *MockAPIMockRecorder) GetMaxCurrent() *gomock.Call
GetMaxCurrent indicates an expected call of GetMaxCurrent.
func (*MockAPIMockRecorder) GetMaxPower ¶
func (mr *MockAPIMockRecorder) GetMaxPower() *gomock.Call
GetMaxPower indicates an expected call of GetMaxPower.
func (*MockAPIMockRecorder) GetMinCurrent ¶
func (mr *MockAPIMockRecorder) GetMinCurrent() *gomock.Call
GetMinCurrent indicates an expected call of GetMinCurrent.
func (*MockAPIMockRecorder) GetMinPower ¶
func (mr *MockAPIMockRecorder) GetMinPower() *gomock.Call
GetMinPower indicates an expected call of GetMinPower.
func (*MockAPIMockRecorder) GetMinSoc ¶
func (mr *MockAPIMockRecorder) GetMinSoc() *gomock.Call
GetMinSoc indicates an expected call of GetMinSoc.
func (*MockAPIMockRecorder) GetMode ¶
func (mr *MockAPIMockRecorder) GetMode() *gomock.Call
GetMode indicates an expected call of GetMode.
func (*MockAPIMockRecorder) GetPhases ¶
func (mr *MockAPIMockRecorder) GetPhases() *gomock.Call
GetPhases indicates an expected call of GetPhases.
func (*MockAPIMockRecorder) GetPlan ¶
func (mr *MockAPIMockRecorder) GetPlan(arg0, arg1 interface{}) *gomock.Call
GetPlan indicates an expected call of GetPlan.
func (*MockAPIMockRecorder) GetPriority ¶
func (mr *MockAPIMockRecorder) GetPriority() *gomock.Call
GetPriority indicates an expected call of GetPriority.
func (*MockAPIMockRecorder) GetRemainingDuration ¶
func (mr *MockAPIMockRecorder) GetRemainingDuration() *gomock.Call
GetRemainingDuration indicates an expected call of GetRemainingDuration.
func (*MockAPIMockRecorder) GetRemainingEnergy ¶
func (mr *MockAPIMockRecorder) GetRemainingEnergy() *gomock.Call
GetRemainingEnergy indicates an expected call of GetRemainingEnergy.
func (*MockAPIMockRecorder) GetStatus ¶
func (mr *MockAPIMockRecorder) GetStatus() *gomock.Call
GetStatus indicates an expected call of GetStatus.
func (*MockAPIMockRecorder) GetTargetEnergy ¶
func (mr *MockAPIMockRecorder) GetTargetEnergy() *gomock.Call
GetTargetEnergy indicates an expected call of GetTargetEnergy.
func (*MockAPIMockRecorder) GetTargetSoc ¶
func (mr *MockAPIMockRecorder) GetTargetSoc() *gomock.Call
GetTargetSoc indicates an expected call of GetTargetSoc.
func (*MockAPIMockRecorder) GetTargetTime ¶
func (mr *MockAPIMockRecorder) GetTargetTime() *gomock.Call
GetTargetTime indicates an expected call of GetTargetTime.
func (*MockAPIMockRecorder) GetVehicle ¶
func (mr *MockAPIMockRecorder) GetVehicle() *gomock.Call
GetVehicle indicates an expected call of GetVehicle.
func (*MockAPIMockRecorder) HasChargeMeter ¶
func (mr *MockAPIMockRecorder) HasChargeMeter() *gomock.Call
HasChargeMeter indicates an expected call of HasChargeMeter.
func (*MockAPIMockRecorder) RemoteControl ¶
func (mr *MockAPIMockRecorder) RemoteControl(arg0, arg1 interface{}) *gomock.Call
RemoteControl indicates an expected call of RemoteControl.
func (*MockAPIMockRecorder) SetDisableThreshold ¶
func (mr *MockAPIMockRecorder) SetDisableThreshold(arg0 interface{}) *gomock.Call
SetDisableThreshold indicates an expected call of SetDisableThreshold.
func (*MockAPIMockRecorder) SetEnableThreshold ¶
func (mr *MockAPIMockRecorder) SetEnableThreshold(arg0 interface{}) *gomock.Call
SetEnableThreshold indicates an expected call of SetEnableThreshold.
func (*MockAPIMockRecorder) SetMaxCurrent ¶
func (mr *MockAPIMockRecorder) SetMaxCurrent(arg0 interface{}) *gomock.Call
SetMaxCurrent indicates an expected call of SetMaxCurrent.
func (*MockAPIMockRecorder) SetMinCurrent ¶
func (mr *MockAPIMockRecorder) SetMinCurrent(arg0 interface{}) *gomock.Call
SetMinCurrent indicates an expected call of SetMinCurrent.
func (*MockAPIMockRecorder) SetMinSoc ¶
func (mr *MockAPIMockRecorder) SetMinSoc(arg0 interface{}) *gomock.Call
SetMinSoc indicates an expected call of SetMinSoc.
func (*MockAPIMockRecorder) SetMode ¶
func (mr *MockAPIMockRecorder) SetMode(arg0 interface{}) *gomock.Call
SetMode indicates an expected call of SetMode.
func (*MockAPIMockRecorder) SetPhases ¶
func (mr *MockAPIMockRecorder) SetPhases(arg0 interface{}) *gomock.Call
SetPhases indicates an expected call of SetPhases.
func (*MockAPIMockRecorder) SetPriority ¶
func (mr *MockAPIMockRecorder) SetPriority(arg0 interface{}) *gomock.Call
SetPriority indicates an expected call of SetPriority.
func (*MockAPIMockRecorder) SetTargetEnergy ¶
func (mr *MockAPIMockRecorder) SetTargetEnergy(arg0 interface{}) *gomock.Call
SetTargetEnergy indicates an expected call of SetTargetEnergy.
func (*MockAPIMockRecorder) SetTargetSoc ¶
func (mr *MockAPIMockRecorder) SetTargetSoc(arg0 interface{}) *gomock.Call
SetTargetSoc indicates an expected call of SetTargetSoc.
func (*MockAPIMockRecorder) SetTargetTime ¶
func (mr *MockAPIMockRecorder) SetTargetTime(arg0 interface{}) *gomock.Call
SetTargetTime indicates an expected call of SetTargetTime.
func (*MockAPIMockRecorder) SetVehicle ¶
func (mr *MockAPIMockRecorder) SetVehicle(arg0 interface{}) *gomock.Call
SetVehicle indicates an expected call of SetVehicle.
func (*MockAPIMockRecorder) StartVehicleDetection ¶
func (mr *MockAPIMockRecorder) StartVehicleDetection() *gomock.Call
StartVehicleDetection indicates an expected call of StartVehicleDetection.
func (*MockAPIMockRecorder) Title ¶
func (mr *MockAPIMockRecorder) Title() *gomock.Call
Title indicates an expected call of Title.
type RemoteDemand ¶
type RemoteDemand string
RemoteDemand defines external status demand
const ( RemoteEnable RemoteDemand = "" RemoteHardDisable RemoteDemand = "hard" RemoteSoftDisable RemoteDemand = "soft" )
remote status demand definition
func RemoteDemandString ¶
func RemoteDemandString(demand string) (RemoteDemand, error)
RemoteDemandString converts string to RemoteDemand