Package org.epics.pvdata.pv
Interface PVField
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
PVArray,PVBoolean,PVBooleanArray,PVByte,PVByteArray,PVDouble,PVDoubleArray,PVFloat,PVFloatArray,PVInt,PVIntArray,PVLong,PVLongArray,PVNumberArray,PVScalar,PVScalarArray,PVShort,PVShortArray,PVString,PVStringArray,PVStructure,PVStructureArray,PVUByte,PVUByteArray,PVUInt,PVUIntArray,PVULong,PVULongArray,PVUnion,PVUnionArray,PVUShort,PVUShortArray
- All Known Implementing Classes:
AbstractPVArray,AbstractPVComplexArray,AbstractPVField,AbstractPVScalar,AbstractPVScalarArray,BasePVBoolean,BasePVBooleanArray,BasePVByte,BasePVByteArray,BasePVDouble,BasePVDoubleArray,BasePVFloat,BasePVFloatArray,BasePVInt,BasePVIntArray,BasePVLong,BasePVLongArray,BasePVShort,BasePVShortArray,BasePVString,BasePVStringArray,BasePVStructure,BasePVStructureArray,BasePVUByte,BasePVUByteArray,BasePVUInt,BasePVUIntArray,BasePVULong,BasePVULongArray,BasePVUnion,BasePVUnionArray,BasePVUShort,BasePVUShortArray
public interface PVField extends Serializable
PVField is the base class for each PVData field. Each PVType has an interface that extends PVField.- Author:
- mrk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldgetField()Get the Field that describes the field.StringgetFieldName()Get the fieldName for this field.intgetFieldOffset()Get offset of the PVField field within top level structure.StringgetFullName()Fully expand the name of this field using the names of its parent fields with a period '.' separating each name.intgetNextFieldOffset()Get the next offset.intgetNumberFields()Get the total number of fields in this field.PVStructuregetParent()Get the parent of this field.booleanisImmutable()Is the field immutable - that is, does it not allow changes?voidpostPut()postPut - called when the field is updated by the implementation.voidsetImmutable()Set the field to be immutable - that is, it can no longer be modified.voidsetPostHandler(PostHandler postHandler)Set the handler for postPut.StringtoString()Implement standard toString().voidtoString(StringBuilder buf)Convert the PVField to a string.voidtoString(StringBuilder buf, int indentLevel)Convert the PVField to a string, indenting each line.-
Methods inherited from interface org.epics.pvdata.pv.Serializable
deserialize, serialize
-
-
-
-
Method Detail
-
getFieldName
String getFieldName()
Get the fieldName for this field.- Returns:
- the name or the empty string if top-level field.
-
getFullName
String getFullName()
Fully expand the name of this field using the names of its parent fields with a period '.' separating each name.- Returns:
- the full name or the empty string if top-level field
-
getFieldOffset
int getFieldOffset()
Get offset of the PVField field within top level structure. Every field within the PVStructure has a unique offset. The top level structure has an offset of 0. The first field within the structure has offset equal to 1. The other offsets are determined by recursively traversing each structure of the tree.- Returns:
- the offset
-
getNextFieldOffset
int getNextFieldOffset()
Get the next offset. If the field is a scalar or array field then this is just offset + 1. If the field is a structure it is the offset of the next field after this structure. Thus (nextOffset - offset) is always equal to the number of fields within the field.- Returns:
- the offset.
-
getNumberFields
int getNumberFields()
Get the total number of fields in this field. This is equal to nextFieldOffset - fieldOffset.- Returns:
- the number of fields
-
isImmutable
boolean isImmutable()
Is the field immutable - that is, does it not allow changes?- Returns:
- (false,true) if it (is not, is) immutable
-
setImmutable
void setImmutable()
Set the field to be immutable - that is, it can no longer be modified. This is permanent. Once done the field cannot be made mutable.
-
getField
Field getField()
Get the Field that describes the field.- Returns:
- the Field, which is the reflection interface
-
getParent
PVStructure getParent()
Get the parent of this field.- Returns:
- the parent interface or null if top-level
-
postPut
void postPut()
postPut - called when the field is updated by the implementation.
-
setPostHandler
void setPostHandler(PostHandler postHandler)
Set the handler for postPut. At most one handler can be set.- Parameters:
postHandler- the handler
-
toString
void toString(StringBuilder buf)
Convert the PVField to a string.- Parameters:
buf- the buffer for the result
-
toString
void toString(StringBuilder buf, int indentLevel)
Convert the PVField to a string, indenting each line.- Parameters:
buf- the buffer for the resultindentLevel- the indentation level
-
-