variables
{
int AutoFill_header = 0; // Used to re-enable the autofill after sending a message
}
on fct_called EVSE.OnLastReceivedMessageIdChanged
{
@Common::LastReceivedMessageId = $EVSE.OnLastReceivedMessageIdChanged.LatestCall.lastRxMessageId;
// Enable AutoHeaderFill if it was previously disabled at the Req/Resp loop
if (AutoFill_header == 0)
{
EVSE.EnableAutoHeaderFill.Call(1);
AutoFill_header = 1;
}
}
on value_change EV.SAP.SupportedAppProtocol_Response
{
int i;
// Disable AutoHeaderFill for manual definition of the parameter set
if (AutoFill_header == 1)
{
EVSE.EnableAutoHeaderFill.Call(0);
AutoFill_header = 0;
}
// Define custom SessionID to be sent in SessionSetupReq
for(i=0; i<8;i++)
{
$CCS::Simulation::EVSE.ISO20.SessionSetup_Request.Header.SessionID[i] = i;
}
}