Skip to content
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

Display #2

Open
cdupont opened this issue Mar 16, 2021 · 1 comment
Open

Display #2

cdupont opened this issue Mar 16, 2021 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

How to display the buffer sent by XLPP? Could you give an example? Thanks

@cdupont cdupont added the documentation Improvements or additions to documentation label Mar 16, 2021
@j-forster
Copy link
Member

XLPP buffers are binary, so you can display them using Base64.

If you are interested in parsing the binary XLPP buffer, you can use the xlpp binary like this:

# Encoding Binary
xlpp -e -f bin '{"string1":"hello:)"}' > pl1.xlpp
xlpp -e -f bin '{"temperature0":23.5}' >> pl1.xlpp

# Decoding Binary
xlpp -d -f bin < pl1.xlpp
# {"string1":"hello:)","temperature0":23.5}

As the encoding is straight forward, you can interpret the raw binary fairly well, e.g. after using xxd.

To parse the XLPP buffer in Arduino / C, use this example:
https://github.com/Waziup/arduino-xlpp/blob/main/test/simple/main.cpp#L421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants