Class SoFileSensor
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.sensors.SoSensor
-
- com.openinventor.inventor.sensors.SoTimerQueueSensor
-
- com.openinventor.inventor.sensors.SoTimerSensor
-
- com.openinventor.inventor.sensors.SoFileSensor
-
public class SoFileSensor extends SoTimerSensor
Sensor that triggers a callback each time a file is changed. File sensors trigger their callback function when a watched file changes. Files are checked at the interval specified withSoTimerSensor.setInterval
.- See Also:
SoOneShotSensor
,SoAlarmSensor
,SoTimerQueueSensor
,SbTime
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoFileSensor()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFile(java.lang.String filename)
Add file to be monitored.void
clearFiles()
Stop monitoring all previously registered files.java.lang.String
getFilename()
Return changed file name.void
removeFile(java.lang.String filename)
Remove file from monitored list.-
Methods inherited from class com.openinventor.inventor.sensors.SoTimerSensor
getBaseTime, getInterval, setBaseTime, setInterval
-
Methods inherited from class com.openinventor.inventor.sensors.SoTimerQueueSensor
getTriggerTime
-
Methods inherited from class com.openinventor.inventor.sensors.SoSensor
isScheduled, schedule, setTask, unschedule
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
removeFile
public void removeFile(java.lang.String filename)
Remove file from monitored list. If file is not being monitored, the method does nothing.
-
clearFiles
public void clearFiles()
Stop monitoring all previously registered files.
-
addFile
public void addFile(java.lang.String filename)
Add file to be monitored. If file does not exist, the method does nothing.
-
getFilename
public java.lang.String getFilename()
Return changed file name.
Note: Only valid when called from the callback function.
-
-