Python syntax question from a Java developer... #127
kazetsukaimiko
started this conversation in
General
Replies: 1 comment 2 replies
-
Hi They are just characters that have an ascii representation of the hex number. > print(b'\x00\x75\x45')
b'\x00uE' likewise |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am a Java developer looking at the protocol documentation for the DALY BMS for a similar, multi-device integration project:
https://github.com/kazetsukaimiko/freedriver (where the daly library will live)
https://github.com/kazetsukaimiko/autonomy (the J2EE microservices that will use it)
I'm using your implementation as reference, and had a general python question. You have some test_responses in your daly.py protocol definitions:
I kinda sorta see hexadecimal/binary encoding here, but I the parts I'm having trouble understanding are:
\x00uE
\x00u
\x00uo
\n
\t
I'm trying to make an equivalent in Java to build tests off:
Would you mind helping me understand what's going on there? Your code is a great reference, and the first I've seen with examples for responses.
Beta Was this translation helpful? Give feedback.
All reactions