Refactor ReadRange by-position and by-sequence encoding into common module (#1028)

This commit is contained in:
Steve Karg
2025-06-23 10:50:48 -05:00
committed by GitHub
parent 5072fb5913
commit 464be15bae
6 changed files with 343 additions and 1 deletions
+4
View File
@@ -151,8 +151,12 @@ void handler_read_range(
} else {
/* assume that there is an error */
error = true;
data.application_data = &Temp_Buf[0];
data.application_data_len = sizeof(Temp_Buf);
/* note: legacy API passed buffer separately */
len = Encode_RR_payload(&Temp_Buf[0], &data);
if (len >= 0) {
data.application_data_len = len;
/* encode the APDU portion of the packet */
len = rr_ack_encode_apdu(NULL, service_data->invoke_id, &data);
if (len < sizeof(Handler_Transmit_Buffer) - pdu_len) {