差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
openinstru_protocol [2021/02/22 21:55]
gongyusu
openinstru_protocol [2021/02/22 22:02] (当前版本)
gongyusu
行 25: 行 25:
 \r\n \r\n
 </​code>​ </​code>​
 +
 +## 多命令
 +
 +----
 +可以使用多命令在单个事务中发送多个命令。
 +
 +### 举例:
 +<WRAP group>
 +<WRAP half column>
 +**Command**
 +<​code>​
 +{
 +   "​dc":​{
 +      "​1":​[
 +         {
 +            "​command":"​setVoltage",​
 +            "​voltage":​3300
 +         },
 +         {
 +            "​command":"​getVoltage"​
 +         }
 +      ],
 +      "​2":​[
 +         {
 +            "​command":"​setVoltage",​
 +            "​voltage":​5000
 +         }
 +      ]
 +   }
 +}
 +</​code>​
 +</​WRAP>​
 +<WRAP half column>​**Response**</​WRAP>​
 +<​code>​
 +{
 +   "​dc":​{
 +      "​1":​[
 +         {
 +            "​command":"​setVoltage",​
 +            "​statusCode":​0,​
 +            "​wait":​500
 +         },
 +         {
 +            "​command":"​getVoltage",​
 +            "​statusCode":​0,​
 +            "​wait":​100, ​           ​
 +            "​voltage":​3300
 +         }
 +      ],
 +      "​2":​[
 +         {
 +            "​command":"​setVoltage",​
 +            "​statusCode":​0,​
 +            "​wait":​500
 +         }
 +      ]
 +   }
 +}
 +</​code>​
 +</​WRAP>​
 +\\
 +\\
 +
 +