/// <summary> /// mLMPsetscancfg_class: /// </summary> /// <param name="scancfg">select_user_level (ScanCfg type)</param> /// <returns></returns> public mLMPsetscancfg_class(ScanCfg scancfg) { string sTemp; ASCIIEncoding encoding = new ASCIIEncoding(); _type = CommandType.mLMPsetscancfg; _data = new mLMPsetscancfg(); _data.stx = 0x02; sTemp = "sMN "; _data.type = encoding.GetBytes(sTemp); sTemp = "mLMPsetscancfg "; _data.cmd = encoding.GetBytes(sTemp); _data.scan_frequency = FunctHelper.ConvertUintToHexByteArray(scancfg.scan_frequency); _data.sp1 = 0x20; _data.value = FunctHelper.ConvertShortToHexByteArray(1); _data.sp2 = 0x20; _data.angle_resolution = FunctHelper.ConvertUintToHexByteArray(scancfg.angle_resolution); _data.sp3 = 0x20; _data.start_angle = FunctHelper.ConvertIntToHexByteArray(scancfg.start_angle); _data.sp4 = 0x20; _data.stop_angle = FunctHelper.ConvertIntToHexByteArray(scancfg.stop_angle); _data.etx = 0x03; }