question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NmeaFileDevice does not stop when EOF

See original GitHub issue

Thank you for this component.

While using the following syntax to read out a text file content, after it reaches end of file it starts again from beginning. How do we stop once its EOF?

  var device = new NmeaFileDevice(filename, 1000);
  device.MessageReceived += Device_MessageReceived;
            
  Console.WriteLine($"\nOpening file {filename} and sending NMEA strings");
  await device.OpenAsync();

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dotMortencommented, Jul 17, 2020

Yeah perhaps just raise an event here, and check if the stream is still open after the event. That allows you to just cancel out in the eventhandler

1reaction
dotMortencommented, Jul 16, 2020

This is actually by design since it’s meant for simulation (real datasources doesn’t suddenly stop). I’d consider adding a property for stopping at the end, or at least an event that you can subscribe to and stop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stop on newline when using read(...) - linux
I need to read the NMEA sentences from a GPS connected through UART. The OS is Debian, and the language must be C++....
Read more >
Failed to open · Issue #48 · ttlappalainen/NMEA2000
I would like to understand the NMEA data flow. It seems that a 59904 PGN needs to be sent every so often just...
Read more >
Why “sudo cat /dev/ttyACM0” run only 1 time? (GPS)
I do not know why sudo cat /dev/ttyACM0 only 1 time. I have the U-blox EVK-M8T which can read the NMEA messages through...
Read more >
NTP PPS - Page 3 - Raspberry Pi Forums
Hi, this x86 box looks very much like it is using the shared mem driver not the kernel disciplined PPS. GPSD is taking...
Read more >
GPS for your Nook? - XDA Forums - XDA Developers
It may be trying to set the time constantly. If I delete gps.default.so it stops. But, in any case, the clock is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found