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, valueFields inherited from class org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
log, record, trigger, type -
Constructor Summary
Constructors -
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.voidConfigures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag.voidprocess()Called by Database in interval set by the trigger parameter in milliseconds.voidprotected booleanupdate(boolean notify) update.Methods inherited from class org.scictrl.csshell.epics.server.processor.DefaultAlarmProcessor
activate, disableSupressTime, newProcessor, update, updateAlarmStatus, updateOrSupressMethods inherited from class org.scictrl.csshell.epics.server.processor.MemoryValueProcessor
_forceValueUpdateEvent, _setValue, _setValue, convert, getChangeAccessTimestamp, getTimestamp, getValue, getValueAsBoolean, isFixed, newBooleanProcessor, newDoubleProcessor, newProcessor, newProcessor, setFixed, setValueMethods 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:
configurein interfaceValueProcessor- Overrides:
configurein classDefaultAlarmProcessor- Parameters:
record- the parent record.config- configuration with room inside processor tag.
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein 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:
_setValuein classMemoryValueProcessor- Parameters:
value- value to be setseverity- the severity to be used together with the value update. Ifnullno alarm update is fired.status- the status to be used together with the value update. Ifnullno alarm update is fired.notify- iftruefire notify event if value was change,falsesuppresses eventsforce- iftrueit 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:
_setValuein classMemoryValueProcessor- Parameters:
value- value to be setseverity- the severity to be used together with the value update. Ifnullno alarm update is fired.status- the status to be used together with the value update. Ifnullno alarm update is fired.notify- iftruefire notify event if value was change,falsesuppresses eventsforce- iftrueit 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:
processin interfaceValueProcessor- Overrides:
processin classAbstractValueProcessor
-