public class VisionListener
extends java.lang.Object
Constructor and Description |
---|
VisionListener(java.lang.String listen_to_addr,
int listen_on_port)
Constructor for the Vision Coprocessor listener socket.
|
Modifier and Type | Method and Description |
---|---|
double |
getArea(int tgt_idx) |
double |
getCpuLoad() |
double |
getFPS() |
double |
getFrameCounter() |
double |
getHeight(int tgt_idx) |
double |
getMemLoad() |
double |
getNumTargetsObserved() |
double |
getPacketRxSystemTime() |
double |
getProcTimeMs() |
double |
getWidth(int tgt_idx) |
double |
getX(int tgt_idx) |
double |
getY(int tgt_idx) |
boolean |
isCoProcessorAlive() |
static void |
main(java.lang.String[] args)
The main function is used as a test which can be run on a user's PC.
|
void |
sampleLatestData()
Locks the most recent data from the coprocessor for use.
|
void |
start()
Starts the listener in the background to look for and interpret UDP packets from the coprocessor.
|
public VisionListener(java.lang.String listen_to_addr, int listen_on_port)
listen_to_addr
- String of the IP address of the coprocessor (For example, "10.17.36.8")listen_on_port
- integer port number to listen on. Usually between 5800 and 5810 per FMS whitepaper. Must match whatever port the coprocessor is sending information to.public void start()
public void sampleLatestData()
public boolean isCoProcessorAlive()
public double getNumTargetsObserved()
public double getX(int tgt_idx)
tgt_idx
- The integer index of the target of interest (should be between 0 and getNumTargetsObserved()-1)public double getY(int tgt_idx)
tgt_idx
- The integer index of the target of interest (should be between 0 and getNumTargetsObserved()-1)public double getArea(int tgt_idx)
tgt_idx
- The integer index of the target of interest (should be between 0 and getNumTargetsObserved()-1)public double getWidth(int tgt_idx)
tgt_idx
- The integer index of the target of interest (should be between 0 and getNumTargetsObserved()-1)public double getHeight(int tgt_idx)
tgt_idx
- The integer index of the target of interest (should be between 0 and getNumTargetsObserved()-1)public double getFPS()
public double getFrameCounter()
public double getProcTimeMs()
public double getCpuLoad()
public double getMemLoad()
public double getPacketRxSystemTime()
public static void main(java.lang.String[] args)