def is_beamline_mode(pv_name):
        """
        Args:
            pv_name: name of the pv

        Returns: True if this the beamline mode pv
        """
        pv_name_no_val = remove_from_end(pv_name, VAL_FIELD)
        return pv_name_no_val == BEAMLINE_MODE or pv_name_no_val == BEAMLINE_MODE + SP_SUFFIX
    def is_param(self, pv_name):
        """

        Args:
            pv_name: name of the pv

        Returns:
            True if the pv is a pv for beamline parameter
        """
        return remove_from_end(pv_name, VAL_FIELD) in self._params_pv_lookup
    def _get_base_param_pv(self, pv_name):
        """
        Args:
            pv_name: name of pv for which to get the base pv

        Returns:
            (str): base parameter pv stripped of any fields / suffixes
        """
        for field in ALL_PARAM_SUFFIXES:
            pv_name = remove_from_end(pv_name, field)
        return pv_name
def is_pv_name_this_field(field_name, pv_name):
    """
    Args:
        field_name: field name to match
        pv_name: pv name to match

    Returns: True if field name is pv name (with oe without VAL field)

    """
    pv_name_no_val = remove_from_end(pv_name, VAL_FIELD)
    return pv_name_no_val == field_name
    def strip_fields_from_pv(self, pv_name):
        """
        Remove suffixes for fields from the end of a given PV.

        Args:
            pv_name: name of the pv

        Returns: The PV name with any of the known field suffixes stripped off the end.
        """
        for field in [VAL_FIELD, STAT_FIELD, SEVR_FIELD, DISP_FIELD]:
            pv_name = remove_from_end(pv_name, field)
        return pv_name