public PacketFormatEventArg(PacketFormatEnum value) { this.value = value; }
private void OnPacketFormatChanged(PacketFormatEnum value) { if (this.PacketFormatChanged == null) return; this.PacketFormatChanged((object) this, new PacketFormatEventArg(value)); }
public void SetPacketFormat(PacketFormatEnum value) { try { lock (syncThread) registers["RegPacketConfig1"].Value = (uint)(byte)((int)(byte)((uint)(byte)registers["RegPacketConfig1"].Value & (uint)sbyte.MaxValue) | (value == PacketFormatEnum.Variable ? 128 : 0)); } catch (Exception ex) { OnError((byte)1, ex.Message); } }
private void OnPacketFormatChanged(PacketFormatEnum value) { if (PacketFormatChanged != null) PacketFormatChanged(this, new PacketFormatEventArg(value)); }
public void SetPacketFormat(PacketFormatEnum value) { try { lock (syncThread) m_registers["RegPacketConfig1"].Value = (m_registers["RegPacketConfig1"].Value & 0x7F) | (uint)(value == PacketFormatEnum.Variable ? 0x80 : 0); } catch (Exception exception) { OnError(1, exception.Message); } }