Class MotionSensorProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.motionsensor.MotionSensorProperties
- All Implemented Interfaces:
JposBaseInterface
,MotionSensorInterface
Class containing the motion sensor specific properties, their default values and default implementations of
MotionSensorInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Motion Sensor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionStatusUpdateEvent to be delivered Timeout milliseconds after it has been fired.boolean
UPOS property Motion.int
UPOS property Timeout.Synchronization object used by MotionSensor to wait until Timeout milliseconds have passed.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Initialization of properties that must be initialized during open.void
timeout(int timeout)
Final part of setTimeout method.void
waitForMotion(int timeout)
Final part of WaitForMotion method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, initOnFirstEnable, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
Motion
public boolean MotionUPOS property Motion. Must be overwritten by derived objects within the initOnEnable method. -
Timeout
public int TimeoutUPOS property Timeout. -
BufferedAbsent
StatusUpdateEvent to be delivered Timeout milliseconds after it has been fired. -
TimeoutWaiter
Synchronization object used by MotionSensor to wait until Timeout milliseconds have passed.
-
-
Constructor Details
-
MotionSensorProperties
public MotionSensorProperties(int dev)Constructor. Sets ExclusiveUse to ExclusiveNo to match the MotionSensor device model.- Parameters:
dev
- Device index
-
-
Method Details
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonProperties
Initialization of properties that must be initialized during open.- Overrides:
initOnOpen
in classJposCommonProperties
-
timeout
public void timeout(int timeout) throws jpos.JposExceptionDescription copied from interface:MotionSensorInterface
Final part of setTimeout method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- timeout is > 0.
- Specified by:
timeout
in interfaceMotionSensorInterface
- Parameters:
timeout
- Time delay for motion- Throws:
jpos.JposException
- If an error occurs.
-
waitForMotion
public void waitForMotion(int timeout) throws jpos.JposExceptionDescription copied from interface:MotionSensorInterface
Final part of WaitForMotion method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- timeout is a positive value or FOREVER.
- Specified by:
waitForMotion
in interfaceMotionSensorInterface
- Parameters:
timeout
- Number of milliseconds to wait before firing an exception with JPOS_E_TIMEOUT.- Throws:
jpos.JposException
- If an error or a timeout occurs.
-