Exemplo n.º 1
0
 static void Main(string[] args)
 {
     //INICIALIZE DLL FILE
     //RECIEVE INFORMATION FROM DLL FILE
     AirSensorNodeDll.AirSensorNodeDll dll = new AirSensorNodeDll.AirSensorNodeDll();
     dll.Initialize(serviceHandler, 1000);
 }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     mClient = new MqttClient("127.0.0.1");
     mClient.Connect(Guid.NewGuid().ToString());
     if (!mClient.IsConnected)
     {
         Console.WriteLine("Error connecting to message broker...");
         return;
     }
     else
     {
         AirSensorNodeDll.AirSensorNodeDll dll = new AirSensorNodeDll.AirSensorNodeDll();
         dll.Initialize(GenerataSensorData, 2500);
     }
 }
        public Boolean Init(int delay, IPAddress ip)
        {
            mClient = new MqttClient(ip.ToString());

            mClient.Connect(Guid.NewGuid().ToString());

            if (!mClient.IsConnected)
            {
                Debug.WriteLine("Error connecting to message broker...");
                return(false);
            }

            if (dll == null)
            {
                dll = new AirSensorNodeDll.AirSensorNodeDll();
                dll.Initialize(TransformData, delay);
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
 public Form1()
 {
     Connect();
     dll.Initialize(dllStarted, 1000);
 }