5.4 Reset
This reinitializes all the components/resources to their default values.
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
OCPPResetAllGlobals() | This function calls various other reset functions to reset all the global variables used throughout the application. It ensures that all the necessary components are reinitialized to their default states. | void | void |
Example:
void OCPPSoftwareReset(void)
{
LogDebug("APP_LOG", "Closing all database instances...");
OCPPDeinit();
finalize();
DataBaseDeinit();
OCPPResetAllGlobals();
sleep(1);
LogDebug("APP_LOG", "Resetting OCPP Configuration to default Configuration\n");
OCPPInit();
TimerInitialize();
DataBaseInit();
OCPPMessagesInit();
InitializeGlobalProfiles(GlobalGetTotalConnectors());
}
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
OCPPSoftwareReset() | Resets the OCPP configuration to its default values. This function first closes all database instances and then reinitializes them. It also sets various configuration parameters to their default states. Finally, it initializes several modules and performs the necessary setups to ensure the system is ready for operation. | void | void |
Example:
case '0': /*Reset OCPP*/
driverPluginStatus = false;
reservationFeatureProfileEnable = true;
totalConnectors = 0U;
GetStartTransactionIdTag(&startTransactionId[0]);
lasttransactionId = GetStartTransactionResponseTransactionId();
OCPPSoftwareReset();
break;
