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:
PV
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EPICS_V3_PV.MonitorMask
Sourced from org/csstudio/platform/libs/epics/EpicsPlugin.java
-
Method Summary
Modifier and Type Method Description void
addControledPV(String pvName)
add pv controlled by this pvvoid
addListener(PVListener listener)
Add a new listener.void
connectionChanged(gov.aps.jca.event.ConnectionEvent ev)
ConnectionListener interface.ArchDBRTypes
getArchDBRTypes()
get the archive DBR types for this pvString
getHostName()
HashMap<String,String>
getLatestMetadata()
Combine the metadata from various sources and return the latest copy.void
getLowLevelChannelInfo(List<Map<String,String>> statuses)
Get any low level info as a displayable list; this is typically meant for debugging purposes..String
getName()
MetaInfo
getTotalMetaInfo()
get the meta info for this pvboolean
isConnected()
boolean
isEnableAllPV()
boolean
isRunning()
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.void
monitorChanged(gov.aps.jca.event.MonitorEvent ev)
MonitorListener interface.void
removeListener(PVListener listener)
Remove a listener.void
sampleWrittenIntoStores()
This method is called each time the ArchiveChannel has written changed a DBRTimeEvent into the buffers.void
setDBEroperties()
void
setMetaFieldParentPV(PV parentPV, boolean isRuntimeOnly)
Set the "parent" PV for this meta field pv.void
start()
Start the PV: connect, get meta data, subscribe to updates, invokePVListener
for incoming values, ...void
stop()
Stop the PV: disconnect, ...String
toString()
void
updataMetaFieldValue(String PVname, String fieldValue)
Update the value in the parent pv hashmaps for this fieldvoid
updateTotalMetaInfo()
Do a caget and update the metadata that is cached in the PV.
-
-
-
Method Detail
-
getHostName
public String getHostName()
- Specified by:
getHostName
in interfacePV
-
isEnableAllPV
public boolean isEnableAllPV()
- Specified by:
isEnableAllPV
in interfaceControllingPV
- Returns:
- the status of all pvs controlled by this pv
-
getArchDBRTypes
public ArchDBRTypes getArchDBRTypes()
Description copied from interface:PV
get the archive DBR types for this pv- Specified by:
getArchDBRTypes
in interfacePV
- Returns:
- ArchDBRTypes
- See Also:
PV.getArchDBRTypes()
-
getTotalMetaInfo
public MetaInfo getTotalMetaInfo()
get the meta info for this pv- Specified by:
getTotalMetaInfo
in interfacePV
- Returns:
- MetaInfo
-
addControledPV
public void addControledPV(String pvName)
Description copied from interface:ControllingPV
add pv controlled by this pv- Specified by:
addControledPV
in interfaceControllingPV
- Parameters:
pvName
- The PV name
-
addListener
public void addListener(PVListener listener)
Add a new listener.- Specified by:
addListener
in interfacePV
- Parameters:
listener
- PVListener- See Also:
PVListener
-
removeListener
public void removeListener(PVListener listener)
Remove a listener.- Specified by:
removeListener
in interfacePV
- Parameters:
listener
- PVListener
-
start
public void start() throws Exception
Start the PV: connect, get meta data, subscribe to updates, invokePVListener
for incoming values, ...- Specified by:
start
in interfaceControllingPV
- Specified by:
start
in interfacePV
- Throws:
Exception
-- See Also:
PV.addListener(PVListener)
,PV.stop()
-
isRunning
public boolean isRunning()
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfacePV
- Returns:
- Returns
true
when connected. WhileisRunning
, we are subscribed for value updates, but we might still be disconnected, at least temporarily.
-
stop
public void stop()
Stop the PV: disconnect, ... When the PV is no longer needed, one should 'stop' it to release resources.- Specified by:
stop
in interfaceControllingPV
- Specified by:
stop
in interfacePV
-
connectionChanged
public void connectionChanged(gov.aps.jca.event.ConnectionEvent ev)
ConnectionListener interface.- Specified by:
connectionChanged
in interfacegov.aps.jca.event.ConnectionListener
-
monitorChanged
public void monitorChanged(gov.aps.jca.event.MonitorEvent ev)
MonitorListener interface.- Specified by:
monitorChanged
in interfacegov.aps.jca.event.MonitorListener
-
setMetaFieldParentPV
public void setMetaFieldParentPV(PV parentPV, boolean isRuntimeOnly)
Description copied from interface:PV
Set the "parent" PV for this meta field pv. The data from this PV is stored as a metafield in the parentPV.- Specified by:
setMetaFieldParentPV
in interfacePV
- Parameters:
parentPV
- - Store data from this PV as a metafield in the parentPV.isRuntimeOnly
- - Only store values in the runtime hashMaps.
-
updataMetaFieldValue
public void updataMetaFieldValue(String PVname, String fieldValue)
Description copied from interface:PV
Update the value in the parent pv hashmaps for this field- Specified by:
updataMetaFieldValue
in interfacePV
- 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.- See Also:
PV.updataMetaFieldValue(java.lang.String, java.lang.String)
-
markPVHasMetafields
public void markPVHasMetafields(boolean hasMetaField)
Description copied from interface:PV
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.- Specified by:
markPVHasMetafields
in interfacePV
- Parameters:
hasMetaField
-- See Also:
PV.markPVHasMetafields(boolean)
-
getLowLevelChannelInfo
public void getLowLevelChannelInfo(List<Map<String,String>> statuses)
Description copied from interface:PV
Get 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:
getLowLevelChannelInfo
in interfacePV
-
updateTotalMetaInfo
public void updateTotalMetaInfo() throws IllegalStateException, gov.aps.jca.CAException
Description copied from interface:PV
Do a caget and update the metadata that is cached in the PV.- Specified by:
updateTotalMetaInfo
in interfacePV
- Throws:
IllegalStateException
-gov.aps.jca.CAException
-
-
getLatestMetadata
public HashMap<String,String> getLatestMetadata()
Combine the metadata from various sources and return the latest copy.- Specified by:
getLatestMetadata
in interfacePV
- Returns:
- HashMap
- See Also:
PV.getLatestMetadata()
-
setDBEroperties
public void setDBEroperties()
-
sampleWrittenIntoStores
public void sampleWrittenIntoStores()
Description copied from interface:PV
This method is called each time the ArchiveChannel has written changed a DBRTimeEvent into the buffers.- Specified by:
sampleWrittenIntoStores
in interfacePV
-
-