Interface PVStructure

    • 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 field
        fieldName - 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 field
        fieldOffset - 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 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
      • 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 find
        elementType - 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)