Skip to content

Commit 9cccbe4

Browse files
committed
Split csms and cs in files and update doc
Signed-off-by: Lorenzo Donini <[email protected]>
1 parent 074ddd6 commit 9cccbe4

File tree

8 files changed

+1281
-1231
lines changed

8 files changed

+1281
-1231
lines changed

ocpp2.0/charging_station.go

Lines changed: 459 additions & 0 deletions
Large diffs are not rendered by default.

ocpp2.0/csms.go

Lines changed: 757 additions & 0 deletions
Large diffs are not rendered by default.

ocpp2.0/get_base_report.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"reflect"
66
)
77

8-
// -------------------- Change Availability (CSMS -> CS) --------------------
8+
// -------------------- Get Base Report (CSMS -> CS) --------------------
99

1010
// Requested availability change in GetBaseReportRequest.
1111
type ReportBaseType string

ocpp2.0/get_charging_profiles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"reflect"
66
)
77

8-
// -------------------- Get Charging Profile (CSMS -> Charging Station) --------------------
8+
// -------------------- Get Charging Profiles (CSMS -> Charging Station) --------------------
99

1010
// Status reported in GetChargingProfilesConfirmation.
1111
type GetChargingProfileStatus string

ocpp2.0/get_display_messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"reflect"
66
)
77

8-
// -------------------- Clear Display (CSMS -> CS) --------------------
8+
// -------------------- Get Display Messages (CSMS -> CS) --------------------
99

1010
// Priority with which a message should be displayed on a Charging Station.
1111
// Used within a GetDisplayMessagesRequest.

ocpp2.0/get_installed_certificate_ids.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"reflect"
66
)
77

8-
// -------------------- Certificate Signed (CSMS -> CS) --------------------
8+
// -------------------- Get Installed Certificate IDs (CSMS -> CS) --------------------
99

1010
// Status returned in response to GetInstalledCertificateIdsRequest, that indicates whether certificate signing has been accepted or rejected.
1111
type GetInstalledCertificateStatus string

ocpp2.0/v2.go

Lines changed: 58 additions & 1224 deletions
Large diffs are not rendered by default.

ocpp2.0_test/ocpp2_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ type expectedChargePointOptions struct {
562562

563563
func setupDefaultCentralSystemHandlers(suite *OcppV2TestSuite, coreListener ocpp2.CentralSystemCoreListener, options expectedCentralSystemOptions) {
564564
t := suite.T()
565-
suite.csms.SetNewChargePointHandler(func(chargePointId string) {
565+
suite.csms.SetNewChargingStationHandler(func(chargePointId string) {
566566
assert.Equal(t, options.clientId, chargePointId)
567567
})
568568
suite.csms.SetCentralSystemCoreListener(coreListener)
@@ -721,7 +721,7 @@ type OcppV2TestSuite struct {
721721
ocppjCentralSystem *ocppj.CentralSystem
722722
mockWsServer *MockWebsocketServer
723723
mockWsClient *MockWebsocketClient
724-
chargePoint ocpp2.ChargePoint
724+
chargePoint ocpp2.ChargingStation
725725
csms ocpp2.CSMS
726726
messageIdGenerator TestRandomIdGenerator
727727
}
@@ -749,7 +749,7 @@ func (suite *OcppV2TestSuite) SetupTest() {
749749
suite.mockWsServer = &mockServer
750750
suite.ocppjChargePoint = ocppj.NewChargePoint("test_id", suite.mockWsClient, coreProfile)
751751
suite.ocppjCentralSystem = ocppj.NewCentralSystem(suite.mockWsServer, coreProfile)
752-
suite.chargePoint = ocpp2.NewChargePoint("test_id", suite.ocppjChargePoint, suite.mockWsClient)
752+
suite.chargePoint = ocpp2.NewChargingStation("test_id", suite.ocppjChargePoint, suite.mockWsClient)
753753
suite.csms = ocpp2.NewCSMS(suite.ocppjCentralSystem, suite.mockWsServer)
754754
suite.messageIdGenerator = TestRandomIdGenerator{generator: func() string {
755755
return defaultMessageId

0 commit comments

Comments
 (0)