基于trro现场设备C SDK,提供Python API使用示例。
|-- sdk_lib sdk目录
|-- device.pem 证书
|-- run_py.sh 运行脚本,会自动设置依赖库路径并启动python程序
|-- trro_sample.py python示例
|-- config_gen.py 配置生成脚本 \
- 修改config_gen.py中的配置;
- 运行python config_gen.py 自动生成并替换config.json
- 按配置生成建议,修改config.json配置文件
- 确认./run_py.sh中正确引用对应平台(nvidia/soft)的动态库路径
- 执行./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说明部分
Based on trro Field Device C SDK,provide Python API samples.
|-- 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 \
- revise config.json directly with or without the tools https://console.tencentcloud.com/trro/config
- using python script to generate
- revise the config_gen.py
- run python config_gen.py to generate config.json
Note:
- for the international site, "cloud_mode" should be configured as "public_intl"
- revise config.json, refer to Configuration
- 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
- 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
https://www.tencentcloud.com/document/product/1252/67790