Class AbstractValueProcessor
java.lang.Object
org.scictrl.csshell.epics.server.processor.AbstractValueProcessor
- All Implemented Interfaces:
ValueProcessor
- Direct Known Subclasses:
MemoryValueProcessor
,OnDemandValueProcessor
Abstract AbstractValueProcessor class.
- Author:
- igor@scictrl.com
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Record has now reference to Database.void
Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag.getName()
getName.getRecord.long
Return trigger interval in milliseconds, which indicates on which interval this processor wants to be processed by Database.gov.aps.jca.dbr.DBRType
getType()
Returns preferred type of the processor.void
process()
Called by Database in interval set by the trigger parameter in milliseconds.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.scictrl.csshell.epics.server.ValueProcessor
getTimestamp, getValue, setValue
-
Field Details
-
record
Record owning this processor. -
trigger
protected long triggerUpdate time -
type
protected gov.aps.jca.dbr.DBRType typeValue type. -
log
protected org.apache.logging.log4j.Logger logLogger.
-
-
Constructor Details
-
AbstractValueProcessor
public AbstractValueProcessor()Constructor for AbstractValueProcessor.
-
-
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
- Parameters:
record
- the parent record.config
- configuration with room inside processor tag.
-
getType
public gov.aps.jca.dbr.DBRType getType()Returns preferred type of the processor. Alternatively the processor can inspect actual type of parent record and adopt. This type will overwrite type from record, when record will be initialized with this processor.- Specified by:
getType
in interfaceValueProcessor
- Returns:
- the type which processor works with, possibly same as associated record.
-
getTrigger
public long getTrigger()Return trigger interval in milliseconds, which indicates on which interval this processor wants to be processed by Database. If trigger is 0 or less, then it means that no processing is required.- Specified by:
getTrigger
in interfaceValueProcessor
- Returns:
- update interval in milliseconds or disabled if 0.
-
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
-
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:
activate
in interfaceValueProcessor
-
getName
getName.
- Specified by:
getName
in interfaceValueProcessor
- Returns:
- a
String
object
-
getRecord
getRecord.
- Specified by:
getRecord
in interfaceValueProcessor
- Returns:
- a
Record
object
-
toString
-