Example #1
0
        public static BACnetHelper GetInstance()
        {
            if (instance == null)
            {
                instance = new BACnetHelper();
            }

            return(instance);
        }
Example #2
0
 private void SendBridge_Click(object sender, EventArgs e)
 {
     byte[] payload = LogHelper.Payload(textToPayload.Text.ToCharArray());
     LogHelper.Log(bridges[comboBoxBridge.SelectedIndex] + " send  [" + LogHelper.Logdata(payload, 0, payload.Length) + "]");
     // PrinterHelper.SetTextData(textToPayload.Text);
     PrinterHelper.PrintPage(textToPayload.Text);
     if (bridges[comboBoxBridge.SelectedIndex] == "SerialPort")
     {
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "TcpServer")
     {
         TcpServerHelper.Write(payload, 0, payload.Length);
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "Barcode_Printer")
     {
         TcpServerHelper.Write(payload, 0, payload.Length);
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "PLC")
     {
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "OPCUA")
     {
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "BACnet")
     {
         BACnetHelper.Write(payload, 0, payload.Length);
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "Control")
     {
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "Access")
     {
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "SqlServer")
     {
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "MqttClient")
     {
         MqttClientHelper.Write(payload, 0, payload.Length);
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "MqttServer")
     {
         MqttServerHelper.Write(payload, 0, payload.Length);
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "TcpClient")
     {
         TcpClientHelper.Write(payload, 0, payload.Length);
     }
     else if (bridges[comboBoxBridge.SelectedIndex] == "UdpClient")
     {
     }
     else
     {
     }
 }
Example #3
0
 private void ButtonScan_Click(object sender, EventArgs e)
 {
     OPCDAHelper.Start();
     BACnetHelper.Start();
     SerialPortHelper.Start();
 }