Added version files.

This commit is contained in:
skarg
2007-08-13 16:42:43 +00:00
parent 89d5edba62
commit 1b9a00e238
14 changed files with 156 additions and 69 deletions
+2 -1
View File
@@ -69,7 +69,8 @@ SRCS = main.c \
$(BACNET_ROOT)/reject.c \
$(BACNET_ROOT)/bacerror.c \
$(BACNET_ROOT)/apdu.c \
$(BACNET_ROOT)/npdu.c
$(BACNET_ROOT)/npdu.c \
$(BACNET_ROOT)/version.c
OBJS = ${SRCS:.c=.o}
+2 -1
View File
@@ -61,7 +61,8 @@ SRCS = main.c \
..\..\reject.c \
..\..\bacerror.c \
..\..\apdu.c \
..\..\npdu.c
..\..\npdu.c \
..\..\version.c
OBJS = $(SRCS:.c=.obj)
+2 -1
View File
@@ -69,7 +69,8 @@ SRCS = main.c \
$(BACNET_ROOT)/reject.c \
$(BACNET_ROOT)/bacerror.c \
$(BACNET_ROOT)/apdu.c \
$(BACNET_ROOT)/npdu.c
$(BACNET_ROOT)/npdu.c \
$(BACNET_ROOT)/version.c
OBJS = ${SRCS:.c=.o}
+2 -1
View File
@@ -62,7 +62,8 @@ SRCS = main.c \
..\..\reject.c \
..\..\bacerror.c \
..\..\apdu.c \
..\..\npdu.c
..\..\npdu.c \
..\..\version.c
OBJS = $(SRCS:.c=.obj)
+3 -16
View File
@@ -42,6 +42,7 @@
#include "lsp.h" /* object list dependency */
#include "mso.h" /* object list dependency */
#include "wp.h" /* write property handling */
#include "version.h"
#include "device.h" /* me */
#if BACFILE
#include "bacfile.h" /* object list dependency */
@@ -122,7 +123,6 @@ static char Vendor_Name[16] = "ASHRAE";
/* FIXME: your vendor id assigned by ASHRAE */
static uint16_t Vendor_Identifier = 0;
static char Model_Name[16] = "GNU";
static char Firmware_Revision[16] = "0.3.2";
static char Application_Software_Version[16] = "1.0";
static char Location[16] = "USA";
static char Description[16] = "server";
@@ -265,20 +265,7 @@ bool Device_Set_Model_Name(const char *name, size_t length)
const char *Device_Firmware_Revision(void)
{
return Firmware_Revision;
}
bool Device_Set_Firmware_Revision(const char *name, size_t length)
{
bool status = false; /*return value */
if (length < sizeof(Firmware_Revision)) {
memmove(Firmware_Revision, name, length);
Firmware_Revision[length] = 0;
status = true;
}
return status;
return BACnet_Version;
}
const char *Device_Application_Software_Version(void)
@@ -681,7 +668,7 @@ int Device_Encode_Property_APDU(uint8_t * apdu,
apdu_len = encode_tagged_character_string(&apdu[0], &char_string);
break;
case PROP_FIRMWARE_REVISION:
characterstring_init_ansi(&char_string, Firmware_Revision);
characterstring_init_ansi(&char_string, BACnet_Version);
apdu_len = encode_tagged_character_string(&apdu[0], &char_string);
break;
case PROP_APPLICATION_SOFTWARE_VERSION:
-1
View File
@@ -69,7 +69,6 @@ extern "C" {
bool Device_Set_Model_Name(const char *name, size_t length);
const char *Device_Firmware_Revision(void);
bool Device_Set_Firmware_Revision(const char *name, size_t length);
const char *Device_Application_Software_Version(void);
bool Device_Set_Application_Software_Version(const char *name,
+8
View File
@@ -88,6 +88,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\..\bacerror.h" />
<Unit filename="..\..\bacint.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\..\bacint.h" />
<Unit filename="..\..\bacstr.c">
<Option compilerVar="CC" />
</Unit>
@@ -251,6 +255,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\..\timesync.h" />
<Unit filename="..\..\version.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="..\..\version.h" />
<Unit filename="..\..\whohas.c">
<Option compilerVar="CC" />
</Unit>
+4
View File
@@ -45,6 +45,7 @@
#include "net.h"
#include "txbuf.h"
#include "lc.h"
#include "version.h"
#if defined(BACDL_MSTP)
#include "rs485.h"
#endif
@@ -108,6 +109,7 @@ int main(int argc, char *argv[])
if (argc > 1)
Device_Set_Object_Instance_Number(strtol(argv[1], NULL, 0));
#if defined(BACDL_BIP)
/* FIXME: really needs to come from a config file */
if (argc > 2)
Network_Interface = argv[2];
if (argc > 3)
@@ -125,8 +127,10 @@ int main(int argc, char *argv[])
}
#endif
printf("BACnet Server Demo\n"
"BACnet Stack Version %s\n"
"BACnet Device ID: %u\n"
"Max APDU: %d\n",
BACnet_Version,
Device_Object_Instance_Number(),
MAX_APDU);
Init_Service_Handlers();