aim4.vehicle
Class ProxyVehicle

java.lang.Object
  extended by aim4.vehicle.BasicVehicle
      extended by aim4.vehicle.BasicAutoVehicle
          extended by aim4.vehicle.ProxyVehicle
All Implemented Interfaces:
AutoVehicleDriverView, AutoVehicleSimView, ProxyVehicleSimView, VehicleDriverView, VehicleSimView

public class ProxyVehicle
extends BasicAutoVehicle
implements ProxyVehicleSimView

The proxy vehicle.


Nested Class Summary
 
Nested classes/interfaces inherited from class aim4.vehicle.BasicVehicle
BasicVehicle.AccelScheduleMovement, BasicVehicle.Movement, BasicVehicle.MovementFactory, BasicVehicle.MovementWithAccel, BasicVehicle.MoveToTargetVelocityMovement, BasicVehicle.NonAccelMovement, BasicVehicle.PhysicalMovement, BasicVehicle.SteeringMovement, BasicVehicle.TrackMovement
 
Nested classes/interfaces inherited from interface aim4.vehicle.AutoVehicleDriverView
AutoVehicleDriverView.LRFMode
 
Field Summary
 
Fields inherited from class aim4.vehicle.BasicAutoVehicle
bitsReceived, DEFAULT_TRANSMISSION_POWER
 
Fields inherited from class aim4.vehicle.BasicVehicle
currentTime, movement, spec, vin
 
Constructor Summary
ProxyVehicle(Point2D pos, double heading, double steeringAngle, double velocity, double targetVelocity, double acceleration, double currentTime)
          Create a proxy vehicle.
 
Method Summary
 ProxyDriver getDriver()
          Getter method for the Driver controlling this Vehicle.
 SocketAddress getSa()
          
 void move(double timeStep)
          Move a single Vehicle according to some approximation of the laws of physics.
 void processReal2ProxyMsg(Real2ProxyMsg msg)
          Process the incoming Real2Proxy message
 void receive(I2VMessage msg)
          Adds a message to the incoming queue of messages received from IntersectionManagers.
 void setDriver(ProxyDriver driver)
          Set this proxy vehicle's driver.
 void setSa(SocketAddress sa)
          
 
Methods inherited from class aim4.vehicle.BasicAutoVehicle
getBitsReceived, getBitsTransmitted, getFrontVehicleDistanceSensor, getFrontVehicleSpeedSensor, getIntervalometer, getLastV2IMessage, getLRFAngle, getLRFDistance, getLRFMode, getRearVehicleDistanceSensor, getRearVehicleSpeedSensor, getTargetLaneForVehicleTracking, getTransmissionPower, getV2IOutbox, isLRFSensing, isVehicleTracking, pollAllMessagesFromI2VInbox, send, setDriver, setLRFMode, setLRFSensing, setTargetLaneForVehicleTracking, setTransmissionPower, setVehicleTracking
 
Methods inherited from class aim4.vehicle.BasicVehicle
checkCurrentTime, coast, finalize, gaugeCornerPoints, gaugeHeading, gaugePointAtMiddleFront, gaugePointAtRear, gaugePointBetweenFrontWheels, gaugePosition, gaugeRearLeftCornerPoint, gaugeRearRightCornerPoint, gaugeShape, gaugeTime, gaugeVelocity, getAcceleration, getAccelSchedule, getCenterPoint, getCornerPoints, getEdges, getHeading, getPointAtMiddleFront, getPointAtRear, getPosition, getShape, getShape, getSpec, getSteeringAngle, getVelocity, getVIN, getWheelShapes, printState, removeAccelSchedule, setAccelSchedule, setAccelWithMaxTargetVelocity, setMaxAccelWithMaxTargetVelocity, setTargetVelocityWithMaxAccel, setVIN, slowToStop, turnTowardPoint
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface aim4.vehicle.AutoVehicleSimView
setLRFSensing
 
Methods inherited from interface aim4.vehicle.AutoVehicleDriverView
getBitsReceived, getBitsTransmitted, getFrontVehicleDistanceSensor, getFrontVehicleSpeedSensor, getIntervalometer, getLastV2IMessage, getLRFDistance, getLRFMode, getRearVehicleDistanceSensor, getRearVehicleSpeedSensor, getTargetLaneForVehicleTracking, getTransmissionPower, isLRFSensing, isVehicleTracking, pollAllMessagesFromI2VInbox, send, setTargetLaneForVehicleTracking, setVehicleTracking
 
Methods inherited from interface aim4.vehicle.VehicleSimView
checkCurrentTime, getAcceleration, getCenterPoint, getCornerPoints, getEdges, getHeading, getPointAtMiddleFront, getPointAtRear, getPosition, getShape, getShape, getV2IOutbox, getVelocity, getWheelShapes, setDriver, setVIN
 
Methods inherited from interface aim4.vehicle.VehicleDriverView
coast, gaugeHeading, gaugePointAtMiddleFront, gaugePointAtRear, gaugePointBetweenFrontWheels, gaugePosition, gaugeRearLeftCornerPoint, gaugeRearRightCornerPoint, gaugeShape, gaugeTime, gaugeVelocity, getAccelSchedule, getSpec, getVIN, printState, removeAccelSchedule, setAccelSchedule, setAccelWithMaxTargetVelocity, setTargetVelocityWithMaxAccel, slowToStop, turnTowardPoint
 

Constructor Detail

ProxyVehicle

public ProxyVehicle(Point2D pos,
                    double heading,
                    double steeringAngle,
                    double velocity,
                    double targetVelocity,
                    double acceleration,
                    double currentTime)
Create a proxy vehicle.

Parameters:
pos - the position
heading - the heading
steeringAngle - the steering angle
velocity - the velocity
targetVelocity - the target velocity
acceleration - the acceleration
currentTime - the current time
Method Detail

getDriver

public ProxyDriver getDriver()
Getter method for the Driver controlling this Vehicle.

Specified by:
getDriver in interface AutoVehicleDriverView
Specified by:
getDriver in interface ProxyVehicleSimView
Specified by:
getDriver in interface VehicleDriverView
Overrides:
getDriver in class BasicAutoVehicle
Returns:
the Driver controlling this Vehicle, or null if none exists.

setDriver

public void setDriver(ProxyDriver driver)
Set this proxy vehicle's driver.

Specified by:
setDriver in interface ProxyVehicleSimView
Parameters:
driver - the new driver to control this Vehicle

getSa

public SocketAddress getSa()

Specified by:
getSa in interface ProxyVehicleSimView
Returns:
the socket address

setSa

public void setSa(SocketAddress sa)

Specified by:
setSa in interface ProxyVehicleSimView
Parameters:
sa - the new socket address to set

processReal2ProxyMsg

public void processReal2ProxyMsg(Real2ProxyMsg msg)
Process the incoming Real2Proxy message

Specified by:
processReal2ProxyMsg in interface ProxyVehicleSimView
Parameters:
msg - the Real2Proxy message

receive

public void receive(I2VMessage msg)
Adds a message to the incoming queue of messages received from IntersectionManagers.

Specified by:
receive in interface AutoVehicleDriverView
Overrides:
receive in class BasicAutoVehicle
Parameters:
msg - the message to send to another Vehicle

move

public void move(double timeStep)
Move a single Vehicle according to some approximation of the laws of physics.

Specified by:
move in interface VehicleSimView
Overrides:
move in class BasicVehicle
Parameters:
timeStep - the size of the time step to simulate, in seconds


Copyright © 2011. All Rights Reserved.