Closed veggiemike closed 10 months ago
Hi Mike - this looks great, thank you!
I'll dive into reviewing shortly, but may I ask that you refile the pull request to pull it into the OpenRVDAS dev branch? I try to aggregate changes there, then push everything out from dev-> master at once.
On Tue, Oct 17, 2023 at 12:56 PM Michael D Labriola < @.***> wrote:
Ahoy! I ran into a couple issues this last cruise aboard the E/V Nautilus and decided to get my hands dirty and fix them. My primary issue was that we couldn't read raw binary data with a NetworkReader and then send it unmodified to a couple different systems using UDPWriter instances. NetworkReader handles raw/binary data fine by setting encoding=None, but UDPWriter was blindly encoding it into UTF-8, which obviously garbles it all up.
I tried to keep this branch focused on just this issue, but couldn't help but fix a couple other problems I bumped into along the way. I actually have a whole 2nd branch full of SerialWriter, NetworkWriter, and testsuite fixes to send along after this, but figured I'd start small(ish). We're planning on using OpenRVDAS more and more on the Nautilus, so I'm going to keep on find-and-fixing while I'm out here.
All the tests that passed before still pass (there are some SerialWriter errors already present that I've got fixed in my next branch).
You can view, comment on, or merge this pull request online at:
https://github.com/OceanDataTools/openrvdas/pull/345 Commit Summary
- b48e4d7 https://github.com/OceanDataTools/openrvdas/pull/345/commits/b48e4d799ae3ff9534aaaa4068b42fe7c70972b7 UDPWriter: fix send() error handling
- 5d599ac https://github.com/OceanDataTools/openrvdas/pull/345/commits/5d599ac9394ed5d7f668948cfcae12b4709adcf1 UDPWriter: fix retry loop counting
- f598b19 https://github.com/OceanDataTools/openrvdas/pull/345/commits/f598b198fbb3e75ced5b6b9d20ae2adcad54b05d UDPWriter: allow hostname resolution
- a8713f0 https://github.com/OceanDataTools/openrvdas/pull/345/commits/a8713f02df202bac8e22e6da9000c4d7306a927f UDPWriter: don't convert records to JSON
- f5b1e56 https://github.com/OceanDataTools/openrvdas/pull/345/commits/f5b1e560eee79cee16083ad613b05dc098bf45c0 UDPWriter: just derive from Writer
- 614dc43 https://github.com/OceanDataTools/openrvdas/pull/345/commits/614dc43ff9fc0a2d6f156251596e73c45440e500 Writer: add common encode/decode code like we do in Reader
- ad9fde4 https://github.com/OceanDataTools/openrvdas/pull/345/commits/ad9fde4f408c7bebe2d1b74f3d1624978e93dcdb UDPWriter: add
encoding
parameter to allow for raw/binary output- 121b50c https://github.com/OceanDataTools/openrvdas/pull/345/commits/121b50c53e1e05316752f09c830592ad3edc5b82 UDPWriter: make sure
port
is an int- 1947b41 https://github.com/OceanDataTools/openrvdas/pull/345/commits/1947b4158e1f1aff73e0930d916ce2dc5462f88a UDPWriter: unescape
eol
parameter- df024c2 https://github.com/OceanDataTools/openrvdas/pull/345/commits/df024c2cef42f4638613beec6a10986162805f8b UDPWriter: added
mc_interface
and changedttl
tomc_ttl
- c80464e https://github.com/OceanDataTools/openrvdas/pull/345/commits/c80464ec6cedc2110f37b7d5ffe03ed144375ff1 Writers: added test_udp_writer
File Changes
(3 files https://github.com/OceanDataTools/openrvdas/pull/345/files)
- A logger/writers/test_udp_writer.py https://github.com/OceanDataTools/openrvdas/pull/345/files#diff-ca407d094751569270d85a3b7ec5a3447230abf0d0ddafe6e0aa2e1b593f1871 (217)
- M logger/writers/udp_writer.py https://github.com/OceanDataTools/openrvdas/pull/345/files#diff-071c0b4c9f70aff30009fe77630f5e58015476fd175fb05e80ae78e63deb3362 (127)
- M logger/writers/writer.py https://github.com/OceanDataTools/openrvdas/pull/345/files#diff-9c527ba7ffddbaa48c5e4ffd711c532d5b1cc98dbca6525b5958d9f93a9783e9 (63)
Patch Links:
- https://github.com/OceanDataTools/openrvdas/pull/345.patch
- https://github.com/OceanDataTools/openrvdas/pull/345.diff
— Reply to this email directly, view it on GitHub https://github.com/OceanDataTools/openrvdas/pull/345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7V3VWSRQIU4ENM3QDCZTX73PHXAVCNFSM6AAAAAA6EMJBXSVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2DQMJUHA2DSNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
No problem, Pablo! I've changed the pull target to OceanDataTools:dev. Thanks!
Excellent - Thanks! Getting right on this. (And yeah, the feature/bug fix makes perfect sense - thank you for diving in on that!)
On Tue, Oct 17, 2023 at 1:34 PM Michael D Labriola @.***> wrote:
No problem, Pablo! I've changed the pull target to OceanDataTools:dev. Thanks!
— Reply to this email directly, view it on GitHub https://github.com/OceanDataTools/openrvdas/pull/345#issuecomment-1767129106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7V3XV44RH5UFV7IDYKMDX73TWFAVCNFSM6AAAAAA6EMJBXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXGEZDSMJQGY . You are receiving this because you commented.Message ID: @.***>
Thanks, Pablo!
Ahoy! I ran into a couple issues this last cruise aboard the E/V Nautilus and decided to get my hands dirty and fix them. My primary issue was that we couldn't read raw binary data with a
NetworkReader
and then send it unmodified to a couple different systems usingUDPWriter
instances.NetworkReader
handles raw/binary data fine by settingencoding=None
, butUDPWriter
was blindly encoding it into UTF-8, which obviously garbles it all up.I tried to keep this branch focused on just this issue, but couldn't help but fix a couple other problems I bumped into along the way. I actually have a whole 2nd branch full of
SerialWriter
,NetworkWriter
, and testsuite fixes to send along after this, but figured I'd start small(ish). We're planning on using OpenRVDAS more and more on the Nautilus, so I'm going to keep on find-and-fixing while I'm out here.All the tests that passed before still pass (there are some
SerialWriter
errors already present that I've got fixed in my next branch).