made Protocol_Revision a configurable value, and adjust the object-type bit string and services-supported bit string length varies depending on which value is used.

This commit is contained in:
skarg
2012-09-29 19:53:57 +00:00
parent 251857e3f6
commit 9d9440e061
2 changed files with 21 additions and 5 deletions
+20 -1
View File
@@ -37,7 +37,26 @@
/* This stack implements this version of BACnet */
#define BACNET_PROTOCOL_VERSION 1
#define BACNET_PROTOCOL_REVISION 10
/* Although this stack can implement a later revision,
* sometimes another revision is required */
#ifndef BACNET_PROTOCOL_REVISION
#define BACNET_PROTOCOL_REVISION 12
#endif
/* there are a few dependencies on the BACnet Protocol-Revision */
#if (BACNET_PROTOCOL_REVISION == 9)
/* from 135-2008 version of the BACnet Standard */
#define MAX_ASHRAE_OBJECT_TYPE 38
#define MAX_BACNET_SERVICES_SUPPORTED 40
#elif (BACNET_PROTOCOL_REVISION == 12)
/* from 135-2010 version of the BACnet Standard */
#define MAX_ASHRAE_OBJECT_TYPE 51
#define MAX_BACNET_SERVICES_SUPPORTED 40
#else
#define MAX_ASHRAE_OBJECT_TYPE 51
#define MAX_BACNET_SERVICES_SUPPORTED 40
#endif
/* largest BACnet Instance Number */
/* Also used as a device instance number wildcard address */
+1 -4
View File
@@ -936,8 +936,6 @@ typedef enum {
OBJECT_POSITIVE_INTEGER_VALUE = 48,
OBJECT_TIME_PATTERN_VALUE = 49,
OBJECT_TIME_VALUE = 50,
MAX_ASHRAE_OBJECT_TYPE = 51,
/* used for bit string loop */
PROPRIETARY_BACNET_OBJECT_TYPE = 128,
MAX_BACNET_OBJECT_TYPE = 1024
@@ -1122,11 +1120,10 @@ typedef enum {
SERVICE_SUPPORTED_TIME_SYNCHRONIZATION = 32,
SERVICE_SUPPORTED_UTC_TIME_SYNCHRONIZATION = 36,
SERVICE_SUPPORTED_WHO_HAS = 33,
SERVICE_SUPPORTED_WHO_IS = 34,
SERVICE_SUPPORTED_WHO_IS = 34
/* Other services to be added as they are defined. */
/* All values in this production are reserved */
/* for definition by ASHRAE. */
MAX_BACNET_SERVICES_SUPPORTED = 40
} BACNET_SERVICES_SUPPORTED;
typedef enum {