void OnStationAttributeTriggerAll(char stationName[], char attributeName[])
{
// For all trigger attributes of all stations in the scenario
write("CAPL Node '%NODE_NAME%', Car2x/V2x station '%s', %f sec : OnStationAttributeTriggerAll called - Attribute '%s' = %f" ,
stationName,
TimeNowNS()/1e9 ,
attributeName,
C2xGetStationAttributeDouble(stationName, attributeName));
// For concrete trigger attribute of a some known station "Station1"
if (strncmp(stationName,"Station1",strlen(stationName)) == 0 &&
strncmp(attributeName,"Speed",strlen(attributeName)) == 0)
{
write("Car2x/V2x Station '%s', %f sec : OnStationAttributeTriggerAll called - Station1 Speed = %f",
stationName,
TimeNowNS()/1e9 ,
C2xGetStationAttributeDouble(stationName, "Speed"));
}
}