Documentation ¶
Overview ¶
Package emobility is a generated GoMock package.
Index ¶
- Variables
- type EMobilityImpl
- func (e *EMobilityImpl) EVChargeStrategy() EVChargeStrategyType
- func (e *EMobilityImpl) EVChargedEnergy() (float64, error)
- func (e *EMobilityImpl) EVCommunicationStandard() (EVCommunicationStandardType, error)
- func (e *EMobilityImpl) EVConnected() bool
- func (e *EMobilityImpl) EVConnectedPhases() (uint, error)
- func (e *EMobilityImpl) EVCoordinatedChargingSupported() (bool, error)
- func (e *EMobilityImpl) EVCurrentChargeState() (EVChargeStateType, error)
- func (e *EMobilityImpl) EVCurrentLimits() ([]float64, []float64, []float64, error)
- func (e *EMobilityImpl) EVCurrentsPerPhase() ([]float64, error)
- func (e *EMobilityImpl) EVEnergyDemand() (EVDemand, error)
- func (e *EMobilityImpl) EVGetIncentiveConstraints() EVIncentiveSlotConstraints
- func (e *EMobilityImpl) EVGetPowerConstraints() EVTimeSlotConstraints
- func (e *EMobilityImpl) EVIdentification() (string, error)
- func (e *EMobilityImpl) EVLoadControlObligationLimits() ([]float64, error)
- func (e *EMobilityImpl) EVOptimizationOfSelfConsumptionSupported() (bool, error)
- func (e *EMobilityImpl) EVPowerPerPhase() ([]float64, error)
- func (e *EMobilityImpl) EVSoC() (float64, error)
- func (e *EMobilityImpl) EVSoCSupported() (bool, error)
- func (e *EMobilityImpl) EVWriteIncentives(data []EVDurationSlotValue) error
- func (e *EMobilityImpl) EVWriteLoadControlLimits(obligations, recommendations []float64) error
- func (e *EMobilityImpl) EVWritePowerLimits(data []EVDurationSlotValue) error
- func (e *EMobilityImpl) HandleEvent(payload spine.EventPayload)
- func (e *EMobilityImpl) HandleResult(errorMsg spine.ResultMessage)
- type EVChargeStateType
- type EVChargeStrategyType
- type EVCommunicationStandardType
- type EVDemand
- type EVDurationSlotValue
- type EVIncentiveSlotConstraints
- type EVTimeSlotConstraints
- type EmobilityConfiguration
- type EmobilityDataProvider
- type EmobilityI
- type EmobilityScenarioImpl
- func (e *EmobilityScenarioImpl) AddFeatures()
- func (e *EmobilityScenarioImpl) AddUseCases()
- func (e *EmobilityScenarioImpl) HandleResult(errorMsg spine.ResultMessage)
- func (e *EmobilityScenarioImpl) RegisterRemoteDevice(details *service.ServiceDetails, dataProvider any) any
- func (e *EmobilityScenarioImpl) UnRegisterRemoteDevice(remoteDeviceSki string) error
- type MockEmobilityDataProvider
- func (m *MockEmobilityDataProvider) EVProvidedChargePlan(data []EVDurationSlotValue)
- func (m *MockEmobilityDataProvider) EVProvidedChargeStrategy(strategy EVChargeStrategyType)
- func (m *MockEmobilityDataProvider) EVRequestIncentives(demand EVDemand, constraints EVIncentiveSlotConstraints)
- func (m *MockEmobilityDataProvider) EVRequestPowerLimits(demand EVDemand, constraints EVTimeSlotConstraints)
- func (m *MockEmobilityDataProvider) EXPECT() *MockEmobilityDataProviderMockRecorder
- type MockEmobilityDataProviderMockRecorder
- func (mr *MockEmobilityDataProviderMockRecorder) EVProvidedChargePlan(data interface{}) *gomock.Call
- func (mr *MockEmobilityDataProviderMockRecorder) EVProvidedChargeStrategy(strategy interface{}) *gomock.Call
- func (mr *MockEmobilityDataProviderMockRecorder) EVRequestIncentives(demand, constraints interface{}) *gomock.Call
- func (mr *MockEmobilityDataProviderMockRecorder) EVRequestPowerLimits(demand, constraints interface{}) *gomock.Call
- type MockEmobilityI
- func (m *MockEmobilityI) EVChargeStrategy() EVChargeStrategyType
- func (m *MockEmobilityI) EVChargedEnergy() (float64, error)
- func (m *MockEmobilityI) EVCommunicationStandard() (EVCommunicationStandardType, error)
- func (m *MockEmobilityI) EVConnected() bool
- func (m *MockEmobilityI) EVConnectedPhases() (uint, error)
- func (m *MockEmobilityI) EVCoordinatedChargingSupported() (bool, error)
- func (m *MockEmobilityI) EVCurrentChargeState() (EVChargeStateType, error)
- func (m *MockEmobilityI) EVCurrentLimits() ([]float64, []float64, []float64, error)
- func (m *MockEmobilityI) EVCurrentsPerPhase() ([]float64, error)
- func (m *MockEmobilityI) EVEnergyDemand() (EVDemand, error)
- func (m *MockEmobilityI) EVGetIncentiveConstraints() EVIncentiveSlotConstraints
- func (m *MockEmobilityI) EVGetPowerConstraints() EVTimeSlotConstraints
- func (m *MockEmobilityI) EVIdentification() (string, error)
- func (m *MockEmobilityI) EVLoadControlObligationLimits() ([]float64, error)
- func (m *MockEmobilityI) EVOptimizationOfSelfConsumptionSupported() (bool, error)
- func (m *MockEmobilityI) EVPowerPerPhase() ([]float64, error)
- func (m *MockEmobilityI) EVSoC() (float64, error)
- func (m *MockEmobilityI) EVSoCSupported() (bool, error)
- func (m *MockEmobilityI) EVWriteIncentives(data []EVDurationSlotValue) error
- func (m *MockEmobilityI) EVWriteLoadControlLimits(obligations, recommendations []float64) error
- func (m *MockEmobilityI) EVWritePowerLimits(data []EVDurationSlotValue) error
- func (m *MockEmobilityI) EXPECT() *MockEmobilityIMockRecorder
- type MockEmobilityIMockRecorder
- func (mr *MockEmobilityIMockRecorder) EVChargeStrategy() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVChargedEnergy() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVCommunicationStandard() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVConnected() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVConnectedPhases() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVCoordinatedChargingSupported() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVCurrentChargeState() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVCurrentLimits() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVCurrentsPerPhase() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVEnergyDemand() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVGetIncentiveConstraints() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVGetPowerConstraints() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVIdentification() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVLoadControlObligationLimits() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVOptimizationOfSelfConsumptionSupported() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVPowerPerPhase() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVSoC() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVSoCSupported() *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVWriteIncentives(data interface{}) *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVWriteLoadControlLimits(obligations, recommendations interface{}) *gomock.Call
- func (mr *MockEmobilityIMockRecorder) EVWritePowerLimits(data interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ErrEVDisconnected = errors.New("ev is disconnected")
var ErrNotSupported = errors.New("function is not supported")
Functions ¶
This section is empty.
Types ¶
type EMobilityImpl ¶
type EMobilityImpl struct {
// contains filtered or unexported fields
}
func NewEMobility ¶
func NewEMobility(service *service.EEBUSService, details *service.ServiceDetails, currency model.CurrencyType, configuration EmobilityConfiguration, dataProvider EmobilityDataProvider) *EMobilityImpl
Add E-Mobility support
func (*EMobilityImpl) EVChargeStrategy ¶ added in v0.2.0
func (e *EMobilityImpl) EVChargeStrategy() EVChargeStrategyType
returns the current charging strategy
func (*EMobilityImpl) EVChargedEnergy ¶
func (e *EMobilityImpl) EVChargedEnergy() (float64, error)
return the charged energy measurement in Wh of the connected EV
possible errors:
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVCommunicationStandard ¶
func (e *EMobilityImpl) EVCommunicationStandard() (EVCommunicationStandardType, error)
return the current communication standard type used to communicate between EVSE and EV
if an EV is connected via IEC61851, no ISO15118 specific data can be provided! sometimes the connection starts with IEC61851 before it switches to ISO15118, and sometimes it falls back again. so the error return is never absolut for the whole connection time, except if the use case is not supported
the values are not constant and can change due to communication problems, bugs, and sometimes communication starts with IEC61851 before it switches to ISO
possible errors:
- ErrDataNotAvailable if that information is not (yet) available
- ErrNotSupported if getting the communication standard is not supported
- and others
func (*EMobilityImpl) EVConnected ¶ added in v0.2.1
func (e *EMobilityImpl) EVConnected() bool
return if an EV is connected
this includes all required features and minimal data being available
func (*EMobilityImpl) EVConnectedPhases ¶
func (e *EMobilityImpl) EVConnectedPhases() (uint, error)
return the number of ac connected phases of the EV or 0 if it is unknown
func (*EMobilityImpl) EVCoordinatedChargingSupported ¶
func (e *EMobilityImpl) EVCoordinatedChargingSupported() (bool, error)
returns if the EVSE and EV combination support coordinated charging
possible errors:
- ErrDataNotAvailable if that information is not (yet) available
- and others
func (*EMobilityImpl) EVCurrentChargeState ¶
func (e *EMobilityImpl) EVCurrentChargeState() (EVChargeStateType, error)
return the current charge state of the EV
func (*EMobilityImpl) EVCurrentLimits ¶
func (e *EMobilityImpl) EVCurrentLimits() ([]float64, []float64, []float64, error)
return the min, max, default limits for each phase of the connected EV
possible errors:
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVCurrentsPerPhase ¶
func (e *EMobilityImpl) EVCurrentsPerPhase() ([]float64, error)
return the last current measurement for each phase of the connected EV
possible errors:
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVEnergyDemand ¶ added in v0.2.0
func (e *EMobilityImpl) EVEnergyDemand() (EVDemand, error)
returns the current energy demand in Wh and the duration
func (*EMobilityImpl) EVGetIncentiveConstraints ¶ added in v0.2.0
func (e *EMobilityImpl) EVGetIncentiveConstraints() EVIncentiveSlotConstraints
returns the minimum and maximum number of incentive slots allowed
func (*EMobilityImpl) EVGetPowerConstraints ¶ added in v0.2.0
func (e *EMobilityImpl) EVGetPowerConstraints() EVTimeSlotConstraints
returns the constraints for the power slots
func (*EMobilityImpl) EVIdentification ¶
func (e *EMobilityImpl) EVIdentification() (string, error)
returns the identification of the currently connected EV or nil if not available
possible errors:
- ErrDataNotAvailable if that information is not (yet) available
- and others
func (*EMobilityImpl) EVLoadControlObligationLimits ¶ added in v0.2.0
func (e *EMobilityImpl) EVLoadControlObligationLimits() ([]float64, error)
return the current loadcontrol obligation limits
possible errors:
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVOptimizationOfSelfConsumptionSupported ¶
func (e *EMobilityImpl) EVOptimizationOfSelfConsumptionSupported() (bool, error)
returns if the EVSE and EV combination support optimzation of self consumption
possible errors:
- ErrDataNotAvailable if that information is not (yet) available
- and others
func (*EMobilityImpl) EVPowerPerPhase ¶
func (e *EMobilityImpl) EVPowerPerPhase() ([]float64, error)
return the last power measurement for each phase of the connected EV
possible errors:
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVSoC ¶
func (e *EMobilityImpl) EVSoC() (float64, error)
return the last known SoC of the connected EV
requires EVSoCSupported to return true only works with a current ISO15118-2 with VAS or ISO15118-20 communication between EVSE and EV
possible errors:
- ErrNotSupported if support for SoC is not possible
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVSoCSupported ¶
func (e *EMobilityImpl) EVSoCSupported() (bool, error)
return if the EVSE and EV combination support providing an SoC
requires EVSoCSupported to return true only works with a current ISO15118-2 with VAS or ISO15118-20 communication between EVSE and EV
possible errors:
- ErrDataNotAvailable if no such measurement is (yet) available
- and others
func (*EMobilityImpl) EVWriteIncentives ¶ added in v0.2.0
func (e *EMobilityImpl) EVWriteIncentives(data []EVDurationSlotValue) error
send incentives to the EV
func (*EMobilityImpl) EVWriteLoadControlLimits ¶
func (e *EMobilityImpl) EVWriteLoadControlLimits(obligations, recommendations []float64) error
send new LoadControlLimits to the remote EV
parameters:
- obligations: Overload Protection Limits per phase in A
- recommendations: Self Consumption recommendations per phase in A
obligations: Sets a maximum A limit for each phase that the EV may not exceed. Mainly used for implementing overload protection of the site or limiting the maximum charge power of EVs when the EV and EVSE communicate via IEC61851 and with ISO15118 if the EV does not support the Optimization of Self Consumption usecase.
recommendations: Sets a recommended charge power in A for each phase. This is mainly used if the EV and EVSE communicate via ISO15118 to support charging excess solar power. The EV either needs to support the Optimization of Self Consumption usecase or the EVSE needs to be able map the recommendations into oligation limits which then works for all EVs communication either via IEC61851 or ISO15118.
notes:
- For obligations to work for optimizing solar excess power, the EV needs to have an energy demand.
- Recommendations work even if the EV does not have an active energy demand, given it communicated with the EVSE via ISO15118 and supports the usecase.
- In ISO15118-2 the usecase is only supported via VAS extensions which are vendor specific and needs to have specific EVSE support for the specific EV brand.
- In ISO15118-20 this is a standard feature which does not need special support on the EVSE.
- Min power data is only provided via IEC61851 or using VAS in ISO15118-2.
func (*EMobilityImpl) EVWritePowerLimits ¶ added in v0.2.0
func (e *EMobilityImpl) EVWritePowerLimits(data []EVDurationSlotValue) error
send power limits to the EV
func (*EMobilityImpl) HandleEvent ¶
func (e *EMobilityImpl) HandleEvent(payload spine.EventPayload)
Internal EventHandler Interface for the CEM
func (*EMobilityImpl) HandleResult ¶
func (e *EMobilityImpl) HandleResult(errorMsg spine.ResultMessage)
type EVChargeStateType ¶
type EVChargeStateType string
const ( EVChargeStateTypeUnknown EVChargeStateType = "Unknown" EVChargeStateTypeUnplugged EVChargeStateType = "unplugged" EVChargeStateTypeError EVChargeStateType = "error" EVChargeStateTypePaused EVChargeStateType = "paused" EVChargeStateTypeActive EVChargeStateType = "active" EVChargeStateTypeFinished EVChargeStateType = "finished" )
type EVChargeStrategyType ¶
type EVChargeStrategyType string
const ( EVChargeStrategyTypeUnknown EVChargeStrategyType = "unknown" EVChargeStrategyTypeNoDemand EVChargeStrategyType = "nodemand" EVChargeStrategyTypeDirectCharging EVChargeStrategyType = "directcharging" EVChargeStrategyTypeMinSoC EVChargeStrategyType = "minsoc" EVChargeStrategyTypeTimedCharging EVChargeStrategyType = "timedcharging" )
type EVCommunicationStandardType ¶
type EVCommunicationStandardType model.DeviceConfigurationKeyValueStringType
const ( EVCommunicationStandardTypeUnknown EVCommunicationStandardType = "unknown" EVCommunicationStandardTypeISO151182ED1 EVCommunicationStandardType = "iso15118-2ed1" EVCommunicationStandardTypeISO151182ED2 EVCommunicationStandardType = "iso15118-2ed2" EVCommunicationStandardTypeIEC61851 EVCommunicationStandardType = "iec61851" )
type EVDemand ¶ added in v0.2.0
type EVDemand struct { MinDemand float64 // minimum demand in Wh to reach the minSoC setting, 0 if not set OptDemand float64 // demand in Wh to reach the timer SoC setting MaxDemand float64 // the maximum possible demand until the battery is full DurationUntilStart time.Duration // the duration from now until charging will start, this could be in the future but usualy is now DurationUntilEnd time.Duration // the duration from now until minDemand or optDemand has to be reached, 0 if direct charge strategy is active }
Contains details about the actual demands from the EV
General:
- If duration and energy is 0, charge mode is EVChargeStrategyTypeNoDemand
- If duration is 0, charge mode is EVChargeStrategyTypeDirectCharging and the slots should cover at least 48h
- If both are != 0, charge mode is EVChargeStrategyTypeTimedCharging and the slots should cover at least the duration, but at max 168h (7d)
type EVDurationSlotValue ¶ added in v0.2.0
type EVDurationSlotValue struct { Duration time.Duration // Duration of this slot Value float64 // Energy Cost or Power Limit }
Contains details about power limits or incentives for a defined timeframe
type EVIncentiveSlotConstraints ¶ added in v0.2.0
type EVIncentiveSlotConstraints struct { MinSlots uint // the minimum number of slots, no minimum if 0 MaxSlots uint // the maximum number of slots, unlimited if 0 }
Details about the incentive slot constraints
type EVTimeSlotConstraints ¶ added in v0.2.0
type EVTimeSlotConstraints struct { MinSlots uint // the minimum number of slots, no minimum if 0 MaxSlots uint // the maximum number of slots, unlimited if 0 MinSlotDuration time.Duration // the minimum duration of a slot, no minimum if 0 MaxSlotDuration time.Duration // the maximum duration of a slot, unlimited if 0 SlotDurationStepSize time.Duration // the duration has to be a multiple of this value if != 0 }
Details about the time slot constraints
type EmobilityConfiguration ¶ added in v0.2.0
type EmobilityConfiguration struct {
CoordinatedChargingEnabled bool
}
Allows to exclude some features
type EmobilityDataProvider ¶ added in v0.2.0
type EmobilityDataProvider interface { // The EV provided a charge strategy EVProvidedChargeStrategy(strategy EVChargeStrategyType) // Energy demand and duration is provided by the EV which requires the CEM // to respond with time slots containing power limits for each slot // // `EVWritePowerLimits` must be invoked within <55s, idealy <15s, after receiving this call // // Parameters: // - demand: Contains details about the actual demands from the EV // - constraints: Contains details about the time slot constraints EVRequestPowerLimits(demand EVDemand, constraints EVTimeSlotConstraints) // Energy demand and duration is provided by the EV which requires the CEM // to respond with time slots containing incentives for each slot // // `EVWriteIncentives` must be invoked within <20s after receiving this call // // Parameters: // - demand: Contains details about the actual demands from the EV // - constraints: Contains details about the incentive slot constraints EVRequestIncentives(demand EVDemand, constraints EVIncentiveSlotConstraints) // The EV provided a charge plan EVProvidedChargePlan(data []EVDurationSlotValue) }
used by emobility and implemented by the CEM
type EmobilityI ¶
type EmobilityI interface { // return if an EV is connected EVConnected() bool // return the current charge state of the EV EVCurrentChargeState() (EVChargeStateType, error) // return the number of ac connected phases of the EV or 0 if it is unknown EVConnectedPhases() (uint, error) // return the charged energy measurement in Wh of the connected EV // // possible errors: // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVChargedEnergy() (float64, error) // return the last power measurement for each phase of the connected EV // // possible errors: // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVPowerPerPhase() ([]float64, error) // return the last current measurement for each phase of the connected EV // // possible errors: // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVCurrentsPerPhase() ([]float64, error) // return the min, max, default limits for each phase of the connected EV // // possible errors: // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVCurrentLimits() ([]float64, []float64, []float64, error) // return the current loadcontrol obligation limits // // possible errors: // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVLoadControlObligationLimits() ([]float64, error) // send new LoadControlLimits to the remote EV // // parameters: // - obligations: Overload Protection Limits per phase in A // - recommendations: Self Consumption recommendations per phase in A // // obligations: // Sets a maximum A limit for each phase that the EV may not exceed. // Mainly used for implementing overload protection of the site or limiting the // maximum charge power of EVs when the EV and EVSE communicate via IEC61851 // and with ISO15118 if the EV does not support the Optimization of Self Consumption // usecase. // // recommendations: // Sets a recommended charge power in A for each phase. This is mainly // used if the EV and EVSE communicate via ISO15118 to support charging excess solar power. // The EV either needs to support the Optimization of Self Consumption usecase or // the EVSE needs to be able map the recommendations into oligation limits which then // works for all EVs communication either via IEC61851 or ISO15118. // // note: // For obligations to work for optimizing solar excess power, the EV needs to // have an energy demand. Recommendations work even if the EV does not have an active // energy demand, given it communicated with the EVSE via ISO15118 and supports the usecase. // In ISO15118-2 the usecase is only supported via VAS extensions which are vendor specific // and needs to have specific EVSE support for the specific EV brand. // In ISO15118-20 this is a standard feature which does not need special support on the EVSE. EVWriteLoadControlLimits(obligations, recommendations []float64) error // return the current communication standard type used to communicate between EVSE and EV // // if an EV is connected via IEC61851, no ISO15118 specific data can be provided! // sometimes the connection starts with IEC61851 before it switches // to ISO15118, and sometimes it falls back again. so the error return is // never absolut for the whole connection time, except if the use case // is not supported // // the values are not constant and can change due to communication problems, bugs, and // sometimes communication starts with IEC61851 before it switches to ISO // // possible errors: // - ErrDataNotAvailable if that information is not (yet) available // - ErrNotSupported if getting the communication standard is not supported // - and others EVCommunicationStandard() (EVCommunicationStandardType, error) // returns the identification of the currently connected EV or nil if not available // // possible errors: // - ErrDataNotAvailable if that information is not (yet) available // - and others EVIdentification() (string, error) // returns if the EVSE and EV combination support optimzation of self consumption // // possible errors: // - ErrDataNotAvailable if that information is not (yet) available // - and others EVOptimizationOfSelfConsumptionSupported() (bool, error) // return if the EVSE and EV combination support providing an SoC // // requires EVSoCSupported to return true // only works with a current ISO15118-2 with VAS or ISO15118-20 // communication between EVSE and EV // // possible errors: // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVSoCSupported() (bool, error) // return the last known SoC of the connected EV // // requires EVSoCSupported to return true // only works with a current ISO15118-2 with VAS or ISO15118-20 // communication between EVSE and EV // // possible errors: // - ErrNotSupported if support for SoC is not possible // - ErrDataNotAvailable if no such measurement is (yet) available // - and others EVSoC() (float64, error) // returns if the EVSE and EV combination support coordinated charging // // possible errors: // - ErrDataNotAvailable if that information is not (yet) available // - and others EVCoordinatedChargingSupported() (bool, error) // returns the current charging stratey // // returns EVChargeStrategyTypeUnknown if it could not be determined, e.g. // if the vehicle communication is via IEC61851 or the EV doesn't provide // any information about its charging mode or plan EVChargeStrategy() EVChargeStrategyType // returns the current energy demand // - EVDemand: details about the actual demands from the EV // - error: if no data is available // // if duration is 0, direct charging is active, otherwise timed charging is active EVEnergyDemand() (EVDemand, error) // returns the constraints for the power slots // - EVTimeSlotConstraints: details about the time slot constraints EVGetPowerConstraints() EVTimeSlotConstraints // send power limits data to the EV // // returns an error if sending failed or charge slot count do not meet requirements // // this needs to be invoked either <55s, idealy <15s, of receiving a call to EVRequestPowerLimits // or if the CEM requires the EV to change its charge plan EVWritePowerLimits(data []EVDurationSlotValue) error // returns the constraints for incentive slots // - EVIncentiveConstraints: details about the incentive slot constraints EVGetIncentiveConstraints() EVIncentiveSlotConstraints // send price slots data to the EV // // returns an error if sending failed or charge slot count do not meet requirements // // this needs to be invoked either within 20s of receiving a call to EVRequestIncentives // or if the CEM requires the EV to change its charge plan EVWriteIncentives(data []EVDurationSlotValue) error }
used by the CEM and implemented by emobility
type EmobilityScenarioImpl ¶
type EmobilityScenarioImpl struct { *scenarios.ScenarioImpl // contains filtered or unexported fields }
func NewEMobilityScenario ¶
func NewEMobilityScenario(service *service.EEBUSService, currency model.CurrencyType, configuration EmobilityConfiguration) *EmobilityScenarioImpl
func (*EmobilityScenarioImpl) AddFeatures ¶
func (e *EmobilityScenarioImpl) AddFeatures()
adds all the supported features to the local entity
func (*EmobilityScenarioImpl) AddUseCases ¶
func (e *EmobilityScenarioImpl) AddUseCases()
add supported e-mobility usecases
func (*EmobilityScenarioImpl) HandleResult ¶
func (e *EmobilityScenarioImpl) HandleResult(errorMsg spine.ResultMessage)
func (*EmobilityScenarioImpl) RegisterRemoteDevice ¶ added in v0.2.0
func (e *EmobilityScenarioImpl) RegisterRemoteDevice(details *service.ServiceDetails, dataProvider any) any
func (*EmobilityScenarioImpl) UnRegisterRemoteDevice ¶ added in v0.2.0
func (e *EmobilityScenarioImpl) UnRegisterRemoteDevice(remoteDeviceSki string) error
type MockEmobilityDataProvider ¶ added in v0.2.0
type MockEmobilityDataProvider struct {
// contains filtered or unexported fields
}
MockEmobilityDataProvider is a mock of EmobilityDataProvider interface.
func NewMockEmobilityDataProvider ¶ added in v0.2.0
func NewMockEmobilityDataProvider(ctrl *gomock.Controller) *MockEmobilityDataProvider
NewMockEmobilityDataProvider creates a new mock instance.
func (*MockEmobilityDataProvider) EVProvidedChargePlan ¶ added in v0.2.0
func (m *MockEmobilityDataProvider) EVProvidedChargePlan(data []EVDurationSlotValue)
EVProvidedChargePlan mocks base method.
func (*MockEmobilityDataProvider) EVProvidedChargeStrategy ¶ added in v0.2.0
func (m *MockEmobilityDataProvider) EVProvidedChargeStrategy(strategy EVChargeStrategyType)
EVProvidedChargeStrategy mocks base method.
func (*MockEmobilityDataProvider) EVRequestIncentives ¶ added in v0.2.0
func (m *MockEmobilityDataProvider) EVRequestIncentives(demand EVDemand, constraints EVIncentiveSlotConstraints)
EVRequestIncentives mocks base method.
func (*MockEmobilityDataProvider) EVRequestPowerLimits ¶ added in v0.2.0
func (m *MockEmobilityDataProvider) EVRequestPowerLimits(demand EVDemand, constraints EVTimeSlotConstraints)
EVRequestPowerLimits mocks base method.
func (*MockEmobilityDataProvider) EXPECT ¶ added in v0.2.0
func (m *MockEmobilityDataProvider) EXPECT() *MockEmobilityDataProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEmobilityDataProviderMockRecorder ¶ added in v0.2.0
type MockEmobilityDataProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockEmobilityDataProviderMockRecorder is the mock recorder for MockEmobilityDataProvider.
func (*MockEmobilityDataProviderMockRecorder) EVProvidedChargePlan ¶ added in v0.2.0
func (mr *MockEmobilityDataProviderMockRecorder) EVProvidedChargePlan(data interface{}) *gomock.Call
EVProvidedChargePlan indicates an expected call of EVProvidedChargePlan.
func (*MockEmobilityDataProviderMockRecorder) EVProvidedChargeStrategy ¶ added in v0.2.0
func (mr *MockEmobilityDataProviderMockRecorder) EVProvidedChargeStrategy(strategy interface{}) *gomock.Call
EVProvidedChargeStrategy indicates an expected call of EVProvidedChargeStrategy.
func (*MockEmobilityDataProviderMockRecorder) EVRequestIncentives ¶ added in v0.2.0
func (mr *MockEmobilityDataProviderMockRecorder) EVRequestIncentives(demand, constraints interface{}) *gomock.Call
EVRequestIncentives indicates an expected call of EVRequestIncentives.
func (*MockEmobilityDataProviderMockRecorder) EVRequestPowerLimits ¶ added in v0.2.0
func (mr *MockEmobilityDataProviderMockRecorder) EVRequestPowerLimits(demand, constraints interface{}) *gomock.Call
EVRequestPowerLimits indicates an expected call of EVRequestPowerLimits.
type MockEmobilityI ¶ added in v0.2.0
type MockEmobilityI struct {
// contains filtered or unexported fields
}
MockEmobilityI is a mock of EmobilityI interface.
func NewMockEmobilityI ¶ added in v0.2.0
func NewMockEmobilityI(ctrl *gomock.Controller) *MockEmobilityI
NewMockEmobilityI creates a new mock instance.
func (*MockEmobilityI) EVChargeStrategy ¶ added in v0.2.0
func (m *MockEmobilityI) EVChargeStrategy() EVChargeStrategyType
EVChargeStrategy mocks base method.
func (*MockEmobilityI) EVChargedEnergy ¶ added in v0.2.0
func (m *MockEmobilityI) EVChargedEnergy() (float64, error)
EVChargedEnergy mocks base method.
func (*MockEmobilityI) EVCommunicationStandard ¶ added in v0.2.0
func (m *MockEmobilityI) EVCommunicationStandard() (EVCommunicationStandardType, error)
EVCommunicationStandard mocks base method.
func (*MockEmobilityI) EVConnected ¶ added in v0.2.1
func (m *MockEmobilityI) EVConnected() bool
EVConnected mocks base method.
func (*MockEmobilityI) EVConnectedPhases ¶ added in v0.2.0
func (m *MockEmobilityI) EVConnectedPhases() (uint, error)
EVConnectedPhases mocks base method.
func (*MockEmobilityI) EVCoordinatedChargingSupported ¶ added in v0.2.0
func (m *MockEmobilityI) EVCoordinatedChargingSupported() (bool, error)
EVCoordinatedChargingSupported mocks base method.
func (*MockEmobilityI) EVCurrentChargeState ¶ added in v0.2.0
func (m *MockEmobilityI) EVCurrentChargeState() (EVChargeStateType, error)
EVCurrentChargeState mocks base method.
func (*MockEmobilityI) EVCurrentLimits ¶ added in v0.2.0
func (m *MockEmobilityI) EVCurrentLimits() ([]float64, []float64, []float64, error)
EVCurrentLimits mocks base method.
func (*MockEmobilityI) EVCurrentsPerPhase ¶ added in v0.2.0
func (m *MockEmobilityI) EVCurrentsPerPhase() ([]float64, error)
EVCurrentsPerPhase mocks base method.
func (*MockEmobilityI) EVEnergyDemand ¶ added in v0.2.0
func (m *MockEmobilityI) EVEnergyDemand() (EVDemand, error)
EVEnergyDemand mocks base method.
func (*MockEmobilityI) EVGetIncentiveConstraints ¶ added in v0.2.0
func (m *MockEmobilityI) EVGetIncentiveConstraints() EVIncentiveSlotConstraints
EVGetIncentiveConstraints mocks base method.
func (*MockEmobilityI) EVGetPowerConstraints ¶ added in v0.2.0
func (m *MockEmobilityI) EVGetPowerConstraints() EVTimeSlotConstraints
EVGetPowerConstraints mocks base method.
func (*MockEmobilityI) EVIdentification ¶ added in v0.2.0
func (m *MockEmobilityI) EVIdentification() (string, error)
EVIdentification mocks base method.
func (*MockEmobilityI) EVLoadControlObligationLimits ¶ added in v0.2.0
func (m *MockEmobilityI) EVLoadControlObligationLimits() ([]float64, error)
EVLoadControlObligationLimits mocks base method.
func (*MockEmobilityI) EVOptimizationOfSelfConsumptionSupported ¶ added in v0.2.0
func (m *MockEmobilityI) EVOptimizationOfSelfConsumptionSupported() (bool, error)
EVOptimizationOfSelfConsumptionSupported mocks base method.
func (*MockEmobilityI) EVPowerPerPhase ¶ added in v0.2.0
func (m *MockEmobilityI) EVPowerPerPhase() ([]float64, error)
EVPowerPerPhase mocks base method.
func (*MockEmobilityI) EVSoC ¶ added in v0.2.0
func (m *MockEmobilityI) EVSoC() (float64, error)
EVSoC mocks base method.
func (*MockEmobilityI) EVSoCSupported ¶ added in v0.2.0
func (m *MockEmobilityI) EVSoCSupported() (bool, error)
EVSoCSupported mocks base method.
func (*MockEmobilityI) EVWriteIncentives ¶ added in v0.2.0
func (m *MockEmobilityI) EVWriteIncentives(data []EVDurationSlotValue) error
EVWriteIncentives mocks base method.
func (*MockEmobilityI) EVWriteLoadControlLimits ¶ added in v0.2.0
func (m *MockEmobilityI) EVWriteLoadControlLimits(obligations, recommendations []float64) error
EVWriteLoadControlLimits mocks base method.
func (*MockEmobilityI) EVWritePowerLimits ¶ added in v0.2.0
func (m *MockEmobilityI) EVWritePowerLimits(data []EVDurationSlotValue) error
EVWritePowerLimits mocks base method.
func (*MockEmobilityI) EXPECT ¶ added in v0.2.0
func (m *MockEmobilityI) EXPECT() *MockEmobilityIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEmobilityIMockRecorder ¶ added in v0.2.0
type MockEmobilityIMockRecorder struct {
// contains filtered or unexported fields
}
MockEmobilityIMockRecorder is the mock recorder for MockEmobilityI.
func (*MockEmobilityIMockRecorder) EVChargeStrategy ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVChargeStrategy() *gomock.Call
EVChargeStrategy indicates an expected call of EVChargeStrategy.
func (*MockEmobilityIMockRecorder) EVChargedEnergy ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVChargedEnergy() *gomock.Call
EVChargedEnergy indicates an expected call of EVChargedEnergy.
func (*MockEmobilityIMockRecorder) EVCommunicationStandard ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVCommunicationStandard() *gomock.Call
EVCommunicationStandard indicates an expected call of EVCommunicationStandard.
func (*MockEmobilityIMockRecorder) EVConnected ¶ added in v0.2.1
func (mr *MockEmobilityIMockRecorder) EVConnected() *gomock.Call
EVConnected indicates an expected call of EVConnected.
func (*MockEmobilityIMockRecorder) EVConnectedPhases ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVConnectedPhases() *gomock.Call
EVConnectedPhases indicates an expected call of EVConnectedPhases.
func (*MockEmobilityIMockRecorder) EVCoordinatedChargingSupported ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVCoordinatedChargingSupported() *gomock.Call
EVCoordinatedChargingSupported indicates an expected call of EVCoordinatedChargingSupported.
func (*MockEmobilityIMockRecorder) EVCurrentChargeState ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVCurrentChargeState() *gomock.Call
EVCurrentChargeState indicates an expected call of EVCurrentChargeState.
func (*MockEmobilityIMockRecorder) EVCurrentLimits ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVCurrentLimits() *gomock.Call
EVCurrentLimits indicates an expected call of EVCurrentLimits.
func (*MockEmobilityIMockRecorder) EVCurrentsPerPhase ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVCurrentsPerPhase() *gomock.Call
EVCurrentsPerPhase indicates an expected call of EVCurrentsPerPhase.
func (*MockEmobilityIMockRecorder) EVEnergyDemand ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVEnergyDemand() *gomock.Call
EVEnergyDemand indicates an expected call of EVEnergyDemand.
func (*MockEmobilityIMockRecorder) EVGetIncentiveConstraints ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVGetIncentiveConstraints() *gomock.Call
EVGetIncentiveConstraints indicates an expected call of EVGetIncentiveConstraints.
func (*MockEmobilityIMockRecorder) EVGetPowerConstraints ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVGetPowerConstraints() *gomock.Call
EVGetPowerConstraints indicates an expected call of EVGetPowerConstraints.
func (*MockEmobilityIMockRecorder) EVIdentification ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVIdentification() *gomock.Call
EVIdentification indicates an expected call of EVIdentification.
func (*MockEmobilityIMockRecorder) EVLoadControlObligationLimits ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVLoadControlObligationLimits() *gomock.Call
EVLoadControlObligationLimits indicates an expected call of EVLoadControlObligationLimits.
func (*MockEmobilityIMockRecorder) EVOptimizationOfSelfConsumptionSupported ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVOptimizationOfSelfConsumptionSupported() *gomock.Call
EVOptimizationOfSelfConsumptionSupported indicates an expected call of EVOptimizationOfSelfConsumptionSupported.
func (*MockEmobilityIMockRecorder) EVPowerPerPhase ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVPowerPerPhase() *gomock.Call
EVPowerPerPhase indicates an expected call of EVPowerPerPhase.
func (*MockEmobilityIMockRecorder) EVSoC ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVSoC() *gomock.Call
EVSoC indicates an expected call of EVSoC.
func (*MockEmobilityIMockRecorder) EVSoCSupported ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVSoCSupported() *gomock.Call
EVSoCSupported indicates an expected call of EVSoCSupported.
func (*MockEmobilityIMockRecorder) EVWriteIncentives ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVWriteIncentives(data interface{}) *gomock.Call
EVWriteIncentives indicates an expected call of EVWriteIncentives.
func (*MockEmobilityIMockRecorder) EVWriteLoadControlLimits ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVWriteLoadControlLimits(obligations, recommendations interface{}) *gomock.Call
EVWriteLoadControlLimits indicates an expected call of EVWriteLoadControlLimits.
func (*MockEmobilityIMockRecorder) EVWritePowerLimits ¶ added in v0.2.0
func (mr *MockEmobilityIMockRecorder) EVWritePowerLimits(data interface{}) *gomock.Call
EVWritePowerLimits indicates an expected call of EVWritePowerLimits.