Ejemplo n.º 1
0
        public bool Connect(int Port, int Baudrate, int Retries)
        {
            //נסיון לפתיחת החיבור עם הדיסטומט
            short to = 1000;

            hv_COM_End();
            nLastResponse = hv_COM_Init();
            hv_COM_SetTimeOut(out to);
            COM_PORT ePort = (COM_PORT)(Port - 1);

            nLastResponse = hv_COM_OpenConnection(ePort, (COM_BAUD_RATE.COM_BAUD_115200), (short)Retries);

            IsConnected = (nLastResponse == 0);
            return(IsConnected);
        }
 public static extern short hv_COM_OpenConnection(COM_PORT ePort, COM_BAUD_RATE eBaudRate, short nRetries);