variables
{
msTimer tRestartAfterPause;
const long cRestartAfterPauseTimeout = 4000;
int isEVTriggered = 1;
}
// To be called during ChargeLoop
on key 'x'
{
if(isEVTriggered == 1)
{
// Trigger 'Pause' or 'Standby' via EV
EV.ISO20.EnterChargingSessionPauseOrStandby.Call();
}
else
{
// Trigger 'Pause' or 'Standby' via EVSE
EVSE.SetNextEVSENotification.Call(_CCS::DataTypes::EVSENotificationType::Pause);
}
}
// To be called during 'Standby' procedure
on key 'c'
{
if(isEVTriggered == 1)
{
// Exit 'Standby' via EV
EV.ISO20.ExitStandby.Call();
}
else
{
// Exit 'Standby' via EVSE
EVSE.SetNextEVSENotification.Call(_CCS::DataTypes::EVSENotificationType::ExitStandby);
}
}
on fct_returning EV.TransportLayerDisconnectInd
{
// Execute 'Pause' logic, if it was requested and accepted
if($EV.ISO20.SessionStop_Request.ChargingSession == _CCS::DataTypes::parISO20ChargingSessionType::Pause
&& $EV.ISO20.SessionStop_Response.ResponseCode == _CCS::DataTypes::ISO20ResponseCodeType::OK)
{
setTimer(tRestartAfterPause, cRestartAfterPauseTimeout);
EV.StopSimulation.Call();
EVSE.StopSimulation.Call();
}
}
on timer tRestartAfterPause
{
// Skip SLAC after pause
setAttribute(CCS::Simulation::EV, CCSBinding::EV::SLACCommunication, CCSBinding::Disabled);
// Restart communication
EV.StartSimulation.Call();
EVSE.StartSimulation.Call();
}