Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
M0r13n committed Sep 21, 2024
1 parent 5069f17 commit 2134e56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

filename = pathlib.Path(__file__).parent.joinpath('sample.ais')

# To track NMEA 4.10 tag block groups a queue is required.
# This queue buffers NMEA sentences belonging until the group is complete.
# NOTE: get_nowait will return NMEA sentences - NOT AIS sentences!
tbq = TagBlockQueue()

with FileReaderStream(str(filename), tbq=TagBlockQueue()) as stream:
tbq = stream.tbq

with FileReaderStream(str(filename), tbq=tbq) as stream:
for msg in stream:
try:
while not tbq.empty():
print(tbq.get_nowait())
except queue.Empty:
pass

0 comments on commit 2134e56

Please sign in to comment.