Changed the demo applications to use BACNET_IFACE environment variable when configuring the datalink. Thank you to Tomas Zerolo for the patch!
This commit is contained in:
@@ -162,7 +162,8 @@ int main(int argc, char *argv[])
|
|||||||
" 1=disable\r\n"
|
" 1=disable\r\n"
|
||||||
" 2=disable-initiation\r\n"
|
" 2=disable-initiation\r\n"
|
||||||
"The timeout can be 0 for infinite, or a value in minutes for disable.\r\n"
|
"The timeout can be 0 for infinite, or a value in minutes for disable.\r\n"
|
||||||
"The optional password is a character string of 1 to 20 characters.\r\n",
|
"The optional password is a character string of 1 to 20 characters.\r\n"
|
||||||
|
"Use BACNET_IFACE environment variable for the interface\r\n",
|
||||||
filename_remove_path(argv[0]), BACNET_MAX_INSTANCE - 1);
|
filename_remove_path(argv[0]), BACNET_MAX_INSTANCE - 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -184,7 +185,7 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -277,7 +277,8 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
datalink_init(Network_Interface);
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
timeout_seconds = (Device_APDU_Timeout() / 1000) *
|
timeout_seconds = (Device_APDU_Timeout() / 1000) *
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
|
|||||||
/* setup my info */
|
/* setup my info */
|
||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
|
|||||||
/* setup my info */
|
/* setup my info */
|
||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* only one value in our value list */
|
/* only one value in our value list */
|
||||||
cov_data.listOfValues.next = NULL;
|
cov_data.listOfValues.next = NULL;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
|
|||||||
/* setup my info */
|
/* setup my info */
|
||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
|
|||||||
/* setup my info */
|
/* setup my info */
|
||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ int main(int argc, char *argv[])
|
|||||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||||
address_init();
|
address_init();
|
||||||
Init_Service_Handlers();
|
Init_Service_Handlers();
|
||||||
if (!datalink_init(NULL))
|
if (!datalink_init(getenv("BACNET_IFACE")))
|
||||||
return 1;
|
return 1;
|
||||||
/* configure the timeout values */
|
/* configure the timeout values */
|
||||||
last_seconds = time(NULL);
|
last_seconds = time(NULL);
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
#define BACNET_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
|
#define BACNET_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BACNET_VERSION_TEXT "1.0.0"
|
#define BACNET_VERSION_TEXT "0.3.6"
|
||||||
#define BACNET_VERSION_CODE BACNET_VERSION(1,0,0)
|
#define BACNET_VERSION_CODE BACNET_VERSION(0,3,6)
|
||||||
#define BACNET_VERSION_MAJOR ((BACNET_VERSION_CODE>>16)&0xFF)
|
#define BACNET_VERSION_MAJOR ((BACNET_VERSION_CODE>>16)&0xFF)
|
||||||
#define BACNET_VERSION_MINOR ((BACNET_VERSION_CODE>>8)&0xFF)
|
#define BACNET_VERSION_MINOR ((BACNET_VERSION_CODE>>8)&0xFF)
|
||||||
#define BACNET_VERSION_MAINTENANCE (BACNET_VERSION_CODE&0xFF)
|
#define BACNET_VERSION_MAINTENANCE (BACNET_VERSION_CODE&0xFF)
|
||||||
|
|||||||
Reference in New Issue
Block a user