【chip-tool】chip-tool工具常用指令介绍

chip-tool 工具可用于调试 matter 设备,是matter协议新兴起时所使用的重要工具,由于资料都是英文 的很不友好,因此本文根据官方教程和自己的理解整理如下,本文主要介绍 chip-tool 常用的一些命令。

关于 使用 chip-tool 工具测试matter设备步骤,请参考博文:
【使用 chip-tool 工具测试matter设备步骤】

1. chip-tool 常用命令

1.1. 工作模式

有 【交互模式】和 【单命令模式】两种,Interactive modesingle command mode,默认情况下 chip-tool 是单命令模式,若单命令模式下某条指令在一定时间周期内为完成, chip-tool 将会报错时间超时,比如报错信息:

[1650992689511] [32397:1415601] CHIP: [TOO] Run command failure: ../../../examples/chip-tool/commands/common/CHIPCommand.cpp:392: CHIP Error 0x00000032: Timeout

通过提供可选的–timeout参数,可以修改任何命令执行的超时,该参数以秒为单位,最大值为65535秒。

$ ./chip-tool otasoftwareupdaterequestor subscribe-event state-transition 5 10 0x1234567890 0 --timeout 65535

对于需要长时间运行的命令(如事件订阅),可以在运行命令之前先以交互模式启动芯片工具。在交互模式下,不会有超时,可以发出多个命令。

$ ./chip-tool interactive start
otasoftwareupdaterequestor subscribe-event state-transition 5 10 ${NODE_ID} 0

1.2 打印所有支持的 cluster

$ ./chip-tool

# 输出

[1647346057.900626][394605:394605] CHIP:TOO: Missing cluster name
Usage:
  ./chip-tool cluster_name command_name [param1 param2 ...]

  +-------------------------------------------------------------------------------------+
  | Clusters:                                                                           |
  +-------------------------------------------------------------------------------------+
  | * accesscontrol                                                                     |
  | * accountlogin                                                                      |
  | * administratorcommissioning                                                        |
  | * alarms                                                                            |
  | * any                                                                               |
  | * appliancecontrol                                                                  |
  | * applianceeventsandalert                                                           |
  | * applianceidentification                                                           |
  | * appliancestatistics                                                               |
  | * applicationbasic                                                                  |

1.3 获取指定的 cluster 列表的命令

$ ./chip-tool <cluster_name>

cluster_name 是在上述的列表中的 cluster 的名称,比如

$ ./chip-tool onoff

# 输出
[1647417645.182824][404411:404411] CHIP:TOO: Missing command name
Usage:
  ./chip-tool onoff command_name [param1 param2 ...]

  +-------------------------------------------------------------------------------------+
  | Commands:                                                                           |
  +-------------------------------------------------------------------------------------+
  | * command-by-id                                                                     |
  | * off                                                                               |
  | * on                                                                                |
  | * toggle                                                                            |
  | * off-with-effect                                                                   |
  | * on-with-recall-global-scene                                                       |
  | * on-with-timed-off                                                                 |
  | * read-by-id                                                                        |
  | * read                                                                              |
  | * write-by-id                                                                       |
  | * write                                                                             |
  | * subscribe-by-id                                                                   |
  | * subscribe                                                                         |
  | * read-event-by-id                                                                  |
  | * subscribe-event-by-id                                                             |
  +-------------------------------------------------------------------------------------+
[1647417645.183836][404411:404411] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/Commands.cpp:84: Error 0x0000002F

1.4 获取指定 cluster 的 attribute 列表

$ ./chip-tool <cluster_name> read

# 比如
$ ./chip-tool onoff read

#输出
[1647417857.913942][404444:404444] CHIP:TOO: Missing attribute name
Usage:
  ./chip-tool onoff read attribute-name [param1 param2 ...]

  +-------------------------------------------------------------------------------------+
  | Attributes:                                                                         |
  +-------------------------------------------------------------------------------------+
  | * on-off                                                                            |
  | * global-scene-control                                                              |
  | * on-time                                                                           |
  | * off-wait-time                                                                     |
  | * start-up-on-off                                                                   |
  | * server-generated-command-list                                                     |
  | * client-generated-command-list                                                     |
  | * attribute-list                                                                    |
  | * feature-map                                                                       |
  | * cluster-revision                                                                  |
  +-------------------------------------------------------------------------------------+
[1647417857.914110][404444:404444] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/Commands.cpp:120: Error 0x0000002F

1.5 获取命令选项列表

$ ./chip-tool <cluster_name> <target_command>

$ ./chip-tool onoff on

更多的命令请参考官方文档:【Working with the CHIP Tool】

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Chip-seq(Chromatin Immunoprecipitation Sequencing)是一种常用的表观遗传学研究方法,用于研究染色质上的蛋白质与DNA相互作用的情况。Chip-seq数据分析是指对Chip-seq实验所得到的大量序列数据进行处理和分析,以获得有关染色质状态和蛋白质相互作用的信息。 Chip-seq数据分析的主要步骤包括: 1. 数据质量控制:对原始数据进行质量控制,筛除低质量序列和序列中的适配器等。 2. 数据预处理:将序列比对到参考基因组上,去除重复的序列,调整序列长度,以便于后续分析。 3. 峰识别:利用统计方法识别出与某种蛋白质结合区域的“峰”,即ChIP信号显著高于背景水平的区域。 4. 峰注释:将峰与生物信息学数据库中的基因、转录因子结合位点等信息进行注释,以获得与研究对象相关的生物信息学特征。 5. 峰差异分析:比较不同实验条件下的Chip-seq数据,寻找峰的差异,以发现不同生物学过程中基因调控的差异。 6. 通路分析:将差异的峰与生物通路、转录因子网络等生物信息学数据库进行匹配,以发现与研究对象相关的生物通路和机制。 7. 结果可视化:将Chip-seq数据分析的结果可视化,如制作热图、曲线图等,以直观表达Chip-seq数据的生物学意义。 总之,Chip-seq数据分析是一个复杂的过程,需要熟练掌握多种分析方法和工具,以便于从大量的序列数据中提取有用的生物学信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

积跬步、至千里

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值