Linux MS/TP Fixes (#1051)

* Linux MS/TP:
 * dlmstp_init:
   * Maximize thread priority if permitted

 * MSTP_Put_Receive/dlmstp_receive:
   * Use a buffer so incoming frames are not dropped during bursts

 * dlmstp_receive:
   * Make timeout optional

 * MSTP_Get_Reply:
   * Lock the mutex before using the PDU Queue
   * Iterate over all queued replies to find a match (instead of only checking the first)
   * Sleep for a millisecond before checking again to wait for the application provide a reply

 * RS485_Check_UART_Data:
   * Ensure waiter is initilized before using with select
   * Ensure bytes are read before adding to FIFO

TSM:
 * Add log when `datalink_send_pdu` fails for consistency with all other `datalink_send_pdu` calls

dlenv_maintenance_timer:
 * Fix Tx/Rx labels in MSTP statitistics print

* don't log on queued requests
This commit is contained in:
Ryan Mulder
2025-07-22 15:51:14 -04:00
committed by GitHub
parent 1a7852f58e
commit 85ba0b2315
4 changed files with 204 additions and 136 deletions
+1 -1
View File
@@ -806,8 +806,8 @@ void dlenv_maintenance_timer(uint16_t elapsed_seconds)
statistics.receive_valid_frame_counter,
statistics.receive_invalid_frame_counter,
statistics.transmit_frame_counter,
statistics.transmit_pdu_counter,
statistics.receive_pdu_counter,
statistics.transmit_pdu_counter,
statistics.lost_token_counter);
fflush(stderr);
#endif