Combined the interface set into the datalink_init for all the datalink layers. Changed all the demo programs to use datalink_init instead of specific datalink functions.
This commit is contained in:
@@ -214,11 +214,8 @@ int main(int argc, char *argv[])
|
||||
Device_Set_Object_Instance_Number(124);
|
||||
Init_Service_Handlers();
|
||||
/* init the data link layer */
|
||||
/* configure standard BACnet/IP port */
|
||||
bip_set_port(0xBAC0);
|
||||
if (!bip_init())
|
||||
if (!datalink_init(NULL))
|
||||
return 1;
|
||||
|
||||
datalink_get_broadcast_address(&broadcast_address);
|
||||
print_address("Broadcast", &broadcast_address);
|
||||
datalink_get_my_address(&my_address);
|
||||
@@ -230,10 +227,8 @@ int main(int argc, char *argv[])
|
||||
/* input */
|
||||
|
||||
/* returns 0 bytes on timeout */
|
||||
pdu_len = bip_receive(&src, &Rx_Buf[0], MAX_MPDU, timeout);
|
||||
|
||||
pdu_len = datalink_receive(&src, &Rx_Buf[0], MAX_MPDU, timeout);
|
||||
/* process */
|
||||
|
||||
if (pdu_len) {
|
||||
npdu_handler(&src, &Rx_Buf[0], pdu_len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user