本规范规定了接入EXLIVE平台的接口定义,采用TCP通讯方式,实现了用户登录、权限验证、各种数据传输等功能。 本规范主要用来实现第三方软件和EXLIVE平台互通 采用TCP传输方式,端口为1502 数据格式使用json格式
1.用户登录 client->server {"header":{"cmd":"1000"},"body":{"name":"exlive","pass":"000000","ver":"","type":"","mode":""}}
2.命令应答 server->client {"header":{"cmd":"8000"},"body":{"cmd":"1000","result":"success" }}
3.用户退出,注销登录 client->server
4.客户端心跳 client->server
6.车机命令 client->server {"header":{"cmd":"1004"},"body":{"id":"","data":"" }}
7.用户所述客户分组信息 client->server {"header":{"cmd":"1005"},"body":{"data":"" }}
8.用户下发的车辆数据 client->server {"header":{"cmd":"1006"},"body":{"data":"" }}
9.服务器向客户端下发车辆定位数据server -> client {"header":{"cmd":"1007"},"body":{"code":"","id":"","lat":"","lng":"","veo":"","dir":"","gpstime":"","av":"","alarm":"","oil":"","dis":"","wstate":"","cstate":"","posinfo":"" }} gpstime格式: 2011-11-01 12:38:39 Av表示是否为有效定位 0 无效定位 1有效定位 Cstate为状态描述,可以为空 posinfo为位置描述,可以为空 Alarm: 是否报警 0 无报警 1 报警 Oil: 当前油量 Dis: 当前总里程
10.请求下发用户权限下客户及分组数据 client->server {"header":{"cmd":"1008"},"body":{"client":"true" }} Client: true 下发客户关系数据 false 不下发
11. 用户的分组权限数据 server->client {"header":{"cmd":"1009"},"body":{"groupid":"","relation":"","customer":"","goupname":"" }}
12.请求服务器下发用户权限下分组车辆数据 client->server {"header":{"cmd":"1010"},"body":{"groupid":"1" }}
13.服务器下发用户权限下分组车辆数据 server->client {"header":{"cmd":"1011"},"body":{"id":"","code":"","sim":"" }}
14.发送车机透传命令到设备 client->server {"header":{"cmd":"1012"},"body":{"terminalid":"","code":"","data":"" }}
15.转发设备透传数据到客户端 server->client {"header":{"cmd":"1013"},"body":{"terminalid":"","code":"","data":"" } |