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.
 
 
 
 

97 lines
2.4 KiB

import {send_uart} from '@/common/blue_request.js';
//控制命令回复处理
export function receivecommand(result,data) {
if((result.id == data.id) && ((parseInt(result.cc,16)&(1<<6)) == 0))
{
return true
}
else{
return false
}
}
//设置无线模块频段命令发送
export function setwirelessspectrum(data) {
return send_uart(data.id,'04','5a52',3,data.msg)
}
//读取灯杆状态命令发送
export function sendReadlampstatus(data) {
return send_uart(data.id,'01','cf01',0,'')
}
//灯杆调光命令发送
export function sendLampdimmer(data) {
return send_uart(data.id,'04','c125',data.len,data.msg)
}
//灯杆调光恢复自动命令发送
export function sendResumeLampdimmer(data) {
return send_uart(data.id,'04','c103',data.len,data.msg)
}
//设备时间表设置命令发送
export function setDeviceTimetable(data) {
return send_uart(data.id,'04','c011',30,data.msg)
}
//设备时间表读取命令发送
export function readDeviceTimetable(data) {
return send_uart(data.id,'01','c011',0,'')
}
//设备场景设置命令发送
export function setDeviceScenetable(data) {
return send_uart(data.id,'04','c012',24,data.msg)
}
//设备场景读取命令发送
export function readDeviceScenetable(data) {
return send_uart(data.id,'01','c012',0,'')
}
//读取设备版本号命令发送
export function readDeviceVersion(data) {
return send_uart(data.id,'01','c00e',0,'')
}
//广播校时命令发送
export function sendBroadcasttiming(data) {
return send_uart('999999999999','08','',6,data.msg)
}
//组调光命令发送
export function sendLampzonedimmer(data) {
return send_uart(data.id,'04','c125',data.len,data.msg)
}
//全网调光命令发送
export function sendLampAlldimmer(data) {
return send_uart('999999999999','04','c125',data.len,data.msg)
}
//组时间表设置命令发送
export function setGroupTimetable(data) {
return send_uart(data.id,'04','c011',30,data.msg)
}
//全网调光命令发送
export function setAllTimetable(data) {
return send_uart('999999999999','04','c011',30,data.msg)
}
//设备升级命令发送
export function sendDeviceUpgrade(data){
return send_uart(data.id,'0f',data.number,data.len,data.msg)
}
//设备启动升级命令发送
export function sendStartUpgtade(data){
return send_uart(data.id,'04','b200',8,data.msg)
}
//读取设备版本命令发送
export function sendReadDevicestatus(data) {
return send_uart(data.id,'01','c00e',0,'')
}