Bugfix/dlmstp api missing in ports os (#1003)

* Added missing API defined in header into ports/win32/dlmstp.c module, added a PDU queue and refactored receive thread, and refactored MS/TP timing parameters.

* Added missing API defined in header into ports/linux/dlmstp.c module, and refactored MS/TP timing parameters.

* Added missing API defined in header into ports/bsd/dlmstp.c module, and refactored MS/TP timing parameters.

* Reduce default MS/TP APDU to 480 to avoid extended frames by default.
This commit is contained in:
Steve Karg
2025-05-27 10:14:15 -05:00
committed by GitHub
parent f5b5db445c
commit 442f408c1a
10 changed files with 2126 additions and 1043 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ bool datetime_local(
bool *dst_active)
{
bool status = false;
struct tm *tblock;
struct tm *tblock = NULL;
#if defined(_MSC_VER)
struct tm newtime = { 0 };
__time64_t long_time = 0;
+690 -361
View File
File diff suppressed because it is too large Load Diff
+15 -1
View File
@@ -187,7 +187,21 @@ static void RS485_Configure_Status(void)
fprintf(stderr, "Unable to set status on %s\n", RS485_Port_Name);
RS485_Print_Error();
}
/* configure the COM port timeout values */
/* configure the time-out parameters for a communications device. */
/* If an application sets ReadIntervalTimeout and
ReadTotalTimeoutMultiplier to MAXDWORD and
sets ReadTotalTimeoutConstant to a value greater
than zero and less than MAXDWORD, one of the following
occurs when the ReadFile function is called:
* If there are any bytes in the input buffer,
ReadFile returns immediately with the bytes in the buffer.
* If there are no bytes in the input buffer,
ReadFile waits until a byte arrives and then returns immediately.
* If no bytes arrive within the time specified
by ReadTotalTimeoutConstant, ReadFile times out.
Constant values are in milliseconds
*/
ctNew.ReadIntervalTimeout = MAXDWORD;
ctNew.ReadTotalTimeoutMultiplier = MAXDWORD;
ctNew.ReadTotalTimeoutConstant = 1;