|
本帖最后由 李维强-15级 于 2020-5-6 10:32 编辑
生成二维码地址,在以下地址内,输入数据即可生成二维码
https://cli.im/
APP下载
ElevatorV1.zip
(1.63 MB, 下载次数: 1)
电梯外 二维码信息
- {"TX":0,"NKK1":"2468024680","EEN":"1234524680","CurF":5,"UpDown":0}
- {"TX":0,"CNUM":28,"FU":3,"NKK1":"2468024680","EEN":"1234524680","CurF":10,"TRO":1}
复制代码
电梯内 二维码信息
12层楼以下
- {"TX":1,"CNUM":10,"FU":3,"NKK1":"2468024680","EEN":"1234524680","CurF":10,"TRO":1}
复制代码
28层楼以下
- {"TX":1,"CNUM":21,"FU":3,"NKK1":"2468024680","EEN":"1234524680","CurF":10,"TRO":1}
复制代码
28层楼以上
- {"TX":1,"CNUM":31,"FU":3,"NKK1":"2468024680","EEN":"1234524680","CurF":10,"TRO":1}
复制代码
变量解释
TX 电梯内/外(1/0) 整型
CNUM 本楼总楼层信息 整型
FU 负楼层数 整型
NKK1 系统认证密码信息(二维码中储存) 字符串
NKK0 手机(服务器)中存储的电梯系统标识 字符串
EEN 电梯id 整型
EStatus0 电梯的3种状态(-1,0,1),整型(电梯状态)
EStatus1 电梯所在楼层(电梯状态)整型
Estatus2 所有按下楼层 整型,列表
TarF 用户期望楼层 整型<=总楼层楼
RNUM 电梯轿厢数 整型
TRO 电梯某个轿厢 整型
CurF 用户所在楼层 整型
UpDown 用户按的上还是下 整型 发送-1为下,1为上
服务器功能需求
0. 用户扫描电梯外部二维码,服务器提供“电梯操作”的接口http://47.102.223.158:8886/scan01/,接收手机发送的操作请求,数据格式:{NKK1, EEN,TRO,TX=0,UpDown,CurF },
http://47.102.223.158:8886/scan0 ... CurF=1&UpDown=0
返回示例:
[JavaScript] syntaxhighlighter_viewsource syntaxhighlighter_copycode {
"EEN": 1,
"imformation": [
{
"TRO": 0,
"EStatus0": -1,
"EStatus1": 34,
"Estatus2": [
4,
10,
23,
25
]
},
{
"TRO": 1,
"EStatus0": 1,
"EStatus1": 20,
"Estatus2": [
4,
7,
23,
25
]
},
{
"TRO": 2,
"EStatus0": -1,
"EStatus1": 13,
"Estatus2": [
4,
6,
23,
37
]
}
]
}
1. 用户扫描电梯内部二维码,服务器提供“电梯状态”接口,http://47.102.223.158:8886/scan02/,接收手机端的“请求” ,数据格式:{NKK1,EEN,TRO,TX=1}。 服务器返回手机端发送对应电梯轿厢状态,数据格式:{EEN, EStatus0, EStatus1, EStatus2 }
http://47.102.223.158:8886/scan0 ... &TRO=1&TX=1
返回示例:
[JavaScript] syntaxhighlighter_viewsource syntaxhighlighter_copycode {
"EEN": 1,
"EStatus0": -1,
"EStatus1": 20,
"Estatus2": [
4,
10,
23,
25
]
}
2. 服务器提供“电梯操作”的接口http://47.102.223.158:8886/operation/,接收手机发送的操作请求,数据格式:{NKK1, EEN,TRO, TarF}, 返回200
3.W2格式
- {"EEN":"XXX","NKK1":"XXXX","TROINFO":[{"TRO":1,"CurF":1,"EStatus0":-1,"EStatus2":[5,6,11]},{"TRO":2,"CurF":1,"EStatus0":-1,"EStatus1":1,"EStatus2":[5,6,11]},{"TRO":3,"CurF":1,"EStatus0":-1,"EStatus2":[5,6,11]}]}
复制代码
|
|