logo
1
0
WeChat Login

Language


中文


基于trro现场设备C SDK,提供Python API使用示例。

文件说明

|-- sdk_lib sdk目录
|-- device.pem 证书
|-- run_py.sh 运行脚本,会自动设置依赖库路径并启动python程序
|-- trro_sample.py python示例
|-- config_gen.py 配置生成脚本 \


配置生成

web工具生成(推荐)

python脚本生成(建议优先web工具)

  1. 修改config_gen.py中的配置;
  2. 运行python config_gen.py 自动生成并替换config.json

运行说明

  1. 按配置生成建议,修改config.json配置文件
  2. 确认./run_py.sh中正确引用对应平台(nvidia/soft)的动态库路径
  3. 执行./run_py.sh, 如果提示权限不足,可先chmod +X ./run_py.sh

注意:

  • 多网卡绑定时需要用root权限执行,或者在执行前添加权限 sudo setcap cap_net_raw,cap_net_bind_service+ep ./trro-test

官网文档

https://cloud.tencent.com/document/product/1584 可参看现场SDK说明部分


English


Based on trro Field Device C SDK,provide Python API samples.

Description

|-- sdk_lib SDK directory
|-- device.pem cloud cerfiticate
|-- run_py.sh python demo run script
|-- trro_sample.py python demo source code
|-- config_gen.py configuration generation python script \


Configuration

  • revise config.json directly with or without the tools https://console.tencentcloud.com/trro/config
  • using python script to generate
    1. revise the config_gen.py
    2. run python config_gen.py to generate config.json Note:
  • for the international site, "cloud_mode" should be configured as "public_intl"

Run Demo

  1. revise config.json, refer to Configuration
  2. revise ./run_py.sh,using the correct LD_LIBRARY_PATH for libs
    • ./sdk_lib/nvidia for nvidia jetson platform
    • ./sdk_lib/soft for common aarch64 platform
  3. run ./run_py.sh,if not permitted,try chmod +X ./run_py.sh

Note:

  • if using multiple networks transmission, recommend to run the program under root permission or add the permission to trro_test sudo setcap cap_net_raw,cap_net_bind_service+ep ./trro-test

SDK Document

https://www.tencentcloud.com/document/product/1252/67790

About

python API调用现场设备SDK示例

28.26 MiB
1 forks0 stars1 branches0 TagREADMEOther license
Language
Python5.8%
Markdown4.9%
Shell0.7%
Others88.6%