VANET Simulator
 All Classes Functions Variables
Public Member Functions | Protected Attributes | List of all members
vanetsim.scenario.KnownVehicle Class Reference

Public Member Functions

 KnownVehicle (Vehicle vehicle, long ID, int x, int y, int time, double speed, boolean isEncrypted)
 
void setX (int x)
 
void setY (int y)
 
void setLastUpdate (int time)
 
void setSpeed (double speed)
 
int getX ()
 
int getY ()
 
long getID ()
 
double getSpeed ()
 
Vehicle getVehicle ()
 
int getLastUpdate ()
 
KnownVehicle getNext ()
 
KnownVehicle getPrevious ()
 
void setNext (KnownVehicle next)
 
void setPrevious (KnownVehicle previous)
 
boolean isEncrypted_ ()
 
void setEncrypted_ (boolean isEncrypted_)
 

Protected Attributes

KnownVehicle previous_
 
KnownVehicle next_
 

Detailed Description

A known vehicle (discovered by receiving a beacon). The variables represent what is known and might differ from the real ones if it hasn't been updated for some time!

Constructor & Destructor Documentation

vanetsim.scenario.KnownVehicle.KnownVehicle ( Vehicle  vehicle,
long  ID,
int  x,
int  y,
int  time,
double  speed,
boolean  isEncrypted 
)
inline

Instantiates a new known vehicle.

Parameters
vehiclethe vehicle
IDthe ID of the vehicle
xthe x coordinate
ythe y coordinate
timethe current time
speedthe current speed
isEncryptedif Beacon was encrypted

Member Function Documentation

long vanetsim.scenario.KnownVehicle.getID ( )
inline

Gets the ID.

Returns
the ID
int vanetsim.scenario.KnownVehicle.getLastUpdate ( )
inline

Gets when this vehicle was last updated.

Returns
the last update time in milliseconds
KnownVehicle vanetsim.scenario.KnownVehicle.getNext ( )
inline

Returns the KnownVehicle after this one.

Returns
the next
KnownVehicle vanetsim.scenario.KnownVehicle.getPrevious ( )
inline

Returns the KnownVehicle before this one.

Returns
the previous
double vanetsim.scenario.KnownVehicle.getSpeed ( )
inline

Gets the speed

Returns
the speed
Vehicle vanetsim.scenario.KnownVehicle.getVehicle ( )
inline

Gets the vehicle.

Returns
the vehicle
int vanetsim.scenario.KnownVehicle.getX ( )
inline

Gets the x coordinate.

Returns
the x coordinate
int vanetsim.scenario.KnownVehicle.getY ( )
inline

Gets the y coordinate.

Returns
the y coordinate
void vanetsim.scenario.KnownVehicle.setLastUpdate ( int  time)
inline

Updates the last modification time.

Parameters
timethe current time
void vanetsim.scenario.KnownVehicle.setNext ( KnownVehicle  next)
inline

Sets the KnownVehicle after this one.

Parameters
nextthe object which comes after this one
void vanetsim.scenario.KnownVehicle.setPrevious ( KnownVehicle  previous)
inline

Sets the KnownVehicle before this one.

Parameters
previousthe object which comes before this one
void vanetsim.scenario.KnownVehicle.setSpeed ( double  speed)
inline

Updates the speed.

Parameters
speedthe current speed
void vanetsim.scenario.KnownVehicle.setX ( int  x)
inline

Updates the x coordinate.

Parameters
xthe x coordinate
void vanetsim.scenario.KnownVehicle.setY ( int  y)
inline

Updates the y coordinate.

Parameters
ythe y coordinate

Member Data Documentation

KnownVehicle vanetsim.scenario.KnownVehicle.next_
protected

Link to the next object.

KnownVehicle vanetsim.scenario.KnownVehicle.previous_
protected

Link to the previous object.


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