1
1
package emobility
2
2
3
+ import "github.com/enbility/spine-go/api"
4
+
3
5
//go:generate mockgen -source emobility.go -destination mock_emobility_test.go -package emobility
4
6
5
7
// used by emobility and implemented by the CEM
@@ -43,48 +45,48 @@ type EmobilityDataProvider interface {
43
45
// used by the CEM and implemented by emobility
44
46
type EMobilityInterface interface {
45
47
// return if an EV is connected
46
- EVConnected () bool
48
+ EVConnected (remoteEntity api. EntityRemoteInterface ) bool
47
49
48
50
// return the current charge state of the EV
49
- EVCurrentChargeState () (EVChargeStateType , error )
51
+ EVCurrentChargeState (remoteEntity api. EntityRemoteInterface ) (EVChargeStateType , error )
50
52
51
53
// return the number of ac connected phases of the EV or 0 if it is unknown
52
- EVConnectedPhases () (uint , error )
54
+ EVConnectedPhases (remoteEntity api. EntityRemoteInterface ) (uint , error )
53
55
54
56
// return the charged energy measurement in Wh of the connected EV
55
57
//
56
58
// possible errors:
57
59
// - ErrDataNotAvailable if no such measurement is (yet) available
58
60
// - and others
59
- EVChargedEnergy () (float64 , error )
61
+ EVChargedEnergy (remoteEntity api. EntityRemoteInterface ) (float64 , error )
60
62
61
63
// return the last power measurement for each phase of the connected EV
62
64
//
63
65
// possible errors:
64
66
// - ErrDataNotAvailable if no such measurement is (yet) available
65
67
// - and others
66
- EVPowerPerPhase () ([]float64 , error )
68
+ EVPowerPerPhase (remoteEntity api. EntityRemoteInterface ) ([]float64 , error )
67
69
68
70
// return the last current measurement for each phase of the connected EV
69
71
//
70
72
// possible errors:
71
73
// - ErrDataNotAvailable if no such measurement is (yet) available
72
74
// - and others
73
- EVCurrentsPerPhase () ([]float64 , error )
75
+ EVCurrentsPerPhase (remoteEntity api. EntityRemoteInterface ) ([]float64 , error )
74
76
75
77
// return the min, max, default limits for each phase of the connected EV
76
78
//
77
79
// possible errors:
78
80
// - ErrDataNotAvailable if no such measurement is (yet) available
79
81
// - and others
80
- EVCurrentLimits () ([]float64 , []float64 , []float64 , error )
82
+ EVCurrentLimits (remoteEntity api. EntityRemoteInterface ) ([]float64 , []float64 , []float64 , error )
81
83
82
84
// return the current loadcontrol obligation limits
83
85
//
84
86
// possible errors:
85
87
// - ErrDataNotAvailable if no such measurement is (yet) available
86
88
// - and others
87
- EVLoadControlObligationLimits () ([]float64 , error )
89
+ EVLoadControlObligationLimits (remoteEntity api. EntityRemoteInterface ) ([]float64 , error )
88
90
89
91
// send new LoadControlLimits to the remote EV
90
92
//
@@ -113,7 +115,7 @@ type EMobilityInterface interface {
113
115
// In ISO15118-2 the usecase is only supported via VAS extensions which are vendor specific
114
116
// and needs to have specific EVSE support for the specific EV brand.
115
117
// In ISO15118-20 this is a standard feature which does not need special support on the EVSE.
116
- EVWriteLoadControlLimits (limits []EVLoadLimits ) error
118
+ EVWriteLoadControlLimits (remoteEntity api. EntityRemoteInterface , limits []EVLoadLimits ) error
117
119
118
120
// return the current communication standard type used to communicate between EVSE and EV
119
121
//
@@ -130,21 +132,21 @@ type EMobilityInterface interface {
130
132
// - ErrDataNotAvailable if that information is not (yet) available
131
133
// - ErrNotSupported if getting the communication standard is not supported
132
134
// - and others
133
- EVCommunicationStandard () (EVCommunicationStandardType , error )
135
+ EVCommunicationStandard (remoteEntity api. EntityRemoteInterface ) (EVCommunicationStandardType , error )
134
136
135
137
// returns the identification of the currently connected EV or nil if not available
136
138
//
137
139
// possible errors:
138
140
// - ErrDataNotAvailable if that information is not (yet) available
139
141
// - and others
140
- EVIdentification () (string , error )
142
+ EVIdentification (remoteEntity api. EntityRemoteInterface ) (string , error )
141
143
142
144
// returns if the EVSE and EV combination support optimzation of self consumption
143
145
//
144
146
// possible errors:
145
147
// - ErrDataNotAvailable if that information is not (yet) available
146
148
// - and others
147
- EVOptimizationOfSelfConsumptionSupported () (bool , error )
149
+ EVOptimizationOfSelfConsumptionSupported (remoteEntity api. EntityRemoteInterface ) (bool , error )
148
150
149
151
// return if the EVSE and EV combination support providing an SoC
150
152
//
@@ -155,7 +157,7 @@ type EMobilityInterface interface {
155
157
// possible errors:
156
158
// - ErrDataNotAvailable if no such measurement is (yet) available
157
159
// - and others
158
- EVSoCSupported () (bool , error )
160
+ EVSoCSupported (remoteEntity api. EntityRemoteInterface ) (bool , error )
159
161
160
162
// return the last known SoC of the connected EV
161
163
//
@@ -167,57 +169,57 @@ type EMobilityInterface interface {
167
169
// - ErrNotSupported if support for SoC is not possible
168
170
// - ErrDataNotAvailable if no such measurement is (yet) available
169
171
// - and others
170
- EVSoC () (float64 , error )
172
+ EVSoC (remoteEntity api. EntityRemoteInterface ) (float64 , error )
171
173
172
174
// returns if the EVSE and EV combination support coordinated charging
173
175
//
174
176
// possible errors:
175
177
// - ErrDataNotAvailable if that information is not (yet) available
176
178
// - and others
177
- EVCoordinatedChargingSupported () (bool , error )
179
+ EVCoordinatedChargingSupported (remoteEntity api. EntityRemoteInterface ) (bool , error )
178
180
179
181
// returns the current charging stratey
180
182
//
181
183
// returns EVChargeStrategyTypeUnknown if it could not be determined, e.g.
182
184
// if the vehicle communication is via IEC61851 or the EV doesn't provide
183
185
// any information about its charging mode or plan
184
- EVChargeStrategy () EVChargeStrategyType
186
+ EVChargeStrategy (remoteEntity api. EntityRemoteInterface ) EVChargeStrategyType
185
187
186
188
// returns the current energy demand
187
189
// - EVDemand: details about the actual demands from the EV
188
190
// - error: if no data is available
189
191
//
190
192
// if duration is 0, direct charging is active, otherwise timed charging is active
191
- EVEnergyDemand () (EVDemand , error )
193
+ EVEnergyDemand (remoteEntity api. EntityRemoteInterface ) (EVDemand , error )
192
194
193
195
// returns the current charge plan
194
196
// - EVChargePlan: details about the actual charge plan provided by the EV
195
197
// - error: if no data is available
196
- EVChargePlan () (EVChargePlan , error )
198
+ EVChargePlan (remoteEntity api. EntityRemoteInterface ) (EVChargePlan , error )
197
199
198
200
// returns the constraints for the time slots
199
201
// - EVTimeSlotConstraints: details about the time slot constraints
200
202
// - error: if no data is available
201
- EVTimeSlotConstraints () (EVTimeSlotConstraints , error )
203
+ EVTimeSlotConstraints (remoteEntity api. EntityRemoteInterface ) (EVTimeSlotConstraints , error )
202
204
203
205
// send power limits data to the EV
204
206
//
205
207
// returns an error if sending failed or charge slot count do not meet requirements
206
208
//
207
209
// this needs to be invoked either <55s, idealy <15s, of receiving a call to EVRequestPowerLimits
208
210
// or if the CEM requires the EV to change its charge plan
209
- EVWritePowerLimits (data []EVDurationSlotValue ) error
211
+ EVWritePowerLimits (remoteEntity api. EntityRemoteInterface , data []EVDurationSlotValue ) error
210
212
211
213
// returns the constraints for incentive slots
212
214
// - EVIncentiveConstraints: details about the incentive slot constraints
213
215
// - error: if no data is available
214
- EVIncentiveConstraints () (EVIncentiveSlotConstraints , error )
216
+ EVIncentiveConstraints (remoteEntity api. EntityRemoteInterface ) (EVIncentiveSlotConstraints , error )
215
217
216
218
// send price slots data to the EV
217
219
//
218
220
// returns an error if sending failed or charge slot count do not meet requirements
219
221
//
220
222
// this needs to be invoked either within 20s of receiving a call to EVRequestIncentives
221
223
// or if the CEM requires the EV to change its charge plan
222
- EVWriteIncentives (data []EVDurationSlotValue ) error
224
+ EVWriteIncentives (remoteEntity api. EntityRemoteInterface , data []EVDurationSlotValue ) error
223
225
}
0 commit comments