public abstract class VWConnection extends Object
Modifier and Type | Field and Description |
---|---|
static int[] |
DYNAMICSPORTS |
protected String |
dynamicsResponse |
protected boolean |
networked |
protected String |
telemetryString
Telemetry string that will be read from dynamics.
|
static int |
UAV |
static int |
UGV |
static int |
UUV |
protected Execution |
vehicle
reference to main vehicle object
|
static int |
VEHICLE_TYPE_PORT_OFFSET |
int |
VWVECTORSIZE
Number of variables in the virtual world state vector
|
protected int |
vwWrites
counter to determine whether or not to print telemetry summary following write
|
Constructor and Description |
---|
VWConnection(Execution vehicle) |
Modifier and Type | Method and Description |
---|---|
void |
openConnection(String host,
int port)
Opens a socket between the execution object and a networked dynamics object
|
String |
readFromVW()
reads a string from the virtual world
|
abstract void |
readTelemetryFromVW()
reads a new uv telemetry from the virtual world as a space-delimited string
and parses it into the uv's vwState object
|
abstract void |
writeTelemetryToVW()
writes the uv telemetry to the virtual world via a DIS connection sans Dynamics calculations
|
abstract void |
writeToVW(String message) |
void |
writeToVWSocket(String message)
writes a string over the network to the virtual world
|
protected Execution vehicle
public final int VWVECTORSIZE
public static final int[] DYNAMICSPORTS
public static final int UUV
public static final int UGV
public static final int UAV
public static final int VEHICLE_TYPE_PORT_OFFSET
protected String telemetryString
protected int vwWrites
protected String dynamicsResponse
protected boolean networked
public VWConnection(Execution vehicle)
public abstract void writeTelemetryToVW()
public abstract void readTelemetryFromVW()
public abstract void writeToVW(String message)
public void openConnection(String host, int port)
host
- name of virtual world hostport
- on remote dynamics object to communicate withpublic void writeToVWSocket(String message)
message
- to be writtenpublic String readFromVW()