epicsarchiver.statistics.models.pv_details ========================================== .. py:module:: epicsarchiver.statistics.models.pv_details .. autoapi-nested-parse:: Handles the PVDetails report per PV from the Archiver. Classes ------- .. autoapisummary:: epicsarchiver.statistics.models.pv_details.DetailEnum epicsarchiver.statistics.models.pv_details.Details Functions --------- .. autoapisummary:: epicsarchiver.statistics.models.pv_details._dropped_pv_response Module Contents --------------- .. py:class:: DetailEnum Bases: :py:obj:`str`, :py:obj:`enum.Enum` Enum of detail types present in the archiver per PV. .. py:attribute:: PVName :value: 'PV Name' .. py:attribute:: DBRType :value: 'Archiver DBR type (from typeinfo):' .. py:attribute:: PVAccess :value: 'Are we using PVAccess?' .. py:attribute:: Method :value: 'Sampling method:' .. py:attribute:: Period :value: 'Sampling period:' .. py:attribute:: Capacity :value: 'Sample buffer capacity' .. py:attribute:: EventRate :value: 'Estimated event rate (events/sec)' .. py:attribute:: EventsLost :value: 'How many events lost totally so far?' .. py:attribute:: TotalEvents :value: 'How many events so far?' .. py:attribute:: Connnected :value: 'Is this PV currently connected?' .. py:attribute:: LastLostConnection :value: 'When did we last lose a connection to this PV?' .. py:attribute:: LostConnections :value: 'How many times have we lost and regained the connection to this PV?' .. py:attribute:: LostEventsTimestamp :value: 'How many events lost because the timestamp is in the far future or past so far?' .. py:attribute:: LostEventsBuffer :value: 'How many events lost because the sample buffer is full so far?' .. py:attribute:: LostEventsType :value: 'How many events lost because the DBR_Type of the PV has changed from what it used to be?' .. py:attribute:: MBStorageRate :value: 'Estimated storage rate (MB/day)' .. py:attribute:: LastEvent :value: 'When did we receive the last event?' .. py:attribute:: Hostname :value: 'Hostname of PV from CA' .. py:attribute:: Instance :value: 'Instance archiving PV' .. py:attribute:: CommandThread :value: 'The CAJ command thread id' .. py:method:: from_str(desc: str) -> DetailEnum | None :classmethod: Convert from a string to DetailEnum. :param desc: input string :type desc: str :returns: An enum representation. :rtype: DetailEnum | None .. py:function:: _dropped_pv_response(pv_name: str, value: str, reason: epicsarchiver.statistics.models.stat_responses.DroppedReason, stat: epicsarchiver.statistics.models.stats.Stat) -> tuple[epicsarchiver.statistics.models.stats.Stat, epicsarchiver.statistics.models.stat_responses.DroppedPVResponse] | None .. py:class:: Details Bases: :py:obj:`Dict`\ [\ :py:obj:`DetailEnum`\ , :py:obj:`str`\ ] Representation of the response from the pvDetails endpoint in archiver. .. py:method:: from_json(json: list[dict[str, str]]) -> Details :classmethod: Convert from the json representation at the Archiver Endpoint. Takes some of the details which are relevant for reports to create Details. :param json: input json :type json: list[dict[str, str]] :returns: dictionary of DetailEnum to string value. :rtype: Details .. py:method:: to_base_responses(mb_per_day_min: float = 0) -> dict[epicsarchiver.statistics.models.stats.Stat, epicsarchiver.statistics.models.stat_responses.BaseStatResponse] Convert to a BaseStatResponse dict to match Generic Archiver Statistics. :param mb_per_day_min: Minimum MB per day to filter by :type mb_per_day_min: float :returns: Stat to BaseStatResponse output :rtype: dict[Stat, BaseStatResponse] .. py:method:: detail_to_base_response(detail_enum: DetailEnum, value: str, mb_per_day_min: float = 0) -> tuple[epicsarchiver.statistics.models.stats.Stat, epicsarchiver.statistics.models.stat_responses.BaseStatResponse] | None Convert a single detail to a Stat and BaseStatResponse. :param detail_enum: Detail :type detail_enum: DetailEnum :param value: String value of the detail :type value: str :param mb_per_day_min: Minimum MB per day to filter by :type mb_per_day_min: float :returns: Output :rtype: tuple[Stat, BaseStatResponse] | None