using System; using Vector.Tools; using Vector.CANoe.Runtime; // Import communication model using DataTypes; using NetworkDB.Services; using NetworkDB.Participants; public class LIDAR : MeasurementScript { public override void Start() { } // Send event from LIDAR_Front with panel values [OnChange(typeof(SysVars.LIDAR_Panel.Object_Front))] public void TriggerFront() { if (SysVars.LIDAR_Panel.Object_Front.Type.Value == SysVars.LIDAR_Panel.Object_Front.Type.NO_OBJECT) { Object_Recognition.Object.Classification.SymbValue = Object_Classifiction_Enum.NO_OBJECT; Object_Recognition.Object.Distance = 100; return; } else if (SysVars.LIDAR_Panel.Object_Front.Type.Value == SysVars.LIDAR_Panel.Object_Front.Type.VEHICLE) { Object_Recognition.Object.Classification.SymbValue = Object_Classifiction_Enum.VEHICLE; } else if (SysVars.LIDAR_Panel.Object_Front.Type.Value == SysVars.LIDAR_Panel.Object_Front.Type.OBSTACLE) { Object_Recognition.Object.Classification.SymbValue = Object_Classifiction_Enum.OBSTACLE; } else if (SysVars.LIDAR_Panel.Object_Front.Type.Value == SysVars.LIDAR_Panel.Object_Front.Type.PEDESTRIAN) { Object_Recognition.Object.Classification.SymbValue = Object_Classifiction_Enum.PEDESTRIAN; } Object_Recognition.Object.Distance = SysVars.LIDAR_Panel.Object_Front.Distance.Value; } }