Hey everyone,

I've been recently working on getting a SNAP up and running and have been digging into the guts into how all these parts fit together. As I try to avoid python like the plague, I thought it would useful to start to write some of the functionality in Rust.

I followed the official SARAO spec and have published a pure-rust implementation here: https://github.com/kiranshila/katcp

This library could be used in clients and servers, even microcontrollers (which I believe currently isn't possible). This also leaves any runtime decisions (like which async engine to use) up to eventual implementers.

Now, I'm trying to design a client to configure my SNAP - but am discovering that tcpborphserver doesn't actually match the prescribed behavior. Specifically, the fact that `read` and `write` work with raw bytes violates the condition that "the contents of the parameter should be restricted to plain ASCII text". This means that *any* strict implementation of the katcp spec (including my own) are unable to use those commands.

Updating these commands to send escaped bytes doesn't seem too tricky, but would be a breaking change. In fact, these commands could match the behavior of `wordread/wordwrite` and send the bytes as hex literals (although those technically violate the spec as well as hex literals aren't one of the valid types).

This change would enable spec-compliant implementers to utilize the commands without building in technically invalid behavior, which in turn would lead to more robust implementations.

Regards,
Kiran

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/daf30b42-6547-ee93-4922-76f0ae36cfe0%40kiranshila.com.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to