qlsdk2 0.1.2__tar.gz → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qlsdk2
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: SDK for quanlan device
5
5
  Home-page: https://github.com/hehuajun/qlsdk
6
6
  Author: hehuajun
@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
6
6
 
7
7
  setuptools.setup(
8
8
  name="qlsdk2",
9
- version="0.1.2",
9
+ version="0.1.4",
10
10
  author="hehuajun",
11
11
  author_email="hehuajun@eegion.com",
12
12
  description="SDK for quanlan device",
@@ -24,7 +24,8 @@ setuptools.setup(
24
24
  install_requires=open("requirements.txt").read().splitlines(),
25
25
  include_package_data=True,
26
26
  package_data={
27
- "src/qlsdk/ar4m/libs": ["lib/*.dll"],
27
+ "src/qlsdk/ar4m/": ["libs/*.dll"],
28
+ "qlsdk/ar4m": ["libs/*.dll"],
28
29
  "":["*.txt", "*.md"]
29
30
  },
30
31
  # entry_points={
@@ -1,4 +1,9 @@
1
- from ar4sdk import AR4SDK, AR4
1
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
2
+
3
+ from .ar4m import AR4M
4
+ from .ar4sdk import AR4SDK, AR4, Packet, AR4Packet
5
+
6
+
2
7
  from time import sleep, time
3
8
  from threading import Lock, Timer
4
9
  from loguru import logger
@@ -8,10 +8,13 @@ from ctypes import (
8
8
  )
9
9
  from loguru import logger
10
10
  from time import sleep, time
11
+ import os
11
12
 
13
+ real_path = os.path.realpath(__file__)
14
+ dll_path = f'{real_path}/libs/libAr4SDK.dll'
12
15
  # 加载 DLL
13
16
  if platform.system() == 'Windows':
14
- _dll = ctypes.CDLL('./libs/libAr4SDK.dll')
17
+ _dll = ctypes.CDLL(dll_path)
15
18
  else:
16
19
  raise NotImplementedError(f"不支持非Windows平台:{platform.system()}")
17
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qlsdk2
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: SDK for quanlan device
5
5
  Home-page: https://github.com/hehuajun/qlsdk
6
6
  Author: hehuajun
@@ -8,7 +8,7 @@ src/qlsdk2.egg-info/dependency_links.txt
8
8
  src/qlsdk2.egg-info/requires.txt
9
9
  src/qlsdk2.egg-info/top_level.txt
10
10
  src/qlsdk/ar4m/__init__.py
11
- src/qlsdk/ar4m/ar4m.py
12
11
  src/qlsdk/ar4m/ar4sdk.py
13
- src/qlsdk/ar4m/example.py
12
+ src/qlsdk/ar4m/libs/libAr4SDK.dll
13
+ src/qlsdk/ar4m/libs/libwinpthread-1.dll
14
14
  test/test_ar4m.py
@@ -1,4 +0,0 @@
1
- __path__ = __import__("pkgutil").extend_path(__path__, __name__)
2
-
3
- from .ar4m import AR4M
4
- from .ar4sdk import AR4SDK, AR4, Packet, AR4Packet
@@ -1,51 +0,0 @@
1
- from time import sleep
2
- from loguru import logger
3
- import os
4
- from threading import Thread
5
-
6
- from ar4m import AR4M
7
-
8
- #------------------------------------------------------------------
9
- # 日志文件配置
10
- #------------------------------------------------------------------
11
- LOG_DIR = os.path.expanduser("./logs")
12
- LOG_FILE = os.path.join(LOG_DIR, "app_{time}.log")
13
- if not os.path.exists(LOG_DIR):
14
- os.mkdir(LOG_DIR)
15
-
16
- logger.add(LOG_FILE, rotation = "50MB")
17
-
18
- def consumer(q):
19
- t = Thread(target=deal_data, args=(q,))
20
- t.daemon = True
21
- t.start()
22
-
23
- def deal_data(q):
24
- while True:
25
- data = q.get()
26
- if data is None:
27
- break
28
- logger.info(data)
29
-
30
- # 主函数
31
- if __name__ == "__main__":
32
- try:
33
- ar4m = AR4M()
34
- ar4m.search()
35
- sleep(6)
36
- for dev in list( ar4m.devices.values()):
37
- ret = dev.start_acquisition()
38
- topic, queue = dev.subscribe()
39
- logger.info(f"启动{dev.box_mac}的数据采集{'成功' if ret else '失败'}")
40
-
41
- sleep(60)
42
-
43
- for dev in list( ar4m.devices.values()):
44
- ret = dev.stop_acquisition()
45
- dev.get_acq_start_time()
46
- logger.info(f"关闭{dev.box_mac}的数据采集{'成功' if ret else '失败'}")
47
- sleep(1)
48
- except Exception as e:
49
- logger.error(f"程序运行异常: {str(e)}")
50
- finally:
51
- logger.info("程序结束。")
File without changes
File without changes
File without changes
File without changes