-
Notifications
You must be signed in to change notification settings - Fork 15
/
__init__.py
107 lines (98 loc) · 3.09 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
"""Public API for accessing the measurement plug-in management service."""
from __future__ import annotations
import warnings
from typing import Any
from deprecation import DeprecatedWarning
from ni_measurement_plugin_sdk_service.session_management._client import (
SessionManagementClient,
)
from ni_measurement_plugin_sdk_service.session_management._constants import (
GRPC_SERVICE_CLASS,
GRPC_SERVICE_INTERFACE_NAME,
INSTRUMENT_TYPE_NI_DAQMX,
INSTRUMENT_TYPE_NI_DCPOWER,
INSTRUMENT_TYPE_NI_DIGITAL_PATTERN,
INSTRUMENT_TYPE_NI_DMM,
INSTRUMENT_TYPE_NI_FGEN,
INSTRUMENT_TYPE_NI_HSDIO,
INSTRUMENT_TYPE_NI_MODEL_BASED_INSTRUMENT,
INSTRUMENT_TYPE_NI_RELAY_DRIVER,
INSTRUMENT_TYPE_NI_RFMX,
INSTRUMENT_TYPE_NI_RFPM,
INSTRUMENT_TYPE_NI_RFSA,
INSTRUMENT_TYPE_NI_RFSG,
INSTRUMENT_TYPE_NI_SCOPE,
INSTRUMENT_TYPE_NI_SWITCH_EXECUTIVE_VIRTUAL_DEVICE,
INSTRUMENT_TYPE_NONE,
SITE_SYSTEM_PINS,
)
from ni_measurement_plugin_sdk_service.session_management._reservation import (
BaseReservation,
MultiplexerSessionContainer,
MultiSessionReservation,
SingleSessionReservation,
)
from ni_measurement_plugin_sdk_service.session_management._types import (
ChannelMapping,
Connection,
PinMapContext,
MultiplexerSessionInformation,
SessionInformation,
SessionInitializationBehavior,
TypedConnection,
TypedConnectionWithMultiplexer,
TypedMultiplexerSessionInformation,
TypedSessionInformation,
)
__all__ = [
"BaseReservation",
"ChannelMapping",
"Client",
"Connection",
"GRPC_SERVICE_CLASS",
"GRPC_SERVICE_INTERFACE_NAME",
"INSTRUMENT_TYPE_NI_DAQMX",
"INSTRUMENT_TYPE_NI_DCPOWER",
"INSTRUMENT_TYPE_NI_DIGITAL_PATTERN",
"INSTRUMENT_TYPE_NI_DMM",
"INSTRUMENT_TYPE_NI_FGEN",
"INSTRUMENT_TYPE_NI_HSDIO",
"INSTRUMENT_TYPE_NI_MODEL_BASED_INSTRUMENT",
"INSTRUMENT_TYPE_NI_RELAY_DRIVER",
"INSTRUMENT_TYPE_NI_RFMX",
"INSTRUMENT_TYPE_NI_RFPM",
"INSTRUMENT_TYPE_NI_RFSA",
"INSTRUMENT_TYPE_NI_RFSG",
"INSTRUMENT_TYPE_NI_SCOPE",
"INSTRUMENT_TYPE_NI_SWITCH_EXECUTIVE_VIRTUAL_DEVICE",
"INSTRUMENT_TYPE_NONE",
"MultiSessionReservation",
"PinMapContext",
"MultiplexerSessionContainer",
"MultiplexerSessionInformation",
"SessionInformation",
"SessionInitializationBehavior",
"SessionManagementClient",
"SingleSessionReservation",
"SITE_SYSTEM_PINS",
"TypedConnection",
"TypedConnectionWithMultiplexer",
"TypedMultiplexerSessionInformation",
"TypedSessionInformation",
]
def __getattr__(name: str) -> Any:
if name == "Reservation":
warnings.warn(
DeprecatedWarning(
name,
deprecated_in="1.1.0",
removed_in=None,
details="Use MultiSessionReservation instead.",
),
stacklevel=2,
)
return MultiSessionReservation
else:
raise AttributeError(f"module {__name__} has no attribute {name}")
Client = SessionManagementClient
"""Alias for compatibility with code that uses session_management.Client."""