Added ability to use static address binding in file address_cache. Useful for client applications binding to MS/TP slave devices.
This commit is contained in:
@@ -370,7 +370,15 @@ int main(
|
||||
timeout_seconds =
|
||||
(Device_APDU_Timeout() / 1000) * Device_Number_Of_APDU_Retries();
|
||||
/* try to bind with the device */
|
||||
Send_WhoIs(Target_Device_Object_Instance, Target_Device_Object_Instance);
|
||||
found = address_bind_request(
|
||||
Target_Device_Object_Instance,
|
||||
&max_apdu,
|
||||
&Target_Address);
|
||||
if (!found) {
|
||||
Send_WhoIs(
|
||||
Target_Device_Object_Instance,
|
||||
Target_Device_Object_Instance);
|
||||
}
|
||||
printf("List of Objects in test device:\r\n");
|
||||
printf("{\r\n");
|
||||
/* loop forever */
|
||||
|
||||
@@ -278,7 +278,14 @@ int main(
|
||||
timeout_seconds =
|
||||
(Device_APDU_Timeout() / 1000) * Device_Number_Of_APDU_Retries();
|
||||
/* try to bind with the device */
|
||||
Send_WhoIs(Target_Device_Object_Instance, Target_Device_Object_Instance);
|
||||
found =
|
||||
address_bind_request(Target_Device_Object_Instance, &max_apdu,
|
||||
&Target_Address);
|
||||
if (!found) {
|
||||
Send_WhoIs(
|
||||
Target_Device_Object_Instance,
|
||||
Target_Device_Object_Instance);
|
||||
}
|
||||
/* loop forever */
|
||||
for (;;) {
|
||||
/* increment timer - exit if timed out */
|
||||
|
||||
@@ -278,6 +278,7 @@ int main(
|
||||
/* setup my info */
|
||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||
Init_Service_Handlers();
|
||||
address_init();
|
||||
Init_DataLink();
|
||||
/* configure the timeout values */
|
||||
last_seconds = time(NULL);
|
||||
|
||||
@@ -395,7 +395,14 @@ int main(
|
||||
timeout_seconds =
|
||||
(Device_APDU_Timeout() / 1000) * Device_Number_Of_APDU_Retries();
|
||||
/* try to bind with the device */
|
||||
Send_WhoIs(Target_Device_Object_Instance, Target_Device_Object_Instance);
|
||||
found =
|
||||
address_bind_request(Target_Device_Object_Instance, &max_apdu,
|
||||
&Target_Address);
|
||||
if (!found) {
|
||||
Send_WhoIs(
|
||||
Target_Device_Object_Instance,
|
||||
Target_Device_Object_Instance);
|
||||
}
|
||||
/* loop forever */
|
||||
for (;;) {
|
||||
/* increment timer - exit if timed out */
|
||||
|
||||
Reference in New Issue
Block a user