com.atiia.automation.sensors

## Class NetFTRDTCommand

- java.lang.Object
- - com.atiia.automation.sensors.NetFTRDTCommand

-     public class NetFTRDTCommand
      extends java.lang.Object

  Represents an RDT request command from the host to the Net F/T sensor.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetFTRDTCommand()` Create a new NetFTRDTPacket with default field values.
    `NetFTRDTCommand(int command, long count)` Create a new NetFTRDTCommand with specific field values.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCommand()` get the mode of the RDT command
    `long` | `getCount()` Get the number of RDT samples to output
    `int` | `getHeader()` Gets the header of the RDT command packet
    `void` | `setCommand(int newCommand)` sets the command mode of the rdt command
    `void` | `setCount(long newCount)` Set the number of RDT packets to output

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

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

- - ### Constructor Detail

    - #### NetFTRDTCommand

          public NetFTRDTCommand()

      Create a new NetFTRDTPacket with default field values. The mode will be 1 (loop-driven output), and the count will be 0 (infinite samples)

    - #### NetFTRDTCommand

          public NetFTRDTCommand(int command,
                         long count)

      Create a new NetFTRDTCommand with specific field values.
      Parameters:
        `command` - The mode to set. 0 = stop, 1 = loop-driven output (good for requesting single packets), 2 = interrupt-driven output (good for requesting a lot of data at high speed)
        `count` - The number of samples to output. A value of 0 will cause the Net F/T to output samples until it is sent another command with the mode field set to 0 (stop mode). This value is sent to the Net F/T as an unsigned four-byte integer, so the largest possible value is 4294967296 ( 2 ^ 32 ).

  - ### Method Detail

    - #### getHeader

          public int getHeader()

      Gets the header of the RDT command packet
      Returns:
        The header of the RDT packet. This is always 0x1234

    - #### setCommand

          public void setCommand(int newCommand)

      sets the command mode of the rdt command
      Parameters:
        `newCommand` - the int command to set (1 = main-loop-driven, 2 = interrupt-driven, 0 = stop)

    - #### getCommand

          public int getCommand()

      get the mode of the RDT command
      Returns:
        0 = stop command, 1= loop driven output (default), 2 = interrupt driven output. Returns int even though underlying data member is a short, because the command is actually unsigned integer from the Net F/T's perspective.

    - #### setCount

          public void setCount(long newCount)

      Set the number of RDT packets to output
      Parameters:
        `newCount` - the long number of RDT packets to output (0 = infinite). Cannot be greater then largest unsigned four-byte integer.

    - #### getCount

          public long getCount()

      Get the number of RDT samples to output
      Returns:
        Number of samples to output. 0 = infinite (default).