Start() public method

public Start ( ) : void
return void
        public static void StartActivity()
        {
            // Bacnet on UDP/IP/Ethernet
            bacnet_client = new BacnetClient(new BacnetIpUdpProtocolTransport(0xBAC0, false), 3000, 3);
            // or Bacnet Mstp on COM4 à 38400 bps, own master id 8
            // m_bacnet_client = new BacnetClient(new BacnetMstpProtocolTransport("COM4", 38400, 8);
            // Or Bacnet Ethernet
            // bacnet_client = new BacnetClient(new BacnetEthernetProtocolTransport("Connexion au réseau local"));

            bacnet_client.Start();    // go

            // Send WhoIs in order to get back all the Iam responses :
            bacnet_client.OnIam += new BacnetClient.IamHandler(handler_OnIam);

            bacnet_client.WhoIs();
        }
Esempio n. 2
0
        private Task StartInternalAsync()
        {
            if (!Initialized)
            {
                _starTaskCompletionSource = new TaskCompletionSource<bool>();
                _bacnetClient = new BacnetClient(new BacnetMstpProtocolTransport(PortName, Baudrate, SourceAddress));

                _bacnetClient.Start(); // go

                // Send WhoIs in order to get back all the Iam responses :  
                _bacnetClient.OnIam += OnIam;
                _bacnetClient.WhoIs();
                Logger.Debug($"StartAsync(): Bacnet Client started / WhoIs sent. Waiting for IAm");
            }
            return _starTaskCompletionSource.Task;
        }