Refactor client into separate files

Add a main loop, move I/O code into io.go, move configuration into config.go.
Use shared.Decode24BitLength instead of manually decoding block lengths.
Fix response block decoding and checksum validation.
Add constants for commonly used byte values and use these in the signer and
the client.
This commit is contained in:
Jan Dittberner 2020-04-17 19:39:01 +02:00
parent 65855152ce
commit 42d1e6e991
8 changed files with 322 additions and 241 deletions

View file

@ -1,3 +1,7 @@
package shared
const MagicTrailer = "rie4Ech7"
const HandshakeByte = 0x02
const AckByte = 0x10
const NackByte = 0x11