public abstract class PVATypeAdapter extends Object implements DataSourceTypeAdapter<PVAChannelHandler,org.epics.pvdata.pv.PVStructure>
| Constructor and Description |
|---|
PVATypeAdapter(Class<?> typeClass,
String[] ntIds)
Creates a new type adapter.
|
PVATypeAdapter(Class<?> typeClass,
String[] ntIds,
org.epics.pvdata.pv.Field fieldType)
Creates a new type adapter.
|
PVATypeAdapter(Class<?> typeClass,
String[] ntIds,
org.epics.pvdata.pv.Field[] fieldTypes)
Creates a new type adapter.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Object |
createValue(org.epics.pvdata.pv.PVStructure message,
org.epics.pvdata.pv.PVField valueField,
boolean disconnected)
Given the value create the new value.
|
Object |
getSubscriptionParameter(ValueCache<?> cache,
PVAChannelHandler channel)
The parameters required to open a monitor for the channel.
|
boolean |
match(org.epics.pvdata.pv.Structure structure) |
int |
match(ValueCache<?> cache,
PVAChannelHandler channel)
Determines whether the converter can take values from the channel
described by the connection payload and transform them in a
type required by the cache.
|
String |
toString() |
boolean |
updateCache(ValueCache cache,
PVAChannelHandler channel,
org.epics.pvdata.pv.PVStructure message)
Takes the information in the message and updates the cache.
|
public PVATypeAdapter(Class<?> typeClass, String[] ntIds)
typeClass - the java type this adapter will createntIds - array of IDs this adapter is able convert, null allowedpublic PVATypeAdapter(Class<?> typeClass, String[] ntIds, org.epics.pvdata.pv.Field fieldType)
typeClass - the java type this adapter will createntIds - array of IDs this adapter is able convert, null allowedfieldType - Field instance this adapter is able convertpublic PVATypeAdapter(Class<?> typeClass, String[] ntIds, org.epics.pvdata.pv.Field[] fieldTypes)
typeClass - the java type this adapter will createntIds - array of IDs this adapter is able convert, null allowedfieldTypes - Field instances this adapter is able convert, null allowedpublic boolean match(org.epics.pvdata.pv.Structure structure)
public int match(ValueCache<?> cache, PVAChannelHandler channel)
DataSourceTypeAdaptermatch in interface DataSourceTypeAdapter<PVAChannelHandler,org.epics.pvdata.pv.PVStructure>cache - the cache where data will need to be writtenchannel - the connection informationpublic Object getSubscriptionParameter(ValueCache<?> cache, PVAChannelHandler channel)
DataSourceTypeAdapterFor channels multiplexed on a single subscription, this method is never used.
getSubscriptionParameter in interface DataSourceTypeAdapter<PVAChannelHandler,org.epics.pvdata.pv.PVStructure>cache - the cache where data will need to be writtenchannel - the connection informationpublic boolean updateCache(ValueCache cache, PVAChannelHandler channel, org.epics.pvdata.pv.PVStructure message)
DataSourceTypeAdapterupdateCache in interface DataSourceTypeAdapter<PVAChannelHandler,org.epics.pvdata.pv.PVStructure>cache - cache to be updatedchannel - the connection informationmessage - the payload of each messagepublic abstract Object createValue(org.epics.pvdata.pv.PVStructure message, org.epics.pvdata.pv.PVField valueField, boolean disconnected)
message - the value taken from the monitorvalueField - the value field data, optionaldisconnected - true if the value should report the channel is currently disconnectedCopyright © 2010–2015. All rights reserved.