Пример #1
0
 public PacketFormatEventArg(PacketFormatEnum value)
 {
     this.value = value;
 }
Пример #2
0
 private void OnPacketFormatChanged(PacketFormatEnum value)
 {
     if (this.PacketFormatChanged == null)
     return;
       this.PacketFormatChanged((object) this, new PacketFormatEventArg(value));
 }
Пример #3
0
 public PacketFormatEventArg(PacketFormatEnum value)
 {
     this.value = value;
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
		private void OnPacketFormatChanged(PacketFormatEnum value)
		{
			if (PacketFormatChanged != null)
				PacketFormatChanged(this, new PacketFormatEventArg(value));
		}
Пример #6
0
		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);
			}
		}