Class MockAnalogInput

java.lang.Object
xbot.common.controls.sensors.XAnalogInput
xbot.common.controls.sensors.mock_adapters.MockAnalogInput
All Implemented Interfaces:
DataFrameRefreshable, XBaseIO, ISimulatableSensor

public class MockAnalogInput extends XAnalogInput implements ISimulatableSensor
  • Constructor Details

    • MockAnalogInput

      @AssistedInject public MockAnalogInput(@Assisted("channel") int channel, DevicePolice police, DataFrameRegistry dataFrameRegistry)
  • Method Details

    • setVoltage

      public void setVoltage(double voltage)
    • getVoltage

      public double getVoltage()
      Description copied from class: XAnalogInput
      Returns the current unfiltered voltage directly from the device.
      Specified by:
      getVoltage in class XAnalogInput
    • getChannel

      public int getChannel()
      Specified by:
      getChannel in interface XBaseIO
    • getAsDigital

      public boolean getAsDigital(double threshold)
      Specified by:
      getAsDigital in class XAnalogInput
    • ingestSimulationData

      public void ingestSimulationData(org.json.JSONObject payload)
      Specified by:
      ingestSimulationData in interface ISimulatableSensor