Class HeartbeatValueProcessor
java.lang.Object
org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
org.scictrl.csshell.epics.server.processor.MemoryValueProcessor
org.scictrl.csshell.epics.server.processor.HeartbeatValueProcessor
- All Implemented Interfaces:
PropertyChangeListener,EventListener,ValueProcessor
Value processor, which connects to provided remote names and captures their value.
By default first value from array of linked values is used.
Value update events wit captured value are produced at the configured heartbeat rate.
- Author:
- igor@scictrl.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionBuffer that stores data between two heartbeat updated.protected ValueLinksInput value remote link.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 TypeMethodDescriptionvoidactivate()Record has now reference to Database.voidConfigures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag.static final HeartbeatValueProcessornewProcessor(String name, String description, String link) Creates processor, configures it and returns it embedded within the returned record.voidprocess()Called by Database in interval set by the trigger parameter in milliseconds.voidMethods inherited from class org.scictrl.csshell.epics.server.processor.MemoryValueProcessor
_forceValueUpdateEvent, _setValue, _setValue, _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
-
Field Details
-
input
Input value remote link. -
buffer
Buffer that stores data between two heartbeat updated.
-
-
Constructor Details
-
HeartbeatValueProcessor
public HeartbeatValueProcessor()Constructor for HeartbeatValueProcessor.
-
-
Method Details
-
newProcessor
public static final HeartbeatValueProcessor newProcessor(String name, String description, String link) Creates processor, configures it and returns it embedded within the returned record.- Parameters:
name- name of the returned recorddescription- the description of the recordlink- the link of the returned processor- Returns:
- new record with embedded and configured processor
-
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 classMemoryValueProcessor- Parameters:
record- the parent record.config- configuration with room inside processor tag.
-
activate
public void activate()Record has now reference to Database. processor might want to connect to other records on this server or PVs on other servers. This can not be done until all records from configuration has been loaded. Call to this method signals to the processor that records has been loaded and linking to other values can be commenced.- Specified by:
activatein interfaceValueProcessor- Overrides:
activatein classMemoryValueProcessor
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
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
-