Interface PVStructure
-
- All Superinterfaces:
BitSetSerializable,PVField,Serializable
- All Known Implementing Classes:
BasePVStructure
public interface PVStructure extends PVField, BitSetSerializable
PVStructure interface.- Author:
- mrk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckValid()Check if PVStructure and sub fields are valid.PVBooleangetBooleanField(String fieldName)Find a boolean subfield with the specified fieldName.PVBytegetByteField(String fieldName)Find a byte subfield with the specified fieldName.PVDoublegetDoubleField(String fieldName)Find a double subfield with the specified fieldName.PVFloatgetFloatField(String fieldName)Find a float subfield with the specified fieldName.PVIntgetIntField(String fieldName)Find an int subfield with the specified fieldName.PVLonggetLongField(String fieldName)Find a long subfield with the specified fieldName.PVField[]getPVFields()Get the PVField array for the nodes of the structure.PVScalarArraygetScalarArrayField(String fieldName, ScalarType elementType)Find an array subfield with the specified fieldName and elementType.PVShortgetShortField(String fieldName)Find a short subfield with the specified fieldName.PVStringgetStringField(String fieldName)Find a string subfield with the specified fieldName.StructuregetStructure()Get the Structure introspection interface.PVStructureArraygetStructureArrayField(String fieldName)Find a structureArray subfield with the specified fieldName.PVStructuregetStructureField(String fieldName)Find a structure subfield with the specified fieldNamePVFieldgetSubField(int fieldOffset)Get the PVField with the specified offset.<T extends PVField>
TgetSubField(Class<T> c, int fieldOffset)Get the PVField with the specified offset.<T extends PVField>
TgetSubField(Class<T> c, String fieldName)Get the PVField subfield with name fieldName.PVFieldgetSubField(String fieldName)Get the PVField subfield with name fieldName.PVUnionArraygetUnionArrayField(String fieldName)Find a unionArray subfield with the specified fieldName.PVUniongetUnionField(String fieldName)Find a union subfield with the specified fieldName.-
Methods inherited from interface org.epics.pvdata.pv.BitSetSerializable
deserialize, serialize
-
Methods inherited from interface org.epics.pvdata.pv.PVField
getField, getFieldName, getFieldOffset, getFullName, getNextFieldOffset, getNumberFields, getParent, isImmutable, postPut, setImmutable, setPostHandler, toString, toString, toString
-
Methods inherited from interface org.epics.pvdata.pv.Serializable
deserialize, serialize
-
-
-
-
Method Detail
-
getStructure
Structure getStructure()
Get the Structure introspection interface.- Returns:
- the introspection interface
-
getPVFields
PVField[] getPVFields()
Get the PVField array for the nodes of the structure.- Returns:
- array of PVField, one for each field
-
getSubField
PVField getSubField(String fieldName)
Get the PVField subfield with name fieldName.fieldName is the name of the field relative to this PVStructure. So it consists of one or more strings separated by periods (.s). The last of these strings is the name of the field. The other strings are the names of the structure subfields containing the requested field starting with the highest-level subfield and descending to the leaf field, e.g. current.alarm.status.
- Parameters:
fieldName- the fieldName- Returns:
- the PVField or null if the subfield does not exist
-
getSubField
PVField getSubField(int fieldOffset)
Get the PVField with the specified offset.- Parameters:
fieldOffset- the offset- Returns:
- the PVField or null if the offset is not part of this structure
-
getSubField
<T extends PVField> T getSubField(Class<T> c, String fieldName)
Get the PVField subfield with name fieldName.fieldName is the name of the field relative to this PVStructure. So it consists of one or more strings separated by periods (.s). The last of these strings is the name of the field. The other strings are the names of the structure subfields containing the requested field starting with the highest-level subfield and descending to the leaf field, e.g. current.alarm.status.
- Type Parameters:
T- the expected type of the PVField of the requested field- Parameters:
c- class object modeling the class T of expected type of the requested fieldfieldName- the fieldName.- Returns:
- the PVField or null if the subfield does not exist, or the field is not of type
T
-
getSubField
<T extends PVField> T getSubField(Class<T> c, int fieldOffset)
Get the PVField with the specified offset.- Type Parameters:
T- the expected type of the PVField of the requested field- Parameters:
c- class object modeling the class T of expected type of the requested fieldfieldOffset- the offset- Returns:
- the PVField or null if the offset is not part of this structure, or the field is not of type
T
-
getBooleanField
PVBoolean getBooleanField(String fieldName)
Find a boolean subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getByteField
PVByte getByteField(String fieldName)
Find a byte subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null if not found
-
getShortField
PVShort getShortField(String fieldName)
Find a short subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find.- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getIntField
PVInt getIntField(String fieldName)
Find an int subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null if not found
-
getLongField
PVLong getLongField(String fieldName)
Find a long subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find.- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getFloatField
PVFloat getFloatField(String fieldName)
Find a float subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getDoubleField
PVDouble getDoubleField(String fieldName)
Find a double subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getStringField
PVString getStringField(String fieldName)
Find a string subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getStructureField
PVStructure getStructureField(String fieldName)
Find a structure subfield with the specified fieldNamefieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- The field name to find.- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getScalarArrayField
PVScalarArray getScalarArrayField(String fieldName, ScalarType elementType)
Find an array subfield with the specified fieldName and elementType.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to findelementType- the ScalarType of an element of the ScalarArray field- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getStructureArrayField
PVStructureArray getStructureArrayField(String fieldName)
Find a structureArray subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the name of the field to find- Returns:
- the interface if the field of the correct type is found or null if not found
-
getUnionField
PVUnion getUnionField(String fieldName)
Find a union subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- the field name to find- Returns:
- the interface if the field of the correct type is found or null otherwise
-
getUnionArrayField
PVUnionArray getUnionArrayField(String fieldName)
Find a unionArray subfield with the specified fieldName.fieldName is the full name of the field relative to this PVStructure.
- Parameters:
fieldName- The field name to find- Returns:
- the interface if the field of the correct type is found or null otherwise
-
checkValid
boolean checkValid()
Check if PVStructure and sub fields are valid.- Returns:
- (true,false) if (OK, problems found)
-
-