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:
skarg
2008-03-01 06:42:46 +00:00
parent 9daa40131d
commit b8ee7d6b9c
6 changed files with 188 additions and 3 deletions
+9 -1
View File
@@ -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 */
+8 -1
View File
@@ -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 */
+1
View File
@@ -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);
+8 -1
View File
@@ -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 */