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

Public Member Functions

boolean isValid ()
 
int getDestinationX_ ()
 
int getDestinationY_ ()
 
boolean getFloodingMode ()
 
void setFloodingMode (boolean mode)
 
int getDestinationRadius ()
 
long getDestinationRadiusSquared ()
 
abstract void execute (Vehicle vehicle)
 

Protected Attributes

int destinationX_
 
int destinationY_
 
int destinationRadius_
 
long destinationRadiusSquared_
 
int validUntil_
 

Detailed Description

An abstract class for messages.

Member Function Documentation

abstract void vanetsim.scenario.messages.Message.execute ( Vehicle  vehicle)
pure virtual

Executes something on a vehicle given.

Parameters
vehiclethe vehicle

Implemented in vanetsim.scenario.messages.PenaltyMessage.

int vanetsim.scenario.messages.Message.getDestinationRadius ( )
inline

Gets the destination radius. If the message arrives in this circular destination area, it should be broadcasted to all vehicles.

Returns
the tolerance in cm
long vanetsim.scenario.messages.Message.getDestinationRadiusSquared ( )
inline

Gets the squared destination radius.

Returns
the squared radius of the destination region in cm^2
int vanetsim.scenario.messages.Message.getDestinationX_ ( )
inline

Gets the x coordinate of the destination.

Returns
the x destination
int vanetsim.scenario.messages.Message.getDestinationY_ ( )
inline

Gets the y coordinate of the destination.

Returns
the y destination
boolean vanetsim.scenario.messages.Message.getFloodingMode ( )
inline

Returns if flooding mode is enabled on this message

Returns
true if flooding of this message to all vehicles is done, false if line-forwarding is done
boolean vanetsim.scenario.messages.Message.isValid ( )
inline

Checks if the message is still valid.

Returns
true if it's valid, else false
void vanetsim.scenario.messages.Message.setFloodingMode ( boolean  mode)
inline

Sets if flooding mode is enabled on this message

Parameters
modetrue if flooding of this message to all vehicles is done, false if line-forwarding is done

Member Data Documentation

int vanetsim.scenario.messages.Message.destinationRadius_
protected

The destination radius in cm.

long vanetsim.scenario.messages.Message.destinationRadiusSquared_
protected

The squared destination radius in cm^2 (as it's often needed).

int vanetsim.scenario.messages.Message.destinationX_
protected

The x coordinate of the destination of this message.

int vanetsim.scenario.messages.Message.destinationY_
protected

The y coordinate of the destination of this message.

int vanetsim.scenario.messages.Message.validUntil_
protected

How long this message is valid.


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