|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.msg.udp.Proxy2RealAdapter
public abstract class Proxy2RealAdapter
The proxy vehicle to real vehicle message adapter.
| Constructor Summary | |
|---|---|
Proxy2RealAdapter()
|
|
| Method Summary | |
|---|---|
static DataOutputStream |
getDosWithHeader(ByteArrayOutputStream baos,
double currentTime,
UdpHeader.UdpMessageType type)
Builds a header for the type of this message, and writes it to a new DataOutputStream wrapped around a given ByteArrayOutputStream |
static DatagramPacket |
toDatagramPacket(Confirm msg,
SocketAddress sa,
double currentTime)
Construct a DatagramPacket of this confirm message |
static DatagramPacket |
toDatagramPacket(double distToFrontVehicle,
SocketAddress sa,
double currentTime)
Construct a DatagramPacket of this confirm message |
static DatagramPacket |
toDatagramPacket(Reject msg,
SocketAddress sa,
double currentTime)
Construct a DatagramPacket of this reject message |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Proxy2RealAdapter()
| Method Detail |
|---|
public static DatagramPacket toDatagramPacket(Confirm msg,
SocketAddress sa,
double currentTime)
throws IOException
sa - SocketAddress of the intended destination of the
datagramcurrentTime - absolute time in seconds
IOException
public static DatagramPacket toDatagramPacket(Reject msg,
SocketAddress sa,
double currentTime)
throws IOException
sa - SocketAddress of the intended destination of the
datagramcurrentTime - absolute time in seconds
IOException
public static DatagramPacket toDatagramPacket(double distToFrontVehicle,
SocketAddress sa,
double currentTime)
throws IOException
distToFrontVehicle - the distance of the vehicles in frontsa - SocketAddress of the intended destination of the
datagramcurrentTime - absolute time in seconds
IOException
public static DataOutputStream getDosWithHeader(ByteArrayOutputStream baos,
double currentTime,
UdpHeader.UdpMessageType type)
throws IOException
baos - The ByteArrayOutputStreamcurrentTime - The current, absolute time in seconds
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||