Open gamadan opened 4 weeks ago
I only need the byte encoder to dynamically encode four bits. Not a full byte.
uint8_t data = 0b1111 | *((uint8_t*)primary_data); encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, &data, sizeof(data), &session_state);
The code above encodes 8 bits, 4 (leading) zeros, and 4 bits from primary_data.
My protocol has 20 address bits, 4 data bits, and 2 stop bits. Do I really need to dynamically encode the last 4 address bits with the 4 data bits each time?
Answers checklist.
General issue report
I only need the byte encoder to dynamically encode four bits. Not a full byte.
The code above encodes 8 bits, 4 (leading) zeros, and 4 bits from primary_data.
My protocol has 20 address bits, 4 data bits, and 2 stop bits. Do I really need to dynamically encode the last 4 address bits with the 4 data bits each time?