ul-data-logger-api-sdk 3.3.3__tar.gz → 3.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/PKG-INFO +1 -1
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/data_logger_api_sdk.py +24 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/pyproject.toml +1 -1
- ul_data_logger_api_sdk-3.3.4/types/api_bs_device_links.py +25 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/.gitignore +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/__init__.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/data_logger_sdk_config.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/py.typed +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/__init__.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_base_stations.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_bs_traffic_stats.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_device_data_history.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_last_bs_data_by_device_macs.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_packet_types.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_protocol_types.py +0 -0
- {ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_uplink_signal.py +0 -0
|
@@ -25,6 +25,7 @@ from data_logger_api_sdk.types.api_base_stations import (
|
|
|
25
25
|
ApiBaseStationSystemLogResponse,
|
|
26
26
|
ApiBaseStationSystemLogsListResult,
|
|
27
27
|
)
|
|
28
|
+
from data_logger_api_sdk.types.api_bs_device_links import ApiBsDeviceLinkResponse, ApiBsDeviceLinksListResult
|
|
28
29
|
from data_logger_api_sdk.types.api_bs_traffic_stats import ApiBsTrafficStatsResponse, ApiDeviceTrafficStatsQuery
|
|
29
30
|
from data_logger_api_sdk.types.api_uplink_signal import (
|
|
30
31
|
ApiDeviceUplinkSignalLatestResponse,
|
|
@@ -218,6 +219,29 @@ class DataLoggerApiSdk:
|
|
|
218
219
|
)
|
|
219
220
|
return ApiDeviceUplinkSignalsListResult(items=items, total_count=total_count)
|
|
220
221
|
|
|
222
|
+
def get_bs_device_links(
|
|
223
|
+
self,
|
|
224
|
+
start_at: datetime,
|
|
225
|
+
end_at: datetime | None = None,
|
|
226
|
+
limit: int = 500,
|
|
227
|
+
offset: int = 0,
|
|
228
|
+
) -> ApiBsDeviceLinksListResult:
|
|
229
|
+
"""GET /bs-device-links — связи «мак ↔ БС» за период («когда-либо» при start_at из далёкого прошлого).
|
|
230
|
+
|
|
231
|
+
Один запрос по журналу device_log (дистинкт по паре мак+БС) вместо
|
|
232
|
+
обхода всех БС; для ночного синка слоя «Объекты и устройства».
|
|
233
|
+
"""
|
|
234
|
+
query: Dict[str, Any] = {"start_at": start_at.isoformat(), "limit": limit, "offset": offset}
|
|
235
|
+
if end_at is not None:
|
|
236
|
+
query["end_at"] = end_at.isoformat()
|
|
237
|
+
items, total_count = self._request_list_payload_once(
|
|
238
|
+
ApiMethod.GET,
|
|
239
|
+
"/bs-device-links",
|
|
240
|
+
List[ApiBsDeviceLinkResponse], # type: ignore
|
|
241
|
+
query,
|
|
242
|
+
)
|
|
243
|
+
return ApiBsDeviceLinksListResult(items=items, total_count=total_count)
|
|
244
|
+
|
|
221
245
|
def get_base_station(
|
|
222
246
|
self,
|
|
223
247
|
base_station_id: UUID,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from typing import List, NamedTuple
|
|
2
|
+
|
|
3
|
+
from pydantic import UUID4
|
|
4
|
+
from ul_api_utils.api_resource.api_response import JsonApiResponsePayload
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ApiBsDeviceLinkResponse(JsonApiResponsePayload):
|
|
8
|
+
"""Связь «мак ↔ БС» за период: элемент ответа GET /bs-device-links.
|
|
9
|
+
|
|
10
|
+
Пара существует, если БС когда-либо получала пакет устройства в
|
|
11
|
+
запрошенном окне (дистинкт по журналу device_log). bs_id — идентификатор
|
|
12
|
+
БС Data Logger (у потребителя unified API это external_bs_id);
|
|
13
|
+
bs_identifier — её серийный номер.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
device_network_mac: int
|
|
17
|
+
bs_id: UUID4
|
|
18
|
+
bs_identifier: str
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ApiBsDeviceLinksListResult(NamedTuple):
|
|
22
|
+
"""Результат спискового вызова: страница элементов и total_count."""
|
|
23
|
+
|
|
24
|
+
items: List[ApiBsDeviceLinkResponse]
|
|
25
|
+
total_count: int
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ul_data_logger_api_sdk-3.3.3 → ul_data_logger_api_sdk-3.3.4}/types/api_device_data_history.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|