Class AbstractSimulatedSensor<Q extends Quantity<Q>>
java.lang.Object
org.episteme.core.device.AbstractDevice
org.episteme.core.device.AbstractSensor<Q>
org.episteme.core.device.sim.AbstractSimulatedSensor<Q>
- Type Parameters:
Q- the type of quantity produced by the sensor
- All Implemented Interfaces:
Serializable, AutoCloseable, Device, Sensor<Q>, Commented, ComprehensiveIdentification, Identified<Identification>, Named
- Direct Known Subclasses:
SimulatedHumidityProbe, SimulatedMicroscope, SimulatedMultimeter, SimulatedOscilloscope, SimulatedPHMeter, SimulatedPressureGauge, SimulatedSeismograph, SimulatedSpectrometer, SimulatedTemperatureProbe, SimulatedVoterScanner
Abstract base implementation for simulated sensors.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractDevice
AbstractDevice.RecordNested classes/interfaces inherited from interface Device
Device.Record, Device.Status -
Field Summary
FieldsFields inherited from class AbstractDevice
accuracy, calibrationHistory, currentValue, displayUnit, firmware, history, identification, lastCalibration, locationDescription, manufacturer, maxRange, minRange, model, precisionDescription, resolution, sensitivity, status -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractSimulatedSensor(Identification identification) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCustomReadings(Map<String, String> readings) Subclasses can override to add custom readings.voidclose()voidconnect()Connects to the device.voidDisconnects from the device.Returns a map of capabilities and their status (active/inactive).Returns the current status readings (Power, Uptime, etc.).Returns the current status of the device as a string.booleanChecks if the device is currently connected.Methods inherited from class AbstractSensor
getValueMethods inherited from class AbstractDevice
calibrate, getAccuracy, getCalibrationHistory, getDeviceStatus, getDisplayUnit, getFirmware, getHistory, getId, getLastCalibration, getLocationDescription, getManufacturer, getMaxRange, getMeasurableQuantities, getMinRange, getModel, getPrecisionDescription, getResolution, getSensitivity, getTrait, getTraitOptional, getTraits, isEnabled, measure, needsCalibration, performCalibration, recordMeasurement, setAccuracy, setCurrentValue, setDisplayUnit, setEnabled, setFirmware, setLastCalibration, setLocationDescription, setManufacturer, setMaxRange, setMinRange, setModel, setPrecisionDescription, setResolution, setSensitivity, setStatusMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, getTraits, setName, setTraitMethods inherited from interface Device
calibrate, calibrate, getAccuracy, getCalibrationHistory, getDeviceStatus, getDisplayUnit, getFirmware, getHistory, getId, getLastCalibration, getLocationDescription, getManufacturer, getMaxRange, getMeasurableQuantities, getMinRange, getModel, getPrecisionDescription, getResolution, getSensitivity, isEnabled, measure, needsCalibration, setDisplayUnit, setEnabled
-
Field Details
-
support
-
-
Constructor Details
-
AbstractSimulatedSensor
-
AbstractSimulatedSensor
-
-
Method Details
-
connect
Description copied from interface:DeviceConnects to the device.- Throws:
IOException- if the connection fails
-
disconnect
Description copied from interface:DeviceDisconnects from the device.- Throws:
IOException- if the disconnection fails
-
isConnected
public boolean isConnected()Description copied from interface:DeviceChecks if the device is currently connected.- Returns:
- true if connected, false otherwise
-
getCapabilities
-
getReadings
-
addCustomReadings
-
getStatus
-
getFormattedInfo
-
close
-