/// <summary> /// 开关灯 /// </summary> /// <param name="classroom"></param> /// <param name="nodeAdd"></param> /// <param name="onoff"></param> /// <returns></returns> public void SetLamp(string classroom, string nodeAdd, string onoff) { byte fun = (byte)Convert.ToInt32(AppSettingUtils.GetValue("Lamp")); byte b; // byte fun = 0x01; b = (byte)(onoff == StateType.OPEN ? 0x01 : 0x00); PortService.SendConvertCmd(fun, classroom, nodeAdd, b); }