Class EPICS_V3_PV
java.lang.Object
org.epics.archiverappliance.engine.pv.EPICS_V3_PV
- All Implemented Interfaces:
gov.aps.jca.event.ConnectionListener,gov.aps.jca.event.MonitorListener,EventListener,ControllingPV,PV
public class EPICS_V3_PV
extends Object
implements PV, ControllingPV, gov.aps.jca.event.ConnectionListener, gov.aps.jca.event.MonitorListener
EPICS ChannelAccess implementation of the PV interface.
- Version:
- Initial version:CSS, 4-Jun-2012, Luofeng Li:added codes to support for the new archiver
- Author:
- Kay Kasemir
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSourced from org/csstudio/platform/libs/epics/EpicsPlugin.java -
Method Summary
Modifier and TypeMethodDescriptionvoidaboutToWriteBuffer(DBRTimeEvent lastEvent) This method is called each time the Write thread is about to write a batch of samples.voidaddControledPV(String pvName) add pv controlled by this pvvoidaddListener(PVListener listener) Add a new listener.voidconnectionChanged(gov.aps.jca.event.ConnectionEvent ev) ConnectionListener interface.get the archive DBR types for this pvCombine the metadata from various sources and return the latest copy.voidgetLowLevelChannelInfo(List<Map<String, String>> statuses) Get any low level info as a displayable list; this is typically meant for debugging purposes..getName()get the meta info for this pvbooleanbooleanbooleanvoidmarkPVHasMetafields(boolean hasMetaField) Making this PV as having metafields or not If the PV has metafields, then internal state is created to maintain the latest values of these metafields.voidmonitorChanged(gov.aps.jca.event.MonitorEvent ev) MonitorListener interface.voidremoveListener(PVListener listener) Remove a listener.voidThis method is called each time the ArchiveChannel has written changed a DBRTimeEvent into the buffers.voidvoidsetMetaFieldParentPV(EPICS_V3_PV parentPV, boolean isRuntimeOnly) Set the "parent" PV for this meta field pv.voidstart()Start the PV: connect, get meta data, subscribe to updates, invokePVListenerfor incoming values, ...voidstop()Stop the PV: disconnect, ...toString()voidupdataMetaFieldValue(String pvName, String fieldValue) Update the value in the parent pv hashmaps for this fieldvoidDo a caget and update the metadata that is cached in the PV.
-
Method Details
-
getHostName
- Specified by:
getHostNamein interfacePV
-
isEnableAllPV
public boolean isEnableAllPV()- Specified by:
isEnableAllPVin interfaceControllingPV- Returns:
- the status of all pvs controlled by this pv
-
getArchDBRTypes
Description copied from interface:PVget the archive DBR types for this pv- Specified by:
getArchDBRTypesin interfacePV- Returns:
- ArchDBRTypes
- See Also:
-
getTotalMetaInfo
get the meta info for this pv- Specified by:
getTotalMetaInfoin interfacePV- Returns:
- MetaInfo
-
addControledPV
Description copied from interface:ControllingPVadd pv controlled by this pv- Specified by:
addControledPVin interfaceControllingPV- Parameters:
pvName- The PV name
-
getName
-
addListener
Add a new listener.- Specified by:
addListenerin interfacePV- Parameters:
listener- PVListener- See Also:
-
removeListener
Remove a listener.- Specified by:
removeListenerin interfacePV- Parameters:
listener- PVListener
-
start
Start the PV: connect, get meta data, subscribe to updates, invokePVListenerfor incoming values, ...- Specified by:
startin interfaceControllingPV- Specified by:
startin interfacePV- Throws:
Exception-- See Also:
-
isRunning
public boolean isRunning() -
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfacePV- Returns:
- Returns
truewhen connected. WhileisRunning, we are subscribed for value updates, but we might still be disconnected, at least temporarily.
-
connectionState
- Specified by:
connectionStatein interfacePV- Returns:
-
stop
public void stop()Stop the PV: disconnect, ... When the PV is no longer needed, one should 'stop' it to release resources.- Specified by:
stopin interfaceControllingPV- Specified by:
stopin interfacePV
-
connectionChanged
public void connectionChanged(gov.aps.jca.event.ConnectionEvent ev) ConnectionListener interface.- Specified by:
connectionChangedin interfacegov.aps.jca.event.ConnectionListener
-
monitorChanged
public void monitorChanged(gov.aps.jca.event.MonitorEvent ev) MonitorListener interface.- Specified by:
monitorChangedin interfacegov.aps.jca.event.MonitorListener
-
toString
-
setMetaFieldParentPV
Set the "parent" PV for this meta field pv. The data from this PV is stored as a metafield in the parentPV.- Parameters:
parentPV- - Store data from this PV as a metafield in the parentPV.isRuntimeOnly- - Only store values in the runtime hashMaps.
-
updataMetaFieldValue
Update the value in the parent pv hashmaps for this field- Parameters:
pvName- this meta field pv 's name - this is the full PV names - for example, a:b:c.HIHIfieldValue- - this meta field pv's value as a string.
-
markPVHasMetafields
public void markPVHasMetafields(boolean hasMetaField) Making this PV as having metafields or not If the PV has metafields, then internal state is created to maintain the latest values of these metafields.- Parameters:
hasMetaField-
-
getLowLevelChannelInfo
Description copied from interface:PVGet any low level info as a displayable list; this is typically meant for debugging purposes.. Add these to as key value pairs to the statuses- Specified by:
getLowLevelChannelInfoin interfacePV
-
updateTotalMetaInfo
Description copied from interface:PVDo a caget and update the metadata that is cached in the PV.- Specified by:
updateTotalMetaInfoin interfacePV- Throws:
IllegalStateException-gov.aps.jca.CAException-
-
getLatestMetadata
Combine the metadata from various sources and return the latest copy.- Specified by:
getLatestMetadatain interfacePV- Returns:
- HashMap
- See Also:
-
setDBEroperties
public void setDBEroperties() -
sampleWrittenIntoStores
public void sampleWrittenIntoStores()Description copied from interface:PVThis method is called each time the ArchiveChannel has written changed a DBRTimeEvent into the buffers.- Specified by:
sampleWrittenIntoStoresin interfacePV
-
aboutToWriteBuffer
Description copied from interface:PVThis method is called each time the Write thread is about to write a batch of samples. The writer thread passes in the last sample of the previous batch of samples after buffer rotation.- Specified by:
aboutToWriteBufferin interfacePV
-