69 lines
1.9 KiB
XML
69 lines
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
<command>
|
||
<hex>Y8</hex>
|
||
</command>
|
||
<data extend = "data">
|
||
<nRandomSize len="3" cn="需要输出的随机串的长度">
|
||
最大长度为999 字节
|
||
</nRandomSize>
|
||
|
||
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
|
||
可选项。如果显示消息尾域,则该域必须显示。值为
|
||
“X’19”。
|
||
<hex>19</hex>
|
||
</tailSep>
|
||
|
||
<tail maxLen="32" required="false" cn="尾部">
|
||
可选项。最大长度为 32个字符。
|
||
</tail>
|
||
</data>
|
||
</req>
|
||
<res>
|
||
|
||
<command>
|
||
<hex>Y9</hex>
|
||
</command>
|
||
<data>
|
||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||
<options>
|
||
<option cn="无错误">
|
||
<hex>00</hex>
|
||
</option>
|
||
<option cn="无效的哈希标识">
|
||
<hex>05</hex>
|
||
</option>
|
||
<option cn="输入数据有误">
|
||
<hex>15</hex>
|
||
</option>
|
||
<option cn="DSP:错误,报告给管理员">
|
||
<hex>47</hex>
|
||
</option>
|
||
<option cn="数据长度错误">
|
||
<hex>80</hex>
|
||
</option>
|
||
</options>
|
||
</error>
|
||
|
||
<random format="X" :len="getRandomSize()" cn="产生的随机数"></random>
|
||
|
||
<tailSep len="1" required="false" cn="尾分隔">
|
||
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
|
||
<hex>19</hex>
|
||
</tailSep>
|
||
|
||
<tail maxLen="32" required="false" cn="尾部">
|
||
可选项。最大长度为 32个字符。
|
||
</tail>
|
||
</data>
|
||
|
||
</res>
|
||
<script>function getRandomSize(){
|
||
var data = $packet.data;
|
||
return data.nRandomSize * 2;
|
||
|
||
}
|
||
</script>
|
||
</packet>
|