伽马配置页面接口文档
1 url 192.168.1.101/WebServer.cgi
2 获取 Get WebServer.cgi
1、request get
运行信息页面: 192.168.1.101/WebServer.cgi/?runinfo
网络参数设置页面: 192.168.1.101/WebServer.cgi/?netset
隐藏参数设置页面: 192.168.1.101/WebServer.cgi/?hideset
参数设置页面: 192.168.1.101/WebServer.cgi/?argset
插值设置页面: 192.168.1.101/WebServer.cgi/?interset
2、response
① 运行信息页面
{
"code" : 0,
"message": "runinfo page data",
"type": "gama",
"page" : "runinfo",
"data" :
{
"name": "GZLTSGMDFSV0001", //设备名称
"id" : "1017110015", //设备ID
"ip" : "192.168.10.15", //ip地址
"mac" : "d3-de-80-89-b1-67", //MAC地址
"ver" : "1.1.1.1", //软件版本
"dr" : "0.098", //剂量率
"cr" : "2.03", //计数率 (cps)
"tm" : "40.7", //温度 (°C)
"hm" : "10.4", //湿度 (H)
"rn": 0, //量程 int类型,0:高量程 1:低量程
"m_start": false, //测量开关 bool类型,true:开始测量 false:关闭测量
"hv_statr":false, //高压开关 bool类型,true:开始高压 false:关闭高压
"p_hv":"250", //正高压 (v)
"n_hv":"250", //负高压 (v)
"status":"", //采集板状态
},
}
②网络参数设置页面
{
"code": 0,
"message": "netset page data",
"type": "gama",
"page": "netset",
"data":
{
"ip_addr": "192.168.10.15", //IP地址
"sub_mask": "225.255.255.0", //子网掩码
"df_gw": "192.168.10.1" //默认网关
},
}
③隐藏参数设置页面
{
"code": 0,
"message": "hideset page data",
"type":"gama",
"page": "hideset",
"data":
{
"name" : "GZLTSGMDFSV0001", //设备名称
"id" : "1017110015", //设备ID
"mac_addr:"01.02.03.04.05.06", //MAC地址
},
}
④参数设置页面
{
"code": 0,
"message": "argset page data",
"type": "gama",
"page": "argset",
"data": {
"measure_mode": false, //测量模式 bool类型, true:计时模式 false:计数模式
"a_thr": "1200", //报警阈值
"dead_tiem":"20", //计时死时间 (ms)
"ave_win": "10", //计时平均窗口
"cst": "22" //计数统计时间(s)
"cal_method":"" //剂量率计算方式
"c_thr_h":"1000" //高脉冲阈值
"c_thr_l":"0.05" //低脉冲阈值
}
}
五、插值设置页面
{
"code": 0,
"message": "interset page data",
"type": "gama",
"page": "interset",
"data": {
"gm1": {
"count_rate": {
"gm1_cr1": "1.01",
"gm1_cr2": "3.02",
"gm1_cr3": "5.03",
"gm1_cr4": "7.04",
"gm1_cr5": "9.05",
"gm1_cr6": "11.06",
"gm1_cr7": "13.07",
"gm1_cr8": "15.08",
"gm1_cr9": "17.09",
"gm1_cr10": "19.1"
},
"dose_rate": {
"gm1_dr1": "0.11",
"gm1_dr2": "2.12",
"gm1_dr3": "4.13",
"gm1_dr4": "6.14",
"gm1_dr5": "8.15",
"gm1_dr6": "10.16",
"gm1_dr7": "12.01",
"gm1_dr8": "14",
"gm1_dr9": "16.09",
"gm1_dr10": "18.12"
}
},
"gm2": {
"count_rate": {
"gm2_cr1": "2",
"gm2_cr2": "4",
"gm2_cr3": "6",
"gm2_cr4": "8",
"gm2_cr5": "10",
"gm2_cr6": "12",
"gm2_cr7": "14",
"gm2_cr8": "16",
"gm2_cr9": "18",
"gm2_cr10": "20"
},
"dose_rate": {
"gm2_dr1": "1",
"gm2_dr2": "2",
"gm2_dr3": "3",
"gm2_dr4": "4",
"gm2_dr5": "5",
"gm2_dr6": "6",
"gm2_dr7": "7",
"gm2_dr8": "8",
"gm2_dr9": "9",
"gm2_dr10": "10"
}
}
}
}
3 配置 Post WebServer
3.1 测量启停控制
request
{
"page" : "runinfo"
"m_start": false, //测量开关 bool类型,true:开始测量 false:关闭测量
"hv_statr":false, //高压开关 bool类型,true:开始高压 false:关闭高压
}
response
已启动:
{
"code": 0,
"message": "post respond",
"type": "gama",
"page": "runinfo",
"data":
{
"m_start": true,
"hv_statr":true,
}
}
已停止:
{
"code": 0,
"message": "post respond",
"type": "gama",
"page": "runinfo",
"data":
{
"m_start": false,
"hv_statr":false,
}
}
3.2 网络设置
request
{
"page": 'netset',
"ip_addr": '192.168.0.101', //IP地址
"sub_mask": '255.255.255.0', //子网掩码
"df_gw": '192.168.0.1' //默认网关
}
response
{
"code": 0,
"message": "post respond",
"page": "netset",
"type": "gama",
"data":
{
"ip_addr": "192.168.0.101", //IP地址
"sub_mask": "255.255.255.0", //子网掩码
"df_gw": "192.168.0.1" //默认网关
},
}
3.3 隐藏参数设置
request
{
"page": 'hideset',
"name" : "GZLTSGMDFSV0001", //设备名称
"id" : "1017110015", //设备ID
"mac_addr:"01.02.03.04.05.06", //MAC地址
}
response
{
"code": 0,
"message": "hideset page data",
"type":"gama",
"page": "hideset",
"data":
{
"name" : "GZLTSGMDFSV0001", //设备名称
"id" : "1017110015", //设备ID
"mac_addr:"01.02.03.04.05.06", //MAC地址
},
}
3.4 参数设置
request:
{
"page": 'argset',
"measure_mode": false, //测量模式 bool类型, true:计时模式 false:计数模式
"a_thr": "1200", //报警阈值
"dead_tiem":"20", //计时死时间 (ms)
"ave_win": "10", //计时平均窗口
"cst": "22" //计数统计时间(s)
"cal_method":"" //剂量率计算方式
"c_thr_h":"1000" //高脉冲阈值
"c_thr_l":"0.05" //低脉冲阈值
}
response:
{
"code": 0,
"message": "post respond",
"type": "gama",
"page": "argset",
"data":
{
"measure_mode": false, //测量模式 bool类型, true:计时模式 false:计数模式
"a_thr": "1200", //报警阈值
"dead_tiem":"20", //计时死时间 (ms)
"ave_win": "10", //计时平均窗口
"cst": "22" //计数统计时间(s)
"cal_method":"" //剂量率计算方式
"c_thr_h":"1000" //高脉冲阈值
"c_thr_l":"0.05" //低脉冲阈值
}
}
3.5 插值设置
request:
{
page: 'interset',
gm1_cr1: '1.01',
gm1_cr2: '3.02',
gm1_cr3: '5.03',
gm1_cr4: '7.04',
gm1_cr5: '9.05',
gm1_cr6: '11.06',
gm1_cr7: '13.07',
gm1_cr8: '15.08',
gm1_cr9: '17.09',
gm1_cr10: '19.10',
gm1_dr1: '0.11',
gm1_dr2: '2.12',
gm1_dr3: '4.13',
gm1_dr4: '6.14',
gm1_dr5: '8.15',
gm1_dr6: '10.16',
gm1_dr7: '12.01',
gm1_dr8: '14.00',
gm1_dr9: '16.09',
gm1_dr10: '18.12',
gm2_cr1: '1.16',
gm2_cr2: '3.04',
gm2_cr3: '5.16',
gm2_cr4: '7.96',
gm2_cr5: '9.86',
gm2_cr6: '11.71',
gm2_cr7: '13.62',
gm2_cr8: '15.36',
gm2_cr9: '17.56',
gm2_cr10: '19.79',
gm2_dr1: '0.26',
gm2_dr2: '2.23',
gm2_dr3: '4.12',
gm2_dr4: '6.21',
gm2_dr5: '8.56',
gm2_dr6: '10.46',
gm2_dr7: '12.39',
gm2_dr8: '14.82',
gm2_dr9: '16.80',
gm2_dr10: '18.34',
}
response:
{
"code": 0,
"message": "interset page data",
"type": "gama",
"page": "interset",
"data": {
"gm1": {
"count_rate": {
"gm1_cr1": "1.01",
"gm1_cr2": "3.02",
"gm1_cr3": "5.03",
"gm1_cr4": "7.04",
"gm1_cr5": "9.05",
"gm1_cr6": "11.06",
"gm1_cr7": "13.07",
"gm1_cr8": "15.08",
"gm1_cr9": "17.09",
"gm1_cr10": "19.1"
},
"dose_rate": {
"gm1_dr1": "0.11",
"gm1_dr2": "2.12",
"gm1_dr3": "4.13",
"gm1_dr4": "6.14",
"gm1_dr5": "8.15",
"gm1_dr6": "10.16",
"gm1_dr7": "12.01",
"gm1_dr8": "14",
"gm1_dr9": "16.09",
"gm1_dr10": "18.12"
}
},
"gm2": {
"count_rate": {
"gm2_cr1": "2",
"gm2_cr2": "4",
"gm2_cr3": "6",
"gm2_cr4": "8",
"gm2_cr5": "10",
"gm2_cr6": "12",
"gm2_cr7": "14",
"gm2_cr8": "16",
"gm2_cr9": "18",
"gm2_cr10": "20"
},
"dose_rate": {
"gm2_dr1": "1",
"gm2_dr2": "2",
"gm2_dr3": "3",
"gm2_dr4": "4",
"gm2_dr5": "5",
"gm2_dr6": "6",
"gm2_dr7": "7",
"gm2_dr8": "8",
"gm2_dr9": "9",
"gm2_dr10": "10"
}
}
}
}