Skip to content

Commit b5c8c53

Browse files
authored
Merge pull request #26 from Trumeet/patch_add_reassm
la_acars_format_json(): add reassembly status
2 parents 9af09a0 + 980dd99 commit b5c8c53

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

doc/API_REFERENCE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,13 @@ A structure representing a decoded ACARS message.
183183
- `crc_ok` - `true` if ACARS CRC verification succeeded, `false` otherwise.
184184
- `err` - `true` if the decoder failed to decode the message. Values of other
185185
fields are left uninitialized.
186-
- `final_block` - `true` if the message text is terminated with ETX character
187-
(meaning it's the final block of a multiblock ACARS message), `false` if
186+
- `more` - `false` if the message text is terminated with ETX character
187+
(meaning it's the final block of a multiblock ACARS message), `true` if
188188
it has been terminated with ETB character (meaning there are more blocks
189189
left in this message)
190+
- `reassembly` - multi-block message reassembly status. One of: `unknown`,
191+
`complete`, `in progress`, `skipped`, `duplicate`, `out of sequence`,
192+
`invalid args`.
190193
- `mode` - mode character
191194
- `reg` - aircraft registration number (NULL-terminated)
192195
- `ack` - acknowledgement character

libacars/acars.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ void la_acars_format_json(la_vstring *vstr, void const *data) {
559559
}
560560
la_json_append_bool(vstr, "crc_ok", msg->crc_ok);
561561
la_json_append_bool(vstr, "more", !msg->final_block);
562+
la_json_append_string(vstr, "reassembly", la_reasm_status_name_get(msg->reasm_status));
562563
la_json_append_string(vstr, "reg", msg->reg);
563564
la_json_append_char(vstr, "mode", msg->mode);
564565
la_json_append_string(vstr, "label", msg->label);

0 commit comments

Comments
 (0)