aidlabsdk 2.0.1__py3-none-any.whl

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.
aidlab/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """
2
+ Aidlab Python SDK
3
+ """
4
+ from .aidlab_manager import AidlabManager
5
+ from .data_type import DataType
6
+ from .device import Device
7
+ from .device_delegate import DeviceDelegate
8
+ from .wear_state import WearState
9
+ from .body_position import BodyPosition
10
+ from .activity_type import ActivityType
11
+
12
+ __all__ = ["AidlabManager", "Device", "DeviceDelegate", "DataType", "WearState", "BodyPosition", "ActivityType"]
@@ -0,0 +1,25 @@
1
+ """
2
+ Created by Jakub Domaszewicz on 16.03.2024.
3
+ """
4
+
5
+ from enum import IntEnum
6
+
7
+ class ActivityType(IntEnum):
8
+ """
9
+ Enumerates the possible types of activities that can be recognized by the device.
10
+
11
+ Attributes:
12
+ UNKNOWN (0): The activity is unknown or not recognized.
13
+ AUTOMOTIVE (1): The user is in a vehicle, such as a car, bus, or train.
14
+ WALKING (2): The user is walking.
15
+ RUNNING (4): The user is running.
16
+ CYCLING (8): The user is cycling.
17
+ STILL (16): The user is still, i.e. not moving.
18
+
19
+ """
20
+ UNKNOWN = 0
21
+ AUTOMOTIVE = 1
22
+ WALKING = 2
23
+ RUNNING = 4
24
+ CYCLING = 8
25
+ STILL = 16
@@ -0,0 +1,45 @@
1
+ """
2
+ Part of the Aidlab Python SDK, providing the core functionality for scanning compatible devices.
3
+
4
+ To customise logging, configure the standard Python logging system in your
5
+ application, for example:
6
+
7
+ logging.getLogger("aidlab.aidlab_manager").setLevel(logging.INFO)
8
+
9
+ Created by Szymon Gesicki on 09.05.2020.
10
+ """
11
+
12
+ import logging
13
+ from bleak import BleakScanner
14
+ from .device import Device
15
+
16
+ logger = logging.getLogger(__name__)
17
+
18
+
19
+ class AidlabManager:
20
+ """
21
+ The central class of the Aidlab SDK for scanning compatible devices.
22
+ """
23
+
24
+ async def scan(self, timeout: int = 10) -> list[Device]:
25
+ """
26
+ Scans for compatible devices.
27
+
28
+ :param timeout: The time in seconds to scan for devices.
29
+ """
30
+
31
+ logger.info("Scanning for devices (timeout: %d seconds)...", timeout)
32
+
33
+ devices = await BleakScanner.discover(timeout)
34
+
35
+ # Container for compatible MAC addresses
36
+ compatible_devices: list[Device] = []
37
+
38
+ for device in devices:
39
+ # Name "Aidlab" is applicable for both Aidlab and Aidmed One
40
+ if (device.name == "Aidlab 2" or device.name == "Aidlab") and device.address:
41
+ compatible_devices.append(Device(device))
42
+
43
+ logger.info("Finished scanning. Found %d devices.", len(compatible_devices))
44
+
45
+ return compatible_devices
Binary file
Binary file
aidlab/aidlabsdk.dll ADDED
Binary file
aidlab/aidlabsdk.dylib ADDED
Binary file
@@ -0,0 +1,23 @@
1
+ """
2
+ Created by Jakub Domaszewicz on 17.12.2023.
3
+ """
4
+
5
+ from enum import IntEnum
6
+
7
+ class BodyPosition(IntEnum):
8
+ """
9
+ Enumerates the possible positions of a body when lying on a bed with a device.
10
+ Each value represents a specific orientation of the body relative to the bed.
11
+
12
+ Attributes:
13
+ UNKNOWN (0): The body's position is unknown or not recognized.
14
+ PRONE (1): The body is lying face down on its stomach.
15
+ SUPINE (2): The body is lying face up on its back.
16
+ LEFT_SIDE (3): The body is lying on its left side.
17
+ RIGHT_SIDE (4): The body is lying on its right side.
18
+ """
19
+ UNKNOWN = 0
20
+ PRONE = 1
21
+ SUPINE = 2
22
+ LEFT_SIDE = 3
23
+ RIGHT_SIDE = 4
aidlab/data_type.py ADDED
@@ -0,0 +1,29 @@
1
+ """
2
+ Created by Szymon Gesicki on 07.11.2021.
3
+ """
4
+
5
+ from enum import IntEnum
6
+
7
+ class DataType(IntEnum):
8
+ """
9
+ Data types that can be received from Aidlab and Aidmed One.
10
+ See the documentation to learn more about each data type.
11
+ """
12
+ ECG = 0
13
+ RESPIRATION = 1
14
+ SKIN_TEMPERATURE = 2
15
+ MOTION = 3
16
+ # BATTERY = 4 # Enabled by default since SDK 1.6.0
17
+ ACTIVITY = 5
18
+ ORIENTATION = 6
19
+ STEPS = 7
20
+ HEART_RATE = 8
21
+ # HEALTH_THERMOMETER = 9 # No longer in use. Use SKIN_TEMPERATURE instead.
22
+ SOUND_VOLUME = 10
23
+ RR = 11
24
+ PRESSURE = 12 # Supported since Firmware 3.0.0. No longer available as characteristic.
25
+ SOUND_FEATURES = 13
26
+ RESPIRATION_RATE = 14
27
+ BODY_POSITION = 15
28
+ EDA = 16
29
+ GPS = 17