forked from lorenzodonini/ocpp-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmartcharging_handler.go
32 lines (26 loc) · 1.9 KB
/
smartcharging_handler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"github.com/lorenzodonini/ocpp-go/ocpp"
"github.com/lorenzodonini/ocpp-go/ocpp2.0.1/smartcharging"
"github.com/lorenzodonini/ocpp-go/ocppj"
)
func (c *CSMSHandler) OnClearedChargingLimit(chargingStationID string, request *smartcharging.ClearedChargingLimitRequest) (response *smartcharging.ClearedChargingLimitResponse, err error) {
logDefault(chargingStationID, request.GetFeatureName()).Warnf("Unsupported feature")
return nil, ocpp.NewHandlerError(ocppj.NotSupported, "Not supported")
}
func (c *CSMSHandler) OnNotifyChargingLimit(chargingStationID string, request *smartcharging.NotifyChargingLimitRequest) (response *smartcharging.NotifyChargingLimitResponse, err error) {
logDefault(chargingStationID, request.GetFeatureName()).Warnf("Unsupported feature")
return nil, ocpp.NewHandlerError(ocppj.NotSupported, "Not supported")
}
func (c *CSMSHandler) OnNotifyEVChargingNeeds(chargingStationID string, request *smartcharging.NotifyEVChargingNeedsRequest) (response *smartcharging.NotifyEVChargingNeedsResponse, err error) {
logDefault(chargingStationID, request.GetFeatureName()).Warnf("Unsupported feature")
return nil, ocpp.NewHandlerError(ocppj.NotSupported, "Not supported")
}
func (c *CSMSHandler) OnNotifyEVChargingSchedule(chargingStationID string, request *smartcharging.NotifyEVChargingScheduleRequest) (response *smartcharging.NotifyEVChargingScheduleResponse, err error) {
logDefault(chargingStationID, request.GetFeatureName()).Warnf("Unsupported feature")
return nil, ocpp.NewHandlerError(ocppj.NotSupported, "Not supported")
}
func (c *CSMSHandler) OnReportChargingProfiles(chargingStationID string, request *smartcharging.ReportChargingProfilesRequest) (response *smartcharging.ReportChargingProfilesResponse, err error) {
logDefault(chargingStationID, request.GetFeatureName()).Warnf("Unsupported feature")
return nil, ocpp.NewHandlerError(ocppj.NotSupported, "Not supported")
}