epicsarchiver.statistics.pv_names

PV Names module, methods for dealing with PV Names.

Attributes

LOG

PV_NAME_REGEX

PV_NAME_PARTS

INVALID_SUFFIXES

Functions

_get_pv_parts(→ list[str])

_count_pvs_with_parts(→ list[tuple[str, int]])

_map_pv_name_parts_to_pvs(→ dict[str, set[str]])

_get_pv_parts_stats(→ dict[str, list[tuple[str, int]]])

Generate count of pvs with statistics per pv name part.

log_pv_parts_stats(→ None)

Log the number of pvs affected by statistics per part of the pv name.

_check_suffix_match(→ str | None)

_check_internal(→ bool)

_check_names(...)

get_invalid_names(...)

Checks a list of pvs has an invalid suffix or is internal (contains #).

Module Contents

epicsarchiver.statistics.pv_names.LOG: logging.Logger[source]
epicsarchiver.statistics.pv_names.PV_NAME_REGEX = '(?P<system>[a-zA-Z0-9\\-]+):(?P<device>[a-zA-Z\\-]+)\\-[0-9a-zA-Z]+:*'[source]
epicsarchiver.statistics.pv_names.PV_NAME_PARTS = ['system', 'device'][source]
epicsarchiver.statistics.pv_names._get_pv_parts(pv: str) list[str][source]
epicsarchiver.statistics.pv_names._count_pvs_with_parts(pvs: set[str], named_parts: set[str]) list[tuple[str, int]][source]
epicsarchiver.statistics.pv_names._map_pv_name_parts_to_pvs(pvs: set[str]) dict[str, set[str]][source]
epicsarchiver.statistics.pv_names._get_pv_parts_stats(pvs: set[str]) dict[str, list[tuple[str, int]]][source]

Generate count of pvs with statistics per pv name part.

Parameters:

pvs (set[str]) – Set of pvs

Returns:

count of each pv with specific part

epicsarchiver.statistics.pv_names.log_pv_parts_stats(pvs: set[str]) None[source]

Log the number of pvs affected by statistics per part of the pv name.

Parameters:

pvs (set[str]) – List of PVs with found statistics

epicsarchiver.statistics.pv_names.INVALID_SUFFIXES = ['ACCESS', 'Access', 'BaseVersion', 'EPICS_VERS', 'EPICS_VERSION', 'GTIM_CUR_SRC',...[source]
epicsarchiver.statistics.pv_names._check_suffix_match(pv: str) str | None[source]
epicsarchiver.statistics.pv_names._check_internal(pv: str) bool[source]
epicsarchiver.statistics.pv_names._check_names(pvs: set[str]) list[epicsarchiver.statistics.models.stat_responses.NameCheckResponse][source]
async epicsarchiver.statistics.pv_names.get_invalid_names(archiver: epicsarchiver.statistics.services.archiver_statistics.ArchiverWrapper) list[epicsarchiver.statistics.models.stat_responses.NameCheckResponse][source]

Checks a list of pvs has an invalid suffix or is internal (contains #).

Parameters:

archiver (ArchiverWrapper) – Archiver to check

Returns:

Response to check

Return type:

list[NameCheckResponse]