Class ScannedArchiveChannel
- java.lang.Object
-
- org.epics.archiverappliance.engine.model.ArchiveChannel
-
- org.epics.archiverappliance.engine.model.ScannedArchiveChannel
-
- All Implemented Interfaces:
Runnable
public class ScannedArchiveChannel extends ArchiveChannel implements Runnable
An ArchiveChannel that stores value in a periodic scan.- Version:
- Initial version:CSS, 4-Jun-2012, Luofeng Li:added codes to support for the new archiver
- Author:
- Kay Kasemir
-
-
Field Summary
-
Fields inherited from class org.epics.archiverappliance.engine.model.ArchiveChannel
lastDBRTimeEvent, latestDBRTimeEvent, pvMetrics
-
-
Constructor Summary
Constructors Constructor Description ScannedArchiveChannel(String name, Writer writer, Enablement enablement, int buffer_capacity, Timestamp last_timeestamp, double scan_period, ConfigService configservice, ArchDBRTypes archdbrtype, String controlPVname, int commandThreadID, boolean usePVAccess)
-
Method Summary
Modifier and Type Method Description String
getMechanism()
double
getPeriod()
protected boolean
handleNewValue(DBRTimeEvent timeevent)
Called for each value received from PV.void
run()
-
Methods inherited from class org.epics.archiverappliance.engine.model.ArchiveChannel
addValueToBuffer, getConnectedMetaChannelCount, getControlPVname, getCurrentArchivedValue, getCurrentCopyOfMetaFields, getEnablement, getHostName, getJCACommandThreadID, getLastArchivedValue, getLatestMetadata, getLowLevelChannelStateInfo, getMetaChannelCount, getMetaPVNames, getName, getPVData, getPVMetrics, getReceivedValues, getSampleBuffer, getSecondsElapsedSinceSearchRequest, getWriter, handleDisconnected, initializeMetaFieldPVS, isConnected, isEnabled, isMetaPVConnected, metaChannelsNeedStartingUp, reset, setJCACommandThreadID, setlastRotateLogsEpochSeconds, shutdownMetaChannels, start, startUpMetaChannels, stop, toString, updateMetadataOnceADay
-
-
-
-
Constructor Detail
-
ScannedArchiveChannel
public ScannedArchiveChannel(String name, Writer writer, Enablement enablement, int buffer_capacity, Timestamp last_timeestamp, double scan_period, ConfigService configservice, ArchDBRTypes archdbrtype, String controlPVname, int commandThreadID, boolean usePVAccess) throws Exception
- Parameters:
name
- pv's namewriter
- the writer for this pvenablement
- start or stop archiving this pv when channel is createdbuffer_capacity
- the sample buffer's capacity for this pvlast_timeestamp
- the last time stamp when this pv was archivedscan_period
-configservice
- the configservice of new archiverarchdbrtype
- the archiving dbr typecontrolPVname
- the pv's name who control this pv to start archiving or stop archivingcommandThreadID
- - this is the index into the array of JCA command threads that processes this context.usePVAccess
- - Should we use PVAccess to connect to this PV.- Throws:
Exception
- error when creating archive channel for this pv- See Also:
ArchiveChannel(java.lang.String, org.epics.archiverappliance.Writer, org.epics.archiverappliance.engine.model.Enablement, int, java.sql.Timestamp, org.epics.archiverappliance.config.ConfigService, org.epics.archiverappliance.config.ArchDBRTypes, java.lang.String, int, boolean)
-
-
Method Detail
-
getPeriod
public final double getPeriod()
- Returns:
- Scan period in seconds
-
getMechanism
public String getMechanism()
- Specified by:
getMechanism
in classArchiveChannel
- Returns:
- Short description of sample mechanism
-
handleNewValue
protected boolean handleNewValue(DBRTimeEvent timeevent) throws Exception
Description copied from class:ArchiveChannel
Called for each value received from PV.Base class remembers the
most_recent_value
, and asserts that one 'first' sample is archived. Derived class must callsuper()
.- Overrides:
handleNewValue
in classArchiveChannel
- Parameters:
timeevent
- DBRTimeEvent- Returns:
- true if the value was already written because it's the first value after startup or error, so there's no need to write that sample again.
- Throws:
Exception
-
-
-