Skip to content

Commit

Permalink
update changes to xresloader v2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Nov 13, 2019
1 parent 78336f2 commit 2d95a82
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"python.linting.flake8Path": "${workspaceFolder}/py3env/bin/flake8",
"python.formatting.yapfPath": "${workspaceFolder}/py3env/bin/yapf",
"python.formatting.autopep8Path": "${workspaceFolder}/py3env/bin/autopep8",
"python.linting.pep8Path": "${workspaceFolder}/py3env/bin/pep8",
"python.linting.pycodestylePath": "${workspaceFolder}/py3env/bin/pep8",
"python.linting.pydocstylePath": "${workspaceFolder}/py3env/bin/pydocstyle",
"python.pythonPath": "${workspaceFolder}/py3env/bin/python",
"restructuredtext.confPath": "${workspaceFolder}/source"
"restructuredtext.confPath": "${workspaceFolder}\\source"
}
50 changes: 29 additions & 21 deletions source/users/output_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ Json的数据格式是:

.. code-block:: json
[{
"count": "(数字)数据条目数量",
"xres_ver":"xresloader版本号",
"hash_code":"文本输出无hash码",
"data_ver":"数据版本号"
}, {
"协议名":[
{"Excel数据Key": "Excel数据内容"},
{"每行一条": "数据内容..."}
]
}]
[
{
"count": "(数字)数据条目数量",
"xres_ver":"xresloader版本号",
"hash_code":"文本输出无hash码",
"data_ver":"数据版本号"
}, {
"协议名":[
{"Excel数据Key": "Excel数据内容"},
{"每行一条": "数据内容..."}
]
},
"协议名"
]
Xml的数据格式是:

Expand All @@ -66,6 +69,7 @@ Xml的数据格式是:
<Excel数据Key>Excel数据内容</Excel数据Key>
</协议名>
</body>
<data_message_type>协议名</data_message_type>
</root>
Lua和Javacript的输出方式和输出设置有关,也很容易看懂,这里就不全部列举了。只列举一个Lua的其中一种输出方式:
Expand All @@ -81,7 +85,8 @@ Lua和Javacript的输出方式和输出设置有关,也很容易看懂,这
data_ver = "数据版本号",
count = 0, -- 数据条目数量,
},
PROTO_NAME = {
[2] = "协议名",
["协议名"] = {
{ ["Excel数据Key"] = "Excel数据内容" }, -- 每行一条,数据内容
}
}
Expand All @@ -99,16 +104,19 @@ Lua和Javacript的输出方式和输出设置有关,也很容易看懂,这
.. code-block:: bash
{
xres_ver: "xresloader版本号",
data_ver: "数据版本号",
count: 数据条目数量,
hash_code: "hash算法:hash值",
header : {
xres_ver: "版本号字符串",
data_ver: "版本号字符串",
count: 配置记录个数,
hash_code: "hash算法:hash值",
}
data_block: [
{配置内容},
{配置内容},
{配置内容},
],
data_message_type: "协议名"
}
配置协议名: [
{配置内容},
{配置内容},
{配置内容},
]
使用Msgpack的话, https://github.com/xresloader/xresloader/tree/master/loader-binding/msgpack 里有python2和node.js的读取示例。

Expand Down
2 changes: 2 additions & 0 deletions source/users/xresloader_core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ xresloader-可用参数列表
+--------------------------------------+----------------------------------+---------------------------------------------------------------+
| -c --const-print | 输出协议描述中的常量 | 参数为字符串,表示输出的文件名 |
+--------------------------------------+----------------------------------+---------------------------------------------------------------+
| -i --option-print | 输出协议描述中的选项 | 参数为字符串,表示输出的文件名 |
+--------------------------------------+----------------------------------+---------------------------------------------------------------+
| -a --data-version | 设置数据版本号 | 参数为字符串,表示输出的数据的data_ver字段。 |
| | | 如果不设置将按执行时间自动生成一个。 |
| | | 会写出到转出数据的header中。 |
Expand Down

0 comments on commit 2d95a82

Please sign in to comment.