/// <summary> /// 单次测量 /// </summary> public void dist_once() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.user_dist_ctl); frame.id = (byte)(Protecl_typical_cmd.dist_ctl_id.dist_once); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 正常模式 /// </summary> public void sensor_mormalMode_switch() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.programer_ctl); frame.id = (byte)(Protecl_typical_cmd.programer_ack_id.sensor_normalMode_switch); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 固件升级命令 /// </summary> public void lk_download_start() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.system_boot_firmware_ctl); frame.id = (byte)(Protecl_typical_cmd.firmware_ctl_id.firmware_begin); frame.ifHeadOnly = true; //含有数据帧 frame.sendFrame(frame); }
/// <summary> /// 获取标定参数 /// </summary> public void qc_get_param() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.programer_ctl); frame.id = (byte)(Protecl_typical_cmd.programer_id.qc_get_param); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 复位第3档 /// </summary> public void qc_reset_third_parm() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.programer_ctl); frame.id = (byte)(Protecl_typical_cmd.programer_id.qc_standthird_reset); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 第2档切换 /// </summary> /// <param name="buf"></param> public void qc_second_switch() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.programer_ctl); frame.id = (byte)(Protecl_typical_cmd.programer_id.qc_standSecond_switch); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 获取传感器参数 /// </summary> public void sensor_get_param() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.usr_paramCfg_get); frame.id = (byte)(Protecl_typical_cmd.paramCfg_get_id.lk_all); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 复位,恢复出厂设置 /// </summary> public void sensor_reset() { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.system_boot_param); frame.id = (byte)(Protecl_typical_cmd.usr_boot_ctl_id.usr_reset); frame.ifHeadOnly = true; frame.sendFrame(frame); }
/// <summary> /// 包发送命令 /// </summary> /// <param name="buf">数据</param> /// <param name="packge_cnt">发送包id</param> public void lk_firmware_send(byte[] buf, byte packge_cnt) { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.system_boot_firmware_pakage); frame.id = packge_cnt; frame.ifHeadOnly = false; //含有数据帧 frame.dataBuf = buf; frame.len = (UInt16)buf.Length; //数据帧字节长度 frame.sendFrame(frame); }
/// <summary> /// 保存第一档标定参数 /// </summary> /// <param name="buf">数据</param> public void qc_save_first_param(byte[] buf) { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.programer_ctl); frame.ifHeadOnly = false; //含有数据帧 frame.id = (byte)(Protecl_typical_cmd.programer_id.qc_standFirst_save); //校准参数 frame.dataBuf = buf; //数据帧缓存 frame.len = (UInt16)buf.Length; //数据帧字节长度 frame.sendFrame(frame); }
/// <summary> /// 开关量下限 /// </summary> /// <param name="buf"></param> public void sensor_set_switch_base(byte[] buf) { tinyFrame frame = new tinyFrame(); frame.Type = (byte)(Protecl_typical_cmd.ctl_type.user_paramCfg_set); frame.ifHeadOnly = false; //含有数据帧 frame.id = (byte)(Protecl_typical_cmd.paramCfg_set_id.backSwich); frame.dataBuf = buf; //数据帧缓存 frame.len = (UInt16)buf.Length; //数据帧字节长度 frame.sendFrame(frame); }