Commit c42238a6 by 熊付

【接口文档】

1 parent b545c690
Showing 97 changed files with 3197 additions and 0 deletions
概述
=======================
概述
-----------
本服务用于为平台的各项服务提供统一的编码。
术语
-----------
- 编码:对常用的公共内容进行编码。
关于接口返回内容的统一说明
----------------------------
1. 采用标准HTTP返回状态码向接口调用者指出操作是否成功,例如2xx均表示成功,4xx和5xx表示失败。
2. 对于HTTP返回状态码2xx的情况,本文档各个接口分别规定了其响应内容的格式(即Response Body规定的格式)。
3. 对于HTTP返回状态码非2xx的情况,可以不返回任何响应内容,即不含有Response Body。但是也可以返回一个以下格式的Response Body向调用者给出更详细的错误指示:
| {
| "ecode": 0, # 整数类型,是平台自定义的错误码
| "enote": "The camera is created ok." # 字符串,关于错误的说明
| }
4. 关于GET请求的统一参数的说明:
GET请求一般来说至少需要支持以下四个参数:
- offset: 本次返回列表项的起始偏移量,用于分页,不出现为0
- limit: 本次返回列表项的最大数量,用于分页,不出现为30
- order: 排序方向,asc表示升序,desc表示降序,不出现为desc
- sortby: 排序关键字,由各个接口决定,参见各个接口说明。
数据库设计
=====================
说明:
- 表中不出现"是"的字段表示"否"。
- 所有外键都以另一个表的主键作为外键关联。
- 以下所有表中文件字段存的都是文件路径
任务表(tb_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------+-------------+------------+-----------+--------+------------------------------+
| 字段名 | 是否必填 | 类型 | 限制 | 唯一 | 说明 |
+================+=============+============+===========+========+==============================+
| id | *是* | string | <=32 | *是* | 分类 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| task_name | *是* | string | <=32 | | 任务名称 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| algo_type | *是* | string | <=64 | | 算法类型 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| play_url | *是* | string | <=64 | | 网络串流 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| run_dt | *是* | timestamp | 3 | | 任务运行时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| status | *是* | int | 2 | | 任务运行状态 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| video_size | *否* | float | | | 视频尺寸 |
+----------------+-------------+------------+-----------+--------+------------------------------+
|video_frame_rate| *否* | int | | | 视频帧率 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| mtasks | *是* | blod | | | 任务配置详情 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| update_dt | *是* | timestamp | 3 | | 任务变更时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
系统运维表(tb_sys_dev)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------+-------------+------------+-----------+--------+------------------------------+
| 字段名 | 是否必填 | 类型 | 限制 | 唯一 | 说明 |
+================+=============+============+===========+========+==============================+
| id | *是* | string | <=32 | *是* | 分类 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| dev_id | *否* | string | <=32 | | 设备id |
+----------------+-------------+------------+-----------+--------+------------------------------+
| over_dt | *否* | timestamp | 3 | | 过期时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| auth_file | *否* | string | <=64 | | 授权文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| back_data_file | *否* | string | <=64 | | 备份数据文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| timed_restart | *否* | int | 1 | | 定时重启标识(0为定时重启, |
| | | | | | 1为定时重启 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| restart_time | *否* | time | 3 | | 定时重启时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| note | *否* | txt | | | 备注 |
+----------------+-------------+------------+-----------+--------+------------------------------+
系统软件表(tb_sys_soft)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------+-------------+------------+-----------+--------+------------------------------+
| 字段名 | 是否必填 | 类型 | 限制 | 唯一 | 说明 |
+================+=============+============+===========+========+==============================+
| id | *是* | string | <=32 | *是* | 分类 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| sys_vs | *否* | string | <=32 | | 系统版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| algo_vs | *否* | string | <=32 | | 算法版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| soft_vs | *否* | string | <=32 | | 软件版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| firm_vs | *否* | string | <=32 | | 固件版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| dev_file | *否* | string | <=32 | | 设备升级文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| storage_file | *否* | string | <=32 | | 存储配置文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
任务管理接口
=======================
.. note::
1. 根据运维实现方式,现在页面上是添加一个大任务(即逻辑任务,用来在UI上归聚显示,并不会在分析服务中执行,
下面会统一简称"大任务"),后台会按多个视频源分解为多个子任务(实际上在分析服务器上执行的任务),一个子任
务对应一个视频源,这就带来了大任务与子任务的状态怎么对应的问题,比如子任务4个,3个运行,一个停止,大任
务运行状态该怎么显示。
2. 标准返回结构体格式:
.. code-block:: python
{
"ecode": 200,
"enote": "OK"
}
任务管理
-------------
添加任务
^^^^^^^^^^^^^
| ``URL``: /tasks
| ``Verb``: POST
| ``Header``: Authorization: {atoken},Accept-Language: {lang_code},Content-Type:application/json
``Request Body``:
.. code-block:: python
{
"task_name": "", # 必填,任务名称
"algo_type": "0", # 必填,任务算法的类型,'0':交通, '1':客流, '2':安防, '3':违停,'4':人脸
"run_dt": "2018-12-03 10:27:30.999", # 必填,任务运行日期时间
"play_url": "rtsp://192.168.9.155:8554//opt/data/vedio/1543548943071.264" # 必填,网络串流
"mtasks":[ #任务详细配置参数
{
"mtask_unid": "xxxx", # mtask任务id
"name": "xxxx", # mtask任务名称
"type": 1, # mtask任务类型,0 轮询任务; 1 时间段任务; 2 批量任务,非球机只支持0
"time_interval": 5, # 轮询任务的时间间隔,时间单位是分钟
"start_time": "00:00:00", # mtask开始时间
"end_time": "22:01:20", # mtask结束时间
"progress": 30, # 输出字段,进度
"scenes": [
{
"scene_unid": "xxxx", # 场景ID
"name": "xxxx", # 场景名称
"preset": 1, # 预置位,用于球机
"callibration": { # 标定参数,xml格式字符串
"calibration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"rois": [ # roi参数,xml格式字符串
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
}
],
"config": { # 算法配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"basicConfig": { # 算法基础配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"link_scenes": [], # 预置位,球机专用
"algo_type": 1, # 必填,必须和大任务一致,算法类型,0 交通; 1 客流; 2 安防;3 违停, 4 人脸。
"algo_args": {}, # 算法基本参数,根据algo_type而不同,参见下文。
"is_record": 1, # 是否录像,不用
"is_active": 1, # 是否有效,不用
"vchan_refid": # 视频通道的唯一id
"play_urls": { # 点播地址,不用
"http": "xxxx",
"rtsp": "xxxx"
},
"is_running": 1, # 任务是否正在运行
"status_reason": "xxxx" # 状态原因
},
...
] # scenes
}
],
"store_conf_unid": "xxxx", # 使用的存储配置的unid
}
``Response``:
标准返回结构体。
.. admonition:: 任务添加说明
该添加任务的接口在后台并不直接向运维发送派发任务的命令,而是在数据库的tb_task表中新增记录。
- source_type==pull_video_stream时:
如果存在vchans字段,那么需要在数据库的tb_subtask表中新增记录。
- source_type==pssull_pic_files或push_pic_files时:
根据node_count创建子任务个数。
如果source_type==pull_pic_files,则还要填写pull_source_url字段,并存储到子任务表中。
及按每个视频源一个小任务进行拆分后的各个子任务,因为小任务还要进行ROI配置,标定配置,参数配置才能派发。
当配置完成后,点击``配置完成``按钮保存子任务配置信息,最后对大任务执行“开始”操作才真正的派发各个小任务到运维服务器。
.. note::
1. 任务算法类型 ('0': 交通; '1': 客流; '2': 安防,'3': 违停) 做为字典项保存到字典服务。
.. error::
1. 原型上任务类型是按上传的算法的名称来算的,但是实际上的任务的算法类型是写死的,如上面所列。
列出任务
^^^^^^^^^^^^^
| **URL**: /tasks
| **Verb**: GET
| **Header**: Authorization: {atoken},Accept-Language: {lang_code},Content-Type:application/json
| **参数**:
.. code-block:: python
{
"offset": 0,
"limit": 10
}
Response:
**按照create_dt降序排列。**
.. code-block:: python
{
"total_num": 4,
"offset": 0,
"list_size": 4,
"list_data": [
{
"task_id": "",
"task_name": "", # 必填,任务名称
"algo_type": "0", # 必填,任务算法的类型,'0':交通, '1':客流, '2':安防, '3':违停,'4':人脸
"run_dt": "2018-12-03 10:27:30.999", # 必填,任务运行日期时间
"play_url": "rtsp://192.168.9.155:8554//opt/data/vedio/1543548943071.264" # 必填,网络串流
"mtasks":[ #任务详细配置参数
{
"mtask_unid": "xxxx", # mtask任务id
"name": "xxxx", # mtask任务名称
"type": 1, # mtask任务类型,0 轮询任务; 1 时间段任务; 2 批量任务,非球机只支持0
"time_interval": 5, # 轮询任务的时间间隔,时间单位是分钟
"start_time": "00:00:00", # mtask开始时间
"end_time": "22:01:20", # mtask结束时间
"progress": 30, # 输出字段,进度
"scenes": [
{
"scene_unid": "xxxx", # 场景ID
"name": "xxxx", # 场景名称
"preset": 1, # 预置位,用于球机
"callibration": { # 标定参数,xml格式字符串
"calibration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"rois": [ # roi参数,xml格式字符串
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
}
],
"config": { # 算法配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"basicConfig": { # 算法基础配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"link_scenes": [], # 预置位,球机专用
"algo_type": 1, # 必填,必须和大任务一致,算法类型,0 交通; 1 客流; 2 安防;3 违停, 4 人脸。
"algo_args": {}, # 算法基本参数,根据algo_type而不同,参见下文。
"is_record": 1, # 是否录像,不用
"is_active": 1, # 是否有效,不用
"vchan_refid": # 视频通道的唯一id
"play_urls": { # 点播地址,不用
"http": "xxxx",
"rtsp": "xxxx"
},
"is_running": 1, # 任务是否正在运行
"status_reason": "xxxx" # 状态原因
},
...
] # scenes
}
],
"store_conf_unid": "xxxx", # 使用的存储配置的unid
},
...
]
}
网络配置接口
=======================
本地网络配置
------------------
配置本地网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/local_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"sub_mask": "255.255.255.0", #子网掩码
"gateway": "8.8.8.8",
"mac_addr": "f0:1f:af:d7:13:c0"
}
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"sub_mask": "255.255.255.0", #子网掩码
"gateway": "8.8.8.8",
"mac_addr": "f0:1f:af:d7:13:c0"
}
获取本地网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/local_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"sub_mask": "255.255.255.0", #子网掩码
"gateway": "8.8.8.8",
"mac_addr": "f0:1f:af:d7:13:c0"
}
中心网络配置
------------------
配置中心网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/center_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
获取中心网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/center_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
运维网络配置
------------------
配置运维网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/dev_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
获取运维网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/dev_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
\ No newline at end of file
系统时间设置接口
=======================
系统时间校时
------------------
ntp校时
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/timing/ntp
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ntp_server_ip": "", # ntp服务器ip
"ntp_server_port": "", # ntp服务器端口
"timing_policy": "fix", # 校时策略, "fix": 定时校时, "interval": 周期校时
"timing_times": [ # 定时校时时间,格式为"HH:mm",最多支持5个校时时间,当timing_policy为0时生效
"03:00",
"12:00"
],
"timing_interval": 3600 # 周期定时时间间隔,单位为秒,当timing_policy为1时生效
}
``请求结果``: Http status code为200表示成功,否则查看返回的错误消息体
\ No newline at end of file
软件管理接口
=======================
系统软件管理
------------------
软件版本设置
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/soft
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"sys_vs": "v1.0", #系统版本
"algo_vs": "v1.0", #子网掩码
"soft_vs": "v1.0", #软件版本
"firm_vs": "v1.0", #固件版本
"dev_file": , #设备升级文件
"storage_file": #存储配置文件
}
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"sys_vs": "v1.0", #系统版本
"algo_vs": "v1.0", #子网掩码
"soft_vs": "v1.0", #软件版本
"firm_vs": "v1.0", #固件版本
"dev_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #设备升级文件
"storage_file": "http://127.0.0.1:20080/static/pics/xxx.tar" #存储配置文件
}
获取软件版本设置信息
^^^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/soft
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"sys_vs": "v1.0", #系统版本
"algo_vs": "v1.0", #子网掩码
"soft_vs": "v1.0", #软件版本
"firm_vs": "v1.0", #固件版本
"dev_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #设备升级文件
"storage_file": "http://127.0.0.1:20080/static/pics/xxx.tar" #存储配置文件
}
\ No newline at end of file
系统运维接口
=======================
系统运维管理
------------------
系统运维设置
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/dev/config
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"dev_id": "1111", #设备id
"over_dt": "2018-12-04 08:00:00.00", #过期时间
"timed_restart": 0, #定时重启标识(0为定时重启,1为定时重启
"restart_time": "08:00:00", #定时重启时间
"auth_file": , #授权文件
"back_data_file":, #备份数据文件
"note":"系统运维信息" #备注
}
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"dev_id": "1111", #设备id
"over_dt": "2018-12-04 08:00:00.00", #过期时间
"timed_restart": 0, #定时重启标识(0为定时重启,1为定时重启
"restart_time": "08:00:00", #定时重启时间
"auth_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #授权文件
"back_data_file":"http://127.0.0.1:20080/static/pics/xxx.tar", #备份数据文件
"note":"系统运维信息" #备注
}
系统运维设置信息
^^^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/dev/config
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"dev_id": "1111", #设备id
"over_dt": "2018-12-04 08:00:00.00", #过期时间
"timed_restart": 0, #定时重启标识(0为定时重启,1为定时重启
"restart_time": "08:00:00", #定时重启时间
"auth_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #授权文件
"back_data_file":"http://127.0.0.1:20080/static/pics/xxx.tar" , #备份数据文件
"note":"系统运维信息" #备注
}
\ No newline at end of file
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = code_serv
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
ĵ
\ No newline at end of file
No preview for this file type
No preview for this file type
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 45f7cf920f5318adf29856639b42361c
tags: 645f666f9bcd5a90fca523b33c5a78b7
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1. 概述 &mdash; tx1_serv 1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="2. 数据库设计" href="20-db.html" />
<link rel="prev" title="公共编码服务" href="index.html" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> tx1_serv
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. 概述</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#id2">1.1. 概述</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id3">1.2. 术语</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id4">1.3. 关于接口返回内容的统一说明</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a></li>
<li class="toctree-l1"><a class="reference internal" href="30-api-task.html">3. 任务管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="40-api-net.html">4. 网络配置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="41-api-ntp.html">5. 系统时间设置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="42-api-soft.html">6. 软件管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="50-api-dev.html">7. 系统运维接口</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">tx1_serv</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>1. 概述</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/10-summary.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>1. 概述<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<div class="section" id="id2">
<h2>1.1. 概述<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<blockquote>
<div>本服务用于为平台的各项服务提供统一的编码。</div></blockquote>
</div>
<div class="section" id="id3">
<h2>1.2. 术语<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h2>
<blockquote>
<div><ul class="simple">
<li>编码:对常用的公共内容进行编码。</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="id4">
<h2>1.3. 关于接口返回内容的统一说明<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h2>
<ol class="arabic simple">
<li>采用标准HTTP返回状态码向接口调用者指出操作是否成功,例如2xx均表示成功,4xx和5xx表示失败。</li>
<li>对于HTTP返回状态码2xx的情况,本文档各个接口分别规定了其响应内容的格式(即Response Body规定的格式)。</li>
<li>对于HTTP返回状态码非2xx的情况,可以不返回任何响应内容,即不含有Response Body。但是也可以返回一个以下格式的Response Body向调用者给出更详细的错误指示:</li>
</ol>
<blockquote>
<div><div class="line-block">
<div class="line">{</div>
<div class="line-block">
<div class="line">“ecode”: 0, # 整数类型,是平台自定义的错误码</div>
<div class="line">“enote”: “The camera is created ok.” # 字符串,关于错误的说明</div>
</div>
<div class="line">}</div>
</div>
</div></blockquote>
<ol class="arabic" start="4">
<li><p class="first">关于GET请求的统一参数的说明:</p>
<blockquote>
<div><blockquote>
<div><p>GET请求一般来说至少需要支持以下四个参数:</p>
</div></blockquote>
<ul class="simple">
<li>offset: 本次返回列表项的起始偏移量,用于分页,不出现为0</li>
<li>limit: 本次返回列表项的最大数量,用于分页,不出现为30</li>
<li>order: 排序方向,asc表示升序,desc表示降序,不出现为desc</li>
<li>sortby: 排序关键字,由各个接口决定,参见各个接口说明。</li>
</ul>
</div></blockquote>
</li>
</ol>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="20-db.html" class="btn btn-neutral float-right" title="2. 数据库设计" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral" title="公共编码服务" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, XF.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>5. 系统时间设置接口 &mdash; tx1_serv 1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="6. 软件管理接口" href="42-api-soft.html" />
<link rel="prev" title="4. 网络配置接口" href="40-api-net.html" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> tx1_serv
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="10-summary.html">1. 概述</a></li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a></li>
<li class="toctree-l1"><a class="reference internal" href="30-api-task.html">3. 任务管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="40-api-net.html">4. 网络配置接口</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">5. 系统时间设置接口</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#id2">5.1. 系统时间校时</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#ntp">5.1.1. ntp校时</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="42-api-soft.html">6. 软件管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="50-api-dev.html">7. 系统运维接口</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">tx1_serv</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>5. 系统时间设置接口</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/41-api-ntp.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>5. 系统时间设置接口<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<div class="section" id="id2">
<h2>5.1. 系统时间校时<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<div class="section" id="ntp">
<h3>5.1.1. ntp校时<a class="headerlink" href="#ntp" title="Permalink to this headline"></a></h3>
<blockquote>
<div><div class="line-block">
<div class="line">Verb: POST</div>
<div class="line">Path: /api/v1/tx1/timing/ntp</div>
<div class="line">Header: (authorization, {$auth_atoken}) (Content-Type, json)</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">Request</span> <span class="pre">Body</span></code>:</p>
<blockquote>
<div><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;ntp_server_ip&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="c1"># ntp服务器ip</span>
<span class="s2">&quot;ntp_server_port&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="c1"># ntp服务器端口</span>
<span class="s2">&quot;timing_policy&quot;</span><span class="p">:</span> <span class="s2">&quot;fix&quot;</span><span class="p">,</span> <span class="c1"># 校时策略, &quot;fix&quot;: 定时校时, &quot;interval&quot;: 周期校时</span>
<span class="s2">&quot;timing_times&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># 定时校时时间,格式为&quot;HH:mm&quot;,最多支持5个校时时间,当timing_policy为0时生效</span>
<span class="s2">&quot;03:00&quot;</span><span class="p">,</span>
<span class="s2">&quot;12:00&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;timing_interval&quot;</span><span class="p">:</span> <span class="mi">3600</span> <span class="c1"># 周期定时时间间隔,单位为秒,当timing_policy为1时生效</span>
<span class="p">}</span>
</pre></div>
</div>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">请求结果</span></code>: Http status code为200表示成功,否则查看返回的错误消息体</p>
</div></blockquote>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="42-api-soft.html" class="btn btn-neutral float-right" title="6. 软件管理接口" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="40-api-net.html" class="btn btn-neutral" title="4. 网络配置接口" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, XF.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
概述
=======================
概述
-----------
本服务用于为平台的各项服务提供统一的编码。
术语
-----------
- 编码:对常用的公共内容进行编码。
关于接口返回内容的统一说明
----------------------------
1. 采用标准HTTP返回状态码向接口调用者指出操作是否成功,例如2xx均表示成功,4xx和5xx表示失败。
2. 对于HTTP返回状态码2xx的情况,本文档各个接口分别规定了其响应内容的格式(即Response Body规定的格式)。
3. 对于HTTP返回状态码非2xx的情况,可以不返回任何响应内容,即不含有Response Body。但是也可以返回一个以下格式的Response Body向调用者给出更详细的错误指示:
| {
| "ecode": 0, # 整数类型,是平台自定义的错误码
| "enote": "The camera is created ok." # 字符串,关于错误的说明
| }
4. 关于GET请求的统一参数的说明:
GET请求一般来说至少需要支持以下四个参数:
- offset: 本次返回列表项的起始偏移量,用于分页,不出现为0
- limit: 本次返回列表项的最大数量,用于分页,不出现为30
- order: 排序方向,asc表示升序,desc表示降序,不出现为desc
- sortby: 排序关键字,由各个接口决定,参见各个接口说明。
数据库设计
=====================
说明:
- 表中不出现"是"的字段表示"否"。
- 所有外键都以另一个表的主键作为外键关联。
- 以下所有表中文件字段存的都是文件路径
任务表(tb_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------+-------------+------------+-----------+--------+------------------------------+
| 字段名 | 是否必填 | 类型 | 限制 | 唯一 | 说明 |
+================+=============+============+===========+========+==============================+
| id | *是* | string | <=32 | *是* | 分类 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| task_name | *是* | string | <=32 | | 任务名称 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| algo_type | *是* | string | <=64 | | 算法类型 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| play_url | *是* | string | <=64 | | 网络串流 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| run_dt | *是* | timestamp | 3 | | 任务运行时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| status | *是* | int | 2 | | 任务运行状态 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| video_size | *否* | float | | | 视频尺寸 |
+----------------+-------------+------------+-----------+--------+------------------------------+
|video_frame_rate| *否* | int | | | 视频帧率 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| mtasks | *是* | blod | | | 任务配置详情 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| update_dt | *是* | timestamp | 3 | | 任务变更时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
系统运维表(tb_sys_dev)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------+-------------+------------+-----------+--------+------------------------------+
| 字段名 | 是否必填 | 类型 | 限制 | 唯一 | 说明 |
+================+=============+============+===========+========+==============================+
| id | *是* | string | <=32 | *是* | 分类 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| dev_id | *否* | string | <=32 | | 设备id |
+----------------+-------------+------------+-----------+--------+------------------------------+
| over_dt | *否* | timestamp | 3 | | 过期时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| auth_file | *否* | string | <=64 | | 授权文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| back_data_file | *否* | string | <=64 | | 备份数据文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| timed_restart | *否* | int | 1 | | 定时重启标识(0为定时重启, |
| | | | | | 1为定时重启 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| restart_time | *否* | time | 3 | | 定时重启时间 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| note | *否* | txt | | | 备注 |
+----------------+-------------+------------+-----------+--------+------------------------------+
系统软件表(tb_sys_soft)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------+-------------+------------+-----------+--------+------------------------------+
| 字段名 | 是否必填 | 类型 | 限制 | 唯一 | 说明 |
+================+=============+============+===========+========+==============================+
| id | *是* | string | <=32 | *是* | 分类 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| sys_vs | *否* | string | <=32 | | 系统版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| algo_vs | *否* | string | <=32 | | 算法版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| soft_vs | *否* | string | <=32 | | 软件版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| firm_vs | *否* | string | <=32 | | 固件版本 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| dev_file | *否* | string | <=32 | | 设备升级文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
| storage_file | *否* | string | <=32 | | 存储配置文件 |
+----------------+-------------+------------+-----------+--------+------------------------------+
任务管理接口
=======================
.. note::
1. 根据运维实现方式,现在页面上是添加一个大任务(即逻辑任务,用来在UI上归聚显示,并不会在分析服务中执行,
下面会统一简称"大任务"),后台会按多个视频源分解为多个子任务(实际上在分析服务器上执行的任务),一个子任
务对应一个视频源,这就带来了大任务与子任务的状态怎么对应的问题,比如子任务4个,3个运行,一个停止,大任
务运行状态该怎么显示。
2. 标准返回结构体格式:
.. code-block:: python
{
"ecode": 200,
"enote": "OK"
}
任务管理
-------------
添加任务
^^^^^^^^^^^^^
| ``URL``: /tasks
| ``Verb``: POST
| ``Header``: Authorization: {atoken},Accept-Language: {lang_code},Content-Type:application/json
``Request Body``:
.. code-block:: python
{
"task_name": "", # 必填,任务名称
"algo_type": "0", # 必填,任务算法的类型,'0':交通, '1':客流, '2':安防, '3':违停,'4':人脸
"run_dt": "2018-12-03 10:27:30.999", # 必填,任务运行日期时间
"play_url": "rtsp://192.168.9.155:8554//opt/data/vedio/1543548943071.264" # 必填,网络串流
"mtasks":[ #任务详细配置参数
{
"mtask_unid": "xxxx", # mtask任务id
"name": "xxxx", # mtask任务名称
"type": 1, # mtask任务类型,0 轮询任务; 1 时间段任务; 2 批量任务,非球机只支持0
"time_interval": 5, # 轮询任务的时间间隔,时间单位是分钟
"start_time": "00:00:00", # mtask开始时间
"end_time": "22:01:20", # mtask结束时间
"progress": 30, # 输出字段,进度
"scenes": [
{
"scene_unid": "xxxx", # 场景ID
"name": "xxxx", # 场景名称
"preset": 1, # 预置位,用于球机
"callibration": { # 标定参数,xml格式字符串
"calibration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"rois": [ # roi参数,xml格式字符串
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
}
],
"config": { # 算法配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"basicConfig": { # 算法基础配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"link_scenes": [], # 预置位,球机专用
"algo_type": 1, # 必填,必须和大任务一致,算法类型,0 交通; 1 客流; 2 安防;3 违停, 4 人脸。
"algo_args": {}, # 算法基本参数,根据algo_type而不同,参见下文。
"is_record": 1, # 是否录像,不用
"is_active": 1, # 是否有效,不用
"vchan_refid": # 视频通道的唯一id
"play_urls": { # 点播地址,不用
"http": "xxxx",
"rtsp": "xxxx"
},
"is_running": 1, # 任务是否正在运行
"status_reason": "xxxx" # 状态原因
},
...
] # scenes
}
],
"store_conf_unid": "xxxx", # 使用的存储配置的unid
}
``Response``:
标准返回结构体。
.. admonition:: 任务添加说明
该添加任务的接口在后台并不直接向运维发送派发任务的命令,而是在数据库的tb_task表中新增记录。
- source_type==pull_video_stream时:
如果存在vchans字段,那么需要在数据库的tb_subtask表中新增记录。
- source_type==pssull_pic_files或push_pic_files时:
根据node_count创建子任务个数。
如果source_type==pull_pic_files,则还要填写pull_source_url字段,并存储到子任务表中。
及按每个视频源一个小任务进行拆分后的各个子任务,因为小任务还要进行ROI配置,标定配置,参数配置才能派发。
当配置完成后,点击``配置完成``按钮保存子任务配置信息,最后对大任务执行“开始”操作才真正的派发各个小任务到运维服务器。
.. note::
1. 任务算法类型 ('0': 交通; '1': 客流; '2': 安防,'3': 违停) 做为字典项保存到字典服务。
.. error::
1. 原型上任务类型是按上传的算法的名称来算的,但是实际上的任务的算法类型是写死的,如上面所列。
列出任务
^^^^^^^^^^^^^
| **URL**: /tasks
| **Verb**: GET
| **Header**: Authorization: {atoken},Accept-Language: {lang_code},Content-Type:application/json
| **参数**:
.. code-block:: python
{
"offset": 0,
"limit": 10
}
Response:
**按照create_dt降序排列。**
.. code-block:: python
{
"total_num": 4,
"offset": 0,
"list_size": 4,
"list_data": [
{
"task_id": "",
"task_name": "", # 必填,任务名称
"algo_type": "0", # 必填,任务算法的类型,'0':交通, '1':客流, '2':安防, '3':违停,'4':人脸
"run_dt": "2018-12-03 10:27:30.999", # 必填,任务运行日期时间
"play_url": "rtsp://192.168.9.155:8554//opt/data/vedio/1543548943071.264" # 必填,网络串流
"mtasks":[ #任务详细配置参数
{
"mtask_unid": "xxxx", # mtask任务id
"name": "xxxx", # mtask任务名称
"type": 1, # mtask任务类型,0 轮询任务; 1 时间段任务; 2 批量任务,非球机只支持0
"time_interval": 5, # 轮询任务的时间间隔,时间单位是分钟
"start_time": "00:00:00", # mtask开始时间
"end_time": "22:01:20", # mtask结束时间
"progress": 30, # 输出字段,进度
"scenes": [
{
"scene_unid": "xxxx", # 场景ID
"name": "xxxx", # 场景名称
"preset": 1, # 预置位,用于球机
"callibration": { # 标定参数,xml格式字符串
"calibration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"rois": [ # roi参数,xml格式字符串
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
{
"roi": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
}
],
"config": { # 算法配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"basicConfig": { # 算法基础配置参数,xml格式字符串
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
},
"link_scenes": [], # 预置位,球机专用
"algo_type": 1, # 必填,必须和大任务一致,算法类型,0 交通; 1 客流; 2 安防;3 违停, 4 人脸。
"algo_args": {}, # 算法基本参数,根据algo_type而不同,参见下文。
"is_record": 1, # 是否录像,不用
"is_active": 1, # 是否有效,不用
"vchan_refid": # 视频通道的唯一id
"play_urls": { # 点播地址,不用
"http": "xxxx",
"rtsp": "xxxx"
},
"is_running": 1, # 任务是否正在运行
"status_reason": "xxxx" # 状态原因
},
...
] # scenes
}
],
"store_conf_unid": "xxxx", # 使用的存储配置的unid
},
...
]
}
网络配置接口
=======================
本地网络配置
------------------
配置本地网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/local_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"sub_mask": "255.255.255.0", #子网掩码
"gateway": "8.8.8.8",
"mac_addr": "f0:1f:af:d7:13:c0"
}
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"sub_mask": "255.255.255.0", #子网掩码
"gateway": "8.8.8.8",
"mac_addr": "f0:1f:af:d7:13:c0"
}
获取本地网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/local_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"sub_mask": "255.255.255.0", #子网掩码
"gateway": "8.8.8.8",
"mac_addr": "f0:1f:af:d7:13:c0"
}
中心网络配置
------------------
配置中心网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/center_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
获取中心网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/center_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
运维网络配置
------------------
配置运维网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/dev_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
获取运维网络
^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/dev_net
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"ip": "127.0.0.1",
"port": "8081"
}
\ No newline at end of file
系统时间设置接口
=======================
系统时间校时
------------------
ntp校时
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/timing/ntp
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"ntp_server_ip": "", # ntp服务器ip
"ntp_server_port": "", # ntp服务器端口
"timing_policy": "fix", # 校时策略, "fix": 定时校时, "interval": 周期校时
"timing_times": [ # 定时校时时间,格式为"HH:mm",最多支持5个校时时间,当timing_policy为0时生效
"03:00",
"12:00"
],
"timing_interval": 3600 # 周期定时时间间隔,单位为秒,当timing_policy为1时生效
}
``请求结果``: Http status code为200表示成功,否则查看返回的错误消息体
\ No newline at end of file
软件管理接口
=======================
系统软件管理
------------------
软件版本设置
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/soft
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"sys_vs": "v1.0", #系统版本
"algo_vs": "v1.0", #子网掩码
"soft_vs": "v1.0", #软件版本
"firm_vs": "v1.0", #固件版本
"dev_file": , #设备升级文件
"storage_file": #存储配置文件
}
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"sys_vs": "v1.0", #系统版本
"algo_vs": "v1.0", #子网掩码
"soft_vs": "v1.0", #软件版本
"firm_vs": "v1.0", #固件版本
"dev_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #设备升级文件
"storage_file": "http://127.0.0.1:20080/static/pics/xxx.tar" #存储配置文件
}
获取软件版本设置信息
^^^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/soft
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"sys_vs": "v1.0", #系统版本
"algo_vs": "v1.0", #子网掩码
"soft_vs": "v1.0", #软件版本
"firm_vs": "v1.0", #固件版本
"dev_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #设备升级文件
"storage_file": "http://127.0.0.1:20080/static/pics/xxx.tar" #存储配置文件
}
\ No newline at end of file
系统运维接口
=======================
系统运维管理
------------------
系统运维设置
^^^^^^^^^^^^^^^^^^^^^
| Verb: POST
| Path: /api/v1/tx1/dev/config
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Request Body``:
.. code-block:: python
{
"dev_id": "1111", #设备id
"over_dt": "2018-12-04 08:00:00.00", #过期时间
"timed_restart": 0, #定时重启标识(0为定时重启,1为定时重启
"restart_time": "08:00:00", #定时重启时间
"auth_file": , #授权文件
"back_data_file":, #备份数据文件
"note":"系统运维信息" #备注
}
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"dev_id": "1111", #设备id
"over_dt": "2018-12-04 08:00:00.00", #过期时间
"timed_restart": 0, #定时重启标识(0为定时重启,1为定时重启
"restart_time": "08:00:00", #定时重启时间
"auth_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #授权文件
"back_data_file":"http://127.0.0.1:20080/static/pics/xxx.tar", #备份数据文件
"note":"系统运维信息" #备注
}
系统运维设置信息
^^^^^^^^^^^^^^^^^^^^^^^
| Verb: GET
| Path: /api/v1/tx1/dev/config
| Header: (authorization, {$auth_atoken}) (Content-Type, json)
``Response Body``:
.. code-block:: python
{
"id": "123456", #主键
"dev_id": "1111", #设备id
"over_dt": "2018-12-04 08:00:00.00", #过期时间
"timed_restart": 0, #定时重启标识(0为定时重启,1为定时重启
"restart_time": "08:00:00", #定时重启时间
"auth_file": "http://127.0.0.1:20080/static/pics/xxx.tar" , #授权文件
"back_data_file":"http://127.0.0.1:20080/static/pics/xxx.tar" , #备份数据文件
"note":"系统运维信息" #备注
}
\ No newline at end of file
.. code_serv documentation master file, created by
sphinx-quickstart on Tue May 9 11:59:12 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
公共编码服务
========================
.. toctree::
:maxdepth: 3
:numbered:
:caption: Contents:
10-summary
20-db
30-api-task
40-api-net
41-api-ntp
42-api-soft
50-api-dev
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
This diff could not be displayed because it is too large.
/*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var bbox = span.getBBox();
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
var parentOfText = node.parentNode.parentNode;
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
}
}
});
}
};
// quick alias for translations
_ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/* sphinx_rtd_theme version 0.4.1 | MIT license */
/* Built 20180727 10:07 */
require=function n(e,i,t){function o(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[s]={exports:{}};e[s][0].call(u.exports,function(n){var i=e[s][1][n];return o(i||n)},u,u.exports,n,e,i,t)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s<t.length;s++)o(t[s]);return o}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var e=this;void 0===n&&(n=!0),e.isRunning||(e.isRunning=!0,jQuery(function(i){e.init(i),e.reset(),e.win.on("hashchange",e.reset),n&&e.win.on("scroll",function(){e.linkScroll||e.winScroll||(e.winScroll=!0,requestAnimationFrame(function(){e.onScroll()}))}),e.win.on("resize",function(){e.winResize||(e.winResize=!0,requestAnimationFrame(function(){e.onResize()}))}),e.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var i=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(i),e.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")}),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var i=n(this);expand=n('<span class="toctree-expand"></span>'),expand.on("click",function(n){return e.toggleCurrent(i),n.stopPropagation(),!1}),i.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}i.length>0&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],i=0;i<e.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[e[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[i]+"CancelAnimationFrame"]||window[e[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,i){var t=(new Date).getTime(),o=Math.max(0,16-(t-n)),r=window.setTimeout(function(){e(t+o)},o);return n=t+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
\ No newline at end of file
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #333333 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #208050 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
.highlight .mf { color: #208050 } /* Literal.Number.Float */
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #06287e } /* Name.Function.Magic */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; tx1_serv 1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> tx1_serv
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="10-summary.html">1. 概述</a></li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a></li>
<li class="toctree-l1"><a class="reference internal" href="30-api-task.html">3. 任务管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="40-api-net.html">4. 网络配置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="41-api-ntp.html">5. 系统时间设置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="42-api-soft.html">6. 软件管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="50-api-dev.html">7. 系统运维接口</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">tx1_serv</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, XF.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公共编码服务 &mdash; tx1_serv 1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="1. 概述" href="10-summary.html" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="#" class="icon icon-home"> tx1_serv
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="10-summary.html">1. 概述</a></li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a></li>
<li class="toctree-l1"><a class="reference internal" href="30-api-task.html">3. 任务管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="40-api-net.html">4. 网络配置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="41-api-ntp.html">5. 系统时间设置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="42-api-soft.html">6. 软件管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="50-api-dev.html">7. 系统运维接口</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">tx1_serv</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="#">Docs</a> &raquo;</li>
<li>公共编码服务</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>公共编码服务<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="10-summary.html">1. 概述</a><ul>
<li class="toctree-l2"><a class="reference internal" href="10-summary.html#id2">1.1. 概述</a></li>
<li class="toctree-l2"><a class="reference internal" href="10-summary.html#id3">1.2. 术语</a></li>
<li class="toctree-l2"><a class="reference internal" href="10-summary.html#id4">1.3. 关于接口返回内容的统一说明</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a><ul>
<li class="toctree-l2"><a class="reference internal" href="20-db.html#tb-task">2.1. 任务表(tb_task)</a></li>
<li class="toctree-l2"><a class="reference internal" href="20-db.html#tb-sys-dev">2.2. 系统运维表(tb_sys_dev)</a></li>
<li class="toctree-l2"><a class="reference internal" href="20-db.html#tb-sys-soft">2.3. 系统软件表(tb_sys_soft)</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="30-api-task.html">3. 任务管理接口</a><ul>
<li class="toctree-l2"><a class="reference internal" href="30-api-task.html#id2">3.1. 任务管理</a><ul>
<li class="toctree-l3"><a class="reference internal" href="30-api-task.html#id3">3.1.1. 添加任务</a></li>
<li class="toctree-l3"><a class="reference internal" href="30-api-task.html#id4">3.1.2. 列出任务</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="40-api-net.html">4. 网络配置接口</a><ul>
<li class="toctree-l2"><a class="reference internal" href="40-api-net.html#id2">4.1. 本地网络配置</a><ul>
<li class="toctree-l3"><a class="reference internal" href="40-api-net.html#id3">4.1.1. 配置本地网络</a></li>
<li class="toctree-l3"><a class="reference internal" href="40-api-net.html#id4">4.1.2. 获取本地网络</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="40-api-net.html#id5">4.2. 中心网络配置</a><ul>
<li class="toctree-l3"><a class="reference internal" href="40-api-net.html#id6">4.2.1. 配置中心网络</a></li>
<li class="toctree-l3"><a class="reference internal" href="40-api-net.html#id7">4.2.2. 获取中心网络</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="40-api-net.html#id8">4.3. 运维网络配置</a><ul>
<li class="toctree-l3"><a class="reference internal" href="40-api-net.html#id9">4.3.1. 配置运维网络</a></li>
<li class="toctree-l3"><a class="reference internal" href="40-api-net.html#id10">4.3.2. 获取运维网络</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="41-api-ntp.html">5. 系统时间设置接口</a><ul>
<li class="toctree-l2"><a class="reference internal" href="41-api-ntp.html#id2">5.1. 系统时间校时</a><ul>
<li class="toctree-l3"><a class="reference internal" href="41-api-ntp.html#ntp">5.1.1. ntp校时</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="42-api-soft.html">6. 软件管理接口</a><ul>
<li class="toctree-l2"><a class="reference internal" href="42-api-soft.html#id2">6.1. 系统软件管理</a><ul>
<li class="toctree-l3"><a class="reference internal" href="42-api-soft.html#id3">6.1.1. 软件版本设置</a></li>
<li class="toctree-l3"><a class="reference internal" href="42-api-soft.html#id4">6.1.2. 获取软件版本设置信息</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="50-api-dev.html">7. 系统运维接口</a><ul>
<li class="toctree-l2"><a class="reference internal" href="50-api-dev.html#id2">7.1. 系统运维管理</a><ul>
<li class="toctree-l3"><a class="reference internal" href="50-api-dev.html#id3">7.1.1. 系统运维设置</a></li>
<li class="toctree-l3"><a class="reference internal" href="50-api-dev.html#id4">7.1.2. 系统运维设置信息</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
</ul>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="10-summary.html" class="btn btn-neutral float-right" title="1. 概述" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, XF.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
No preview for this file type
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; tx1_serv 1.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> tx1_serv
</a>
<div class="version">
1.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="10-summary.html">1. 概述</a></li>
<li class="toctree-l1"><a class="reference internal" href="20-db.html">2. 数据库设计</a></li>
<li class="toctree-l1"><a class="reference internal" href="30-api-task.html">3. 任务管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="40-api-net.html">4. 网络配置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="41-api-ntp.html">5. 系统时间设置接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="42-api-soft.html">6. 软件管理接口</a></li>
<li class="toctree-l1"><a class="reference internal" href="50-api-dev.html">7. 系统运维接口</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">tx1_serv</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Search</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<noscript>
<div id="fallback" class="admonition warning">
<p class="last">
Please activate JavaScript to enable the search
functionality.
</p>
</div>
</noscript>
<div id="search-results">
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, XF.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
</body>
</html>
\ No newline at end of file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# code_serv documentation build configuration file, created by
# sphinx-quickstart on Tue May 9 11:59:12 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'tx1_serv'
copyright = '2018, XF'
author = 'XF'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'code_servdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'tx1_serv.tex', 'tx1\\_serv Documentation',
'Yuan Chao', 'manual'),
]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'tx1_serv', 'tx1_serv Documentation',
[author], 1)
]
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'tx1_serv', 'tx1_serv Documentation',
author, 'tx1_serv', 'One line description of project.',
'Miscellaneous'),
]
.. code_serv documentation master file, created by
sphinx-quickstart on Tue May 9 11:59:12 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
公共编码服务
========================
.. toctree::
:maxdepth: 3
:numbered:
:caption: Contents:
10-summary
20-db
30-api-task
40-api-net
41-api-ntp
42-api-soft
50-api-dev
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=code_serv
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd
This file is too large to display.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!