|
|
// 登陆
export const loginJSON = (userid, passwd) => { return { command: 'login', messageId: 'login', userid, passwd, } }
// 退出登陆
export const logoutJSON = { command: 'unlogin', messageId: 'unlogin', }
// 改密码
export const chpasswdJSON = (userId, newpasswd, passwd) => { return { command: 'chpasswd', messageId: 'chpasswd', userId, newpasswd, passwd, } }
// 关机
export const shutdownJSON = { command: 'shutdown', messageId: 'shutdown', delayms: 1000 * 5, }
// 开始消毒
export const startDisinfectionJSON = (loglevel, roomVolume) => { return { command: 'startDisinfection', messageId: 'startDisinfection', loglevel, roomVolume, } }
export const continueDisinfectionJSON = { command: 'continueDisinfection', messageId: 'continueDisinfection', }
// 停止消毒
export const stopDisinfectionJSON = { command: 'stopDisinfection', messageId: 'stopDisinfection', }
export const pauseDisinfectionJSON = { command: 'pauseDisinfection', messageId: 'pauseDisinfection', }
// 获取当前设备的状态信息
export const getStateJSON = { command: 'getState', messageId: 'getState', }
export const getAllUserJSON = { command: 'getAllUser', messageId: 'getAllUser', }
export const getAllSettingJSON = { command: 'getAllSetting', messageId: 'getAllSetting', }
export const getAllRecordsJSON = 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 = stopAt => { return { command: 'startReplenishingFluids', messageId: 'startReplenishingFluids', stopAt, } }
export const stopReplenishingFluidsJSON = { command: 'stopReplenishingFluids', messageId: 'stopReplenishingFluids', }
export const startDrainingJSON = { command: 'startDraining', messageId: 'startDraining', }
export const stopDrainingJSON = { command: 'stopDraining', messageId: 'stopDraining', }
export const addLiquidCtrlJSON = (num, speed, power) => { return { command: 'exceCanCmd', cancmd: `pumpctrl_c1004 ${num} 300 ${speed} 1 ${power}`, } }
export const test_replenishingFluidsPumpCtrJSON = (ctrl, speed) => { return { command: 'test_replenishingFluidsPumpCtrl', messageId: 'test_replenishingFluidsPumpCtrl', ctrl, speed, } }
export const sprayLiquidPump_open_for_testJSON = (ctrl, speed) => { return { command: 'test_sprayLiquidPumpCtrl', messageId: 'test_sprayLiquidPumpCtrl', ctrl, speed, } }
export const updateDateJSON = (year, month, day) => { return { command: 'updateDate', messageId: 'updateDate', year, month, day, } }
export const updateTimeJSON = (hour, min, second) => { return { command: 'updateTime', messageId: 'updateTime', hour, min, second, } }
export const changeDisinfectionParameterJSON = data => { return { command: 'changeDisinfectionParameter', messageId: 'changeDisinfectionParameter', ...data, } }
export const addUserJson = (uid, passwd) => { return { command: 'addUser', messageId: 'addUser', uid, passwd, permission_level: 3, } }
export const delUserJSON = id => { return { command: 'delUser', messageId: 'delUser', id, } }
export const updateUserPermissionLevelJSON = id => { return { command: 'updateUserPermissionLevel', messageId: 'updateUserPermissionLevel', id, permission_level: 0, } }
export const exportUserBehaviorRecordJSON = { command: 'exportUserBehaviorRecord', messageId: 'exportUserBehaviorRecord', }
export const exportDisinfectionRecordJSON = { command: 'exportDisinfectionRecord', messageId: 'exportDisinfectionRecord', }
export const cleanDisinfectionRecordJSON = { command: 'cleanDisinfectionRecord', messageId: 'cleanDisinfectionRecord', }
export const cleanUserBehaviorRecordJSON = { command: 'cleanUserBehaviorRecord', messageId: 'cleanUserBehaviorRecord', }
export const getUserBehaviorRecordDescJSON = (page, page_size) => { return { command: 'getUserBehaviorRecordDescJson', page, page_size, messageId: 'getUserBehaviorRecordDescJson', } }
|