Class VehicleSeenTrafficSignsUpdate
java.lang.Object
org.eclipse.mosaic.rti.api.Interaction
org.eclipse.mosaic.interactions.trafficsigns.VehicleSeenTrafficSignsUpdate
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Interaction>
This extension of
Interaction
stores a map of all traffic signs which are in sight
distance of a specific vehicle and a map of all traffic signs which became invalid for that vehicle.- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.mosaic.rti.api.Interaction
time
-
Constructor Summary
ConstructorsConstructorDescriptionVehicleSeenTrafficSignsUpdate
(long time) Creates a newVehicleSeenTrafficSignsUpdate
interaction without any updates. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewSign
(String vehicleId, TrafficSign trafficSign) Adds a new which is in sight area of vehicle with .void
addPassedSign
(String vehicleId, TrafficSign trafficSign) Adds a which has become invalid for vehicle with .boolean
Returns a list of all receiver vehicles.getNewSigns
(String vehicleId) Returns the list of new traffic signs of which vehicle with is recipient.getPassedSigns
(String vehicleId) Returns the list of traffic signs that became invalid of which vehicle with is recipient.int
hashCode()
toString()
Methods inherited from class org.eclipse.mosaic.rti.api.Interaction
compareTo, createTypeIdentifier, getId, getSenderId, getTime, getTypeId, setSenderId
-
Field Details
-
TYPE_ID
-
-
Constructor Details
-
VehicleSeenTrafficSignsUpdate
public VehicleSeenTrafficSignsUpdate(long time) Creates a newVehicleSeenTrafficSignsUpdate
interaction without any updates. The traffic sign updates need to be added withaddNewSign(String, TrafficSign)
andaddPassedSign(String, TrafficSign)
.- Parameters:
time
- Timestamp of this interaction, unit: [ns]
-
-
Method Details
-
addNewSign
Adds a new which is in sight area of vehicle with .- Parameters:
vehicleId
- The vehicle identifier.trafficSign
- The traffic sign.
-
addPassedSign
Adds a which has become invalid for vehicle with .- Parameters:
vehicleId
- The vehicle identifier.trafficSign
- The traffic sign.
-
getAllRecipients
Returns a list of all receiver vehicles.- Returns:
- list of all receiver vehicles
-
getNewSigns
Returns the list of new traffic signs of which vehicle with is recipient.- Parameters:
vehicleId
- vehicle identifier- Returns:
- list of all traffic signs that just became valid for
-
getPassedSigns
Returns the list of traffic signs that became invalid of which vehicle with is recipient.- Parameters:
vehicleId
- vehicle identifier- Returns:
- list of all traffic signs that just became invalid for
-
hashCode
public int hashCode()- Overrides:
hashCode
in classInteraction
-
equals
- Overrides:
equals
in classInteraction
-
toString
- Overrides:
toString
in classInteraction
-