Skip to content

Comments

Parse OSC v1.1 booleans#4

Open
ja-cop wants to merge 1 commit intojbclements:masterfrom
ja-cop:parse-booleans
Open

Parse OSC v1.1 booleans#4
ja-cop wants to merge 1 commit intojbclements:masterfrom
ja-cop:parse-booleans

Conversation

@ja-cop
Copy link

@ja-cop ja-cop commented Mar 9, 2022

Parses T and F argument types, to Racket values #t and #f respectively. T and F are already emitted by osc-element->bytes when given booleans, but without this patch, bytes->osc-element will throw unimplemented type char: 84 (for T) and unimplemented type char: 70 (for F) when given an OSC message containing booleans.

Did I handle the offset parameter correctly? The spec says "No bytes are allocated in the argument data" for these types. It seems to work correctly - I also tested putting booleans in a bundle, and that seemed to parse correctly too.

For the tests, I tried to align the address and message sizes to 4 bytes, and they pass, but I'm also not super confident I padded it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant