epicsarchiver_mgmt.archiver.mgmt
Archiver Mgmt operations module.
Attributes
Classes
Represents the different storage levels of the archiver appliance. |
|
Represents the different types of put type info. |
|
Represents the different input protocols of the archiver appliance. |
|
Represents the different sampling methods of the archiver appliance. |
|
List of Dbr Types that the archiver uses. |
|
Information to archive a PV. |
|
Mgmt Operations EPICS Archiver Appliance client. |
Module Contents
- epicsarchiver_mgmt.archiver.mgmt.LOG: logging.Logger[source]
- class epicsarchiver_mgmt.archiver.mgmt.Storage[source]
Bases:
enum.StrEnumRepresents the different storage levels of the archiver appliance.
- class epicsarchiver_mgmt.archiver.mgmt.PutInfoType(*args, **kwds)[source]
Bases:
enum.EnumRepresents the different types of put type info.
- class epicsarchiver_mgmt.archiver.mgmt.EpicsProto[source]
Bases:
enum.StrEnumRepresents the different input protocols of the archiver appliance.
- class epicsarchiver_mgmt.archiver.mgmt.SamplingMethod[source]
Bases:
enum.StrEnumRepresents the different sampling methods of the archiver appliance.
- class epicsarchiver_mgmt.archiver.mgmt.ArchDbrType(*args, **kwds)[source]
Bases:
enum.EnumList of Dbr Types that the archiver uses.
- class epicsarchiver_mgmt.archiver.mgmt.ArchivePVRequest[source]
Information to archive a PV.
- samplingmethod: SamplingMethod | None = None[source]
- class epicsarchiver_mgmt.archiver.mgmt.ArchiverMgmt(hostname: str = 'localhost', port: int = 17665)[source]
Bases:
epicsarchiver_mgmt.archiver.info.ArchiverMgmtInfoMgmt Operations EPICS Archiver Appliance client.
Hold a session to the Archiver Appliance web application and use the mgmt interface.
- Parameters:
hostname – EPICS Archiver Appliance hostname [default: localhost]
port – EPICS Archiver Appliance management port [default: 17665]
- archive_pv(pv: str, *, sampling_period: float | None = None, sampling_method: SamplingMethod | None = None, controlling_pv: str | None = None, policy: str | None = None, appliance: str | None = None, protocol: EpicsProto = EpicsProto.CA) OperationResultList[source]
Archive a PV.
- Parameters:
pv (str) – PV name.
sampling_period (str | None, optional) – The sampling period, i.e. 1.0 is 1Hz. Defaults to None.
sampling_method (SamplingMethod | None, optional) – The sampling method, SCAN or MONITOR. Defaults to None.
controlling_pv (str | None, optional) – A pv to control when to archive this pv. Defaults to None.
policy (str | None, optional) – The policy, can be found at /mgmt/bpl/getPolicyList. Defaults to None.
appliance (str | None, optional) – Can specify a specific appliance. Defaults to None.
protocol (EpicsProto, optional) – Protocol to use. Defaults to EpicsProto.CA.
- Returns:
_description_
- Return type:
- archive_pv_requests(pv_requests: list[ArchivePVRequest]) OperationResultList[source]
Archive a list of PVs with the given parameters.
- Parameters:
pv_requests (list[ArchivePVRequest]) – The pv requests.
- Returns:
Result of the operation.
- Return type:
- pause_pv(pv: str) OperationResult[source]
Pause the archiving of a PV(s).
- Parameters:
pv – name of the pv. Can be a GLOB wildcards or a list of comma separated names.
- Returns:
list of submitted PVs
- resume_pv(pv: str) OperationResult[source]
Resume the archiving of a PV(s).
- Parameters:
pv – name of the pv. Can be a GLOB wildcards or a list of comma separated names.
- Returns:
list of submitted PVs
- abort_pv(pv: str) OperationResult[source]
Abort any pending requests for archiving this PV.
- Parameters:
pv – name of the pv.
- Returns:
Status of action and description. Example: {“status”:”ok”,”desc”:”Aborted request for archiving PV PV1”}
- Return type:
- add_alias(pv: str, alias_name: str) OperationResult[source]
Add an alias to a pv.
- Parameters:
pv – PV to add alias.
alias_name – name of alias to add to pv.
- Returns:
Status of action and description.
- Return type:
- remove_alias(pv: str, alias_name: str) OperationResult[source]
Remove an alias to a pv.
- Parameters:
pv – PV to remove alias.
alias_name – name of alias to remove from pv.
- Returns:
Status of action and description.
- Return type:
- delete_pv(pv: str, delete_data: bool = False) OperationResult[source]
Stop archiving the specified PV.
The PV needs to be paused first.
- Parameters:
pv – name of the pv.
delete_data – delete the data that has already been recorded. Default to False.
- Returns:
list of submitted PVs
- rename_pv(pv: str, newname: str) OperationResult[source]
Rename this pv to a new name.
The PV needs to be paused first.
- Parameters:
- Returns:
- Status of action and description. Example:
{“status”:”ok”,”desc”:”Successfully renamed PV PV1 to PV2”}
- Return type:
- update_pv(pv: str, samplingperiod: float | None = None, samplingmethod: str | None = None) OperationResult[source]
Change the archival parameters for a PV.
- Parameters:
pv – name of the pv.
samplingperiod – the new sampling period in seconds.
samplingmethod – the new sampling method [SCAN|MONITOR]
- Returns:
list of submitted PV
- rename_and_append(old: str, new: str, storage: Storage) OperationResult[source]
Appends the data for an older PV into a newer PV.
The older PV is deleted and an alias mapping the older PV name to the new PV is added.
- Parameters:
- Returns:
Result of the operation
- Return type:
- change_type(pv: str, new_type: ArchDbrType) OperationResult[source]
Change the type of a pv to a new type.
- Parameters:
pv (str) – Name of the PV
new_type (ArchDbrType) – New DBR_TYPE
- Returns:
OperationResult
- put_pv_type_info(pv: str, type_info: epicsarchiver_mgmt.archiver.info.TypeInfo, put_info_type: PutInfoType) epicsarchiver_mgmt.archiver.info.TypeInfo[source]
Put the type info for a PV.
- Parameters:
pv (str) – Name of the PV
type_info (InfoResult) – Type info
put_info_type (PutInfoType) – Whether override or create new
- Returns:
The updated type info
- Return type:
- get_policy_list() dict[str, str][source]
Get the list of policies.
- Returns:
dictionary of policies names and descriptions
- property never_connected_pvs: epicsarchiver_mgmt.archiver.info.InfoResultList[source]
Get the never connected PVs of the archiver.
- Returns:
List of never connected items.
- Return type: