88#include < ArduinoOcpp/Core/OcppModel.h>
99#include < ArduinoOcpp/Tasks/Metering/MeteringService.h>
1010#include < ArduinoOcpp/Tasks/SmartCharging/SmartChargingService.h>
11- #include < ArduinoOcpp/Tasks/ChargePointStatus/ChargePointStatusService .h>
11+ #include < ArduinoOcpp/Tasks/ChargeControl/ChargeControlService .h>
1212#include < ArduinoOcpp/Tasks/Heartbeat/HeartbeatService.h>
1313#include < ArduinoOcpp/Tasks/FirmwareManagement/FirmwareService.h>
1414#include < ArduinoOcpp/Tasks/Diagnostics/DiagnosticsService.h>
@@ -140,8 +140,8 @@ void OCPP_initialize(OcppSocket& ocppSocket, const char *bootNotificationCredent
140140 new TransactionStore (AO_NUMCONNECTORS , filesystem)));
141141 model.setBootService (std::unique_ptr<BootService>(
142142 new BootService (*ocppEngine)));
143- model.setChargePointStatusService (std::unique_ptr<ChargePointStatusService >(
144- new ChargePointStatusService (*ocppEngine, AO_NUMCONNECTORS , filesystem)));
143+ model.setChargeControlService (std::unique_ptr<ChargeControlService >(
144+ new ChargeControlService (*ocppEngine, AO_NUMCONNECTORS , filesystem)));
145145 model.setHeartbeatService (std::unique_ptr<HeartbeatService>(
146146 new HeartbeatService (*ocppEngine)));
147147 model.setAuthorizationService (std::unique_ptr<AuthorizationService>(
@@ -166,8 +166,8 @@ void OCPP_initialize(OcppSocket& ocppSocket, const char *bootNotificationCredent
166166#endif
167167
168168#if AO_PLATFORM == AO_PLATFORM_ARDUINO && (defined(ESP32) || defined(ESP8266))
169- if (!model.getChargePointStatusService ()->getExecuteReset ())
170- model.getChargePointStatusService ()->setExecuteReset (makeDefaultResetFn ());
169+ if (!model.getChargeControlService ()->getExecuteReset ())
170+ model.getChargeControlService ()->setExecuteReset (makeDefaultResetFn ());
171171#endif
172172
173173 model.getBootService ()->setChargePointCredentials (bootNotificationCredentials);
@@ -277,7 +277,7 @@ bool beginTransaction(const char *idTag, unsigned int connectorId) {
277277 AO_DBG_ERR (" idTag format violation. Expect c-style string with at most %u characters" , IDTAG_LEN_MAX );
278278 return false ;
279279 }
280- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
280+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
281281 if (!connector) {
282282 AO_DBG_ERR (" Could not find connector. Ignore" );
283283 return false ;
@@ -296,7 +296,7 @@ bool beginTransaction_authorized(const char *idTag, const char *parentIdTag, uns
296296 AO_DBG_ERR (" (parent)idTag format violation. Expect c-style string with at most %u characters" , IDTAG_LEN_MAX );
297297 return false ;
298298 }
299- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
299+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
300300 if (!connector) {
301301 AO_DBG_ERR (" Could not find connector. Ignore" );
302302 return false ;
@@ -310,7 +310,7 @@ bool endTransaction(const char *reason, unsigned int connectorId) {
310310 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
311311 return false ;
312312 }
313- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
313+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
314314 if (!connector) {
315315 AO_DBG_ERR (" Could not find connector. Ignore" );
316316 return false ;
@@ -325,7 +325,7 @@ bool isTransactionRunning(unsigned int connectorId) {
325325 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
326326 return false ;
327327 }
328- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
328+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
329329 if (!connector) {
330330 AO_DBG_ERR (" Could not find connector. Ignore" );
331331 return false ;
@@ -338,7 +338,7 @@ bool ocppPermitsCharge(unsigned int connectorId) {
338338 AO_DBG_WARN (" Please call OCPP_initialize before" );
339339 return false ;
340340 }
341- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
341+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
342342 if (!connector) {
343343 AO_DBG_ERR (" Could not find connector. Ignore" );
344344 return false ;
@@ -351,7 +351,7 @@ void setConnectorPluggedInput(std::function<bool()> pluggedInput, unsigned int c
351351 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
352352 return ;
353353 }
354- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
354+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
355355 if (!connector) {
356356 AO_DBG_ERR (" Could not find connector. Ignore" );
357357 return ;
@@ -432,7 +432,7 @@ void setEvReadyInput(std::function<bool()> evReadyInput, unsigned int connectorI
432432 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
433433 return ;
434434 }
435- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
435+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
436436 if (!connector) {
437437 AO_DBG_ERR (" Could not find connector. Ignore" );
438438 return ;
@@ -445,7 +445,7 @@ void setEvseReadyInput(std::function<bool()> evseReadyInput, unsigned int connec
445445 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
446446 return ;
447447 }
448- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
448+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
449449 if (!connector) {
450450 AO_DBG_ERR (" Could not find connector. Ignore" );
451451 return ;
@@ -458,7 +458,7 @@ void addErrorCodeInput(std::function<const char *()> errorCodeInput, unsigned in
458458 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
459459 return ;
460460 }
461- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
461+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
462462 if (!connector) {
463463 AO_DBG_ERR (" Could not find connector. Ignore" );
464464 return ;
@@ -518,7 +518,7 @@ void setOnResetNotify(std::function<bool(bool)> onResetNotify) {
518518 return ;
519519 }
520520
521- if (auto csService = ocppEngine->getOcppModel ().getChargePointStatusService ()) {
521+ if (auto csService = ocppEngine->getOcppModel ().getChargeControlService ()) {
522522 csService->setPreReset (onResetNotify);
523523 }
524524}
@@ -529,7 +529,7 @@ void setOnResetExecute(std::function<void(bool)> onResetExecute) {
529529 return ;
530530 }
531531
532- if (auto csService = ocppEngine->getOcppModel ().getChargePointStatusService ()) {
532+ if (auto csService = ocppEngine->getOcppModel ().getChargeControlService ()) {
533533 csService->setExecuteReset (onResetExecute);
534534 }
535535}
@@ -539,7 +539,7 @@ void setOnUnlockConnectorInOut(std::function<PollResult<bool>()> onUnlockConnect
539539 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
540540 return ;
541541 }
542- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
542+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
543543 if (!connector) {
544544 AO_DBG_ERR (" Could not find connector. Ignore" );
545545 return ;
@@ -552,7 +552,7 @@ void setStartTxReadyInput(std::function<bool()> startTxReady, unsigned int conne
552552 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
553553 return ;
554554 }
555- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
555+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
556556 if (!connector) {
557557 AO_DBG_ERR (" Could not find connector. Ignore" );
558558 return ;
@@ -565,7 +565,7 @@ void setStopTxReadyInput(std::function<bool()> stopTxReady, unsigned int connect
565565 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
566566 return ;
567567 }
568- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
568+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
569569 if (!connector) {
570570 AO_DBG_ERR (" Could not find connector. Ignore" );
571571 return ;
@@ -578,7 +578,7 @@ void setOccupiedInput(std::function<bool()> occupied, unsigned int connectorId)
578578 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
579579 return ;
580580 }
581- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
581+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
582582 if (!connector) {
583583 AO_DBG_ERR (" Could not find connector. Ignore" );
584584 return ;
@@ -592,8 +592,8 @@ bool isOperative(unsigned int connectorId) {
592592 return true ; // assume "true" as default state
593593 }
594594 auto & model = ocppEngine->getOcppModel ();
595- auto chargePoint = model.getConnectorStatus (OCPP_ID_OF_CP );
596- auto connector = model.getConnectorStatus (connectorId);
595+ auto chargePoint = model.getConnector (OCPP_ID_OF_CP );
596+ auto connector = model.getConnector (connectorId);
597597 if (!chargePoint || !connector) {
598598 AO_DBG_ERR (" Could not find connector. Ignore" );
599599 return true ; // assume "true" as default state
@@ -607,7 +607,7 @@ int getTransactionId(unsigned int connectorId) {
607607 AO_DBG_WARN (" Please call OCPP_initialize before" );
608608 return -1 ;
609609 }
610- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
610+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
611611 if (!connector) {
612612 AO_DBG_ERR (" Could not find connector. Ignore" );
613613 return -1 ;
@@ -620,7 +620,7 @@ const char *getTransactionIdTag(unsigned int connectorId) {
620620 AO_DBG_WARN (" Please call OCPP_initialize before" );
621621 return nullptr ;
622622 }
623- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (connectorId);
623+ auto connector = ocppEngine->getOcppModel ().getConnector (connectorId);
624624 if (!connector) {
625625 AO_DBG_ERR (" Could not find connector. Ignore" );
626626 return nullptr ;
@@ -731,7 +731,7 @@ bool startTransaction(const char *idTag, OnReceiveConfListener onConf, OnAbortLi
731731 AO_DBG_ERR (" idTag format violation. Expect c-style string with at most %u characters" , IDTAG_LEN_MAX );
732732 return false ;
733733 }
734- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (OCPP_ID_OF_CONNECTOR );
734+ auto connector = ocppEngine->getOcppModel ().getConnector (OCPP_ID_OF_CONNECTOR );
735735 if (!connector) {
736736 AO_DBG_ERR (" Could not find connector. Ignore" );
737737 return false ;
@@ -789,7 +789,7 @@ bool stopTransaction(OnReceiveConfListener onConf, OnAbortListener onAbort, OnTi
789789 AO_DBG_ERR (" OCPP uninitialized" ); // please call OCPP_initialize before
790790 return false ;
791791 }
792- auto connector = ocppEngine->getOcppModel ().getConnectorStatus (OCPP_ID_OF_CONNECTOR );
792+ auto connector = ocppEngine->getOcppModel ().getConnector (OCPP_ID_OF_CONNECTOR );
793793 if (!connector) {
794794 AO_DBG_ERR (" Could not find connector. Ignore" );
795795 return false ;
0 commit comments