运行Akela矢量测量单元的控制接口和API。
avmu的Python项目详细描述
#AVMU接口
与Akela公司矢量测量单元的Python3接口。
[在此填写API文档](https://akelainc.github.io/avmu/index.html)
快速启动:
import avmu
AVMU_IP_ADDRESS = “192.168.1.219” HOP_RATE = “HOP_15K” START_F = 250 STOP_F = 2100 NUM_POINTS = 1024 SWEEP_COUNT = 100
device = avmu.AvmuInterface() device.setIPAddress(AVMU_IP_ADDRESS) device.setIPPort(1027) device.setTimeout(500) device.setMeasurementType(“PROG_ASYNC”)
device.initialize()
device.setHopRate(HOP_RATE) device.addPathToMeasure(‘AVMU_TX_PATH_0’, ‘AVMU_RX_PATH_1’)
device.utilGenerateLinearSweep(startF_mhz=START_F, stopF_mhz=STOP_F, points=NUM_POINTS)
# Get the freqency plan that utilGenerateLinearSweep calculated given the # hardware constraints. frequencies = device.getFrequencies()
# Arm the device device.start()
sweeps = []
# Tell the AVMU to start asynchronous acquisitions. device.beginAsync()
# Consume asynchronously generated frequency sweeps for _ in range(count):
device.measure() sweep_data = device.extractAllPaths() sweeps.append(sweep_data) print(“Acquired sweep (%s)” % (len(sweeps), ))#停止异步采集 device.haltasync()
#最后,解除采集。 device.stop()
更全面的例子包含在demo simple.py和demo threaded.py中。
- demo-simple.py shows how to properly convert acquired frequency domain data into time-domain data, for extracting meaningful range profiles. It also includes a waterfall plot for viewing motion the returned data, if desired.
- demo-threaded.py implements a much more robust, error tolerant client for the AVMU, with proper handling for the various way the network connection can hiccup.
###用法:
如果克隆此存储库,则可以直接运行示例,因为存在avmu包 也在仓库里。但是,对于外部项目,这取决于您手动放置 任何想要使用它的项目根目录中的avmu目录。
另外,avmu在pypi中也可用,因此pip install avmu将使avmu 全球提供接口包。在这一点上,任何一个示例文件都可以运行 从任何地方。
##更改:
- 0.0.12
- 删除setup.py windows check(谢谢https://github.com/AkelaInc/avmu/pull/1!)
- 0.0.11
- 添加额外的安装分类程序,表明MacOS/Linux支持(哇哦!)
- 0.0.10
- 这个变更集主要增加了对macos的(初步)支持。 avmu库没有内部更改,它只包括添加支持 用于定位/加载macos dylibs,以及相关的(内部)构建过程支持 在MacOS上编译。 此外,windows构建环境也更新为vc141(vs2017)。这个 不应影响此库的用户,因为c abi在不同版本之间是稳定的。
- 0.0.9
- combo utils工具已经更新,在每个combo元组中包含传输avmu。 这将需要更新任何使用avmu.combo实用程序的软件,但是 文件到目前为止还没有记录,这不算是一个突破性的变化。这种变化是有动机的 完全由图书馆内部使用。
- 0.0.8
- 添加了Linux x86_64共享对象。这个.so是在ubuntu 16.04上构建的,所以它很可能在 大多数Debian变体。
- 0.0.7
- 小的dll查找改进。添加了Linux ARMV7L共享对象(例如Raspberry PI版本)。
- 0.0.6
- 在dll中重新启用rtti,这样它就不会爆炸。哎呀,对不起。
- 0.0.5
- utilpingunit()现在接受一个可选参数来指定重试尝试的次数 为了平。
- 默认超时库范围设置为100毫秒。以前是1000毫秒 (和错误记录为150)。1000毫秒在硬件环境中没有多大意义, 它(通常)根本不能执行阻塞操作。因此,不能花更长的时间 如果它收到了一条消息,那么就需要一两毫秒来响应。
- 0.0.4:
- 改进了对包含硬件功能标志的调用的返回, 这使得确定远程avmu可以做什么比尝试 打开各种功能并查看是否有错误。
- 修复了在setup.py中报告的版本中的错误,包括Python3.4。
- 0.0.3:
- 初始版本