Updated dlmstp to be consistent with other datalink layers.

This commit is contained in:
skarg
2007-06-30 23:11:58 +00:00
parent ade401f44b
commit 0e3c2e01af
3 changed files with 7 additions and 114 deletions
+4 -2
View File
@@ -313,7 +313,7 @@ void dlmstp_get_broadcast_address(BACNET_ADDRESS * dest)
return;
}
void dlmstp_init(void)
bool dlmstp_init(char *ifname)
{
int rc = 0;
pthread_t hThread;
@@ -322,6 +322,8 @@ void dlmstp_init(void)
Receive_Buffer.ready = false;
Receive_Buffer.pdu_len = 0;
/* initialize hardware */
if (ifname)
RS485_Set_Interface(ifname);
RS485_Initialize();
MSTP_Init(&MSTP_Port);
#if 0
@@ -345,7 +347,7 @@ void dlmstp_init(void)
rc = pthread_create(&hThread, NULL, dlmstp_receive_fsm_task, NULL);
rc = pthread_create(&hThread, NULL, dlmstp_master_fsm_task, NULL);
atexit(dlmstp_cleanup);
return 1;
}
#ifdef TEST_DLMSTP