-
Hi,
I'm seeing the verbose logging from within the GNSSNTRIPClient to indicate various message types are being received from the NTRIP server, however rtr.read() doesn't seem to be reading anything. When I strip out the RTCMReader and just try to read the ntrip_rtcm_stream it doesn't return any bytes either. If I replace the BytesIO stream with an actual file, it does have RTCM data written to it. Any ideas why the in-memory stream isn't working for me? Thanks, Dean |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dgashby, Couple of issues with the code...
from io import BytesIO
b = BytesIO(b"1234")
print(b.getvalue()) # outputs b'1234'
print(b.read(2)) # outputs b'12'
print(b.read(2)) # outputs b'34'
print(b.read()) # outputs b''
b.write(b"5678")
print(b.getvalue()) # outputs b'12345678'
print(b.read()) # still outputs b''
For a more flexible approach, I recommend you take a look at the ntrip_client_generic.py example in the \examples folder. You can substitute the simple Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @dgashby,
Couple of issues with the code...
BytesIO
can be used in quite this way e.g. consider the following:output
argument supports the following specific writeable output media classes (intended to cover the most common use cases):