Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

C# VS 2005 Express Stream in Echtzeit auslesen

Empfohlene Antworten

Veröffentlicht

Hallo,

ich hab folgendes Problem, ich habe ein BarcodeReader, der normalerweise ueber RS232 angesprochen wird, mithilfe eines 1-port RS232 zu Ethernet Geraete Server in ein Ethernet integriert.

Ich will nun in Echtzeit die Werte die mir der BarcodeReader (sendet ununterbrochen) sendet abgreifen.

Aber ich hab das Problem das ich mit diesem Code:

stream = new NetworkStream(socket);

stream.ReadTimeout = 1000;

int rRead = 0;

string strRead = "";

byte[] rBuff = new byte[5000];

try

{

while(strRead.Length < 1000)

{

rRead = stream.Read(rBuff, 0, rBuff.Length);

strRead += Encoding.ASCII.GetString(rBuff, 0, rRead);

}

System.Threading.Thread.Sleep(1000);

return strRead;

}

catch(Exception ex)

{

Console.WriteLine(ex.Message);

return "TimeOutError";

}

immer alte Werte und nicht die aktuell gesendeten bekomme.

Gibt es eine Methode die das macht?

Bei einem SerialPort geht es ja auch.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.