Esempio n. 1
0
 public byte[] BuildWriteByte(byte station, string address, byte[] value)
 {
     try
     {
         DemoUtils.WriteResultRender(fastEnet.Write(address, value), address);
     }
     catch (Exception ex)
     {
         EventscadaException?.Invoke(this.GetType().Name, ex.Message);
     }
     return(new byte[0]);
 }
Esempio n. 2
0
 private void button23_Click(object sender, EventArgs e)
 {
     // byte写入
     try
     {
         DemoUtils.WriteResultRender(fastEnet.Write(textBox8.Text, byte.Parse(textBox7.Text)), textBox8.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 3
0
        public bool Write(string address, dynamic value)
        {
            if (value is bool)
            {
                fastEnet.WriteCoil(address, value);
            }
            else
            {
                fastEnet.Write(address, value);
            }



            return(true);
        }