Two options that we talked about are:
packet TwoEqualFields {
size_of_fields : 8,
field_one : 8[size_of_fields],
field_two : 8[size_of_fields],
}
packet TwoEqualFields {
_elementsize_(data) : 8,
data: 8[2][], // Two variable-size byte-arrays that have the same size.
}
The benefit of elementsize is that we will need something like that for GATT.
The downside is that data and mask are not the same, so it would be nicer to be able to have meaningful names.
Two other options are:
packet TwoEqualFields {
_size_(field_one) : 8,
field_one : 8[],
field_two : 8[_size_(field_one)],
}
packet TwoEqualFields {
_size_(field_one) {, && ==} _size_(field_two) : 8,
field_one : 8[],
field_two : 8[],
}
Two options that we talked about are:
The benefit of elementsize is that we will need something like that for GATT.
The downside is that data and mask are not the same, so it would be nicer to be able to have meaningful names.
Two other options are: