public class NetFTSensor
extends java.lang.Object
| Constructor and Description |
|---|
NetFTSensor(java.net.InetAddress setAddress)
creates new Net F/T representation.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getVersion()
Get the version of the Net F/T interface.
|
java.net.DatagramSocket |
initLowSpeedData()
Request a single RDT F/T record from the Net F/T sensor.
|
NetFTRDTPacket[] |
readHighSpeedData(java.net.DatagramSocket cNetFTSocket,
int iCount)
Read high speed data from the Net F/T sensor.
|
NetFTRDTPacket |
readLowSpeedData(java.net.DatagramSocket cNetFTSocket) |
java.net.DatagramSocket |
startHighSpeedDataCollection(int iCount)
Start interrupt-driven (high-speed) data collection from Net F/T
sensor.
|
void |
stopDataCollection(java.net.DatagramSocket cNetFTSocket)
Stop the Net F/T from outputting any more RDT samples.
|
void |
tare()
Tares the current load of the sensor.
|
public NetFTSensor(java.net.InetAddress setAddress)
throws java.net.UnknownHostException
setAddress - the address of the Net F/T sensorUnkownHostException - If setAddress is an
unknown host.java.net.UnknownHostExceptionpublic java.net.DatagramSocket initLowSpeedData()
throws java.net.SocketException,
java.io.IOException
java.net.SocketException - If there is an error with the socket.java.io.IOException - If there is an I/O error with the load cell.public java.net.DatagramSocket startHighSpeedDataCollection(int iCount)
throws java.net.SocketException,
java.io.IOException
iCount - The number of samples to collect. A value of 0
means the Net F/T should keep outputting samples until it is sent
a stop command. The stop command can be sent by calling
stopDataCollection.java.net.SocketException - A SocketException is thrown if there is
a problem setting up the socket that is returned.java.io.IOException - An IOException is thrown if there is a
problem sending the start command to the Net F/T.public void tare()
throws java.net.SocketException,
java.io.IOException
java.net.SocketException - A SocketException is thrown if there is
trouble setting up the socket to send the tare command.java.io.IOException - An IOException is thrown if there is
trouble communicating with the sensor.public NetFTRDTPacket[] readHighSpeedData(java.net.DatagramSocket cNetFTSocket, int iCount) throws java.io.IOException
cNetFTSocket - The socket returned from
startHighSpeedDataCollection.iCount - The number of samples to read from the Net F/T
sensor. This can be less than the total number of samples that the
Net F/T will output. I.e. you could call startHighSpeedDataCollection
with a count of 1000, then call this function 10 times, each time
reading 100 samples.java.io.IOException - An IOException will be thrown if there is an
error reading data from the Net F/T.public NetFTRDTPacket readLowSpeedData(java.net.DatagramSocket cNetFTSocket) throws java.io.IOException
java.io.IOExceptionpublic void stopDataCollection(java.net.DatagramSocket cNetFTSocket)
throws java.io.IOException
cNetFTSocket - The socket returned by
startHighSpeedDataCollection. This socket will be closed by this
function, so don't use it again!java.io.IOException - An IOException will be thrown if there is an
error sending the stop command to the Net F/T.public static java.lang.String getVersion()