NetFTSynchronization

## Class NetFTSensorGroup

- java.lang.Object
- - NetFTSynchronization.NetFTSensorGroup

-     public class NetFTSensorGroup
      extends java.lang.Object

  Represents a group of ATI Industrial Automation Net F/T force and torque load cells.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetFTSensorGroup(java.net.InetAddress[] setAddress)` creates new Net F/T group representation.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NetFTRDTPacket` | `getNetFTRDTPacketFromDatagramPacket(java.net.DatagramPacket NetFTRDTDataPacket)` Get the user-friendly NetFTRDTPacket structure from the data received off the network.
    `static java.lang.String` | `getVersion()` Get the version of the Net F/T interface.
    `java.net.DatagramPacket` | `readHighSpeedData(java.net.DatagramSocket cNetFTSocket)` Read high speed data from the Net F/T sensor group.
    `java.net.DatagramSocket` | `startHighSpeedDataCollection()` Start interrupt-driven (high-speed) data collection from Net F/T sensor.
    `void` | `stopDataCollection()` Stop the Net F/T group from outputting any more RDT samples.
    `void` | `tare(int sensorNumber)` Tares the current load of a specific sensor.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NetFTSensorGroup

          public NetFTSensorGroup(java.net.InetAddress[] setAddress)
                           throws java.net.UnknownHostException

      creates new Net F/T group representation.
      Parameters:
        `setAddress` - the addresses of the Net F/T sensors
      Throws:
        `UnkownHostException` - If setAddress contains an unknown host.
        `java.net.UnknownHostException`

  - ### Method Detail

    - #### startHighSpeedDataCollection

          public java.net.DatagramSocket startHighSpeedDataCollection()
                                                               throws java.net.SocketException,
                                                                      java.io.IOException

      Start interrupt-driven (high-speed) data collection from Net F/T sensor.
      Returns:
        A DatagramSocket that you should pass to subsequent calls to readHighSpeedData in order to read the samples sent back from the Net F/T systems.
      Throws:
        `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 any of the Net F/Ts.

    - #### tare

          public void tare(int sensorNumber)
                    throws java.net.SocketException,
                           java.io.IOException

      Tares the current load of a specific sensor.
      Parameters:
        `sensorNumer:` - indicates the sensor to receive the Tare operation. This is the index to the list of Net F/T IP addresses.
      Throws:
        `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.

    - #### readHighSpeedData

          public java.net.DatagramPacket readHighSpeedData(java.net.DatagramSocket cNetFTSocket)
                                                    throws java.io.IOException

      Read high speed data from the Net F/T sensor group. This method is not thread-safe, so take care that you do not perform other operations on the DatagramSocket while this function is executing, i.e. calling stopDataCollection while this function is executing could cause a "socket is closed" error.
      Parameters:
        `cNetFTSocket` - The socket returned from startHighSpeedDataCollection.
      Returns:
        An array of NetFTRDTPackets of length iCount, which represent the F/T records collected from the sensor.
      Throws:
        `java.io.IOException` - An IOException will be thrown if there is an error reading data from a Net F/T.

    - #### stopDataCollection

          public void stopDataCollection()
                                  throws java.io.IOException

      Stop the Net F/T group from outputting any more RDT samples.
      Throws:
        `java.io.IOException` - An IOException will be thrown if there is an error sending the stop command to the Net F/T.

    - #### getNetFTRDTPacketFromDatagramPacket

          public NetFTRDTPacket getNetFTRDTPacketFromDatagramPacket(java.net.DatagramPacket NetFTRDTDataPacket)

      Get the user-friendly NetFTRDTPacket structure from the data received off the network.
      Parameters:
        `NetFTRDTDataPacket` - The DatagramPacket received from the Net F/T sensor.
      Returns:
        The filled NetFTRDTPacket structure

    - #### getVersion

          public static java.lang.String getVersion()

      Get the version of the Net F/T interface.
      Returns:
        The version of the Net F/T interface.