Package org.scictrl.csshell.epics.server
Class ValueLinks
java.lang.Object
org.scictrl.csshell.epics.server.ValueLinks
ValueLinks class.
- Author:
- igor@scictrl.com
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionValueLinks(String name, String[] linkNames, PropertyChangeListener listener, String propertyType) Creates new link handler.ValueLinks(String name, String linkName, PropertyChangeListener listener, String propertyType) Creates new link handler.ValueLinks(String name, String context, String[] linkNames, PropertyChangeListener listener, String propertyType) Creates new link handler.ValueLinks(String name, String context, String linkName, PropertyChangeListener listener, String propertyType) Creates new link handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidActivates links to database records or remote objects.consume()Receives copy of array with received values.booleanconsumeAsBooleanAnd.double[]consumeAsDoubles.longconsumeAsLong.long[]consumeAsLongs.voidCopy meta data from this link representation to the provided record reference.voidcopyMetaData(Record r, int link) Copy meta data from this link representation indicated by index to the provided record reference.voiddeactivate.protected voidfireUpdate.gov.aps.jca.dbr.SeverityGetter for the fieldlastSeverity.gov.aps.jca.dbr.StatusGetter for the fieldlastStatus.String[]Getter for the fieldlinkNames.getMetaData(int link) getMetaData.getName()Returns the name of this links object.String[]getNotConnected.getValue()getValue.booleanReturnstrueif after consume was called and no new values were delivered.booleanReturnstrueif some of the connection failed.booleanisLastSeverityHigh.booleanisLastSeverityInvalid.booleanisReady()Returntruewhen all values from all links has been received and there is nonullin array of values.voidprintDebug(Appendable sb) printDebug.voidresetConsumedFlag.voidsetValue.voidsetValueToAll(double[] value) setValueToAll.voidsetValueToAll(Object value) setValueToAll.voidsetValueToAll(Object value, boolean[] select) setValueToAll.toString()
-
Field Details
-
SUMMARY
ConstantSUMMARY="Summary"- See Also:
-
-
Constructor Details
-
ValueLinks
public ValueLinks(String name, String linkName, PropertyChangeListener listener, String propertyType) Creates new link handler. Name is used as a context.- Parameters:
name- this name is used as identifier, so if several link handlers are used, they can be distinguished, for example as inAbstractApplication.linkName- name of PV links to be established by this handler.listener- update listenerpropertyType- how to listen to links,c an beRecord.PROPERTY_VALUEorRecord.PROPERTY_ALARM
-
ValueLinks
public ValueLinks(String name, String context, String linkName, PropertyChangeListener listener, String propertyType) Creates new link handler.- Parameters:
name- this name is used as identifier, so if several link handlers are used, they can be distinguished, for example as inAbstractApplication.context- a context to the link, this is used in logging to distinguish who is using this link. ifnullthen name is used.linkName- name of PV links to be established by this handler.listener- update listenerpropertyType- how to listen to links,c an beRecord.PROPERTY_VALUEorRecord.PROPERTY_ALARM
-
ValueLinks
public ValueLinks(String name, String[] linkNames, PropertyChangeListener listener, String propertyType) Creates new link handler. Name is used as a context.- Parameters:
name- this name is used as identifier, so if several link handlers are used, they can be distinguished, for example as inAbstractApplication.linkNames- name of PV links to be established by this handler.listener- update listenerpropertyType- how to listen to links,c an beRecord.PROPERTY_VALUEorRecord.PROPERTY_ALARM
-
ValueLinks
public ValueLinks(String name, String context, String[] linkNames, PropertyChangeListener listener, String propertyType) Creates new link handler.- Parameters:
name- this name is used as identifier, so if several link handlers are used, they can be distinguished, for example as inAbstractApplication.context- a context to the link, this is used in logging to distinguish who is using this link. Can benull.linkNames- name of PV links to be established by this handler.listener- update listenerpropertyType- how to listen to links,c an beRecord.PROPERTY_VALUEorRecord.PROPERTY_ALARM
-
-
Method Details
-
getName
Returns the name of this links object.- Returns:
- the name of this links object
-
activate
Activates links to database records or remote objects. But be called from activate method from Record or Application.- Parameters:
db- aDatabaseobject
-
deactivate
public void deactivate()deactivate.
-
consume
Receives copy of array with received values. Values in array are in same order as link names. Resets consumed flag to true.- Returns:
- copy of received values up to this point
-
consumeAsDoubles
public double[] consumeAsDoubles()consumeAsDoubles.
- Returns:
- an array of
objects
invalid reference
double
-
consumeAsLongs
public long[] consumeAsLongs()consumeAsLongs.
- Returns:
- an array of
objects
invalid reference
long
-
consumeAsLong
public long consumeAsLong()consumeAsLong.
- Returns:
- a long
-
consumeAsBooleanAnd
public boolean consumeAsBooleanAnd()consumeAsBooleanAnd.
- Returns:
- a boolean
-
getLastSeverity
public gov.aps.jca.dbr.Severity getLastSeverity()Getter for the field
lastSeverity.- Returns:
- a
Severityobject
-
isLastSeverityInvalid
public boolean isLastSeverityInvalid()isLastSeverityInvalid.
- Returns:
- a boolean
-
isLastSeverityHigh
public boolean isLastSeverityHigh()isLastSeverityHigh.
- Returns:
- a boolean
-
getLastStatus
public gov.aps.jca.dbr.Status getLastStatus()Getter for the field
lastStatus.- Returns:
- a
Statusobject
-
isConsumed
public boolean isConsumed()Returnstrueif after consume was called and no new values were delivered.- Returns:
trueif after consume was called and no new values were delivered
-
resetConsumedFlag
public void resetConsumedFlag()resetConsumedFlag.
-
isReady
public boolean isReady()Returntruewhen all values from all links has been received and there is nonullin array of values.- Returns:
truewhen there is no morenullamong values
-
getNotConnected
getNotConnected.
- Returns:
- an array of
Stringobjects
-
isInvalid
public boolean isInvalid()Returnstrueif some of the connection failed.- Returns:
trueif some of the connection failed
-
printDebug
printDebug.
- Parameters:
sb- aAppendableobject- Throws:
IOException- if any.
-
fireUpdate
protected void fireUpdate()fireUpdate.
-
copyMetaData
Copy meta data from this link representation to the provided record reference. If there is more than one link, first link is used.- Parameters:
r- the Record object for metadata to be copied to
-
copyMetaData
Copy meta data from this link representation indicated by index to the provided record reference.- Parameters:
r- the Record object for metadata to be copied tolink- the index of link to provide the data for copy
-
getMetaData
getMetaData.
- Parameters:
link- a int- Returns:
- a
MetaDataobject
-
setValue
setValue.
-
setValueToAll
setValueToAll.
- Parameters:
value- an array ofobjectsinvalid reference
double- Throws:
Exception- if any.
-
setValueToAll
setValueToAll.
-
setValueToAll
setValueToAll.
-
getValue
getValue.
- Returns:
- an array of
ValueLinks.ValueHolderobjects - Throws:
Exception- if any.
-
getLinkNames
Getter for the field
linkNames.- Returns:
- an array of
Stringobjects
-
toString
-