-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
hexarray & hexdump #12241
hexarray & hexdump #12241
Conversation
(cherry picked from commit 8f01c760d7e9af50b5e1fb8acd54fd197800c9e5)
namespace string { | ||
|
||
|
||
/*static*/ std::string hexarray::to_string( bytes const & bytearray ) |
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.
what about this "static" ? should be commented out or not ?
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.
I put these there on purpose, since it's not always clear that you're looking at a static function member body. I find it helps me understand where I am.
} | ||
|
||
|
||
/*static*/ std::ostream & hexarray::to_stream( std::ostream & os, bytes const & bytearray ) |
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.
same as above
JSON byte-arrays get passed as an array of bytes:
This implements a
hexarray
object that can be used to communicate byte-arrays in a standard way ("0102abcd"
). Compatible with regular JSON array-of-bytes representation ([1,2,3]
) (with type/range checks). With unit-tests. Added docs.Tracked on [LRS-899]