APL_LENGTH_MASK
uint8_t afdlength = rdata[length + 3] & APL_LENGTH_MASK;
length = rdata[*offset + 3] & APL_LENGTH_MASK;