Class MockAnalogInput
java.lang.Object
xbot.common.controls.sensors.XAnalogInput
xbot.common.controls.sensors.mock_adapters.MockAnalogInput
- All Implemented Interfaces:
DataFrameRefreshable, XBaseIO, ISimulatableSensor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class XAnalogInput
XAnalogInput.XAnalogInputFactory -
Constructor Summary
ConstructorsConstructorDescriptionMockAnalogInput(int channel, DevicePolice police, DataFrameRegistry dataFrameRegistry) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAsDigital(double threshold) intdoubleReturns the current unfiltered voltage directly from the device.voidingestSimulationData(org.json.JSONObject payload) voidsetVoltage(double voltage) Methods inherited from class XAnalogInput
getAverageVoltage, refreshDataFrame, setAverageBits, setAverageSampleWindow
-
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:XAnalogInputReturns the current unfiltered voltage directly from the device.- Specified by:
getVoltagein classXAnalogInput
-
getChannel
public int getChannel()- Specified by:
getChannelin interfaceXBaseIO
-
getAsDigital
public boolean getAsDigital(double threshold) - Specified by:
getAsDigitalin classXAnalogInput
-
ingestSimulationData
public void ingestSimulationData(org.json.JSONObject payload) - Specified by:
ingestSimulationDatain interfaceISimulatableSensor
-