VANET Simulator
 All Classes Functions Variables
Public Member Functions | List of all members
vanetsim.scenario.messages.PenaltyMessage Class Reference
Inheritance diagram for vanetsim.scenario.messages.PenaltyMessage:

Public Member Functions

 PenaltyMessage (int destinationX, int destinationY, int destinationRadius, int validUntil, Street penaltyStreet, int penaltyDirection, int penaltyValue, int penaltyValidUntil)
void execute (Vehicle vehicle)
- Public Member Functions inherited from vanetsim.scenario.messages.Message
boolean isValid ()
int getDestinationX_ ()
int getDestinationY_ ()
boolean getFloodingMode ()
void setFloodingMode (boolean mode)
int getDestinationRadius ()
long getDestinationRadiusSquared ()

Additional Inherited Members

- Protected Attributes inherited from vanetsim.scenario.messages.Message
int destinationX_
int destinationY_
int destinationRadius_
long destinationRadiusSquared_
int validUntil_

Detailed Description

A message which indicates some kind of traffic jam through assigning a penalty to the street on which the jam is.

Constructor & Destructor Documentation

vanetsim.scenario.messages.PenaltyMessage.PenaltyMessage ( int  destinationX,
int  destinationY,
int  destinationRadius,
int  validUntil,
Street  penaltyStreet,
int  penaltyDirection,
int  penaltyValue,
int  penaltyValidUntil 

Instantiates a new penalty message.

destinationXthe x coordinate of the destination of the message
destinationYthe y coordinate of the destination of the message
destinationRadiusthe radius of the destination area in cm
validUntilhow long the message is valid in ms (measured from simulation start)
penaltyStreetthe penalty street
penaltyDirectionthe direction to which the penalty corresponds. 1 means from endNode to startNode, 0 means both directions and -1 means from startNode to endNode
penaltyValuethe penalty value in cm
penaltyValidUntilhow long the penalty is valid in ms (measured from simulation start)

Member Function Documentation

void vanetsim.scenario.messages.PenaltyMessage.execute ( Vehicle  vehicle)

Executes the message by adding a new penalty value to the known penalties of the vehicle given.

vehiclethe vehicle on which this operation is done
See Also

Implements vanetsim.scenario.messages.Message.

The documentation for this class was generated from the following file: