public DeviceConnection(Device device)
        {
            this.device  = device;
            deviceCalls  = DeviceCalls.getInstance();
            ws2Functions = Ws2Functions.getInstance();

            portConnections = new Dictionary <short, PortConnection>();
        }
Exemple #2
0
        public PortConnection(short port, Device device)
        {
            this.port   = port;
            this.device = device;

            deviceCalls  = DeviceCalls.getInstance();
            ws2Functions = Ws2Functions.getInstance();

            activeSockets        = new List <Socket>();
            autoResetEventSocket = new AutoResetEvent(false);
        }
 public void startListening()
 {
     lock (syncRoot)
     {
         if (isrunning)
         {
             return;
         }
         else
         {
             deviceCalls      = DeviceCalls.getInstance();
             connectedDevices = new List <Device>();
             subscribe();
             isrunning = true;
         }
     }
 }