public class ProxyVehicle extends BasicAutoVehicle implements ProxyVehicleSimView
BasicVehicle.AccelScheduleMovement, BasicVehicle.Movement, BasicVehicle.MovementFactory, BasicVehicle.MovementWithAccel, BasicVehicle.MoveToTargetVelocityMovement, BasicVehicle.NonAccelMovement, BasicVehicle.PhysicalMovement, BasicVehicle.SteeringMovement, BasicVehicle.TrackMovement
AutoVehicleDriverView.LRFMode
bitsReceived, DEFAULT_TRANSMISSION_POWER
currentTime, movement, spec, vin
Constructor and Description |
---|
ProxyVehicle(Point2D pos,
double heading,
double steeringAngle,
double velocity,
double targetVelocity,
double acceleration,
double currentTime)
Create a proxy vehicle.
|
Modifier and Type | Method and Description |
---|---|
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) |
getBitsReceived, getBitsTransmitted, getFrontVehicleDistanceSensor, getFrontVehicleSpeedSensor, getIntervalometer, getLastV2IMessage, getLRFAngle, getLRFDistance, getLRFMode, getRearVehicleDistanceSensor, getRearVehicleSpeedSensor, getTargetLaneForVehicleTracking, getTransmissionPower, getV2IOutbox, isLRFSensing, isVehicleTracking, pollAllMessagesFromI2VInbox, send, setDriver, setLRFMode, setLRFSensing, setTargetLaneForVehicleTracking, setTransmissionPower, setVehicleTracking
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
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setLRFSensing
getBitsReceived, getBitsTransmitted, getFrontVehicleDistanceSensor, getFrontVehicleSpeedSensor, getIntervalometer, getLastV2IMessage, getLRFDistance, getLRFMode, getRearVehicleDistanceSensor, getRearVehicleSpeedSensor, getTargetLaneForVehicleTracking, getTransmissionPower, isLRFSensing, isVehicleTracking, pollAllMessagesFromI2VInbox, send, setTargetLaneForVehicleTracking, setVehicleTracking
checkCurrentTime, getAcceleration, getCenterPoint, getCornerPoints, getEdges, getHeading, getPointAtMiddleFront, getPointAtRear, getPosition, getShape, getShape, getV2IOutbox, getVelocity, getWheelShapes, setDriver, setVIN
coast, gaugeHeading, gaugePointAtMiddleFront, gaugePointAtRear, gaugePointBetweenFrontWheels, gaugePosition, gaugeRearLeftCornerPoint, gaugeRearRightCornerPoint, gaugeShape, gaugeTime, gaugeVelocity, getAccelSchedule, getSpec, getVIN, printState, removeAccelSchedule, setAccelSchedule, setAccelWithMaxTargetVelocity, setTargetVelocityWithMaxAccel, slowToStop, turnTowardPoint
public ProxyVehicle(Point2D pos, double heading, double steeringAngle, double velocity, double targetVelocity, double acceleration, double currentTime)
pos
- the positionheading
- the headingsteeringAngle
- the steering anglevelocity
- the velocitytargetVelocity
- the target velocityacceleration
- the accelerationcurrentTime
- the current timepublic ProxyDriver getDriver()
getDriver
in interface AutoVehicleDriverView
getDriver
in interface ProxyVehicleSimView
getDriver
in interface VehicleDriverView
getDriver
in class BasicAutoVehicle
null
if none exists.public void setDriver(ProxyDriver driver)
setDriver
in interface ProxyVehicleSimView
driver
- the new driver to control this Vehiclepublic SocketAddress getSa()
getSa
in interface ProxyVehicleSimView
public void setSa(SocketAddress sa)
setSa
in interface ProxyVehicleSimView
sa
- the new socket address to setpublic void processReal2ProxyMsg(Real2ProxyMsg msg)
processReal2ProxyMsg
in interface ProxyVehicleSimView
msg
- the Real2Proxy messagepublic void receive(I2VMessage msg)
receive
in interface AutoVehicleDriverView
receive
in class BasicAutoVehicle
msg
- the message to send to another Vehiclepublic void move(double timeStep)
move
in interface VehicleSimView
move
in class BasicVehicle
timeStep
- the size of the time step to simulate, in secondsCopyright © 2013. All rights reserved.