Hi! I have the following situation:
# Service type
test.TypeA
uint8 cmd_code
---
uint8 resp_code
# Proper to add void4 here?
TypeB Payload
# Nested type
test.TypeB
# Adding void here is not allowed, compile error, hence the union
@union
uint8 x
TypeC foo
TypeC bar
uint8 y
# Nested type
test.TypeC
@union
uint8 xx
float32 yy
int32 zz
TypeC will create a 2bit tag and needs outer void6 to be aligned.
Question1:
How do I align the data properly, hence I cannot add void into a type with union?
Question2:
In test.TypeB there are two TypeC included. They will totally add up needing void12, is it enough to add void4 (modulo8) in test.TypeA for proper alignment?
Kind regards