-
-
Notifications
You must be signed in to change notification settings - Fork 110
Adds TCP broker supporting zero-delimited frames #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
473069f
to
b2969e2
Compare
Changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well done, I just left a couple of minor comments. Ideally we should probably distribute it as a separate Python package since it doesn't use anything from PyCyphal, but I don't have the bandwidth to arrange it now, and I'm not sure if you do, so we can just leave it as-is for now.
Please also bump the patch version.
Thanks!
pycyphal/util/_broker.py
Outdated
This broker is similar in functionality to :code:`ncat --broker`, but observes | ||
reads the whole frame before passing it on to other clients. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
This broker is similar in functionality to :code:`ncat --broker`, but observes | |
reads the whole frame before passing it on to other clients. | |
This broker is similar in functionality to :code:`ncat --broker`, but | |
reads the whole frame before passing it on to other clients. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoopsie. Yes, thank you.
Done: Rephrased.
setup.cfg
Outdated
@@ -36,6 +36,10 @@ classifiers = | |||
Operating System :: OS Independent | |||
Typing :: Typed | |||
|
|||
[options.entry_points] | |||
console_scripts = | |||
cyphal-broker = pycyphal.util._broker:main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please call it cyphal-serial-broker
? Just cyphal-broker
is misleading because it means a completely different thing.
That, or we could just call it bro
. It's Latvian for "one who beheads the messiah".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please call it
cyphal-serial-broker
?
Done.
Just
cyphal-broker
is misleading because it means a completely different thing.
Good to know that this exists. I'll have to give it a spin sometime.
That, or we could just call it
bro
. It's Latvian for "one who beheads the messiah".
ngl: you had me in the first half 😄 (I didn't watch the show)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know that this exists. I'll have to give it a spin sometime.
This was an experiment, not something made for use in production, so keep that in mind.
Also, if you could share anything about your use of Cyphal at Neosat, that would be very much welcome on the forum ;) |
This commits adds an implementation of a TCP-broker that observes the zero-byte frame delimiter of COBS-encoded Cyphal/Serial frames. This commit addresses OpenCyphal#300 Signed-off-by: Hannes Weisbach <[email protected]> Signed-off-by: Hannes Weisbach <[email protected]>
Would you want to keep it under the umbrella of OpenCyphal?
Done + rebased against current master.
I'll ask what I can share. |
Either way is fine with me. We can host it under OpenCyphal unless you prefer to maintain it separately. |
Thanks for merging it so quick! I'd actually prefer the OpenCyphal umbrella; I wrote it specifically to broker Cyphal frames, so this is where it belongs :) |
This commits adds an implementation of a TCP-broker that observes the zero-byte frame delimiter of COBS-encoded Cyphal/Serial frames.
This commit addresses #300
I randomly stumbled upon #300 by accident. We at Neosat have a simple broker that does observe zero-delimited framing.
I cleaned it up a bit, added comments, etc.
I'm open to comments/change requests.
Open questions:
I'm not exactly sure where to put the file in the source tree.
How much/what tests would you require?
Edit: I forgot to bump the version number 😬 Would that be a minor or patch bump?