智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/df/df9aee1554bed6cb42c1d4bd3e5...

314 lines
6.7 KiB

import axios from '@/common/network/request.js';
//读取灯杆状态命令发送
export function sendReadlampstatus(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'readalonelampstate',
'controlid': data.controlid,
'id': data.id,
},
})
}
//读取灯杆状态命令接收
export function receiveReadlampstatus(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'readalonelampstate',
'commandid': data.commandid,
'controlid': data.controlid,
'id': data.id,
},
})
}
//读取回路状态命令发送
export function sendReadloopstatus(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'readcurmcontrolstate',
'mcontrolid': data.mcontrolid,
'id': data.id,
},
})
}
//读取回路状态命令接收
export function receiveReadloopstatus(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'readcurmcontrolstate',
'commandid': data.commandid,
'mcontrolid': data.mcontrolid,
'id': data.id,
},
})
}
//灯杆调光命令发送
export function sendLampdimmer(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'changedimming',
'controlid': data.controlid,
'comid': data.comid,
'dimming1': data.dimming1,
'dimming2': data.dimming2,
},
})
}
//灯杆调光命令发送
export function receiveLampdimmer(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'changedimming',
'commandid': data.commandid,
'controlid': data.controlid,
'comid': data.comid,
'dimming1': data.dimming1,
'dimming2': data.dimming2,
},
})
}
//灯杆/回路 时间表设置命令发送
export function setDeviceTimetable(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'changetimetable',
'timetableid': data.controlid,
'type':data.type,
'timeList':data.timeList,
},
})
}
//灯杆/回路 时间表设置命令发送
export function receivesetDeviceTimetable(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'changetimetable',
'commandid': data.commandid,
'timetableid': data.controlid,
'type':data.type,
},
})
}
//灯杆/回路 时间表查询命令发送
export function readDeviceTimetable(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'readTimetable',
'timetableid': data.controlid,
'type': data.type,
},
})
}
//灯杆/回路 时间表查询命令发送
export function receivereadDeviceTimetable(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'readTimetable',
'commandid': data.commandid,
'timetableid': data.controlid,
'type': data.type,
},
})
}
//传感器值读取命令发送
export function readSensorvalue(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': data.operation,
'sensorid': data.sensorid,
},
})
}
//传感器值读取 回复命令发送
export function receivereadSensorvalue(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': data.operation,
'commandid': data.commandid,
'sensorid': data.sensorid,
},
})
}
//区域 时间表设置命令发送
export function setGroupTimetable(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'changetimetablebygroup',
'id': data.id,
'timeList': data.timeList,
'groupid': data.groupid,
},
})
}
//区域 时间表查询命令发送
export function receivesetGroupTimetable(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'changetimetablebygroup',
'commandid': data.commandid,
'id': data.id,
'timeList': data.timeList,
'groupid': data.groupid,
},
})
}
//灯杆/回路 所有调光发送
export function sendLampAlldimmer(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': data.operation,
'dimming1': data.dimming1,
'dimming2': data.dimming2,
'id':data.id,
},
})
}
//灯杆/回路 区域调光发送
export function sendLampzonedimmer(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': data.operation,
'controlid': data.controlid,
'comid': data.comid,
'dimming1': data.dimming1,
'dimming2': data.dimming2,
'groupid': data.groupid,
'id':data.id,
},
})
}
//灯杆/回路 区域调光接收
export function receiveLampzonedimmer(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': data.operation,
'commandid': data.commandid,
'comid': data.comid,
'dimming1': data.dimming1,
'dimming2': data.dimming2,
'groupid': data.groupid,
'id':data.id,
},
})
}
//读取照度传感器照度值命令发送
export function readSensorIlluminancevalue(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'readsensorofillumination',
'sensorid': data.controlid,
},
})
}
//读取照度传感器照度值命令接收
export function receivereadSensorIlluminancevalue(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'readsensorofillumination',
'commandid': data.commandid,
'sensorid': data.controlid,
},
})
}
//读取亮度传感器亮度值命令发送
export function readSensorBrightnessvalue(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'readsensoroflight',
'sensorid': data.controlid,
},
})
}
//读取亮度传感器亮度值命令接收
export function receivereadSensorBrightnessvalue(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'readsensoroflight',
'commandid': data.commandid,
'sensorid': data.controlid,
},
})
}
//读取车流量传感器车流量值命令发送
export function readSensorTrafficvalue(data) {
return axios({
url: '/protocol/doSend.do',
method: 'POST',
params: {
'operation': 'readsensorofcar',
'sensorid': data.controlid,
},
})
}
//读取车流量传感器车流量值命令接收
export function receivereadSensorTrafficvalue(data) {
return axios({
url: '/protocol/doReceive.do',
method: 'POST',
params: {
'operation': 'readsensorofcar',
'commandid': data.commandid,
'sensorid': data.controlid,
},
})
}