Class EPICS_V4_PV
- java.lang.Object
-
- org.epics.archiverappliance.engine.pv.EPICS_V4_PV
-
- All Implemented Interfaces:
PV
,org.epics.pvaccess.client.ChannelGetRequester
,org.epics.pvaccess.client.ChannelRequester
,org.epics.pvdata.monitor.MonitorRequester
,org.epics.pvdata.pv.Requester
public class EPICS_V4_PV extends Object implements PV, org.epics.pvaccess.client.ChannelGetRequester, org.epics.pvaccess.client.ChannelRequester, org.epics.pvdata.monitor.MonitorRequester
-
-
Method Summary
Modifier and Type Method Description void
addListener(PVListener listener)
Add a new listener.void
channelCreated(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.Channel createdChannel)
void
channelGetConnect(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.ChannelGet channelGet, org.epics.pvdata.pv.Structure arg2)
void
channelStateChange(org.epics.pvaccess.client.Channel channelChangingState, org.epics.pvaccess.client.Channel.ConnectionState connectionStatus)
ArchDBRTypes
getArchDBRTypes()
get the archive DBR types for this pvvoid
getDone(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.ChannelGet arg1, org.epics.pvdata.pv.PVStructure pvStructure, org.epics.pvdata.misc.BitSet arg3)
String
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()
String
getRequesterName()
MetaInfo
getTotalMetaInfo()
get the meta info for this pvboolean
isConnected()
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
message(String message, org.epics.pvdata.pv.MessageType mtype)
void
monitorConnect(org.epics.pvdata.pv.Status status, org.epics.pvdata.monitor.Monitor channelMonitor, org.epics.pvdata.pv.Structure structure)
void
monitorEvent(org.epics.pvdata.monitor.Monitor monitor)
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
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, ...void
unlisten(org.epics.pvdata.monitor.Monitor monitor)
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
-
addListener
public void addListener(PVListener listener)
Description copied from interface:PV
Add a new listener.- Specified by:
addListener
in interfacePV
- Parameters:
listener
- PVListener- See Also:
PVListener
-
removeListener
public void removeListener(PVListener listener)
Description copied from interface:PV
Remove a listener.- Specified by:
removeListener
in interfacePV
- Parameters:
listener
- PVListener
-
start
public void start() throws Exception
Description copied from interface:PV
Start the PV: connect, get meta data, subscribe to updates, invokePVListener
for incoming values, ...- Specified by:
start
in interfacePV
- Throws:
Exception
-- See Also:
PV.addListener(PVListener)
,PV.stop()
-
stop
public void stop()
Description copied from interface:PV
Stop the PV: disconnect, ... When the PV is no longer needed, one should 'stop' it to release resources.
-
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.
-
getArchDBRTypes
public ArchDBRTypes getArchDBRTypes()
Description copied from interface:PV
get the archive DBR types for this pv- Specified by:
getArchDBRTypes
in interfacePV
- Returns:
- ArchDBRTypes
-
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
-
-
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.
-
getLatestMetadata
public HashMap<String,String> getLatestMetadata()
Description copied from interface:PV
Combine the metadata from various sources and return the latest copy.- Specified by:
getLatestMetadata
in interfacePV
- Returns:
- HashMap
-
updateTotalMetaInfo
public void updateTotalMetaInfo() throws IllegalStateException
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
-
-
getHostName
public String getHostName()
- Specified by:
getHostName
in interfacePV
-
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
-
getRequesterName
public String getRequesterName()
- Specified by:
getRequesterName
in interfaceorg.epics.pvdata.pv.Requester
-
message
public void message(String message, org.epics.pvdata.pv.MessageType mtype)
- Specified by:
message
in interfaceorg.epics.pvdata.pv.Requester
-
monitorConnect
public void monitorConnect(org.epics.pvdata.pv.Status status, org.epics.pvdata.monitor.Monitor channelMonitor, org.epics.pvdata.pv.Structure structure)
- Specified by:
monitorConnect
in interfaceorg.epics.pvdata.monitor.MonitorRequester
-
monitorEvent
public void monitorEvent(org.epics.pvdata.monitor.Monitor monitor)
- Specified by:
monitorEvent
in interfaceorg.epics.pvdata.monitor.MonitorRequester
-
unlisten
public void unlisten(org.epics.pvdata.monitor.Monitor monitor)
- Specified by:
unlisten
in interfaceorg.epics.pvdata.monitor.MonitorRequester
-
channelCreated
public void channelCreated(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.Channel createdChannel)
- Specified by:
channelCreated
in interfaceorg.epics.pvaccess.client.ChannelRequester
-
channelStateChange
public void channelStateChange(org.epics.pvaccess.client.Channel channelChangingState, org.epics.pvaccess.client.Channel.ConnectionState connectionStatus)
- Specified by:
channelStateChange
in interfaceorg.epics.pvaccess.client.ChannelRequester
-
channelGetConnect
public void channelGetConnect(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.ChannelGet channelGet, org.epics.pvdata.pv.Structure arg2)
- Specified by:
channelGetConnect
in interfaceorg.epics.pvaccess.client.ChannelGetRequester
-
getDone
public void getDone(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.ChannelGet arg1, org.epics.pvdata.pv.PVStructure pvStructure, org.epics.pvdata.misc.BitSet arg3)
- Specified by:
getDone
in interfaceorg.epics.pvaccess.client.ChannelGetRequester
-
getTotalMetaInfo
public MetaInfo getTotalMetaInfo()
get the meta info for this pv- Specified by:
getTotalMetaInfo
in interfacePV
- Returns:
- MetaInfo
-
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
-
-