Class StateWatchdogProcessor
java.lang.Object
org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
org.scictrl.csshell.epics.server.processor.MemoryValueProcessor
org.scictrl.csshell.epics.server.processor.DefaultAlarmProcessor
org.scictrl.csshell.epics.server.processor.StateWatchdogProcessor
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
,ValueProcessor
StateWatchdogProcessor class.
- Author:
- igor@scictrl.com
-
Field Summary
Fields inherited from class org.scictrl.csshell.epics.server.processor.MemoryValueProcessor
fixed, lastChangeTimestamp, timestamp, value
Fields inherited from class org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
log, record, trigger, type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
_setValue
(boolean value, gov.aps.jca.dbr.Severity severity, gov.aps.jca.dbr.Status status, boolean notify, boolean force) Internal set: sets new value to this processor.protected boolean
_setValue
(Object value, gov.aps.jca.dbr.Severity severity, gov.aps.jca.dbr.Status status, boolean notify, boolean force) Internal set: sets new value to this processor.void
Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag.void
process()
Called by Database in interval set by the trigger parameter in milliseconds.void
protected boolean
update
(boolean notify) update.Methods inherited from class org.scictrl.csshell.epics.server.processor.DefaultAlarmProcessor
activate, disableSupressTime, newProcessor, update, updateAlarmStatus, updateOrSupress
Methods inherited from class org.scictrl.csshell.epics.server.processor.MemoryValueProcessor
_forceValueUpdateEvent, _setValue, _setValue, convert, getChangeAccessTimestamp, getTimestamp, getValue, getValueAsBoolean, isFixed, newBooleanProcessor, newDoubleProcessor, newProcessor, newProcessor, setFixed, setValue
Methods inherited from class org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
getName, getRecord, getTrigger, getType, toString
-
Constructor Details
-
StateWatchdogProcessor
public StateWatchdogProcessor()Constructor for StateWatchdogProcessor.
-
-
Method Details
-
configure
public void configure(Record record, org.apache.commons.configuration.HierarchicalConfiguration config) Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag. Parent record is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.- Specified by:
configure
in interfaceValueProcessor
- Overrides:
configure
in classDefaultAlarmProcessor
- Parameters:
record
- the parent record.config
- configuration with room inside processor tag.
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classDefaultAlarmProcessor
-
_setValue
protected boolean _setValue(Object value, gov.aps.jca.dbr.Severity severity, gov.aps.jca.dbr.Status status, boolean notify, boolean force) Internal set: sets new value to this processor. It checks if it is fixed, it never sets fixed value. Fires value update event only if value was changes and notify is true. If force is true, then updates value and fires notify, if notify is true, even if value was not changed. If the value is not an array it tries to convert it to a single element array. Updates timestamp. If required fires notify event.- Overrides:
_setValue
in classMemoryValueProcessor
- Parameters:
value
- value to be setseverity
- the severity to be used together with the value update. Ifnull
no alarm update is fired.status
- the status to be used together with the value update. Ifnull
no alarm update is fired.notify
- iftrue
fire notify event if value was change,false
suppresses eventsforce
- iftrue
it will update value and timestamp even if there is not new value and proceeds with notify- Returns:
- true if value was updated, regardless if based on difference or force
-
_setValue
protected boolean _setValue(boolean value, gov.aps.jca.dbr.Severity severity, gov.aps.jca.dbr.Status status, boolean notify, boolean force) Internal set: sets new value to this processor. It checks if it is fixed, it never sets fixed value. Fires value update event only if value was changes and notify is true. If force is true, then updates value and fires notify, if notify is true, even if value was not changed. If the value is not an array it tries to convert it to a single element array. Updates timestamp. If required fires notify event.- Overrides:
_setValue
in classMemoryValueProcessor
- Parameters:
value
- value to be setseverity
- the severity to be used together with the value update. Ifnull
no alarm update is fired.status
- the status to be used together with the value update. Ifnull
no alarm update is fired.notify
- iftrue
fire notify event if value was change,false
suppresses eventsforce
- iftrue
it will update value and timestamp even if there is not new value and proceeds with notify- Returns:
- true if value was updated, regardless if based on difference or force
-
update
protected boolean update(boolean notify) update.
- Parameters:
notify
- a boolean- Returns:
- a boolean
-
process
public void process()Called by Database in interval set by the trigger parameter in milliseconds. Not called if trigger in 0.- Specified by:
process
in interfaceValueProcessor
- Overrides:
process
in classAbstractValueProcessor
-