大空间消毒机
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.
 
 
 
 
 

115 lines
2.2 KiB

// 登陆
export const loginJSON = (userid, passwd) => {
return {
command: 'login',
messageId: 'login',
userid,
passwd,
}
}
// 退出登陆
export const logoutJSON = {
command: 'unlogin',
messageId: 'unlogin',
}
// 改密码
export const chpasswdJSON = (userId, passwd) => {
return {
command: 'chpasswd',
messageId: 'chpasswd',
userId,
passwd,
}
}
// 关机
export const shutdownJSON = {
command: 'shutdown',
messageId: 'shutdown',
delayms: 60 * 5,
}
// 开始消毒
export const startDisinfectionJSON = (loglevel, roomVolume) => {
return {
command: 'startDisinfection',
messageId: 'startDisinfection',
loglevel,
roomVolume,
}
}
// 停止消毒
export const stopDisinfectionJSON = {
command: 'stopDisinfection',
messageId: 'stopDisinfection',
}
// 获取当前设备的状态信息
export const getStateJSON = {
command: 'getState',
messageId: 'getState',
}
export const getAllUserJSON = {
command: 'getAllUser',
messageId: 'getAllUser',
}
export const getAllSettingJSON = {
command: 'getAllSetting',
messageId: 'getAllSetting',
}
export const getAllRecords = disinfection_id => {
return {
command: 'getAllRecords',
messageId: 'getAllRecords',
disinfection_id,
}
}
export const setSettingValJSON = (settingName, settingVal) => {
return {
command: 'setSettingVal',
messageId: 'setSettingVal',
settingName,
settingVal,
}
}
// RealtimeSensorDataReport
// 实时传感器信息上报
// 控制加液体泵转动 1 控制喷液体泵转动 2
export const liquidpumpctrlJSON = (num, speed) => {
return {
command: 'exceCanCmd',
cancmd: `pumpctrl_c1004 ${num} 300 ${speed}`, // 1 泵编号 300 是加速度, 1000是转速
}
}
// 空压机
export const someAirSwitchJSON = (num, flag) => {
return {
command: 'exceCanCmd',
cancmd: `writeio ${num} ${flag}`,
}
}
export const startReplenishingFluidsJSON = {
command: 'startReplenishingFluids',
messageId: 'startReplenishingFluids',
}
export const stopReplenishingFluidsJSON = {
command: 'stopReplenishingFluids',
messageId: 'stopReplenishingFluids',
}
export const startDrainingJSON = {
command: 'startDraining',
messageId: 'startDraining',
}