Use MAC address documentation range in filter examples
[metze/wireshark/wip.git] / epan / dissectors / packet-bacapp.c
index 26f3ef0f41a053956f1c9b8b372b7f16d97e69a7..1abf510e8c781d4d57b56af36923bd004779b393 100644 (file)
@@ -6,8 +6,6 @@
  * Enhanced by Felix Kraemer, 2010, <sauter-cumulus[AT]de.sauter-bc.com>,
  *  Sauter-Cumulus GmbH, Freiburg
  *
- * $Id$
- *
  * Wireshark - Network traffic analyzer
  * By Gerald Combs <gerald[AT]wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <glib.h>
+#include "config.h"
 
 #include <epan/packet.h>
+#include <epan/to_str.h>
 #include <epan/reassemble.h>
 #include <epan/expert.h>
 #include <epan/stats_tree.h>
@@ -43,21 +38,16 @@ static int bacapp_tap = -1;
 
 /* formerly bacapp.h  contains definitions and forward declarations */
 
-#ifndef FAULT
-#define FAULT           proto_tree_add_text(subtree, tvb, offset, tvb_length(tvb) - offset, "something is going wrong here !!"); \
-    offset = tvb_length(tvb);
-#endif
-
 /* BACnet PDU Types */
-#define BACAPP_TYPE_CONFIRMED_SERVICE_REQUEST  0
-#define BACAPP_TYPE_UNCONFIRMED_SERVICE_REQUEST 1
-#define BACAPP_TYPE_SIMPLE_ACK                                 2
-#define BACAPP_TYPE_COMPLEX_ACK                                        3
-#define BACAPP_TYPE_SEGMENT_ACK                                        4
-#define BACAPP_TYPE_ERROR                                              5
-#define BACAPP_TYPE_REJECT                                             6
-#define BACAPP_TYPE_ABORT                                              7
-#define MAX_BACAPP_TYPE                                                        8
+#define BACAPP_TYPE_CONFIRMED_SERVICE_REQUEST                   0
+#define BACAPP_TYPE_UNCONFIRMED_SERVICE_REQUEST                 1
+#define BACAPP_TYPE_SIMPLE_ACK                                  2
+#define BACAPP_TYPE_COMPLEX_ACK                                 3
+#define BACAPP_TYPE_SEGMENT_ACK                                 4
+#define BACAPP_TYPE_ERROR                                       5
+#define BACAPP_TYPE_REJECT                                      6
+#define BACAPP_TYPE_ABORT                                       7
+#define MAX_BACAPP_TYPE                                         8
 
 #define BACAPP_SEGMENTED_REQUEST 0x08
 #define BACAPP_MORE_SEGMENTS 0x04
@@ -77,9 +67,9 @@ static int bacapp_tap = -1;
  *  reject-PDU                  [6] BACnet-Reject-PDU,
  *  abort-PDU                   [7] BACnet-Abort-PDU
  * }
- * @param tvb
- * @param pinfo
- * @param tree
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
  **/
 static void
 dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
@@ -99,20 +89,20 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
  *  service-choice              [9] BACnetConfirmedServiceChoice,
  *  service-request             [10] BACnet-Confirmed-Service-Request OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
 fConfirmedRequestPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @param ack - indocates whether working on request or ack
  * @param svc - output variable to return service choice
  * @param tt  - output varable to return service choice item
@@ -129,10 +119,10 @@ fStartConfirmed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
  *  service-choice  [2] BACnetUnconfirmedServiceChoice,
  *  service-request [3] BACnetUnconfirmedServiceRequest -- Context-specific tags 0..3 are NOT used in header encoding
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -145,10 +135,10 @@ fUnconfirmedRequestPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
  *  invokeID            [2] Unsigned (0..255),
  *  service-ACK-choice  [3] BACnetUnconfirmedServiceChoice -- Context-specific tags 0..3 are NOT used in header encoding
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -166,10 +156,10 @@ fSimpleAckPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
  *  service-ACK-choice      [7] BACnetConfirmedServiceChoice,
  *  service-ACK             [8] BACnet-Confirmed-Service-Request  -- Context-specific tags 0..8 are NOT used in header encoding
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -185,10 +175,10 @@ fComplexAckPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
  *  sequence-number         [5] Unsigned (0..255),
  *  actual-window-size      [6] Unsigned (0..127)
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -202,10 +192,10 @@ fSegmentAckPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
  *  error-choice            [3] BACnetConfirmedServiceChoice,
  *  error                   [4] BACnet-Error
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -218,10 +208,10 @@ fErrorPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *  original-invokeID       [2] Unsigned (0..255),
  *  reject-reason           [3] BACnetRejectReason
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -235,10 +225,10 @@ fRejectPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *  original-invokeID       [3] Unsigned (0..255),
  *  abort-reason            [4] BACnetAbortReason
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -246,102 +236,102 @@ fAbortPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * 20.2.4, adds the label with max 64Bit unsigned Integer Value to tree
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fUnsignedTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fUnsignedTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * 20.2.5, adds the label with max 64Bit signed Integer Value to tree
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fSignedTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fSignedTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * 20.2.8, adds the label with Octet String to tree; if lvt == 0 then lvt = restOfFrame
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @param lvt length of String
  * @return modified offset
  */
 static guint
-fOctetString (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, guint32 lvt);
+fOctetString(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, guint32 lvt);
 
 /**
  * 20.2.12, adds the label with Date Value to tree
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fDate    (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fDate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * 20.2.13, adds the label with Time Value to tree
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fTime (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fTime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * 20.2.14, adds Object Identifier to tree
  * use BIG ENDIAN: Bits 31..22 Object Type, Bits 21..0 Instance Number
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fObjectIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fObjectIdentifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnet-Confirmed-Service-Request ::= CHOICE {
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param service_choice
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param service_choice the service choice
  * @return offset
  */
 static guint
-fConfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice);
+fConfirmedServiceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice);
 
 /**
  * BACnet-Confirmed-Service-ACK ::= CHOICE {
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param service_choice
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param service_choice the service choice
  * @return offset
  */
 static guint
-fConfirmedServiceAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice);
+fConfirmedServiceAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice);
 
 /**
  * AcknowledgeAlarm-Request ::= SEQUENCE {
@@ -352,14 +342,14 @@ fConfirmedServiceAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  acknowledgementSource          [4] Character String,
  *  timeOfAcknowledgement          [5] BACnetTimeStamp
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAcknowledgeAlarmRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAcknowledgeAlarmRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ConfirmedCOVNotification-Request ::= SEQUENCE {
@@ -369,14 +359,14 @@ fAcknowledgeAlarmRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
  *  timeRemaining               [3] unsigned,
  *  listOfValues                [4] SEQUENCE OF BACnetPropertyValues
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fConfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fConfirmedCOVNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ConfirmedEventNotification-Request ::= SEQUENCE {
@@ -394,14 +384,14 @@ fConfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree
  *  toState                    [11] BACnetEventState,
  *  eventValues                [12] BACnetNotificationParameters OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fConfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo,  proto_tree *tree, guint offset);
+fConfirmedEventNotificationRequest(tvbuff_t *tvb, packet_info *pinfo,  proto_tree *tree, guint offset);
 
 /**
  * GetAlarmSummary-ACK ::= SEQUENCE OF SEQUENCE {
@@ -409,14 +399,14 @@ fConfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo,  proto_tr
  *  alarmState               BACnetEventState,
  *  acknowledgedTransitions  BACnetEventTransitionBits
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fGetAlarmSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fGetAlarmSummaryAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * GetEnrollmentSummary-Request ::= SEQUENCE {
@@ -440,14 +430,14 @@ fGetAlarmSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *      } OPTIONAL,
  *  notificationClassFilter [5] Unsigned OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fGetEnrollmentSummaryRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fGetEnrollmentSummaryRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * GetEnrollmentSummary-ACK ::= SEQUENCE OF SEQUENCE {
@@ -457,41 +447,41 @@ fGetEnrollmentSummaryRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
  *  priority            Unsigned8,
  *  notificationClass   Unsigned OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fGetEnrollmentSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fGetEnrollmentSummaryAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * GetEventInformation-Request ::= SEQUENCE {
  *  lastReceivedObjectIdentifier    [0] BACnetObjectIdentifer
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fGetEventInformationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fGetEventInformationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * GetEventInformation-ACK ::= SEQUENCE {
  *  listOfEventSummaries [0] listOfEventSummaries,
  *  moreEvents           [1] BOOLEAN
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fGetEventInformationACK (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fGetEventInformationACK(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * LifeSafetyOperation-Request ::= SEQUENCE {
@@ -500,10 +490,10 @@ fGetEventInformationACK (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
  *  request                     [2] BACnetLifeSafetyOperation
  *  objectIdentifier            [3] BACnetObjectIdentifier OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -516,12 +506,10 @@ fLifeSafetyOperationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *  issueConfirmedNotifications [2] BOOLEAN OPTIONAL
  *  lifetime                    [3] Unsigned OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
- * @param src
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -536,10 +524,10 @@ fSubscribeCOVRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  monitoredPropertyIdentifier [4] BACnetPropertyReference OPTIONAL
  *  covIncrement                [5] Unsigned OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -559,10 +547,10 @@ fSubscribeCOVPropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
  *          }
  *      }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -583,14 +571,14 @@ fAtomicReadFileRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
  *          }
  *      }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAtomicReadFileAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAtomicReadFileAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * AtomicWriteFile-Request ::= SEQUENCE {
@@ -607,10 +595,10 @@ fAtomicReadFileAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
  *          }
  *      }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -621,14 +609,14 @@ fAtomicWriteFileRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
  *      fileStartPosition [0] INTEGER,
  *      fileStartRecord   [1] INTEGER,
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAtomicWriteFileAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAtomicWriteFileAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * AddListElement-Request ::= SEQUENCE {
@@ -637,10 +625,10 @@ fAtomicWriteFileAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
  *  listOfElements     [3] ABSTRACT-SYNTAX.&Type
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -651,10 +639,10 @@ fAddListElementRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
  *  objectSpecifier     [0] ObjectSpecifier,
  *  listOfInitialValues [1] SEQUENCE OF BACnetPropertyValue OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param subtree the sub tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -662,23 +650,23 @@ fCreateObjectRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, gui
 
 /**
  * CreateObject-Request ::= BACnetObjectIdentifier
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fCreateObjectAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fCreateObjectAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * DeleteObject-Request ::= SEQUENCE {
  *  ObjectIdentifier    BACnetObjectIdentifer
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -690,10 +678,10 @@ fDeleteObjectRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  propertyIdentifier  [1] BACnetPropertyIdentifier,
  *  propertyArrayIndex  [2] Unsigned OPTIONAL, -- used only with array datatype
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -706,24 +694,24 @@ fReadPropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
  *  propertyValue      [3] ABSTRACT-SYNTAX.&Type
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fReadPropertyAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fReadPropertyAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ReadPropertyConditional-Request ::= SEQUENCE {
  *  objectSelectionCriteria  [0] objectSelectionCriteria,
  *  listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param subtree the  sub tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -733,23 +721,23 @@ fReadPropertyConditionalRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *s
  * ReadPropertyConditional-ACK ::= SEQUENCE {
  *  listOfPReadAccessResults    SEQUENCE OF ReadAccessResult OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fReadPropertyConditionalAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fReadPropertyConditionalAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ReadPropertyMultiple-Request ::= SEQUENCE {
  *  listOfReadAccessSpecs   SEQUENCE OF ReadAccessSpecification
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param subtree the sub tree to append this item to
+ * @param offset the offset in the tvb
  * @return offset modified
  */
 static guint
@@ -759,14 +747,14 @@ fReadPropertyMultipleRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subt
  * ReadPropertyMultiple-Ack ::= SEQUENCE {
  *  listOfReadAccessResults SEQUENCE OF ReadAccessResult
  * }
- * @param tvb
- * @parma pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return offset modified
  */
 static guint
-fReadPropertyMultipleAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fReadPropertyMultipleAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ReadRange-Request ::= SEQUENCE {
@@ -788,14 +776,14 @@ fReadPropertyMultipleAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
  *          },
  *      } OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fReadRangeRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fReadRangeRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ReadRange-ACK ::= SEQUENCE {
@@ -806,14 +794,14 @@ fReadRangeRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
  *  itemCount          [4] Unsigned,
  *  itemData           [5] SEQUENCE OF ABSTRACT-SYNTAX.&Type
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fReadRangeAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fReadRangeAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * RemoveListElement-Request ::= SEQUENCE {
@@ -822,10 +810,10 @@ fReadRangeAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
  *  propertyArrayIndex  [2] Unsigned OPTIONAL, -- used only with array datatype
  *  listOfElements  [3] ABSTRACT-SYNTAX.&Type
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -839,10 +827,10 @@ fRemoveListElementRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
  *  propertyValue      [3] ABSTRACT-SYNTAX.&Type
  *  priority           [4] Unsigned8 (1..16) OPTIONAL --used only when property is commandable
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -852,10 +840,10 @@ fWritePropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  * WritePropertyMultiple-Request ::= SEQUENCE {
  *  listOfWriteAccessSpecifications SEQUENCE OF WriteAccessSpecification
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -870,10 +858,10 @@ fWritePropertyMultipleRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
  *      },
  *  password        [2] CharacterString (SIZE(1..20)) OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -885,10 +873,10 @@ fDeviceCommunicationControlRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree
  *  serviceNumber     [1] Unsigned,
  *  serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -900,10 +888,10 @@ fConfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
  *  serviceNumber [1] Unsigned,
  *  resultBlock   [2] ABSTRACT-SYNTAX.&Type OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -922,10 +910,10 @@ fConfirmedPrivateTransferAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
  *      },
  *  message [3] CharacterString
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -944,10 +932,10 @@ fConfirmedTextMessageRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
  *      },
  *  password                    [1] CharacterString (SIZE(1..20)) OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -958,10 +946,10 @@ fReinitializeDeviceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *  vtClass BACnetVTClass,
  *  localVTSessionIdentifier    Unsigned8
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -971,27 +959,27 @@ fVtOpenRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
  * VTOpen-ACK ::= SEQUENCE {
  *  remoteVTSessionIdentifier   Unsigned8
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fVtOpenAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fVtOpenAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * VTClose-Request ::= SEQUENCE {
  *  listOfRemoteVTSessionIdentifiers    SEQUENCE OF Unsigned8
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fVtCloseRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fVtCloseRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * VTData-Request ::= SEQUENCE {
@@ -999,28 +987,28 @@ fVtCloseRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
  *  vtNewData           OCTET STRING,
  *  vtDataFlag          Unsigned (0..1)
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fVtDataRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fVtDataRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * VTData-ACK ::= SEQUENCE {
  *  allNewDataAccepted  [0] BOOLEAN,
  *  acceptedOctetCount  [1] Unsigned OPTIONAL -- present only if allNewDataAccepted = FALSE
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fVtDataAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fVtDataAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * Authenticate-Request ::= SEQUENCE {
@@ -1030,27 +1018,27 @@ fVtDataAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *  operatorPassword       [3] CharacterString (SIZE(1..20)) OPTIONAL,
  *  startEncypheredSession [4] BOOLEAN OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAuthenticateRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAuthenticateRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * Authenticate-ACK ::= SEQUENCE {
  *  modifiedRandomNumber    Unsigned32,
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAuthenticateAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAuthenticateAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * RequestKey-Request ::= SEQUENCE {
@@ -1059,27 +1047,27 @@ fAuthenticateAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
  *  remoteDeviceIdentifier     BACnetObjectIdentifier,
  *  remoteDeviceAddress        BACnetAddress
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fRequestKeyRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fRequestKeyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * Unconfirmed-Service-Request ::= CHOICE {
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param service_choice
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param service_choice the service choice
  * @return modified offset
  */
 static guint
-fUnconfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice);
+fUnconfirmedServiceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice);
 
 /**
  * UnconfirmedCOVNotification-Request ::= SEQUENCE {
@@ -1089,14 +1077,14 @@ fUnconfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *  timeRemaining               [3] unsigned,
  *  listOfValues                [4] SEQUENCE OF BACnetPropertyValues
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fUnconfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fUnconfirmedCOVNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * UnconfirmedEventNotification-Request ::= SEQUENCE {
@@ -1114,14 +1102,14 @@ fUnconfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tre
  *  toState                    [11] BACnetEventState,
  *  eventValues                [12] BACnetNotificationParameters OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fUnconfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fUnconfirmedEventNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * I-Am-Request ::= SEQUENCE {
@@ -1130,14 +1118,14 @@ fUnconfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_t
  *  segmentationSupported   BACnetSegmentation,
  *  vendorID    Unsigned
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fIAmRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fIAmRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 
 /**
@@ -1146,14 +1134,14 @@ fIAmRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
  *  objectIdentifier  BACnetObjectIdentifier,
  *  objectName        CharacterString
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fIHaveRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fIHaveRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * UnconfirmedPrivateTransfer-Request ::= SEQUENCE {
@@ -1161,10 +1149,10 @@ fIHaveRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
  *  serviceNumber     [1] Unsigned,
  *  serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1183,10 +1171,10 @@ fUnconfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree
  *      },
  *  message                 [3] CharacterString
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1196,27 +1184,27 @@ fUnconfirmedTextMessageRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
  * TimeSynchronization-Request ::=  SEQUENCE {
  *  BACnetDateTime
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fTimeSynchronizationRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fTimeSynchronizationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * UTCTimeSynchronization-Request ::=  SEQUENCE {
  *  BACnetDateTime
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fUTCTimeSynchronizationRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fUTCTimeSynchronizationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * Who-Has-Request ::=  SEQUENCE {
@@ -1229,27 +1217,27 @@ fUTCTimeSynchronizationRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *
  *      objectName                   [3] CharacterString
  *      }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fWhoHas (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fWhoHas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * Who-Is-Request ::= SEQUENCE {
  *  deviceInstanceRangeLowLimit  [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
  *  deviceInstanceRangeHighLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
  * }
- * @param tvb
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fWhoIsRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fWhoIsRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnet-Error ::= CHOICE {
@@ -1261,11 +1249,11 @@ fWhoIsRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
  *  readRange               [26] ObjectAccessService-Error
  *                          [default] Error
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param service
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param service the service
  * @return modified offset
  */
 static guint
@@ -1274,10 +1262,10 @@ fBACnetError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
 /**
  * Dissect a BACnetError in a context tag
  *
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint fContextTaggedError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
@@ -1288,10 +1276,10 @@ static guint fContextTaggedError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
  *    firstFailedElementNumber [1] Unsigned
  *    }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1303,10 +1291,10 @@ fChangeListError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
  *    firstFailedElementNumber [1] Unsigned
  *    }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1320,10 +1308,10 @@ fCreateObjectError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
  *    errorParameters [3] ABSTRACT-SYNTAX.&Type OPTIONAL
  *    }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1335,10 +1323,10 @@ fConfirmedPrivateTransferError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
  *    firstFailedWriteAttempt [1] Unsigned
  *    }
  * }
- * @param tvb
- * @pram pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1350,10 +1338,10 @@ fWritePropertyMultipleError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *    listOfVTSessionIdentifiers [1] SEQUENCE OF Unsigned8 OPTIONAL
  *    }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -1361,15 +1349,15 @@ fVTCloseError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
 /**
  * BACnet Application Types chapter 20.2.1
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fApplicationTypes   (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fApplicationTypes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * BACnetActionCommand ::= SEQUENCE {
@@ -1383,55 +1371,55 @@ fApplicationTypes   (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  quitOnFailure       [7] BOOLEAN,
  *  writeSuccessful     [8] BOOLEAN
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param matching tag number
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param tag_match the tag number
  * @return modified offset
  */
 static guint
-fActionCommand (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tag_match);
+fActionCommand(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tag_match);
 
 /**
  * BACnetActionList ::= SEQUENCE {
  *  action  [0] SEQUENCE of BACnetActionCommand
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fActionList (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fActionList(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /** BACnetAddress ::= SEQUENCE {
  *  network-number  Unsigned16, -- A value 0 indicates the local network
  *  mac-address     OCTET STRING -- A string of length 0 indicates a broadcast
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAddress (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAddress(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetAddressBinding ::= SEQUENCE {
  *  deviceObjectID  BACnetObjectIdentifier
  *  deviceAddress   BacnetAddress
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fAddressBinding (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAddressBinding(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetCalendarEntry ::= CHOICE {
@@ -1439,83 +1427,83 @@ fAddressBinding (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
  *  dateRange   [1] BACnetDateRange,
  *  weekNDay    [2] BacnetWeekNday
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fCalendarEntry (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fCalendarEntry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetClientCOV ::= CHOICE {
  *  real-increment  REAL,
  *  default-increment   NULL
  * }
- * @param tvb
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fClientCOV (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fClientCOV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 
 /**
  * BACnetDailySchedule ::= SEQUENCE {
  *  day-schedule    [0] SENQUENCE OF BACnetTimeValue
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fDailySchedule (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fDailySchedule(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetWeeklySchedule ::= SEQUENCE {
  *  week-schedule    SENQUENCE SIZE (7) OF BACnetDailySchedule
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fWeeklySchedule (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fWeeklySchedule(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetDateRange ::= SEQUENCE {
  *  StartDate   Date,
  *  EndDate     Date
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fDateRange (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fDateRange(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetDateTime ::= SEQUENCE {
  *  date   Date,
  *  time   Time
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fDateTime (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fDateTime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * BACnetDestination ::= SEQUENCE {
@@ -1527,14 +1515,14 @@ fDateTime (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, co
  *  issueConfirmedNotifications BOOLEAN,
  *  transitions BACnetEventTransitionBits
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fDestination (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fDestination(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetDeviceObjectPropertyReference ::= SEQUENCE {
@@ -1543,14 +1531,14 @@ fDestination (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
  *  propertyArrayIndex  [2] Unsigend OPTIONAL,
  *  deviceIdentifier    [3] BACnetObjectIdentifier OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fDeviceObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fDeviceObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetObjectPropertyReference ::= SEQUENCE {
@@ -1558,28 +1546,28 @@ fDeviceObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
  *  propertyIdentifier  [1] BACnetPropertyIdentifier,
  *  propertyArrayIndex  [2] Unsigend OPTIONAL,
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetDeviceObjectReference ::= SEQUENCE {
  *  deviceIdentifier    [0] BACnetObjectIdentifier OPTIONAL,
  *  objectIdentifier    [1] BACnetObjectIdentifier
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fDeviceObjectReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fDeviceObjectReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetEventParameter ::= CHOICE {
@@ -1616,24 +1604,76 @@ fDeviceObjectReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
  *      high-limit                       [2] REAL,
  *      deadband                         [3] REAL
  *      },
- *  buffer-ready                    [7] SEQUENCE {
- *      notification-threshold           [0] Unsigned,
- *      previous-notification-count      [1] Unsigned32
- *      }
+ *  -- context tag 7 is deprecated
  *  change-of-life-safety           [8] SEQUENCE {
  *      time-delay                       [0] Unsigned,
  *      list-of-life-safety-alarm-values [1] SEQUENCE OF BACnetLifeSafetyState,
  *      list-of-alarm-values             [2] SEQUENCE OF BACnetLifeSafetyState,
  *      mode-property-reference          [3] BACnetDeviceObjectPropertyReference
+ *      },
+ *  extended                        [9] SEQUENCE {
+ *      vendor-id                        [0] Unsigned16,
+ *      extended-event-type              [1] Unsigned,
+ *      parameters                       [2] SEQUENCE OF CHOICE {
+ *          null        NULL,
+ *          real        REAL,
+ *          integer     Unsigned,
+ *          boolean     BOOLEAN,
+ *          double      Double,
+ *          octet       OCTET STRING,
+ *          bitstring   BIT STRING,
+ *          enum        ENUMERATED,
+ *          reference   [0] BACnetDeviceObjectPropertyReference
+ *          }
+ *      },
+ *  buffer-ready                    [10] SEQUENCE {
+ *      notification-threshold           [0] Unsigned,
+ *      previous-notification-count      [1] Unsigned32
+ *      },
+ * unsigned-range                   [11] SEQUENCE {
+ *      time-delay                       [0] Unsigned,
+ *      low-limit                        [1] Unsigned,
+ *      high-limit                       [2] Unsigned,
+ *      }
+ * -- context tag 12 is reserved for future addenda
+ * access-event                     [13] SEQUENCE {
+ *      list-of-access-events            [0] SEQUENCE OF BACnetAccessEvent,
+ *      access-event-time-reference      [1] BACnetDeviceObjectPropertyReference
  *      }
+ * double-out-of-range              [14] SEQUENCE {
+ *      time-delay                       [0] Unsigned,
+ *      low-limit                        [1] Double,
+ *      high-limit                       [2] Double,
+ *      deadband                         [3] Double
+ *  }
+ *  signed-out-of-range             [15] SEQUENCE {
+ *      time-delay                       [0] Unsigned,
+ *      low-limit                        [1] INTEGER,
+ *      high-limit                       [2] INTEGER,
+ *      deadband                         [3] Unsigned
  *  }
- * @param tvb
- * @param tree
- * @param offset
+ *  unsigned-out-of-range           [16] SEQUENCE {
+ *      time-delay                       [0] Unsigned,
+ *      low-limit                        [1] Unsigned,
+ *      high-limit                       [2] Unsigned,
+ *      deadband                         [3] Unsigned
+ *   }
+ *  change-of-characterstring       [17] SEQUENCE {
+ *      time-delay                       [0] Unsigned,
+ *      list-of-alarm-values             [1] SEQUENCE OF CharacterString,
+ *   }
+ *  change-of-status-flags          [18] SEQUENCE {
+ *      time-delay                       [0] Unsigned,
+ *      selected-flags                   [1] BACnetStatusFlags
+ *   }
+ * }
+ * @param tvb the tv buffer of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fEventParameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 
 
@@ -1647,7 +1687,7 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
  *      enum-value      [3] ENUMERATED, -- Optionally limited to 32 bits
  *      unsigned-value  [4] Unsigned, -- Optionally limited to 32 bits
  *      signed-value    [5] INTEGER, -- Optionally limited to 32 bits
- *      bitstring-value [6] BIT STRING,-- Optionally limited to 32 bits
+ *      bitstring-value [6] BIT STRING, -- Optionally limited to 32 bits
  *      null-value      [7] NULL,
  *      failure         [8] Error,
  *      time-change     [9] REAL,
@@ -1655,14 +1695,14 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
  *      }
  *  statusFlags [2] BACnetStatusFlags OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fLogRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fLogRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetEventLogRecord ::= SEQUENCE {
@@ -1673,17 +1713,17 @@ fLogRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *      time-change  [2] REAL,
  *      }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fEventLogRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fEventLogRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 static guint
-fLogMultipleRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fLogMultipleRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetNotificationParameters ::= CHOICE {
@@ -1717,30 +1757,87 @@ fLogMultipleRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
  *      exceeding-value      [0] REAL,
  *      status-flags         [1] BACnetStatusFlags
  *      deadband             [2] REAL,
- *      exceeded-limit       [0] REAL
+ *      exceeded-limit       [3] REAL
  *      },
  *  complex-event-type  [6] SEQUENCE OF BACnetPropertyValue,
- *  buffer-ready [7]    SEQUENCE {
- *      buffer-device        [0] BACnetObjectIdentifier,
- *      buffer-object        [1] BACnetObjectIdentifier
- *      previous-notification[2] BACnetDateTime,
- *      current-notification [3] BACnetDateTime
- *      },
+ * -- complex tag 7 is deprecated
  *  change-of-life-safety [8]   SEQUENCE {
  *      new-state            [0] BACnetLifeSafetyState,
  *      new-mode             [1] BACnetLifeSafetyState
  *      status-flags         [2] BACnetStatusFlags,
  *      operation-expected   [3] BACnetLifeSafetyOperation
- *      }
+ *      },
+ *  extended [9]   SEQUENCE {
+ *      vendor-id            [0] Unsigned16,
+ *      extended-event-type  [1] Unsigned,
+ *      parameters           [2] SEQUENCE OF CHOICE {
+ *          null                NULL,
+ *          real                REAL,
+ *          integer             Unsigned,
+ *          boolean             BOOLEAN,
+ *          double              Double,
+ *          octet               OCTET STRING,
+ *          bitstring           BIT STRING,
+ *          enum                ENUMERATED,
+ *          propertyValue       [0] BACnetDeviceObjectPropertyValue
+ *          }
+ *      },
+ *  buffer-ready [10]    SEQUENCE {
+ *      buffer-property      [0] BACnetDeviceObjectPropertyReference,
+ *      previous-notification[1] Unsigned32,
+ *      current-notification [2] BACneUnsigned32tDateTime
+ *      },
+ *  unsigned-range [11]    SEQUENCE {
+ *      exceeding-value      [0] Unsigned,
+ *      status-flags         [1] BACnetStatusFlags,
+ *      exceeded-limit       [2] Unsigned
+ *      },
+ * -- context tag 12 is reserved for future addenda
+ *  access-event [13]    SEQUENCE {
+ *      access-event          [0] BACnetAccessEvent,
+ *      status-flags          [1] BACnetStatusFlags,
+ *      access-event-tag      [2] Unsigned,
+ *      access-event-time     [3] BACnetTimeStamp,
+ *      access-credential     [4] BACnetDeviceObjectReference,
+ *      authentication-factor [5] BACnetAuthenticationFactor OPTIONAL
+ *      },
+ *  double-out-of-range [14]    SEQUENCE {
+ *      exceeding-value      [0] Double,
+ *      status-flags         [1] BACnetStatusFlags
+ *      deadband             [2] Double,
+ *      exceeded-limit       [3] Double
+ *      },
+ *  signed-out-of-range [15]    SEQUENCE {
+ *      exceeding-value      [0] INTEGER,
+ *      status-flags         [1] BACnetStatusFlags
+ *      deadband             [2] Unsigned,
+ *      exceeded-limit       [3] INTEGER
+ *      },
+ *  unsigned-out-of-range [16]    SEQUENCE {
+ *      exceeding-value      [0] Unsigned,
+ *      status-flags         [1] BACnetStatusFlags
+ *      deadband             [2] Unsigned,
+ *      exceeded-limit       [3] Unsigned
+ *      },
+ *  change-of-characterstring [17]    SEQUENCE {
+ *      changed-value        [0] CharacterString,
+ *      status-flags         [1] BACnetStatusFlags
+ *      alarm-value          [2] CharacterString
+ *      },
+ *  change-of-status-flags [18]    SEQUENCE {
+ *      present-value        [0] ABSTRACT-SYNTAX.&Type OPTIONAL,
+ *                              -- depends on referenced property
+ *      referenced-flags     [1] BACnetStatusFlags
+ *      },
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fNotificationParameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetObjectPropertyReference ::= SEQUENCE {
@@ -1748,14 +1845,14 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
  *  propertyIdentifier  [1] BACnetPropertyIdentifier,
  *  propertyArrayIndex  [2] Unsigned OPTIONAL, -- used only with array datatype
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fBACnetObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fBACnetObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 #if 0
 /**
@@ -1767,51 +1864,51 @@ fBACnetObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
  *      value              [3] ABSTRACT-SYNTAX.&Type, --any datatype appropriate for the specified property
  *      priority           [4] Unsigned (1..16) OPTIONAL
  * }
- * @param tvb
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
+fObjectPropertyValue(tvbuff_t *tvb, proto_tree *tree, guint offset);
 #endif
 
 /**
  * BACnetPriorityArray ::= SEQUENCE SIZE (16) OF BACnetPriorityValue
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fPriorityArray (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fPriorityArray(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 static guint
-fPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset, guint8 list);
+fPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset, guint8 list);
 
 /**
  * BACnetPropertyReference ::= SEQUENCE {
  *  propertyIdentifier  [0] BACnetPropertyIdentifier,
  *  propertyArrayIndex  [1] Unsigned OPTIONAL, -- used only with array datatype
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fBACnetPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 list);
+fBACnetPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 list);
 
 /* static guint
-fBACnetObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); */
+fBACnetObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset); */
 
 static guint
-fLOPR (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fLOPR(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 static guint
-fRestartReason (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fRestartReason(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetPropertyValue ::= SEQUENCE {
@@ -1821,17 +1918,17 @@ fRestartReason (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
  *      value              [2] ABSTRACT-SYNTAX.&Type, -- any datatype appropriate for the specified property
  *      priority           [3] Unsigned (1..16) OPTIONAL -- used only when property is commandable
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fBACnetPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fBACnetPropertyValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 static guint
-fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset);
+fPropertyValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset);
 
 /**
  * BACnet Application PDUs chapter 21
@@ -1839,14 +1936,14 @@ fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
  *  device  [0] BACnetObjectIdentifier
  *  address [1] BACnetAddress
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fRecipient (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fRecipient(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnet Application PDUs chapter 21
@@ -1854,17 +1951,17 @@ fRecipient (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *  recipient   [0] BACnetRecipient
  *  processID   [1] Unsigned32
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fRecipientProcess (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fRecipientProcess(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 static guint
-fCOVSubscription (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fCOVSubscription(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 #if 0
 /**
@@ -1872,14 +1969,14 @@ fCOVSubscription (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
  *  sessionKey  OCTET STRING (SIZE(8)), -- 56 bits for key, 8 bits for checksum
  *  peerAddress BACnetAddress
  * }
- * @param tvb
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  * @todo check if checksum is displayed correctly
  */
 static guint
-fSessionKey (tvbuff_t *tvb, proto_tree *tree, guint offset);
+fSessionKey(tvbuff_t *tvb, proto_tree *tree, guint offset);
 #endif
 
 /**
@@ -1891,14 +1988,14 @@ fSessionKey (tvbuff_t *tvb, proto_tree *tree, guint offset);
  *      listOfTimeValues    [2] SEQUENCE OF BACnetTimeValue,
  *      eventPriority       [3] Unsigned (1..16)
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fSpecialEvent (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fSpecialEvent(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnetTimeStamp ::= CHOICE {
@@ -1906,15 +2003,15 @@ fSpecialEvent (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
  *  sequenceNumber  [1] Unsigned (0..65535),
  *  dateTime        [2] BACnetDateTime
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param label
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
+ * @param label the label of this item
  * @return modified offset
  */
 static guint
-fTimeStamp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fTimeStamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 static guint
 fEventTimeStamps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
@@ -1924,14 +2021,14 @@ fEventTimeStamps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
  *  time    Time,
  *  value   ABSTRACT-SYNTAX.&Type -- any primitive datatype, complex types cannot be decoded
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fTimeValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fTimeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 #if 0
 /**
@@ -1940,13 +2037,13 @@ fTimeValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *  remote-vtSessionID  Unsigned8,
  *  remote-vtAddress    BACnetAddress
  * }
- * @param tvb
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fVTSession (tvbuff_t *tvb, proto_tree *tree, guint offset);
+fVTSession(tvbuff_t *tvb, proto_tree *tree, guint offset);
 #endif
 
 /**
@@ -1962,14 +2059,14 @@ fVTSession (tvbuff_t *tvb, proto_tree *tree, guint offset);
  * -- third octet dayOfWeek (1..7) where 1 = Monday
  * -- 7 = Sunday
  * -- X'FF' = any day of week
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fWeekNDay (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fWeekNDay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ReadAccessResult ::= SEQUENCE {
@@ -1983,60 +2080,60 @@ fWeekNDay (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
  *      }
  *  } OPTIONAL
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fReadAccessResult (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fReadAccessResult(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * ReadAccessSpecification ::= SEQUENCE {
  *  objectIdentifier         [0] BACnetObjectIdentifier,
  *  listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param subtree the subtree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fReadAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset);
+fReadAccessSpecification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset);
 
 /**
  * WriteAccessSpecification ::= SEQUENCE {
  *  objectIdentifier [0] BACnetObjectIdentifier,
  *  listOfProperty   [1] SEQUENCE OF BACnetPropertyValue
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param subtree the sub tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fWriteAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset);
+fWriteAccessSpecification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset);
 
 
 /********************************************************* Helper functions *******************************************/
 
 /**
  * extracts the tag number from the tag header.
- * @param tvb "TestyVirtualBuffer"
- * @param offset in actual tvb
+ * @param tvb the tv buffer of the current data "TestyVirtualBuffer"
+ * @param offset the offset in the tvb in actual tvb
  * @return Tag Number corresponding to BACnet 20.2.1.2 Tag Number
  */
 static guint
-fTagNo (tvbuff_t *tvb, guint offset);
+fTagNo(tvbuff_t *tvb, guint offset);
 
 /**
  * splits Tag Header coresponding to 20.2.1 General Rules For BACnet Tags
- * @param tvb = "TestyVirtualBuffer"
- * @param pinfo = packet info
- * @param offset = offset in actual tvb
+ * @param tvb the tv buffer of the current data = "TestyVirtualBuffer"
+ * @param pinfo the packet info of the current data = packet info
+ * @param offset the offset in the tvb = offset in actual tvb
  * @return tag_no BACnet 20.2.1.2 Tag Number
  * @return class_tag BACnet 20.2.1.1 Class
  * @return lvt BACnet 20.2.1.3 Length/Value/Type
@@ -2044,59 +2141,58 @@ fTagNo (tvbuff_t *tvb, guint offset);
  */
 
 static guint
-fTagHeader (tvbuff_t *tvb, packet_info *pinfo, guint offset, guint8 *tag_no, guint8* class_tag, guint32 *lvt);
+fTagHeader(tvbuff_t *tvb, packet_info *pinfo, guint offset, guint8 *tag_no, guint8* class_tag, guint32 *lvt);
 
 
 /**
  * adds processID with max 32Bit unsigned Integer Value to tree
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fProcessId (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fProcessId(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * adds timeSpan with max 32Bit unsigned Integer Value to tree
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fTimeSpan (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
+fTimeSpan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label);
 
 /**
  * BACnet Application PDUs chapter 21
  * BACnetPropertyIdentifier::= ENUMERATED {
  *   @see bacapp_property_identifier
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
- * @param tt returnvalue of this item
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fPropertyIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fPropertyIdentifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * BACnet Application PDUs chapter 21
  * BACnetPropertyArrayIndex::= ENUMERATED {
  *   @see bacapp_property_array_index
  * }
- * @param tvb
- * @param tree
- * @param offset
- * @param tt returnvalue of this item
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fPropertyArrayIndex (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fPropertyArrayIndex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * listOfEventSummaries ::= SEQUENCE OF SEQUENCE {
@@ -2108,14 +2204,14 @@ fPropertyArrayIndex (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
  *  eventEnable             [5] BACnetEventTransitionBits,
  *  eventPriorities         [6] SEQUENCE SIZE (3) OF Unsigned
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-flistOfEventSummaries (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+flistOfEventSummaries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * SelectionCriteria ::= SEQUENCE {
@@ -2124,28 +2220,28 @@ flistOfEventSummaries (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
  *  relationSpecifier  [2] ENUMERATED { bacapp_relationSpecifier },
  *  comparisonValue    [3] ABSTRACT-SYNTAX.&Type
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fSelectionCriteria(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 /**
  * objectSelectionCriteria ::= SEQUENCE {
  *  selectionLogic          [0] ENUMERATED { bacapp_selectionLogic },
  *  listOfSelectionCriteria [1] SelectionCriteria
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param subtree the sub tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
-fObjectSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset);
+fObjectSelectionCriteria(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset);
 
 /**
  * BACnet-Error ::= SEQUENCE {
@@ -2153,10 +2249,10 @@ fObjectSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree
  *    error-code  ENUMERATED {}
  *    }
  * }
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  */
 static guint
@@ -2165,10 +2261,10 @@ fError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 /**
  * Generic handler for context tagged values.  Mostly for handling
  * vendor-defined properties and services.
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  * @todo beautify this ugly construct
  */
@@ -2177,19 +2273,19 @@ fContextTaggedValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
 
 /**
  * realizes some ABSTRACT-SYNTAX.&Type
- * @param tvb
- * @param pinfo
- * @param tree
- * @param offset
+ * @param tvb the tv buffer of the current data
+ * @param pinfo the packet info of the current data
+ * @param tree the tree to append this item to
+ * @param offset the offset in the tvb
  * @return modified offset
  * @todo beautify this ugly construct
  */
 static guint
-fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+fAbstractSyntaxNType(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
 
 
 static guint
-fBitStringTagVS (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label,
+fBitStringTagVS(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label,
     const value_string *src);
 
 /**
@@ -2204,36 +2300,19 @@ proto_register_bacapp(void);
 void
 proto_reg_handoff_bacapp(void);
 
-/**
- * converts XXX coded strings to UTF-8
- * else 'in' is copied to 'out'
- * @param in  -- pointer to string
- * @param inbytesleft
- * @param out -- pointer to string
- * @param outbytesleft
- * @param fromcoding
- * @return count of modified characters of returned string, -1 for errors
- */
-static guint32
-fConvertXXXtoUTF8(gchar *in, gsize *inbytesleft, gchar *out, gsize *outbytesleft, const gchar *fromcoding);
-
-static void
-uni_to_string(char * data, gsize str_length, char *dest_buf);
-
 /* <<<< formerly bacapp.h */
 
-/* some hashes for segmented messages */
-static GHashTable *msg_fragment_table = NULL;
-static GHashTable *msg_reassembled_table = NULL;
+/* reassembly table for segmented messages */
+static reassembly_table msg_reassembly_table;
 
 /* some necessary forward function prototypes */
 static guint
-fApplicationTypesEnumerated (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
+fApplicationTypesEnumerated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
     const gchar *label, const value_string *vs);
 
-static const char *bacapp_unknown_service_str = "unknown service";
-static const char *ASHRAE_Reserved_Fmt = "(%d) Reserved for Use by ASHRAE";
-static const char *Vendor_Proprietary_Fmt = "(%d) Vendor Proprietary Value";
+static const char *bacapp_unknown_service_str = "unknown service";  /* Usage: no format specifiers */
+static const char ASHRAE_Reserved_Fmt[] = "(%d) Reserved for Use by ASHRAE";
+static const char Vendor_Proprietary_Fmt[] = "(%d) Vendor Proprietary Value";
 
 static const value_string
 BACnetTypeName[] = {
@@ -2359,6 +2438,69 @@ BACnetAction [] = {
     { 0, NULL}
 };
 
+static const value_string
+BACnetAccessEvent [] = {
+    {  0, "none"},
+    {  1, "granted"},
+    {  2, "muster"},
+    {  3, "passback-detected"},
+    {  4, "duress"},
+    {  5, "trace"},
+    {  6, "lockout-max-attempts"},
+    {  7, "lockout-other"},
+    {  8, "lockout-relinquished"},
+    {  9, "lockout-by-higher-priority"},
+    { 10, "out-of-service"},
+    { 11, "out-of-service-relinquished"},
+    { 12, "accompaniment-by"},
+    { 13, "authentication-factor-read"},
+    { 14, "authorization-delayed"},
+    { 15, "verification-required"},
+    /* Enumerated values 128-511 are used for events
+     * which indicate that access has been denied. */
+    { 128, "denied-deny-all"},
+    { 129, "denied-unknown-credential"},
+    { 130, "denied-authentication-unavailable"},
+    { 131, "denied-authentication-factor-timeout"},
+    { 132, "denied-incorrect-authentication-factor"},
+    { 133, "denied-zone-no-access-rights"},
+    { 134, "denied-point-no-access-rights"},
+    { 135, "denied-no-access-rights"},
+    { 136, "denied-out-of-time-range"},
+    { 137, "denied-threat-level"},
+    { 138, "denied-passback"},
+    { 139, "denied-unexpected-location-usage"},
+    { 140, "denied-max-attempts"},
+    { 141, "denied-lower-occupancy-limit"},
+    { 142, "denied-upper-occupancy-limit"},
+    { 143, "denied-authentication-factor-lost"},
+    { 144, "denied-authentication-factor-stolen"},
+    { 145, "denied-authentication-factor-damaged"},
+    { 146, "denied-authentication-factor-destroyed"},
+    { 147, "denied-authentication-factor-disabled"},
+    { 148, "denied-authentication-factor-error"},
+    { 149, "denied-credential-unassigned"},
+    { 150, "denied-credential-not-provisioned"},
+    { 151, "denied-credential-not-yet-active"},
+    { 152, "denied-credential-expired"},
+    { 153, "denied-credential-manual-disable"},
+    { 154, "denied-credential-lockout"},
+    { 155, "denied-credential-max-days"},
+    { 156, "denied-credential-max-uses"},
+    { 157, "denied-credential-inactivity"},
+    { 158, "denied-credential-disabled"},
+    { 159, "denied-no-accompaniment"},
+    { 160, "denied-incorrect-accompaniment"},
+    { 161, "denied-lockout"},
+    { 162, "denied-verification-failed"},
+    { 163, "denied-verification-timeout"},
+    { 164, "denied-other"},
+    { 0,  NULL}
+/* Enumerated values 0-512 are reserved for definition by ASHRAE.
+   Enumerated values 512-65535 may be used by others subject to
+   procedures and constraints described in Clause 23. */
+};
+
 static const value_string
 BACnetFileAccessMethod [] = {
     { 0, "record-access"},
@@ -2449,12 +2591,14 @@ BACnetLifeSafetyOperation [] = {
    procedures and constraints described in Clause 23. */
 };
 
+#if 0
 static const value_string
 BACnetLimitEnable [] = {
     { 0, "lowLimitEnable"},
     { 1, "highLimitEnable"},
     { 0, NULL}
 };
+#endif
 
 static const value_string
 BACnetLifeSafetyState [] = {
@@ -2554,10 +2698,11 @@ BACnetUnconfirmedServiceChoice [] = {
     { 6, "timeSynchronization"},
     { 7, "who-Has"},
     { 8, "who-Is"},
-    { 9, "utcTimeSynchonization"},
+    { 9, "utcTimeSynchronization"},
     { 0, NULL}
 };
 
+#if 0
 static const value_string
 BACnetUnconfirmedServiceRequest [] = {
     { 0, "i-Am-Request"},
@@ -2572,6 +2717,7 @@ BACnetUnconfirmedServiceRequest [] = {
     { 9, "utcTimeSynchonization-Request"},
     { 0, NULL}
 };
+#endif
 
 static const value_string
 BACnetObjectType [] = {
@@ -3011,7 +3157,7 @@ BACnetPropertyIdentifier [] = {
     {   6, "alarm-value"},
     {   7, "alarm-values"},
     {   8, "all"},
-    {   9, "all-write-successful"},
+    {   9, "all-writes-successful"},
     {  10, "apdu-segment-timeout"},
     {  11, "apdu-timeout"},
     {  12, "application-software-version"},
@@ -3049,7 +3195,7 @@ BACnetPropertyIdentifier [] = {
     {  44, "firmware-revision"},
     {  45, "high-limit"},
     {  46, "inactive-text"},
-    {  47, "in-progress"},
+    {  47, "in-process"},
     {  48, "instance-of"},
     {  49, "integral-constant"},
     {  50, "integral-constant-units"},
@@ -3354,20 +3500,22 @@ BACnetBinaryPV [] = {
 };
 
 
-#define ANSI_X34 0
-#define IBM_MS_DBCS 1
-#define JIS_C_6226 2
-#define ISO_10646_UCS4 3
-#define ISO_10646_UCS2 4
-#define ISO_18859_1 5
+#define ANSI_X3_4      0 /* ANSI X3.4, a/k/a "ASCII"; full UTF-8 since 2010 */
+                         /* See, for example, ANSI/ASHRAE Addendum k to ANSI/ASHRAE Standard 135-2008 */
+                         /* XXX - I've seen captures using this for ISO 8859-1 */
+#define IBM_MS_DBCS    1 /* "IBM/Microsoft DBCS"; was there only one such DBCS? */
+#define JIS_C_6226     2 /* JIS C 6226 */
+#define ISO_10646_UCS4 3 /* ISO 10646 (UCS-4) - 4-byte Unicode */
+#define ISO_10646_UCS2 4 /* ISO 10646 (UCS-2) - 2-byte Unicode Basic Multilingual Plane (not UTF-16, presumably) */
+#define ISO_8859_1     5 /* ISO 8859-1 */
 static const value_string
 BACnetCharacterSet [] = {
-    { ANSI_X34,      "ANSI X3.4 / UTF-8 (since 2010)"},
-    { IBM_MS_DBCS,   "IBM/Microsoft DBCS"},
-    { JIS_C_6226,    "JIS C 6226"},
-    { ISO_10646_UCS4, "ISO 10646(UCS-4)"},
-    { ISO_10646_UCS2, "ISO 10646(UCS-2)"},
-    { ISO_18859_1,    "ISO 18859-1"},
+    { ANSI_X3_4,      "ANSI X3.4 / UTF-8 (since 2010)"},
+    { IBM_MS_DBCS,    "IBM/Microsoft DBCS"},
+    { JIS_C_6226,     "JIS C 6226"},
+    { ISO_10646_UCS4, "ISO 10646 (UCS-4)"},
+    { ISO_10646_UCS2, "ISO 10646 (UCS-2)"},
+    { ISO_8859_1,     "ISO 8859-1"},
     { 0,     NULL}
 };
 
@@ -3559,7 +3707,7 @@ BACnetEventType [] = {
     {  4, "floating-limit" },
     {  5, "out-of-range" },
     {  6, "complex-event-type" },
-    {  7, "buffer-ready" },
+    {  7, "(deprecated)buffer-ready" },
     {  8, "change-of-life-safety" },
     {  9, "extended" },
     { 10, "buffer-ready" },
@@ -3865,6 +4013,11 @@ BACnetAccumulatorStatus [] = {
     { 0, NULL }
 };
 
+/* These values are (manually) transferred from
+ * http://www.bacnet.org/VendorID/BACnet Vendor IDs.htm
+ * Version: "As of September 16, 2013"
+ */
+
 static const value_string
 BACnetVendorIdentifiers [] = {
     {   0, "ASHRAE" },
@@ -3874,10 +4027,10 @@ BACnetVendorIdentifiers [] = {
     {   4, "PolarSoft" },
     {   5, "Johnson Controls, Inc." },
     {   6, "American Auto-Matrix" },
-    {   7, "Siemens Building Technologies, Ltd., Landis & Staefa Division Europe" },
+    {   7, "Siemens Schweiz AG (Formerly: Landis & Staefa Division Europe)" },
     {   8, "Delta Controls" },
-    {   9, "Siemens Building Technologies, Inc." },
-    {  10, "Tour Andover Controls Corporation" },
+    {   9, "Siemens Schweiz AG" },
+    {  10, "Schneider Electric" },
     {  11, "TAC" },
     {  12, "Orion Analysis Corporation" },
     {  13, "Teletrol Systems Inc." },
@@ -3889,7 +4042,7 @@ BACnetVendorIdentifiers [] = {
     {  19, "TAC AB" },
     {  20, "Hewlett-Packard Company" },
     {  21, "Dorsette's Inc." },
-    {  22, "Cerberus AG" },
+    {  22, "Siemens Schweiz AG (Formerly: Cerberus AG)" },
     {  23, "York Controls Group" },
     {  24, "Automated Logic Corporation" },
     {  25, "CSI Control Systems International" },
@@ -3900,11 +4053,11 @@ BACnetVendorIdentifiers [] = {
     {  30, "Hyundai Information Technology Co., Ltd." },
     {  31, "Tokimec Inc." },
     {  32, "Simplex" },
-    {  33, "North Communications Limited" },
+    {  33, "North Building Technologies Limited" },
     {  34, "Notifier" },
     {  35, "Reliable Controls Corporation" },
     {  36, "Tridium Inc." },
-    {  37, "Sierra Monitor Corp." },
+    {  37, "Sierra Monitor Corporation/FieldServer Technologies" },
     {  38, "Silicon Energy" },
     {  39, "Kieback & Peter GmbH & Co KG" },
     {  40, "Anacon Systems, Inc." },
@@ -3926,7 +4079,7 @@ BACnetVendorIdentifiers [] = {
     {  56, "Liebert Corporation" },
     {  57, "SEMCO Incorporated" },
     {  58, "Air Monitor Corporation" },
-    {  59, "TRIATEK, Inc." },
+    {  59, "TRIATEK, LLC" },
     {  60, "NexLight" },
     {  61, "Multistack" },
     {  62, "TSI Incorporated" },
@@ -3940,12 +4093,12 @@ BACnetVendorIdentifiers [] = {
     {  70, "RLE Technologies" },
     {  71, "Cardkey Systems" },
     {  72, "SECOM Co., Ltd." },
-    {  73, "ABB Gebaudetechnik AG Bereich NetServ" },
+    {  73, "ABB Gebaeudetechnik AG Bereich NetServ" },
     {  74, "KNX Association cvba" },
     {  75, "Institute of Electrical Installation Engineers of Japan (IEIEJ)" },
     {  76, "Nohmi Bosai, Ltd." },
     {  77, "Carel S.p.A." },
-    {  78, "AirSense Technology, Inc." },
+    {  78, "UTC Fire & Security Espana, S.L." },
     {  79, "Hochiki Corporation" },
     {  80, "Fr. Sauter AG" },
     {  81, "Matsushita Electric Works, Ltd." },
@@ -3976,7 +4129,7 @@ BACnetVendorIdentifiers [] = {
     { 106, "Meidensha Corporation" },
     { 107, "JCI Systems Integration Services" },
     { 108, "Freedom Corporation" },
-    { 109, "Neuberger Gebaudeautomation GmbH" },
+    { 109, "Neuberger Gebaeudeautomation GmbH" },
     { 110, "Sitronix" },
     { 111, "Leviton Manufacturing" },
     { 112, "Fujitsu Limited" },
@@ -3999,41 +4152,41 @@ BACnetVendorIdentifiers [] = {
     { 129, "Toshiba Carrier Corporation" },
     { 130, "Shenzhen Junzhi Hi-Tech Co., Ltd." },
     { 131, "Tokai Soft" },
-    { 132, "Lumisys" },
+    { 132, "Blue Ridge Technologies" },
     { 133, "Veris Industries" },
     { 134, "Centaurus Prime" },
     { 135, "Sand Network Systems" },
     { 136, "Regulvar, Inc." },
-    { 137, "Fastek International, Ltd." },
+    { 137, "AFDtek Division of Fastek International Inc." },
     { 138, "PowerCold Comfort Air Solutions, Inc." },
     { 139, "I Controls" },
     { 140, "Viconics Electronics, Inc." },
-    { 141, "Yaskawa Electric America, Inc." },
-    { 142, "Plueth Regelsysteme" },
+    { 141, "Yaskawa America, Inc." },
+    { 142, "DEOS control systems GmbH" },
     { 143, "Digitale Mess- und Steuersysteme AG" },
     { 144, "Fujitsu General Limited" },
     { 145, "Project Engineering S.r.l." },
     { 146, "Sanyo Electric Co., Ltd." },
     { 147, "Integrated Information Systems, Inc." },
     { 148, "Temco Controls, Ltd." },
-    { 149, "Airtek Technologies, Inc." },
+    { 149, "Airtek International Inc." },
     { 150, "Advantech Corporation" },
     { 151, "Titan Products, Ltd." },
     { 152, "Regel Partners" },
     { 153, "National Environmental Product" },
     { 154, "Unitec Corporation" },
     { 155, "Kanden Engineering Company" },
-    { 156, "Messner Gebaudetechnik GmbH" },
+    { 156, "Messner Gebaeudetechnik GmbH" },
     { 157, "Integrated.CH" },
-    { 158, "EH Price Limited" },
+    { 158, "Price Industries" },
     { 159, "SE-Elektronic GmbH" },
     { 160, "Rockwell Automation" },
     { 161, "Enflex Corp." },
     { 162, "ASI Controls" },
     { 163, "SysMik GmbH Dresden" },
     { 164, "HSC Regelungstechnik GmbH" },
-    { 165, "Smart Temp Australia Pty. Ltd." },
-    { 166, "PCI Lighting Control Systems" },
+    { 165, "Smart Temp Australia Pty.  Ltd." },
+    { 166, "Cooper Controls" },
     { 167, "Duksan Mecasys Co., Ltd." },
     { 168, "Fuji IT Co., Ltd." },
     { 169, "Vacon Plc" },
@@ -4055,7 +4208,7 @@ BACnetVendorIdentifiers [] = {
     { 185, "Hermos AG" },
     { 186, "CEZIM" },
     { 187, "Softing" },
-    { 188, "Lynxspring" },
+    { 188, "Lynxspring, Inc." },
     { 189, "Schneider Toshiba Inverter Europe" },
     { 190, "Danfoss Drives A/S" },
     { 191, "Eaton Corporation" },
@@ -4064,7 +4217,7 @@ BACnetVendorIdentifiers [] = {
     { 194, "Noveo, Inc." },
     { 195, "AMEV" },
     { 196, "Yokogawa Electric Corporation" },
-    { 197, "GFR Gesellschaft fur Regelungstechnik" },
+    { 197, "GFR Gesellschaft fuer Regelungstechnik" },
     { 198, "Exact Logic" },
     { 199, "Mass Electronics Pty Ltd dba Innotech Control Systems Australia" },
     { 200, "Kandenko Co., Ltd." },
@@ -4080,7 +4233,7 @@ BACnetVendorIdentifiers [] = {
     { 210, "NTT Facilities, Inc." },
     { 211, "VIPA GmbH" },
     { 212, "TSC21 Association of Japan" },
-    { 213, "BBP Energie Ltee" },
+    { 213, "Strato Automation" },
     { 214, "HRW Limited" },
     { 215, "Lighting Control & Design, Inc." },
     { 216, "Mercy Electronic and Electrical Industries" },
@@ -4088,7 +4241,7 @@ BACnetVendorIdentifiers [] = {
     { 218, "Impact Facility Solutions, Inc." },
     { 219, "Aircuity" },
     { 220, "Control Techniques, Ltd." },
-    { 221, "Evolve Control Systems, LLC" },
+    { 221, "OpenGeneral Pty., Ltd." },
     { 222, "WAGO Kontakttechnik GmbH & Co. KG" },
     { 223, "Cerus Industrial" },
     { 224, "Chloride Power Protection Company" },
@@ -4118,7 +4271,7 @@ BACnetVendorIdentifiers [] = {
     { 248, "Heat-Timer Corporation" },
     { 249, "Ingrasys Technology, Inc." },
     { 250, "Costerm Building Automation" },
-    { 251, "Wilo AG" },
+    { 251, "WILO SE" },
     { 252, "Embedia Technologies Corp." },
     { 253, "Technilog" },
     { 254, "HR Controls Ltd. & Co. KG" },
@@ -4129,14 +4282,14 @@ BACnetVendorIdentifiers [] = {
     { 259, "Larmia Control AB" },
     { 260, "BACnet Stack at SourceForge" },
     { 261, "G4S Security Services A/S" },
-    { 262, "Sitek S.p.A." },
+    { 262, "Exor International S.p.A." },
     { 263, "Cristal Controles" },
     { 264, "Regin AB" },
-    { 265, "Dimension Software, Inc. " },
+    { 265, "Dimension Software, Inc." },
     { 266, "SynapSense Corporation" },
     { 267, "Beijing Nantree Electronic Co., Ltd." },
     { 268, "Camus Hydronics Ltd." },
-    { 269, "Kawasaki Heavy Industries, Ltd. " },
+    { 269, "Kawasaki Heavy Industries, Ltd." },
     { 270, "Critical Environment Technologies" },
     { 271, "ILSHIN IBS Co., Ltd." },
     { 272, "ELESTA Energy Control AG" },
@@ -4173,8 +4326,8 @@ BACnetVendorIdentifiers [] = {
     { 303, "Real Time Automation, Inc." },
     { 304, "ITEC Hankyu-Hanshin Co." },
     { 305, "Cyrus E&M Engineering Co., Ltd." },
-    { 306, "Racine Federated, Inc." },
-    { 307, "Verari Systems, Inc." },
+    { 306, "Badger Meter" },
+    { 307, "Cirrascale Corporation" },
     { 308, "Elesta GmbH Building Automation" },
     { 309, "Securiton" },
     { 310, "OSlsoft, Inc." },
@@ -4199,7 +4352,7 @@ BACnetVendorIdentifiers [] = {
     { 329, "TROX GmbH" },
     { 330, "Beijing Hysine Technology Co., Ltd" },
     { 331, "RCK Controls, Inc." },
-    { 332, "ACELIA" },
+    { 332, "Distech Controls SAS" },
     { 333, "Novar/Honeywell" },
     { 334, "The S4 Group, Inc." },
     { 335, "Schneider Electric" },
@@ -4208,199 +4361,451 @@ BACnetVendorIdentifiers [] = {
     { 338, "Cllimalux S.A." },
     { 339, "VAISALA Oyj" },
     { 340, "COMPLEX (Beijing) Technology, Co., LTD." },
+    { 341, "SCADAmetrics" },
     { 342, "POWERPEG NSI Limited" },
     { 343, "BACnet Interoperability Testing Services, Inc." },
     { 344, "Teco a.s." },
-    { 345, "Plexus Technology Limited"},
-    { 346, "Energy Focus, Inc."},
-    { 347, "Powersmiths International Corp."},
-    { 348, "Nichibei Co., Ltd."},
-    { 349, "HKC Technology Ltd."},
-    { 350, "Ovation Networks, Inc."},
-    { 351, "Setra Systems"},
-    { 352, "AVG Automation"},
-    { 353, "ZXC Ltd."},
-    { 354, "Byte Sphere"},
-    { 355, "Generiton Co., Ltd."},
-    { 356, "Holter Regelarmaturen GmbH & Co. KG"},
-    { 357, "Bedford Instruments, LLC"},
-    { 358, "Standair Inc."},
-    { 359, "WEG Automation - R&D"},
-    { 360, "Prolon Control Systems ApS"},
-    { 361, "Inneasoft"},
-    { 362, "ConneXSoft GmbH"},
-    { 363, "CEAG Notlichtsysteme GmbH"},
-    { 364, "Distech Controls Inc."},
-    { 365, "Industrial Technology Research Institute"},
-    { 366, "ICONICS, Inc."},
-    { 367, "IQ Controls s.c."},
-    { 368, "OJ Electronics A/S"},
-    { 369, "Rolbit Ltd."},
-    { 370, "Synapsys Solutions Ltd."},
-    { 371, "ACME Engineering Prod. Ltd."},
-    { 372, "Zener Electric Pty, Ltd."},
-    { 373, "Selectronix, Inc."},
-    { 374, "Gorbet & Banerjee, LLC."},
-    { 375, "IME"},
-    { 376, "Stephen H. Dawson Computer Service"},
-    { 377, "Accutrol, LLC"},
-    { 378, "Schneider Elektronik GmbH"},
-    { 379, "Alpha-Inno Tec GmbH"},
-    { 380, "ADMMicro, Inc."},
-    { 381, "Greystone Energy Systems, Inc."},
-    { 382, "CAP Technologie"},
-    { 383, "KeRo Systems"},
-    { 384, "Domat Control System s.r.o."},
-    { 385, "Efektronics Pty. Ltd."},
-    { 386, "Hekatron Vertriebs GmbH"},
-    { 387, "Securiton AG"},
-    { 388, "Carlo Gavazzi Controls SpA"},
-    { 389, "Chipkin Automation Systems"},
-    { 390, "Savant Systems, LLC"},
-    { 391, "Simmtronic Lighting Controls"},
-    { 392, "Abelko Innovation AB"},
-    { 393, "Seresco Technologies Inc."},
-    { 394, "IT Watchdogs"},
-    { 395, "Automation Assist Japan Corp."},
-    { 396, "Thermokon Sensortechnik GmbH"},
-    { 397, "EGauge Systems, LLC"},
-    { 398, "Quantum Automation (ASIA) PTE, Ltd."},
-    { 399, "Toshiba Lighting & Technology Corp."},
-    { 400, "SPIN Engenharia de Automaca Ltda."},
-    { 401, "Logistics Systems & Software Services India PVT. Ltd."},
-    { 402, "Delta Controls Integration Products"},
-    { 403, "Focus Media"},
-    { 404, "LUMEnergi Inc."},
-    { 405, "Kara Systems"},
-    { 406, "RF Code, Inc."},
-    { 407, "Fatek Automation Corp."},
-    { 408, "JANDA Software Company, LLC"},
-    { 409, "Open System Solutions Limited"},
-    { 410, "Intelec Systems PTY Ltd."},
-    { 411, "Ecolodgix, LLC"},
-    { 412, "Douglas Lighting Controls"},
-    { 413, "iSAtech GmbH intelligente Sensoren Aktoren technologie"},
-    { 414, "AREAL"},
-    { 415, "Beckhoff Automation GmbH"},
-    { 416, "IPAS GmbH"},
-    { 417, "KE2 Therm Solutions"},
-    { 418, "Base2Products"},
-    { 419, "DTL Controls, LLC"},
-    { 420, "INNCOM International, Inc."},
-    { 421, "BTR Netcom GmbH"},
-    { 422, "Greentrol Automation, Inc"},
-    { 423, "BELIMO Automation AG"},
-    { 424, "Samsung Heavy Industries Co, Ltd"},
-    { 425, "Triacta Power Technologies, Inc."},
-    { 426, "Globestar Systems"},
-    { 427, "MLB Advanced Media, LP"},
-    { 428, "SWG Stuckmann Wirtschaftliche Gebaudesysteme GmbH"},
-    { 429, "SensorSwitch"},
-    { 430, "Multitek Power Limited"},
-    { 431, "Aquametro AG"},
-    { 432, "LG Electronics Inc."},
-    { 433, "Electronic Theatre Controls, Inc."},
-    { 434, "Mitsubishi Electric Corporation Nagoya Works"},
-    { 435, "Delta Electronics, Inc."},
-    { 436, "Elma Kurtalj, Ltd."},
-    { 437, "ADT Fire and Security Sp. A.o.o."},
-    { 438, "Nedap Security Management"},
-    { 439, "ESC Automation Inc."},
-    { 440, "DSP4YOU Ltd."},
-    { 441, "GE Sensing and Inspection Technologies"},
-    { 442, "Embedded Systems SIA"},
-    { 443, "BEFEGA GmbH"},
-    { 444, "Baseline Inc."},
-    { 445, "M2M Systems Integrators"},
-    { 446, "OEMCtrl"},
-    { 447, "Clarkson Controls Limited"},
-    { 448, "Rogerwell Control System Limited"},
-    { 449, "SCL Elements"},
-    { 450, "Hitachi Ltd."},
-    { 451, "Newron System SA"},
-    { 452, "BEVECO Gebouwautomatisering BV"},
-    { 453, "Streamside Solutions"},
-    { 454, "Yellowstone Soft"},
-    { 455, "Oztech Intelligent Systems Pty Ltd."},
-    { 456, "Novelan GmbH"},
-    { 457, "Flexim Americas Corporation"},
-    { 458, "ICP DAS Co., Ltd."},
-    { 459, "CARMA Industries Inc."},
-    { 460, "Log-One Ltd."},
-    { 461, "TECO Electric & Machinery Co., Ltd."},
-    { 462, "ConnectEx, Inc."},
-    { 463, "Turbo DDC Sudwest"},
-    { 464, "Quatrosense Environmental Ltd."},
-    { 465, "Fifth Light Technology Ltd."},
-    { 466, "Scientific Solutions, Ltd."},
-    { 467, "Controller Area Network Solutions (M) Sdn Bhd"},
-    { 468, "RESOL - Elektronische Regelungen GmbH"},
-    { 469, "RPBUS LLC"},
-    { 470, "BRS Sistemas Eletronicos"},
-    { 471, "WindowMaster A/S"},
-    { 472, "Sunlux Technologies Ltd."},
-    { 473, "Measurlogic"},
-    { 474, "Frimat GmbH"},
-    { 475, "Spirax Sarco"},
-    { 476, "Luxtron"},
-    { 477, "Raypak Inc"},
-    { 478, "Air Monitor Corporation"},
-    { 479, "Regler Och Webbteknik Sverige (ROWS)"},
-    { 480, "Intelligent Lighting Controls Inc."},
-    { 481, "Sanyo Electric Industry Co., Ltd"},
-    { 482, "E-Mon Energy Monitoring Products"},
-    { 483, "Digital Control Systems"},
-    { 484, "ATI Airtest Technologies, Inc."},
-    { 485, "SCS SA"},
-    { 486, "HMS Industrial Networks AB"},
-    { 487, "Shenzhen Universal Intellisys Co Ltd"},
-    { 488, "EK Intellisys Sdn Bhd"},
-    { 489, "SysCom"},
-    { 490, "Firecom, Inc."},
-    { 491, "ESA Elektroschaltanlagen Grimma GmbH"},
-    { 492, "Kumahira Co Ltd"},
-    { 493, "Hotraco"},
-    { 494, "SABO Elektronik GmbH"},
-    { 495, "Equip'Trans"},
-    { 496, "TCS Basys Controls"},
-    { 497, "FlowCon International A/S"},
-    { 498, "ThyssenKrupp Elevator Americas"},
-    { 499, "Abatement Technologies"},
-    { 500, "Continental Control Systems, LLC"},
-    { 501, "WISAG Automatisierungstechnik GmbH & Co KG"},
-    { 502, "EasyIO"},
-    { 503, "EAP-Electric GmbH"},
-    { 504, "Hardmeier"},
-    { 505, "Mircom Group of Companies"},
-    { 506, "Quest Controls"},
-    { 507, "Mestek, Inc"},
-    { 508, "Pulse Energy"},
-    { 509, "Tachikawa Corporation"},
-    { 510, "University of Nebraska-Lincoln"},
-    { 511, "Redwood Systems"},
-    { 512, "PASStec Industrie-Elektronik GmbH"},
-    { 513, "NgEK, Inc."},
-    { 514, "FAW Electronics Ltd"},
-    { 515, "Jireh Energy Tech Co., Ltd."},
-    { 516, "Enlighted Inc."},
-    { 517, "El-Piast Sp. Z o.o"},
-    { 518, "NetxAutomation Software GmbH"},
-    { 519, "Invertek Drives"},
-    { 520, "Deutschmann Automation GmbH & Co. KG"},
-    { 521, "EMU Electronic AG"},
-    { 522, "Phaedrus Limited"},
-    { 523, "Sigmatek GmbH & Co KG"},
-    { 524, "Marlin Controls"},
-    { 525, "Circutor, SA"},
-    { 526, "UTC Fire & Security"},
-    { 527, "DENT Instruments, Inc."},
-    { 528, "FHP Manufacturing Company - Bosch Group"},
-    { 529, "GE Intelligent Platforms"},
-    { 530, "Inner Range Pty Ltd"},
-    { 531, "GLAS Energy Technology"},
-    { 532, "MSR-Electronic-GmbH"},
+    { 345, "Plexus Technology, Inc." },
+    { 346, "Energy Focus, Inc." },
+    { 347, "Powersmiths International Corp." },
+    { 348, "Nichibei Co., Ltd." },
+    { 349, "HKC Technology Ltd." },
+    { 350, "Ovation Networks, Inc." },
+    { 351, "Setra Systems" },
+    { 352, "AVG Automation" },
+    { 353, "ZXC Ltd." },
+    { 354, "Byte Sphere" },
+    { 355, "Generiton Co., Ltd." },
+    { 356, "Holter Regelarmaturen GmbH & Co. KG" },
+    { 357, "Bedford Instruments, LLC" },
+    { 358, "Standair Inc." },
+    { 359, "WEG Automation - R&D" },
+    { 360, "Prolon Control Systems ApS" },
+    { 361, "Inneasoft" },
+    { 362, "ConneXSoft GmbH" },
+    { 363, "CEAG Notlichtsysteme GmbH" },
+    { 364, "Distech Controls Inc." },
+    { 365, "Industrial Technology Research Institute" },
+    { 366, "ICONICS, Inc." },
+    { 367, "IQ Controls s.c." },
+    { 368, "OJ Electronics A/S" },
+    { 369, "Rolbit Ltd." },
+    { 370, "Synapsys Solutions Ltd." },
+    { 371, "ACME Engineering Prod. Ltd." },
+    { 372, "Zener Electric Pty, Ltd." },
+    { 373, "Selectronix, Inc." },
+    { 374, "Gorbet & Banerjee, LLC." },
+    { 375, "IME" },
+    { 376, "Stephen H. Dawson Computer Service" },
+    { 377, "Accutrol, LLC" },
+    { 378, "Schneider Elektronik GmbH" },
+    { 379, "Alpha-Inno Tec GmbH" },
+    { 380, "ADMMicro, Inc." },
+    { 381, "Greystone Energy Systems, Inc." },
+    { 382, "CAP Technologie" },
+    { 383, "KeRo Systems" },
+    { 384, "Domat Control System s.r.o." },
+    { 385, "Efektronics Pty. Ltd." },
+    { 386, "Hekatron Vertriebs GmbH" },
+    { 387, "Securiton AG" },
+    { 388, "Carlo Gavazzi Controls SpA" },
+    { 389, "Chipkin Automation Systems" },
+    { 390, "Savant Systems, LLC" },
+    { 391, "Simmtronic Lighting Controls" },
+    { 392, "Abelko Innovation AB" },
+    { 393, "Seresco Technologies Inc." },
+    { 394, "IT Watchdogs" },
+    { 395, "Automation Assist Japan Corp." },
+    { 396, "Thermokon Sensortechnik GmbH" },
+    { 397, "EGauge Systems, LLC" },
+    { 398, "Quantum Automation (ASIA) PTE, Ltd." },
+    { 399, "Toshiba Lighting & Technology Corp." },
+    { 400, "SPIN Engenharia de Automacao Ltda." },
+    { 401, "Logistics Systems & Software Services India PVT. Ltd." },
+    { 402, "Delta Controls Integration Products" },
+    { 403, "Focus Media" },
+    { 404, "LUMEnergi Inc." },
+    { 405, "Kara Systems" },
+    { 406, "RF Code, Inc." },
+    { 407, "Fatek Automation Corp." },
+    { 408, "JANDA Software Company, LLC" },
+    { 409, "Open System Solutions Limited" },
+    { 410, "Intelec Systems PTY Ltd." },
+    { 411, "Ecolodgix, LLC" },
+    { 412, "Douglas Lighting Controls" },
+    { 413, "iSAtech GmbH" },
+    { 414, "AREAL" },
+    { 415, "Beckhoff Automation GmbH" },
+    { 416, "IPAS GmbH" },
+    { 417, "KE2 Therm Solutions" },
+    { 418, "Base2Products" },
+    { 419, "DTL Controls, LLC" },
+    { 420, "INNCOM International, Inc." },
+    { 421, "BTR Netcom GmbH" },
+    { 422, "Greentrol Automation, Inc" },
+    { 423, "BELIMO Automation AG" },
+    { 424, "Samsung Heavy Industries Co, Ltd" },
+    { 425, "Triacta Power Technologies, Inc." },
+    { 426, "Globestar Systems" },
+    { 427, "MLB Advanced Media, LP" },
+    { 428, "SWG Stuckmann Wirtschaftliche Gebaeudesysteme GmbH" },
+    { 429, "SensorSwitch" },
+    { 430, "Multitek Power Limited" },
+    { 431, "Aquametro AG" },
+    { 432, "LG Electronics Inc." },
+    { 433, "Electronic Theatre Controls, Inc." },
+    { 434, "Mitsubishi Electric Corporation Nagoya Works" },
+    { 435, "Delta Electronics, Inc." },
+    { 436, "Elma Kurtalj, Ltd." },
+    { 437, "ADT Fire and Security Sp. A.o.o." },
+    { 438, "Nedap Security Management" },
+    { 439, "ESC Automation Inc." },
+    { 440, "DSP4YOU Ltd." },
+    { 441, "GE Sensing and Inspection Technologies" },
+    { 442, "Embedded Systems SIA" },
+    { 443, "BEFEGA GmbH" },
+    { 444, "Baseline Inc." },
+    { 445, "M2M Systems Integrators" },
+    { 446, "OEMCtrl" },
+    { 447, "Clarkson Controls Limited" },
+    { 448, "Rogerwell Control System Limited" },
+    { 449, "SCL Elements" },
+    { 450, "Hitachi Ltd." },
+    { 451, "Newron System SA" },
+    { 452, "BEVECO Gebouwautomatisering BV" },
+    { 453, "Streamside Solutions" },
+    { 454, "Yellowstone Soft" },
+    { 455, "Oztech Intelligent Systems Pty Ltd." },
+    { 456, "Novelan GmbH" },
+    { 457, "Flexim Americas Corporation" },
+    { 458, "ICP DAS Co., Ltd." },
+    { 459, "CARMA Industries Inc." },
+    { 460, "Log-One Ltd." },
+    { 461, "TECO Electric & Machinery Co., Ltd." },
+    { 462, "ConnectEx, Inc." },
+    { 463, "Turbo DDC Suedwest" },
+    { 464, "Quatrosense Environmental Ltd." },
+    { 465, "Fifth Light Technology Ltd." },
+    { 466, "Scientific Solutions, Ltd." },
+    { 467, "Controller Area Network Solutions (M) Sdn Bhd" },
+    { 468, "RESOL - Elektronische Regelungen GmbH" },
+    { 469, "RPBUS LLC" },
+    { 470, "BRS Sistemas Eletronicos" },
+    { 471, "WindowMaster A/S" },
+    { 472, "Sunlux Technologies Ltd." },
+    { 473, "Measurlogic" },
+    { 474, "Frimat GmbH" },
+    { 475, "Spirax Sarco" },
+    { 476, "Luxtron" },
+    { 477, "Raypak Inc" },
+    { 478, "Air Monitor Corporation" },
+    { 479, "Regler Och Webbteknik Sverige (ROWS)" },
+    { 480, "Intelligent Lighting Controls Inc." },
+    { 481, "Sanyo Electric Industry Co., Ltd" },
+    { 482, "E-Mon Energy Monitoring Products" },
+    { 483, "Digital Control Systems" },
+    { 484, "ATI Airtest Technologies, Inc." },
+    { 485, "SCS SA" },
+    { 486, "HMS Industrial Networks AB" },
+    { 487, "Shenzhen Universal Intellisys Co Ltd" },
+    { 488, "EK Intellisys Sdn Bhd" },
+    { 489, "SysCom" },
+    { 490, "Firecom, Inc." },
+    { 491, "ESA Elektroschaltanlagen Grimma GmbH" },
+    { 492, "Kumahira Co Ltd" },
+    { 493, "Hotraco" },
+    { 494, "SABO Elektronik GmbH" },
+    { 495, "Equip'Trans" },
+    { 496, "TCS Basys Controls" },
+    { 497, "FlowCon International A/S" },
+    { 498, "ThyssenKrupp Elevator Americas" },
+    { 499, "Abatement Technologies" },
+    { 500, "Continental Control Systems, LLC" },
+    { 501, "WISAG Automatisierungstechnik GmbH & Co KG" },
+    { 502, "EasyIO" },
+    { 503, "EAP-Electric GmbH" },
+    { 504, "Hardmeier" },
+    { 505, "Mircom Group of Companies" },
+    { 506, "Quest Controls" },
+    { 507, "Mestek, Inc" },
+    { 508, "Pulse Energy" },
+    { 509, "Tachikawa Corporation" },
+    { 510, "University of Nebraska-Lincoln" },
+    { 511, "Redwood Systems" },
+    { 512, "PASStec Industrie-Elektronik GmbH" },
+    { 513, "NgEK, Inc." },
+    { 514, "FAW Electronics Ltd" },
+    { 515, "Jireh Energy Tech Co., Ltd." },
+    { 516, "Enlighted Inc." },
+    { 517, "El-Piast Sp. Z o.o" },
+    { 518, "NetxAutomation Software GmbH" },
+    { 519, "Invertek Drives" },
+    { 520, "Deutschmann Automation GmbH & Co. KG" },
+    { 521, "EMU Electronic AG" },
+    { 522, "Phaedrus Limited" },
+    { 523, "Sigmatek GmbH & Co KG" },
+    { 524, "Marlin Controls" },
+    { 525, "Circutor, SA" },
+    { 526, "UTC Fire & Security" },
+    { 527, "DENT Instruments, Inc." },
+    { 528, "FHP Manufacturing Company - Bosch Group" },
+    { 529, "GE Intelligent Platforms" },
+    { 530, "Inner Range Pty Ltd" },
+    { 531, "GLAS Energy Technology" },
+    { 532, "MSR-Electronic-GmbH" },
+    { 533, "Energy Control Systems, Inc." },
+    { 534, "EMT Controls" },
+    { 535, "Daintree Networks Inc." },
+    { 536, "EURO ICC d.o.o" },
+    { 537, "TE Connectivity Energy" },
+    { 538, "GEZE GmbH" },
+    { 539, "NEC Corporation" },
+    { 540, "Ho Cheung International Company Limited" },
+    { 541, "Sharp Manufacturing Systems Corporation" },
+    { 542, "DOT CONTROLS a.s." },
+    { 543, "BeaconMedaes" },
+    { 544, "Midea Commercial Aircon" },
+    { 545, "WattMaster Controls" },
+    { 546, "Kamstrup A/S" },
+    { 547, "CA Computer Automation GmbH" },
+    { 548, "Laars Heating Systems Company" },
+    { 549, "Hitachi Systems, Ltd." },
+    { 550, "Fushan AKE Electronic Engineering Co., Ltd." },
+    { 551, "Toshiba International Corporation" },
+    { 552, "Starman Systems, LLC" },
+    { 553, "Samsung Techwin Co., Ltd." },
+    { 554, "ISAS-Integrated Switchgear and Systems P/L" },
+    { 556, "Obvius" },
+    { 557, "Marek Guzik" },
+    { 558, "Vortek Instruments, LLC" },
+    { 559, "Universal Lighting Technologies" },
+    { 560, "Myers Power Products, Inc." },
+    { 561, "Vector Controls GmbH" },
+    { 562, "Crestron Electronics, Inc." },
+    { 563, "A&E Controls Limited" },
+    { 564, "Projektomontaza A.D." },
+    { 565, "Freeaire Refrigeration" },
+    { 566, "Aqua Cooler Pty Limited" },
+    { 567, "Basic Controls" },
+    { 568, "GE Measurement and Control Solutions Advanced Sensors" },
+    { 569, "EQUAL Networks" },
+    { 570, "Millennial Net" },
+    { 571, "APLI Ltd" },
+    { 572, "Electro Industries/GaugeTech" },
+    { 573, "SangMyung University" },
+    { 574, "Coppertree Analytics, Inc." },
+    { 575, "CoreNetiX GmbH" },
+    { 576, "Acutherm" },
+    { 577, "Dr. Riedel Automatisierungstechnik GmbH" },
+    { 578, "Shina System Co., Ltd" },
+    { 579, "Iqapertus" },
+    { 580, "PSE Technology" },
+    { 581, "BA Systems" },
+    { 582, "BTICINO" },
+    { 583, "Monico, Inc." },
+    { 584, "iCue" },
+    { 585, "tekmar Control Systems Ltd." },
+    { 586, "Control Technology Corporation" },
+    { 587, "GFAE GmbH" },
+    { 588, "BeKa Software GmbH" },
+    { 589, "Isoil Industria SpA" },
+    { 590, "Home Systems Consulting SpA" },
+    { 591, "Socomec" },
+    { 592, "Everex Communications, Inc." },
+    { 593, "Ceiec Electric Technology" },
+    { 594, "Atrila GmbH" },
+    { 595, "WingTechs" },
+    { 596, "Shenzhen Mek Intellisys Pte Ltd." },
+    { 597, "Nestfield Co., Ltd." },
+    { 598, "Swissphone Telecom AG" },
+    { 599, "PNTECH JSC" },
+    { 600, "Horner APG, LLC" },
+    { 601, "PVI Industries, LLC" },
+    { 602, "Ela-compil" },
+    { 603, "Pegasus Automation International LLC" },
+    { 604, "Wight Electronic Services Ltd." },
+    { 605, "Marcom" },
+    { 606, "Exhausto A/S" },
+    { 607, "Dwyer Instruments, Inc." },
+    { 608, "Link GmbH" },
+    { 609, "Oppermann Regelgerate GmbH" },
+    { 610, "NuAire, Inc." },
+    { 611, "Nortec Humidity, Inc." },
+    { 612, "Bigwood Systems, Inc." },
+    { 613, "Enbala Power Networks" },
+    { 614, "Inter Energy Co., Ltd." },
+    { 615, "ETC" },
+    { 616, "COMELEC S.A.R.L" },
+    { 617, "Pythia Technologies" },
+    { 618, "TrendPoint Systems, Inc." },
+    { 619, "AWEX" },
+    { 620, "Eurevia" },
+    { 621, "Kongsberg E-lon AS" },
+    { 622, "FlaktWoods" },
+    { 623, "E + E Elektronik GES M.B.H." },
+    { 624, "ARC Informatique" },
+    { 625, "SKIDATA AG" },
+    { 626, "WSW Solutions" },
+    { 627, "Trefon Electronic GmbH" },
+    { 628, "Dongseo System" },
+    { 629, "Kanontec Intelligence Technology Co., Ltd." },
+    { 630, "EVCO S.p.A." },
+    { 631, "Accuenergy (CANADA) Inc." },
+    { 632, "SoftDEL" },
+    { 633, "Orion Energy Systems, Inc." },
+    { 634, "Roboticsware" },
+    { 635, "DOMIQ Sp. z o.o." },
+    { 636, "Solidyne" },
+    { 637, "Elecsys Corporation" },
+    { 638, "Conditionaire International Pty. Limited" },
+    { 639, "Quebec, Inc." },
+    { 640, "Homerun Holdings" },
+    { 641, "Murata Americas" },
+    { 642, "Comptek" },
+    { 643, "Westco Systems, Inc." },
+    { 644, "Advancis Software & Services GmbH" },
+    { 645, "Intergrid, LLC" },
+    { 646, "Markerr Controls, Inc." },
+    { 647, "Toshiba Elevator and Building Systems Corporation" },
+    { 648, "Spectrum Controls, Inc." },
+    { 649, "Mkservice" },
+    { 650, "Fox Thermal Instruments" },
+    { 651, "SyxthSense Ltd" },
+    { 652, "DUHA System S R.O." },
+    { 653, "NIBE" },
+    { 654, "Melink Corporation" },
+    { 655, "Fritz-Haber-Institut" },
+    { 656, "MTU Onsite Energy GmbH, Gas Power Systems" },
+    { 657, "Omega Engineering, Inc." },
+    { 658, "Avelon" },
+    { 659, "Ywire Technologies, Inc." },
+    { 660, "M.R. Engineering Co., Ltd." },
+    { 661, "Lochinvar, LLC" },
+    { 662, "Sontay Limited" },
+    { 663, "GRUPA Slawomir Chelminski" },
+    { 664, "Arch Meter Corporation" },
+    { 665, "Senva, Inc." },
+    { 667, "FM-Tec" },
+    { 668, "Systems Specialists, Inc." },
+    { 669, "SenseAir" },
+    { 670, "AB IndustrieTechnik Srl" },
+    { 671, "Cortland Research, LLC" },
+    { 672, "MediaView" },
+    { 673, "VDA Elettronica" },
+    { 674, "CSS, Inc." },
+    { 675, "Tek-Air Systems, Inc." },
+    { 676, "ICDT" },
+    { 677, "The Armstrong Monitoring Corporation" },
+    { 678, "DIXELL S.r.l" },
+    { 679, "Lead System, Inc." },
+    { 680, "ISM EuroCenter S.A." },
+    { 681, "TDIS" },
+    { 682, "Trade FIDES" },
+    { 683, "Knuerr GmbH (Emerson Network Power)" },
+    { 684, "Resource Data Management" },
+    { 685, "Abies Technology, Inc." },
+    { 686, "Amalva" },
+    { 687, "MIRAE Electrical Mfg. Co., Ltd." },
+    { 688, "HunterDouglas Architectural Projects Scandinavia ApS" },
+    { 689, "RUNPAQ Group Co., Ltd" },
+    { 690, "Unicard SA" },
+    { 691, "IE Technologies" },
+    { 692, "Ruskin Manufacturing" },
+    { 693, "Calon Associates Limited" },
+    { 694, "Contec Co., Ltd." },
+    { 695, "iT GmbH" },
+    { 696, "Autani Corporation" },
+    { 697, "Christian Fortin" },
+    { 698, "HDL" },
+    { 699, "IPID Sp. Z.O.O Limited" },
+    { 700, "Fuji Electric Co., Ltd" },
+    { 701, "View, Inc." },
+    { 702, "Samsung S1 Corporation" },
+    { 703, "New Lift" },
+    { 704, "VRT Systems" },
+    { 705, "Motion Control Engineering, Inc." },
+    { 706, "Weiss Klimatechnik GmbH" },
+    { 707, "Elkon" },
+    { 708, "Eliwell Controls S.r.l." },
+    { 709, "Japan Computer Technos Corp" },
+    { 710, "Rational Network ehf" },
+    { 711, "Magnum Energy Solutions, LLC" },
+    { 712, "MelRok" },
+    { 713, "VAE Group" },
+    { 714, "LGCNS" },
+    { 715, "Berghof Automationstechnik GmbH" },
+    { 716, "Quark Communications, Inc." },
+    { 717, "Sontex" },
+    { 718, "mivune AG" },
+    { 719, "Panduit" },
+    { 720, "Smart Controls, LLC" },
+    { 721, "Compu-Aire, Inc." },
+    { 722, "Sierra" },
+    { 723, "ProtoSense Technologies" },
+    { 724, "Eltrac Technologies Pvt Ltd" },
+    { 725, "Bektas Invisible Controls GmbH" },
+    { 726, "Entelec" },
+    { 727, "Innexiv" },
+    { 728, "Covenant" },
+    { 729, "Davitor AB" },
+    { 730, "TongFang Technovator" },
+    { 731, "Building Robotics, Inc." },
+    { 732, "HSS-MSR UG" },
+    { 733, "FramTack LLC" },
+    { 734, "B. L. Acoustics, Ltd." },
+    { 735, "Traxxon Rock Drills, Ltd" },
+    { 736, "Franke" },
+    { 737, "Wurm GmbH & Co" },
+    { 738, "AddENERGIE" },
+    { 739, "Mirle Automation Corporation" },
+    { 740, "Ibis Networks" },
+    { 741, "ID-KARTA s.r.o." },
+    { 742, "Anaren, Inc." },
+    { 743, "Span, Incorporated" },
+    { 744, "Bosch Thermotechnology Corp" },
+    { 745, "DRC Technology S.A." },
+    { 746, "Shanghai Energy Building Technology Co, Ltd" },
+    { 747, "Fraport AG" },
+    { 748, "Flowgroup" },
+    { 749, "Skytron Energy, GmbH" },
+    { 750, "ALTEL Wicha, Golda Sp. J." },
+    { 751, "Drupal" },
+    { 752, "Axiomatic Technology, Ltd" },
+    { 753, "Bohnke + Partner" },
+    { 754, "Function 1" },
+    { 755, "Optergy Pty, Ltd" },
+    { 756, "LSI Virticus" },
+    { 757, "Konzeptpark GmbH" },
+    { 758, "Hubbell Building Automation, Inc." },
+    { 759, "eCurv, Inc." },
+    { 760, "Agnosys GmbH" },
+    { 761, "Shanghai Sunfull Automation Co., LTD" },
+    { 762, "Kurz Instruments, Inc." },
+    { 763, "Cias Elettronica S.r.l." },
+    { 764, "Multiaqua, Inc." },
+    { 765, "BlueBox" },
+    { 766, "Sensidyne" },
+    { 767, "Viessmann Elektronik GmbH" },
+    { 768, "ADFweb.com srl" },
+    { 769, "Gaylord Industries" },
+    { 770, "Majur Ltd." },
+    { 771, "Shanghai Huilin Technology Co., Ltd." },
+    { 772, "Exotronic" },
+    { 773, "Safecontrol spol s.r.o." },
+    { 774, "Amatis" },
+    { 775, "Universal Electric Corporation" },
+    { 776, "iBACnet" },
+    { 778, "Smartrise Engineering, Inc." },
+    { 779, "Miratron, Inc." },
+    { 780, "SmartEdge" },
+    { 781, "Mitsubishi Electric Australia Pty Ltd" },
+    { 782, "Triangle Research International Ptd Ltd" },
+    { 783, "Produal Oy" },
+    { 784, "Milestone Systems A/S" },
+    { 785, "Trustbridge" },
     { 0, NULL }
 };
+static value_string_ext BACnetVendorIdentifiers_ext = VALUE_STRING_EXT_INIT(BACnetVendorIdentifiers);
 
 static int proto_bacapp = -1;
 static int hf_bacapp_type = -1;
@@ -4428,6 +4833,7 @@ static int hf_BACnetExtendedTagNumber = -1;
 static int hf_BACnetNamedTag = -1;
 static int hf_BACnetTagClass = -1;
 static int hf_BACnetCharacterSet = -1;
+static int hf_BACnetCodePage = -1;
 static int hf_bacapp_tag_lvt = -1;
 static int hf_bacapp_tag_ProcessId = -1;
 static int hf_bacapp_uservice = -1;
@@ -4458,7 +4864,9 @@ static gint ett_bacapp_tag = -1;
 static gint ett_bacapp_list = -1;
 static gint ett_bacapp_value = -1;
 
-static dissector_handle_t data_handle;
+static expert_field ei_bacapp_bad_length = EI_INIT;
+static expert_field ei_bacapp_bad_tag = EI_INIT;
+
 static gint32 propertyIdentifier = -1;
 static gint32 propertyArrayIndex = -1;
 static guint32 object_type = 4096;
@@ -4488,25 +4896,36 @@ bacapp_packet_stats_tree_init(stats_tree* st)
     st_node_packets_by_ip_dst = stats_tree_create_node(st, st_str_packets_by_ip_dst, st_node_packets_by_ip, TRUE);
 }
 
+static gchar *
+bacapp_get_address_label(const char *tag, address *addr)
+{
+    gchar *addr_str, *label_str;
+
+    addr_str = address_to_str(NULL, addr);
+    label_str = wmem_strconcat(NULL, tag, addr_str, NULL);
+    wmem_free(NULL, addr_str);
+    return label_str;
+}
+
 static int
 bacapp_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
 {
-    int packets_for_this_dst;
-    int packets_for_this_src;
-    int service_for_this_dst;
-    int service_for_this_src;
-    int src_for_this_dst;
-    int dst_for_this_src;
-    int objectid_for_this_dst;
-    int objectid_for_this_src;
-    int instanceid_for_this_dst;
-    int instanceid_for_this_src;
+    int    packets_for_this_dst;
+    int    packets_for_this_src;
+    int    service_for_this_dst;
+    int    service_for_this_src;
+    int    src_for_this_dst;
+    int    dst_for_this_src;
+    int    objectid_for_this_dst;
+    int    objectid_for_this_src;
+    int    instanceid_for_this_dst;
+    int    instanceid_for_this_src;
     gchar *dststr;
     gchar *srcstr;
-    const bacapp_info_value_t *binfo = p;
+    const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
 
-    srcstr = ep_strconcat("Src: ", address_to_str(&pinfo->src), NULL);
-    dststr = ep_strconcat("Dst: ", address_to_str(&pinfo->dst), NULL);
+    srcstr = bacapp_get_address_label("Src: ", &pinfo->src);
+    dststr = bacapp_get_address_label("Dst: ", &pinfo->dst);
 
     tick_stat_node(st, st_str_packets_by_ip, 0, TRUE);
     packets_for_this_dst = tick_stat_node(st, st_str_packets_by_ip_dst, st_node_packets_by_ip, TRUE);
@@ -4526,6 +4945,9 @@ bacapp_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt
         }
     }
 
+    wmem_free(NULL, srcstr);
+    wmem_free(NULL, dststr);
+
     return 1;
 }
 
@@ -4543,16 +4965,16 @@ static int
 bacapp_stats_tree_service(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
 {
     int    servicetype;
-    int    src,dst;
+    int    src, dst;
     int    objectid;
 
     gchar *dststr;
     gchar *srcstr;
 
-    const bacapp_info_value_t *binfo = p;
+    const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
 
-    srcstr = ep_strconcat("Src: ", address_to_str(&pinfo->src), NULL);
-    dststr = ep_strconcat("Dst: ", address_to_str(&pinfo->dst), NULL);
+    srcstr = bacapp_get_address_label("Src: ", &pinfo->src);
+    dststr = bacapp_get_address_label("Dst: ", &pinfo->dst);
 
     tick_stat_node(st, st_str_packets_by_service, 0, TRUE);
     if (binfo->service_type) {
@@ -4565,6 +4987,9 @@ bacapp_stats_tree_service(stats_tree* st, packet_info* pinfo, epan_dissect_t* ed
         }
     }
 
+    wmem_free(NULL, srcstr);
+    wmem_free(NULL, dststr);
+
     return 1;
 }
 
@@ -4582,15 +5007,15 @@ static int
 bacapp_stats_tree_objectid(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
 {
     int    servicetype;
-    int    src,dst;
+    int    src, dst;
     int    objectid;
 
     gchar *dststr;
     gchar *srcstr;
-    const bacapp_info_value_t *binfo = p;
+    const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
 
-    srcstr = ep_strconcat("Src: ", address_to_str(&pinfo->src), NULL);
-    dststr = ep_strconcat("Dst: ", address_to_str(&pinfo->dst), NULL);
+    srcstr = bacapp_get_address_label("Src: ", &pinfo->src);
+    dststr = bacapp_get_address_label("Dst: ", &pinfo->dst);
 
     tick_stat_node(st, st_str_packets_by_objectid, 0, TRUE);
     if (binfo->object_ident) {
@@ -4603,6 +5028,9 @@ bacapp_stats_tree_objectid(stats_tree* st, packet_info* pinfo, epan_dissect_t* e
         }
     }
 
+    wmem_free(NULL, srcstr);
+    wmem_free(NULL, dststr);
+
     return 1;
 }
 
@@ -4620,15 +5048,15 @@ static int
 bacapp_stats_tree_instanceid(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
 {
     int    servicetype;
-    int    src,dst;
+    int    src, dst;
     int    instanceid;
 
     gchar *dststr;
     gchar *srcstr;
-    const bacapp_info_value_t *binfo = p;
+    const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
 
-    srcstr = ep_strconcat("Src: ", address_to_str(&pinfo->src), NULL);
-    dststr = ep_strconcat("Dst: ", address_to_str(&pinfo->dst), NULL);
+    srcstr = bacapp_get_address_label("Src: ", &pinfo->src);
+    dststr = bacapp_get_address_label("Dst: ", &pinfo->dst);
 
     tick_stat_node(st, st_str_packets_by_instanceid, 0, TRUE);
     if (binfo->object_ident) {
@@ -4640,6 +5068,10 @@ bacapp_stats_tree_instanceid(stats_tree* st, packet_info* pinfo, epan_dissect_t*
             tick_stat_node(st, binfo->object_ident, servicetype, FALSE);
         }
     }
+
+    wmem_free(NULL, srcstr);
+    wmem_free(NULL, dststr);
+
     return 1;
 }
 
@@ -4648,19 +5080,19 @@ bacapp_stats_tree_instanceid(stats_tree* st, packet_info* pinfo, epan_dissect_t*
 static void
 register_bacapp_stat_trees(void)
 {
-    stats_tree_register("bacapp","bacapp_ip","BACnet/Packets sorted by IP", 0,
+    stats_tree_register("bacapp", "bacapp_ip", "BACnet/Packets sorted by IP", 0,
         bacapp_stats_tree_packet, bacapp_packet_stats_tree_init, NULL);
-    stats_tree_register("bacapp","bacapp_service","BACnet/Packets sorted by Service", 0,
+    stats_tree_register("bacapp", "bacapp_service", "BACnet/Packets sorted by Service", 0,
         bacapp_stats_tree_service, bacapp_service_stats_tree_init, NULL);
-    stats_tree_register("bacapp","bacapp_objectid","BACnet/Packets sorted by Object Type", 0,
+    stats_tree_register("bacapp", "bacapp_objectid", "BACnet/Packets sorted by Object Type", 0,
         bacapp_stats_tree_objectid, bacapp_objectid_stats_tree_init, NULL);
-    stats_tree_register("bacapp","bacapp_instanceid","BACnet/Packets sorted by Instance ID", 0,
+    stats_tree_register("bacapp", "bacapp_instanceid", "BACnet/Packets sorted by Instance ID", 0,
         bacapp_stats_tree_instanceid, bacapp_instanceid_stats_tree_init, NULL);
 }
 
-/* 'data' must be ep_ allocated */
+/* 'data' must be allocated with wmem packet scope */
 static gint
-updateBacnetInfoValue(gint whichval, gchar *data)
+updateBacnetInfoValue(gint whichval, const gchar *data)
 {
     if (whichval == BACINFO_SERVICE) {
         bacinfo.service_type = data;
@@ -4698,15 +5130,17 @@ static const fragment_items msg_frag_items = {
     &hf_msg_reassembled_in,
     /* Reassembled length field */
     &hf_msg_reassembled_length,
+    /* Reassembled data field */
+    NULL,
     /* Tag */
     "Message fragments"
 };
 
-/* if BACnet uses the reserved values, then patch the corresponding values here, maximum 16 values are defined */
-static const guint MaxAPDUSize [] = { 50,128,206,480,1024,1476 };
-
 #if 0
+/* if BACnet uses the reserved values, then patch the corresponding values here, maximum 16 values are defined */
 /* FIXME: fGetMaxAPDUSize is commented out, as it is not used. It was used to set variables which were not later used. */
+static const guint MaxAPDUSize [] = { 50, 128, 206, 480, 1024, 1476 };
+
 static guint
 fGetMaxAPDUSize(guint8 idx)
 {
@@ -4721,6 +5155,11 @@ fGetMaxAPDUSize(guint8 idx)
 }
 #endif
 
+static const char*
+val_to_split_str(guint32 val, guint32 split_val, const value_string *vs,
+    const char *fmt, const char *split_fmt)
+    G_GNUC_PRINTF(4, 0)
+    G_GNUC_PRINTF(5, 0);
 
 /* Used when there are ranges of reserved and proprietary enumerations */
 static const char*
@@ -4781,13 +5220,13 @@ object_id_instance(guint32 object_identifier)
 }
 
 static guint
-fTagNo (tvbuff_t *tvb, guint offset)
+fTagNo(tvbuff_t *tvb, guint offset)
 {
     return (guint)(tvb_get_guint8(tvb, offset) >> 4);
 }
 
 static gboolean
-fUnsigned32 (tvbuff_t *tvb, guint offset, guint32 lvt, guint32 *val)
+fUnsigned32(tvbuff_t *tvb, guint offset, guint32 lvt, guint32 *val)
 {
     gboolean valid = TRUE;
 
@@ -4813,7 +5252,7 @@ fUnsigned32 (tvbuff_t *tvb, guint offset, guint32 lvt, guint32 *val)
 }
 
 static gboolean
-fUnsigned64 (tvbuff_t *tvb, guint offset, guint32 lvt, guint64 *val)
+fUnsigned64(tvbuff_t *tvb, guint offset, guint32 lvt, guint64 *val)
 {
     gboolean valid = FALSE;
     gint64   value = 0;
@@ -4821,7 +5260,6 @@ fUnsigned64 (tvbuff_t *tvb, guint offset, guint32 lvt, guint64 *val)
 
     if (lvt && (lvt <= 8)) {
         valid = TRUE;
-        data = tvb_get_guint8(tvb, offset);
         for (i = 0; i < lvt; i++) {
             data = tvb_get_guint8(tvb, offset+i);
             value = (value << 8) + data;
@@ -4839,7 +5277,7 @@ fUnsigned64 (tvbuff_t *tvb, guint offset, guint32 lvt, guint64 *val)
    octet is 0, and the first octet shall not be X'FF' if the most
    significant bit of the second octet is 1. ASHRAE-135-2004-20.2.5 */
 static gboolean
-fSigned64 (tvbuff_t *tvb, guint offset, guint32 lvt, gint64 *val)
+fSigned64(tvbuff_t *tvb, guint offset, guint32 lvt, gint64 *val)
 {
     gboolean valid = FALSE;
     gint64   value = 0;
@@ -4865,16 +5303,15 @@ fSigned64 (tvbuff_t *tvb, guint offset, guint32 lvt, gint64 *val)
 }
 
 static guint
-fTagHeaderTree (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
+fTagHeaderTree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     guint offset, guint8 *tag_no, guint8* tag_info, guint32 *lvt)
 {
+    proto_item *ti = NULL;
     guint8      tag;
     guint8      value;
     guint       tag_len = 1;
     guint       lvt_len = 1;    /* used for tree display of lvt */
     guint       lvt_offset;     /* used for tree display of lvt */
-    proto_item *ti;
-    proto_tree *subtree;
 
     lvt_offset = offset;
     tag        = tvb_get_guint8(tvb, offset);
@@ -4906,261 +5343,259 @@ fTagHeaderTree (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     }
 
     if (tree) {
-        if (tag_is_opening(tag))
-            ti = proto_tree_add_text(tree, tvb, offset, tag_len, "{[%u]", *tag_no );
-        else if (tag_is_closing(tag))
-            ti = proto_tree_add_text(tree, tvb, offset, tag_len, "}[%u]", *tag_no );
-        else if (tag_is_context_specific(tag)) {
-            ti = proto_tree_add_text(tree, tvb, offset, tag_len,
-                "Context Tag: %u, Length/Value/Type: %u",
-                *tag_no, *lvt);
-        } else
-            ti = proto_tree_add_text(tree, tvb, offset, tag_len,
-                "Application Tag: %s, Length/Value/Type: %u",
-                val_to_str(*tag_no,
-                    BACnetApplicationTagNumber,
-                    ASHRAE_Reserved_Fmt),
+        proto_tree *subtree;
+        if (tag_is_opening(tag)) {
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, tag_len,
+                    ett_bacapp_tag, &ti, "{[%u]", *tag_no );
+        } else if (tag_is_closing(tag)) {
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, tag_len,
+                    ett_bacapp_tag, &ti, "}[%u]", *tag_no );
+        } else if (tag_is_context_specific(tag)) {
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, tag_len,
+                    ett_bacapp_tag, &ti,
+                    "Context Tag: %u, Length/Value/Type: %u", *tag_no, *lvt);
+        } else {
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, tag_len,
+                    ett_bacapp_tag, &ti,
+                    "Application Tag: %s, Length/Value/Type: %u",
+                    val_to_str(*tag_no, BACnetApplicationTagNumber,
+                        ASHRAE_Reserved_Fmt),
                     *lvt);
+        }
 
-        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
         /* details if needed */
         proto_tree_add_item(subtree, hf_BACnetTagClass, tvb, offset, 1, ENC_BIG_ENDIAN);
         if (tag_is_extended_tag_number(tag)) {
             proto_tree_add_uint_format(subtree,
-                    hf_BACnetContextTagNumber,
-                    tvb, offset, 1, tag,
-                    "Extended Tag Number");
+                                       hf_BACnetContextTagNumber,
+                                       tvb, offset, 1, tag,
+                                       "Extended Tag Number");
             proto_tree_add_item(subtree,
-                hf_BACnetExtendedTagNumber,
-                tvb, offset + 1, 1, ENC_BIG_ENDIAN);
+                                hf_BACnetExtendedTagNumber,
+                                tvb, offset + 1, 1, ENC_BIG_ENDIAN);
         } else {
             if (tag_is_context_specific(tag))
                 proto_tree_add_item(subtree,
-                    hf_BACnetContextTagNumber,
-                    tvb, offset, 1, ENC_BIG_ENDIAN);
+                                    hf_BACnetContextTagNumber,
+                                    tvb, offset, 1, ENC_BIG_ENDIAN);
             else
                 proto_tree_add_item(subtree,
-                    hf_BACnetApplicationTagNumber,
-                    tvb, offset, 1, ENC_BIG_ENDIAN);
+                                    hf_BACnetApplicationTagNumber,
+                                    tvb, offset, 1, ENC_BIG_ENDIAN);
         }
         if (tag_is_closing(tag) || tag_is_opening(tag))
             proto_tree_add_item(subtree,
-                hf_BACnetNamedTag,
-                tvb, offset, 1, ENC_BIG_ENDIAN);
+                                hf_BACnetNamedTag,
+                                tvb, offset, 1, ENC_BIG_ENDIAN);
         else if (tag_is_extended_value(tag)) {
             proto_tree_add_item(subtree,
-                hf_BACnetNamedTag,
-                tvb, offset, 1, ENC_BIG_ENDIAN);
+                                hf_BACnetNamedTag,
+                                tvb, offset, 1, ENC_BIG_ENDIAN);
             proto_tree_add_uint(subtree, hf_bacapp_tag_lvt,
-                tvb, lvt_offset, lvt_len, *lvt);
+                                tvb, lvt_offset, lvt_len, *lvt);
         } else
             proto_tree_add_uint(subtree, hf_bacapp_tag_lvt,
-                tvb, lvt_offset, lvt_len, *lvt);
+                                tvb, lvt_offset, lvt_len, *lvt);
+    } /* if (tree) */
 
-        if (*lvt > tvb_length(tvb)) {
-            expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
-                    "LVT length too long: %d > %d", *lvt,
-                    tvb_length(tvb));
-            *lvt = 1;
-        }
-    }
-    else if (*lvt > tvb_length(tvb))
-        /* We can't add expert info, but we can still stop infinite loops */
+    if (*lvt > tvb_reported_length(tvb)) {
+        expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length,
+                               "LVT length too long: %d > %d", *lvt,
+                               tvb_reported_length(tvb));
         *lvt = 1;
+    }
 
     return tag_len;
 }
 
 static guint
-fTagHeader (tvbuff_t *tvb, packet_info *pinfo, guint offset, guint8 *tag_no, guint8* tag_info,
+fTagHeader(tvbuff_t *tvb, packet_info *pinfo, guint offset, guint8 *tag_no, guint8* tag_info,
     guint32 *lvt)
 {
-    return fTagHeaderTree (tvb, pinfo, NULL, offset, tag_no, tag_info, lvt);
+    return fTagHeaderTree(tvb, pinfo, NULL, offset, tag_no, tag_info, lvt);
 }
 
 static guint
-fNullTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fNullTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint8      tag_no, tag_info;
     guint32     lvt;
-    proto_item *ti;
     proto_tree *subtree;
 
-    ti      = proto_tree_add_text(tree, tvb, offset, 1, "%sNULL", label);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset, 1, ett_bacapp_tag, NULL, "%sNULL", label);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset + 1;
 }
 
 static guint
-fBooleanTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fBooleanTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint8      tag_no, tag_info;
     guint32     lvt      = 0;
-    proto_item *ti;
     proto_tree *subtree;
     guint       bool_len = 1;
 
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     if (tag_info && lvt == 1) {
         lvt = tvb_get_guint8(tvb, offset+1);
         ++bool_len;
     }
 
-    ti = proto_tree_add_text(tree, tvb, offset, bool_len,
-                             "%s%s", label, lvt == 0 ? "FALSE" : "TRUE");
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset, bool_len,
+                             ett_bacapp_tag, NULL, "%s%s", label, lvt == 0 ? "FALSE" : "TRUE");
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset + bool_len;
 }
 
 static guint
-fUnsignedTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fUnsignedTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint64     val = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     /* only support up to an 8 byte (64-bit) integer */
-    if (fUnsigned64 (tvb, offset + tag_len, lvt, &val))
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s(Unsigned) %" G_GINT64_MODIFIER "u", label, val);
+    if (fUnsigned64(tvb, offset + tag_len, lvt, &val))
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "%s(Unsigned) %" G_GINT64_MODIFIER "u", label, val);
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s - %u octets (Unsigned)", label, lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "%s - %u octets (Unsigned)", label, lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fDevice_Instance (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, int hf)
+fDevice_Instance(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, int hf)
 {
     guint8      tag_no, tag_info;
-    guint32     lvt;
+    guint32     lvt, safe_lvt;
     guint       tag_len;
     proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    ti = proto_tree_add_item(tree, hf, tvb, offset+tag_len, lvt, ENC_BIG_ENDIAN);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+
+    if (lvt > 4)
+        safe_lvt = 4;
+    else
+        safe_lvt = lvt;
+
+    ti = proto_tree_add_item(tree, hf, tvb, offset+tag_len, safe_lvt, ENC_BIG_ENDIAN);
+
+    if (lvt != safe_lvt)
+        expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length,
+                "This field claims to be an impossible %u bytes, while the max is %u", lvt, safe_lvt);
+
     subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 /* set split_val to zero when not needed */
 static guint
-fEnumeratedTagSplit (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
+fEnumeratedTagSplit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     guint offset, const gchar *label, const value_string *vs, guint32 split_val)
 {
     guint32     val = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     /* only support up to a 4 byte (32-bit) enumeration */
-    if (fUnsigned32 (tvb, offset+tag_len, lvt, &val)) {
+    if (fUnsigned32(tvb, offset+tag_len, lvt, &val)) {
         if (vs)
-            ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-                "%s %s", label, val_to_split_str(val, split_val, vs,
-                ASHRAE_Reserved_Fmt,Vendor_Proprietary_Fmt));
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+                ett_bacapp_tag, NULL, "%s %s", label, val_to_split_str(val, split_val, vs,
+                ASHRAE_Reserved_Fmt, Vendor_Proprietary_Fmt));
         else
-            ti =proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-                "%s %u", label, val);
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+                ett_bacapp_tag, NULL, "%s %u", label, val);
     } else {
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s - %u octets (enumeration)", label, lvt);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "%s - %u octets (enumeration)", label, lvt);
     }
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fEnumeratedTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
+fEnumeratedTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
         guint offset, const gchar *label, const value_string *vs)
 {
-    return fEnumeratedTagSplit (tvb, pinfo, tree, offset, label, vs, 0);
+    return fEnumeratedTagSplit(tvb, pinfo, tree, offset, label, vs, 0);
 }
 
 static guint
-fSignedTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fSignedTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     gint64      val = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    if (fSigned64 (tvb, offset + tag_len, lvt, &val))
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s(Signed) %" G_GINT64_MODIFIER "d", label, val);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    if (fSigned64(tvb, offset + tag_len, lvt, &val))
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "%s(Signed) %" G_GINT64_MODIFIER "d", label, val);
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s - %u octets (Signed)", label, lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "%s - %u octets (Signed)", label, lvt);
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fRealTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fRealTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
     gfloat      f_val;
-    proto_item *ti;
     proto_tree *subtree;
 
     tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     f_val = tvb_get_ntohieee_float(tvb, offset+tag_len);
-    ti = proto_tree_add_text(tree, tvb, offset, 4+tag_len,
-        "%s%f (Real)", label, f_val);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset, 4+tag_len,
+        ett_bacapp_tag, NULL, "%s%f (Real)", label, f_val);
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+4;
 }
 
 static guint
-fDoubleTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fDoubleTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint8 tag_no, tag_info;
     guint32 lvt;
     guint tag_len;
     gdouble d_val;
-    proto_item *ti;
     proto_tree *subtree;
 
     tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     d_val = tvb_get_ntohieee_double(tvb, offset+tag_len);
-    ti = proto_tree_add_text(tree, tvb, offset, 8+tag_len,
-        "%s%f (Double)", label, d_val);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset, 8+tag_len,
+        ett_bacapp_tag, NULL, "%s%f (Double)", label, d_val);
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+8;
 }
 
 static guint
-fProcessId (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fProcessId(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint32     val = 0, lvt;
     guint8      tag_no, tag_info;
@@ -5168,14 +5603,18 @@ fProcessId (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
     proto_tree *subtree;
     guint       tag_len;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    if (fUnsigned32 (tvb, offset+tag_len, lvt, &val))
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    if (fUnsigned32(tvb, offset+tag_len, lvt, &val))
+    {
         ti = proto_tree_add_uint(tree, hf_bacapp_tag_ProcessId,
             tvb, offset, lvt+tag_len, val);
+        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+    }
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "Process Identifier - %u octets (Signed)", lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+    {
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "Process Identifier - %u octets (Signed)", lvt);
+    }
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
     offset += tag_len + lvt;
 
@@ -5183,76 +5622,76 @@ fProcessId (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 }
 
 static guint
-fTimeSpan (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fTimeSpan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint32     val = 0, lvt;
     guint8      tag_no, tag_info;
-    proto_item *ti;
     proto_tree *subtree;
     guint       tag_len;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    if (fUnsigned32 (tvb, offset+tag_len, lvt, &val))
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-        "%s (hh.mm.ss): %d.%02d.%02d%s",
-        label,
-        (val / 3600), ((val % 3600) / 60), (val % 60),
-        val == 0 ? " (indefinite)" : "");
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    if (fUnsigned32(tvb, offset+tag_len, lvt, &val))
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
+            "%s (hh.mm.ss): %d.%02d.%02d%s",
+            label,
+            (val / 3600), ((val % 3600) / 60), (val % 60),
+            val == 0 ? " (indefinite)" : "");
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
             "%s - %u octets (Signed)", label, lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fWeekNDay (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fWeekNDay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint32     month, weekOfMonth, dayOfWeek;
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     month = tvb_get_guint8(tvb, offset+tag_len);
     weekOfMonth = tvb_get_guint8(tvb, offset+tag_len+1);
     dayOfWeek = tvb_get_guint8(tvb, offset+tag_len+2);
-    ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len, "%s %s, %s",
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+                 ett_bacapp_tag, NULL, "%s %s, %s",
                  val_to_str(month, months, "month (%d) not found"),
                  val_to_str(weekOfMonth, weekofmonth, "week of month (%d) not found"),
                  val_to_str(dayOfWeek, day_of_week, "day of week (%d) not found"));
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fDate (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fDate(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint32     year, month, day, weekday;
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    year = tvb_get_guint8(tvb, offset+tag_len);
-    month = tvb_get_guint8(tvb, offset+tag_len+1);
-    day = tvb_get_guint8(tvb, offset+tag_len+2);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    year    = tvb_get_guint8(tvb, offset+tag_len);
+    month   = tvb_get_guint8(tvb, offset+tag_len+1);
+    day     = tvb_get_guint8(tvb, offset+tag_len+2);
     weekday = tvb_get_guint8(tvb, offset+tag_len+3);
     if ((year == 255) && (day == 255) && (month == 255) && (weekday == 255)) {
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
             "%sany", label);
     }
     else if (year != 255) {
         year += 1900;
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
             "%s%s %d, %d, (Day of Week = %s)",
             label, val_to_str(month,
                 months,
@@ -5261,64 +5700,62 @@ fDate (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const
                 day_of_week,
                 "(%d) not found"));
     } else {
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
             "%s%s %d, any year, (Day of Week = %s)",
             label, val_to_str(month, months, "month (%d) not found"),
             day, val_to_str(weekday, day_of_week, "(%d) not found"));
     }
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fTime (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fTime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint32     hour, minute, second, msec, lvt;
     guint8      tag_no, tag_info;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     hour    = tvb_get_guint8(tvb, offset+tag_len);
     minute  = tvb_get_guint8(tvb, offset+tag_len+1);
     second  = tvb_get_guint8(tvb, offset+tag_len+2);
     msec    = tvb_get_guint8(tvb, offset+tag_len+3);
     if ((hour == 255) && (minute == 255) && (second == 255) && (msec == 255))
-        ti = proto_tree_add_text(tree, tvb, offset,
-            lvt+tag_len, "%sany", label);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset,
+            lvt+tag_len, ett_bacapp_tag, NULL,
+            "%sany", label);
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
             "%s%d:%02d:%02d.%d %s = %02d:%02d:%02d.%d",
             label,
             hour > 12 ? hour - 12 : hour,
             minute, second, msec,
             hour >= 12 ? "P.M." : "A.M.",
             hour, minute, second, msec);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fDateTime (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fDateTime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     if (label != NULL) {
-        tt = proto_tree_add_text (subtree, tvb, offset, 10, "%s", label);
-        subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+        subtree = proto_tree_add_subtree(subtree, tvb, offset, 10, ett_bacapp_value, NULL, label);
     }
-    offset = fDate (tvb,pinfo,subtree,offset,"Date: ");
-    return fTime (tvb,pinfo,subtree,offset,"Time: ");
+    offset = fDate(tvb, pinfo, subtree, offset, "Date: ");
+    return fTime(tvb, pinfo, subtree, offset, "Time: ");
 }
 
 static guint
-fTimeValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fTimeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
     guint8 tag_no, tag_info;
@@ -5326,35 +5763,35 @@ fTimeValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {   /* closing Tag, but not for me */
             return offset;
         }
-        offset = fTime    (tvb,pinfo,tree,offset,"Time: ");
+        offset = fTime(tvb, pinfo, tree, offset, "Time: ");
         offset = fApplicationTypes(tvb, pinfo, tree, offset, "Value: ");
 
-        if (offset==lastoffset) break;    /* exit loop if nothing happens inside */
+        if (offset == lastoffset) break;    /* exit loop if nothing happens inside */
     }
     return offset;
 }
 
 static guint
-fCalendarEntry (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fCalendarEntry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
 
     switch (fTagNo(tvb, offset)) {
     case 0: /* Date */
-        offset = fDate    (tvb, pinfo, tree, offset, "Date: ");
+        offset = fDate(tvb, pinfo, tree, offset, "Date: ");
         break;
     case 1: /* dateRange */
         offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-        offset  = fDateRange (tvb, pinfo, tree, offset);
+        offset  = fDateRange(tvb, pinfo, tree, offset);
         offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
         break;
     case 2: /* BACnetWeekNDay */
-        offset = fWeekNDay (tvb, pinfo, tree, offset);
+        offset = fWeekNDay(tvb, pinfo, tree, offset);
         break;
     default:
         return offset;
@@ -5368,22 +5805,19 @@ fEventTimeStamps( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint
 {
     guint32     lvt     = 0;
     proto_tree* subtree = tree;
-    proto_item* ti      = 0;
 
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
-        ti = proto_tree_add_text(tree, tvb, offset, lvt, "eventTimeStamps");
-        if (ti) {
-            subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-        }
-        offset = fTimeStamp (tvb, pinfo, subtree, offset,"TO-OFFNORMAL timestamp: ");
-        offset = fTimeStamp (tvb, pinfo, subtree, offset,"TO-FAULT timestamp: ");
-        offset = fTimeStamp (tvb, pinfo, subtree, offset,"TO-NORMAL timestamp: ");
+        subtree = proto_tree_add_subtree(tree, tvb, offset, lvt, ett_bacapp_tag, NULL, "eventTimeStamps");
+
+        offset = fTimeStamp(tvb, pinfo, subtree, offset, "TO-OFFNORMAL timestamp: ");
+        offset = fTimeStamp(tvb, pinfo, subtree, offset, "TO-FAULT timestamp: ");
+        offset = fTimeStamp(tvb, pinfo, subtree, offset, "TO-NORMAL timestamp: ");
     }
     return offset;
 }
 
 static guint
-fTimeStamp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fTimeStamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint8  tag_no = 0, tag_info = 0;
     guint32 lvt    = 0;
@@ -5391,16 +5825,16 @@ fTimeStamp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, c
     if (tvb_reported_length_remaining(tvb, offset) > 0) {   /* don't loop, it's a CHOICE */
         switch (fTagNo(tvb, offset)) {
         case 0: /* time */
-            offset = fTime (tvb, pinfo, tree, offset, label?label:"time: ");
+            offset = fTime(tvb, pinfo, tree, offset, label?label:"time: ");
             break;
         case 1: /* sequenceNumber */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset,
+            offset = fUnsignedTag(tvb, pinfo, tree, offset,
                 label?label:"sequence number: ");
             break;
         case 2: /* dateTime */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fDateTime (tvb, pinfo, tree, offset, label?label:"date time: ");
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fDateTime(tvb, pinfo, tree, offset, label?label:"date time: ");
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
             return offset;
@@ -5412,10 +5846,10 @@ fTimeStamp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, c
 
 
 static guint
-fClientCOV (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fClientCOV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
-        offset = fApplicationTypes(tvb,pinfo,tree,offset, "increment: ");
+        offset = fApplicationTypes(tvb, pinfo, tree, offset, "increment: ");
     }
     return offset;
 }
@@ -5433,18 +5867,18 @@ BACnetDaysOfWeek [] = {
 };
 
 static guint
-fDestination (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fDestination(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
-        offset = fApplicationTypesEnumerated(tvb,pinfo,tree,offset,
+        offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset,
                                              "valid Days: ", BACnetDaysOfWeek);
-        offset = fTime (tvb,pinfo,tree,offset,"from time: ");
-        offset = fTime (tvb,pinfo,tree,offset,"to time: ");
-        offset = fRecipient (tvb,pinfo,tree,offset);
-        offset = fProcessId (tvb,pinfo,tree,offset);
-        offset = fApplicationTypes (tvb,pinfo,tree,offset,
+        offset = fTime(tvb, pinfo, tree, offset, "from time: ");
+        offset = fTime(tvb, pinfo, tree, offset, "to time: ");
+        offset = fRecipient(tvb, pinfo, tree, offset);
+        offset = fProcessId(tvb, pinfo, tree, offset);
+        offset = fApplicationTypes(tvb, pinfo, tree, offset,
                                     "issue confirmed notifications: ");
-        offset = fBitStringTagVS (tvb,pinfo,tree,offset,
+        offset = fBitStringTagVS(tvb, pinfo, tree, offset,
                                   "transitions: ", BACnetEventTransitionBits);
     }
     return offset;
@@ -5452,71 +5886,50 @@ fDestination (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
 
 static guint
-fOctetString (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, guint32 lvt)
+fOctetString(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, guint32 lvt)
 {
     gchar      *tmp;
     guint       start   = offset;
     guint8      tag_no, tag_info;
     proto_tree *subtree = tree;
-    proto_item *ti      = 0;
 
-    offset += fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    offset += fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
     if (lvt > 0) {
-        tmp = tvb_bytes_to_str(tvb, offset, lvt);
-        ti = proto_tree_add_text(tree, tvb, offset, lvt, "%s %s", label, tmp);
+        tmp = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, lvt);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt,
+                    ett_bacapp_tag, NULL, "%s %s", label, tmp);
         offset += lvt;
     }
 
-    if (ti)
-        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-
     fTagHeaderTree(tvb, pinfo, subtree, start, &tag_no, &tag_info, &lvt);
 
     return offset;
 }
 
 static guint
-fMacAddress (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, guint32 lvt)
+fMacAddress(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, guint32 lvt)
 {
-    gchar *tmp;
     guint start = offset;
     guint8 tag_no, tag_info;
     proto_tree* subtree = tree;
-    proto_item* ti = 0;
 
-    offset += fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    offset += fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
-    ti = proto_tree_add_text(tree, tvb, offset, 6, "%s", label); /* just add the label, with the tagHeader information in its subtree */
+    /* just add the label, with the tagHeader information in its subtree */
+    subtree = proto_tree_add_subtree(tree, tvb, offset, 6, ett_bacapp_tag, NULL, label);
 
-    if (lvt > 0) {
-        if (lvt == 6) { /* we have 6 Byte IP Address with 4 Octets IPv4 and 2 Octets Port Information */
-
-            guint32 ip   = tvb_get_ipv4(tvb, offset);
-            guint16 port = tvb_get_ntohs(tvb, offset+4);
-
-            proto_tree_add_ipv4(tree, hf_bacapp_tag_IPV4, tvb, offset, 4, ip);
-            proto_tree_add_uint(tree, hf_bacapp_tag_PORT, tvb, offset+4, 2, port);
-
-        } else {
-            if (lvt == 18) { /* we have 18 Byte IP Address with 16 Octets IPv6 and 2 Octets Port Information */
-            struct e_in6_addr addr;
-            guint16 port =  tvb_get_ntohs(tvb, offset+16);
-            tvb_get_ipv6(tvb, offset, &addr);
-
-            proto_tree_add_ipv6(tree, hf_bacapp_tag_IPV6, tvb, offset, 16, (const guint8 *) &addr);
-            proto_tree_add_uint(tree, hf_bacapp_tag_PORT, tvb, offset+16, 2, port);
-
-            } else { /* we have 1 Byte MS/TP Address or anything else interpreted as an address */
-                tmp = tvb_bytes_to_str(tvb, offset, lvt);
-                ti = proto_tree_add_text(tree, tvb, offset, lvt, "%s", tmp);
-            }
-        }
-        offset += lvt;
+    if (lvt == 6) { /* we have 6 Byte IP Address with 4 Octets IPv4 and 2 Octets Port Information */
+        proto_tree_add_item(tree, hf_bacapp_tag_IPV4, tvb, offset, 4, ENC_BIG_ENDIAN);
+        proto_tree_add_item(tree, hf_bacapp_tag_PORT, tvb, offset+4, 2, ENC_BIG_ENDIAN);
+    } else if (lvt == 18) { /* we have 18 Byte IP Address with 16 Octets IPv6 and 2 Octets Port Information */
+        proto_tree_add_item(tree, hf_bacapp_tag_IPV6, tvb, offset, 16, ENC_NA);
+        proto_tree_add_item(tree, hf_bacapp_tag_PORT, tvb, offset+16, 2, ENC_BIG_ENDIAN);
+    } else { /* we have 1 Byte MS/TP Address or anything else interpreted as an address */
+        subtree = proto_tree_add_subtree(tree, tvb, offset, lvt,
+                ett_bacapp_tag, NULL, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, lvt));
     }
-
-    if (ti)
-        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
+    offset += lvt;
 
     fTagHeaderTree(tvb, pinfo, subtree, start, &tag_no, &tag_info, &lvt);
 
@@ -5524,51 +5937,51 @@ fMacAddress (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
 }
 
 static guint
-fAddress (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAddress(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
     guint   offs;
 
-    offset = fUnsignedTag (tvb, pinfo, tree, offset, "network-number");
-    offs   = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    offset = fUnsignedTag(tvb, pinfo, tree, offset, "network-number");
+    offs   = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     if (lvt == 0) {
         proto_tree_add_text(tree, tvb, offset, offs, "MAC-address: broadcast");
         offset += offs;
     } else
-        offset  = fMacAddress (tvb, pinfo, tree, offset, "MAC-address: ", lvt);
+        offset  = fMacAddress(tvb, pinfo, tree, offset, "MAC-address: ", lvt);
 
     return offset;
 }
 
 static guint
-fSessionKey (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fSessionKey(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fOctetString (tvb,pinfo,tree,offset,"session key: ", 8);
-    return fAddress (tvb,pinfo,tree,offset);
+    offset = fOctetString(tvb, pinfo, tree, offset, "session key: ", 8);
+    return fAddress(tvb, pinfo, tree, offset);
 }
 
 static guint
-fObjectIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fObjectIdentifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_length;
-    proto_item *ti;
     proto_tree *subtree;
     guint32     object_id;
 
     tag_length  = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    object_id   = tvb_get_ntohl(tvb,offset+tag_length);
+    object_id   = tvb_get_ntohl(tvb, offset+tag_length);
     object_type = object_id_type(object_id);
-    ti = proto_tree_add_text(tree, tvb, offset, tag_length + 4,
-        "ObjectIdentifier: %s, %u",
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset, tag_length + 4,
+        ett_bacapp_tag, NULL, "ObjectIdentifier: %s, %u",
         val_to_split_str(object_type,
             128,
             BACnetObjectType,
             ASHRAE_Reserved_Fmt,
             Vendor_Proprietary_Fmt),
         object_id_instance(object_id));
+
     if (col_get_writable(pinfo->cinfo))
         col_append_fstr(pinfo->cinfo, COL_INFO, "%s,%u ",
             val_to_split_str(object_type,
@@ -5580,15 +5993,17 @@ fObjectIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
 
     /* update BACnet Statistics */
     updateBacnetInfoValue(BACINFO_OBJECTID,
-                  ep_strdup(val_to_split_str(object_type, 128,
+                  wmem_strdup(wmem_packet_scope(),
+                    val_to_split_str(object_type, 128,
                     BACnetObjectType, ASHRAE_Reserved_Fmt,
                     Vendor_Proprietary_Fmt)));
-    updateBacnetInfoValue(BACINFO_INSTANCEID, ep_strdup_printf("Instance ID: %u",
-                  object_id_instance(object_id)));
+    updateBacnetInfoValue(BACINFO_INSTANCEID,
+                  wmem_strdup_printf(wmem_packet_scope(),
+                    "Instance ID: %u",
+                    object_id_instance(object_id)));
 
     /* here are the details of how we arrived at the above text */
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
     offset += tag_length;
     proto_tree_add_item(subtree, hf_bacapp_objectType, tvb, offset, 4, ENC_BIG_ENDIAN);
     proto_tree_add_item(subtree, hf_bacapp_instanceNumber, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -5598,7 +6013,7 @@ fObjectIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
 }
 
 static guint
-fRecipient (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fRecipient(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -5606,30 +6021,28 @@ fRecipient (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
     fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     if (tag_no < 2) {
         if (tag_no == 0) { /* device */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
         }
         else {  /* address */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fAddress (tvb, pinfo, tree, offset);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fAddress(tvb, pinfo, tree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
         }
     }
     return offset;
 }
 
 static guint
-fRecipientProcess (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fRecipientProcess(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *orgtree    = tree;
-    proto_item *tt;
     proto_tree *subtree;
 
     /* beginning of new item - indent and label */
-    tt   = proto_tree_add_text(orgtree, tvb, offset, 1, "Recipient Process" );
-    tree = proto_item_add_subtree(tt, ett_bacapp_value);
+    tree = proto_tree_add_subtree(orgtree, tvb, offset, 1, ett_bacapp_value, NULL, "Recipient Process" );
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
@@ -5637,13 +6050,12 @@ fRecipientProcess (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
         switch (fTagNo(tvb, offset)) {
         case 0: /* recipient */
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt); /* show context open */
-            tt = proto_tree_add_text(tree, tvb, offset, 1, "Recipient");    /* add tree label and indent */
-            subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-            offset  = fRecipient (tvb, pinfo, subtree, offset);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt); /* show context close */
+            subtree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_bacapp_value, NULL, "Recipient");    /* add tree label and indent */
+            offset  = fRecipient(tvb, pinfo, subtree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt); /* show context close */
             break;
         case 1: /* processId */
-            offset = fProcessId (tvb, pinfo, tree, offset);
+            offset = fProcessId(tvb, pinfo, tree, offset);
             lastoffset = offset;
             break;
         default:
@@ -5655,19 +6067,18 @@ fRecipientProcess (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
 }
 
 static guint
-fCOVSubscription (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fCOVSubscription(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree;
-    proto_item *tt;
     proto_tree *orgtree    = tree;
     guint       itemno     = 1;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
         }
@@ -5675,33 +6086,31 @@ fCOVSubscription (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
 
         case 0: /* recipient */
                 /* beginning of new item in list */
-                tt = proto_tree_add_text(orgtree, tvb, offset, 1, "Subscription %d",itemno);    /* add tree label and indent */
+                tree = proto_tree_add_subtree_format(orgtree, tvb, offset, 1,
+                    ett_bacapp_value, NULL, "Subscription %d",itemno);    /* add tree label and indent */
                 itemno = itemno + 1;
-                tree = proto_item_add_subtree(tt, ett_bacapp_value);
 
-                tt = proto_tree_add_text(tree, tvb, offset, 1, "Recipient");    /* add tree label and indent */
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+                subtree = proto_tree_add_subtree(tree, tvb, offset, 1,
+                    ett_bacapp_value, NULL, "Recipient");    /* add tree label and indent */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt); /* show context open */
-                offset  = fRecipientProcess (tvb, pinfo, subtree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);  /* show context close */
-                subtree = tree; /* done with this level - return to previous tree */
+                offset  = fRecipientProcess(tvb, pinfo, subtree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);  /* show context close */
             break;
         case 1: /* MonitoredPropertyReference */
-                tt = proto_tree_add_text(tree, tvb, offset, 1, "Monitored Property Reference");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+                subtree = proto_tree_add_subtree(tree, tvb, offset, 1,
+                    ett_bacapp_value, NULL, "Monitored Property Reference");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fBACnetObjectPropertyReference(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fBACnetObjectPropertyReference (tvb, pinfo, subtree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                subtree = tree;
             break;
         case 2: /* IssueConfirmedNotifications - boolean */
-            offset = fBooleanTag (tvb, pinfo, tree, offset, "Issue Confirmed Notifications: ");
+            offset = fBooleanTag(tvb, pinfo, tree, offset, "Issue Confirmed Notifications: ");
             break;
         case 3: /* TimeRemaining */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "Time Remaining: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "Time Remaining: ");
             break;
         case 4: /* COVIncrement */
-            offset = fRealTag (tvb, pinfo, tree, offset, "COV Increment: ");
+            offset = fRealTag(tvb, pinfo, tree, offset, "COV Increment: ");
             break;
         default:
             break;
@@ -5712,14 +6121,14 @@ fCOVSubscription (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
 }
 
 static guint
-fAddressBinding (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAddressBinding(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fObjectIdentifier (tvb, pinfo, tree, offset);
-    return fAddress (tvb, pinfo, tree, offset);
+    offset = fObjectIdentifier(tvb, pinfo, tree, offset);
+    return fAddress(tvb, pinfo, tree, offset);
 }
 
 static guint
-fActionCommand (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tag_match)
+fActionCommand(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tag_match)
 {
     guint       lastoffset = 0, len;
     guint8      tag_no, tag_info;
@@ -5730,7 +6139,7 @@ fActionCommand (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
     propertyArrayIndex = -1;
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             if (tag_no == tag_match) {
                 return offset;
@@ -5742,25 +6151,25 @@ fActionCommand (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
         switch (tag_no) {
 
         case 0: /* deviceIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 1: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* propertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, subtree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 3: /* propertyArrayIndex */
-            offset = fPropertyArrayIndex (tvb, pinfo, subtree, offset);
+            offset = fPropertyArrayIndex(tvb, pinfo, subtree, offset);
             break;
         case 4: /* propertyValue */
-            offset = fPropertyValue (tvb, pinfo, subtree, offset, tag_info);
+            offset = fPropertyValue(tvb, pinfo, subtree, offset, tag_info);
             break;
         case 5: /* priority */
-            offset = fUnsignedTag (tvb,pinfo,subtree,offset,"Priority: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "Priority: ");
             break;
         case 6: /* postDelay */
-            offset = fUnsignedTag (tvb,pinfo,subtree,offset,"Post Delay: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "Post Delay: ");
             break;
         case 7: /* quitOnFailure */
             offset = fBooleanTag(tvb, pinfo, subtree, offset,
@@ -5783,17 +6192,16 @@ fActionCommand (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
       }
 */
 static guint
-fActionList (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fActionList(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0, len;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree    = tree;
-    proto_item *ti;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             subtree = tree;
             if ( tag_no != 0 ) /* don't eat the closing property tag, just return */
@@ -5802,14 +6210,13 @@ fActionList (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
             continue;
         }
         if (tag_is_opening(tag_info)) {
-            ti = proto_tree_add_text(tree, tvb, offset, 1, "Action List");
-            subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset,
+            subtree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_bacapp_tag, NULL, "Action List");
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset,
                 &tag_no, &tag_info, &lvt);
         }
         switch (tag_no) {
         case 0: /* BACnetActionCommand */
-            offset = fActionCommand (tvb, pinfo, subtree, offset, tag_no);
+            offset = fActionCommand(tvb, pinfo, subtree, offset, tag_no);
             break;
         default:
             break;
@@ -5820,20 +6227,20 @@ fActionList (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 }
 
 static guint
-fPropertyIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fPropertyIdentifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8       tag_no, tag_info;
     guint32      lvt;
     guint        tag_len;
-    proto_item  *ti;
     proto_tree  *subtree;
     const gchar *label = "Property Identifier";
 
     propertyIdentifier = 0; /* global Variable */
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     /* can we decode this value? */
-    if (fUnsigned32 (tvb, offset+tag_len, lvt, (guint32 *)&propertyIdentifier)) {
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
+    if (fUnsigned32(tvb, offset+tag_len, lvt, (guint32 *)&propertyIdentifier)) {
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL,
             "%s: %s (%u)", label,
             val_to_split_str(propertyIdentifier, 512,
                 BACnetPropertyIdentifier,
@@ -5849,8 +6256,8 @@ fPropertyIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
         /* property identifiers cannot be larger than 22-bits */
         return offset;
     }
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
     proto_tree_add_item(subtree, hf_BACnetPropertyIdentifier, tvb,
         offset+tag_len, lvt, ENC_BIG_ENDIAN);
 
@@ -5858,55 +6265,53 @@ fPropertyIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fPropertyArrayIndex (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fPropertyArrayIndex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    if (fUnsigned32 (tvb, offset + tag_len, lvt, (guint32 *)&propertyArrayIndex))
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "property Array Index (Unsigned) %u", propertyArrayIndex);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    if (fUnsigned32(tvb, offset + tag_len, lvt, (guint32 *)&propertyArrayIndex))
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "property Array Index (Unsigned) %u", propertyArrayIndex);
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "property Array Index - %u octets (Unsigned)", lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, NULL, "property Array Index - %u octets (Unsigned)", lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset+tag_len+lvt;
 }
 
 static guint
-fCharacterString (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fCharacterString(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
     guint8      tag_no, tag_info, character_set;
     guint32     lvt, l;
-    gsize       inbytesleft, outbytesleft = 512;
-    guint       offs, extra = 1;
-    guint8     *str_val;
+    guint       offs;
     const char *coding;
-    guint8      bf_arr[512], *out = &bf_arr[0];
-    proto_item *ti;
+    guint8     *out;
     proto_tree *subtree;
     guint       start = offset;
 
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
 
-        offs = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        offs = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        offset += offs;
+
+        character_set = tvb_get_guint8(tvb, offset);
+        offset++;
+        lvt--;
 
-        character_set = tvb_get_guint8(tvb, offset+offs);
         /* Account for code page if DBCS */
-        if (character_set == 1) {
-            extra = 3;
+        if (character_set == IBM_MS_DBCS) {
+            offset += 2;
+            lvt -= 2;
         }
-        offset += (offs+extra);
-        lvt -= (extra);
 
         do {
-            inbytesleft = l = MIN(lvt, 255);
+            l = MIN(lvt, 256);
             /*
              * XXX - are we guaranteed that these encoding
              * names correspond, on *all* platforms with
@@ -5923,50 +6328,49 @@ fCharacterString (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
              * other dissectors need to handle various
              * character encodings.
              */
-            str_val = tvb_get_ephemeral_string(tvb, offset, l);
             /** this decoding may be not correct for multi-byte characters, Lka */
             switch (character_set) {
-            case ANSI_X34:
-                fConvertXXXtoUTF8(str_val, &inbytesleft, out, &outbytesleft, "UTF-8");
+            case ANSI_X3_4:
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_UTF_8);
                 coding = "UTF-8";
                 break;
             case IBM_MS_DBCS:
-                out = str_val;
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
                 coding = "IBM MS DBCS";
                 break;
             case JIS_C_6226:
-                out = str_val;
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
                 coding = "JIS C 6226";
                 break;
             case ISO_10646_UCS4:
-                fConvertXXXtoUTF8(str_val, &inbytesleft, out, &outbytesleft, "UCS-4BE");
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_UCS_4|ENC_BIG_ENDIAN);
                 coding = "ISO 10646 UCS-4";
                 break;
             case ISO_10646_UCS2:
-                fConvertXXXtoUTF8(str_val, &inbytesleft, out, &outbytesleft, "UCS-2BE");
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_UCS_2|ENC_BIG_ENDIAN);
                 coding = "ISO 10646 UCS-2";
                 break;
-            case ISO_18859_1:
-                fConvertXXXtoUTF8(str_val, &inbytesleft, out, &outbytesleft, "ISO8859-1");
+            case ISO_8859_1:
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ISO_8859_1);
                 coding = "ISO 8859-1";
                 break;
             default:
-                out = str_val;
+                /* Assume this is some form of extended ASCII, with one-byte code points for ASCII characters */
+                out = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
                 coding = "unknown";
                 break;
             }
-            ti = proto_tree_add_text(tree, tvb, offset, l, "%s%s '%s'", label, coding, out);
+            subtree = proto_tree_add_subtree_format(tree, tvb, offset, l, ett_bacapp_tag, NULL,
+                                        "%s%s '%s'", label, coding, out);
             lvt    -= l;
             offset += l;
         } while (lvt > 0);
 
-        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-
-        fTagHeaderTree (tvb, pinfo, subtree, start, &tag_no, &tag_info, &lvt);
+        fTagHeaderTree(tvb, pinfo, subtree, start, &tag_no, &tag_info, &lvt);
         proto_tree_add_item(subtree, hf_BACnetCharacterSet, tvb, start+offs, 1, ENC_BIG_ENDIAN);
 
-        if (character_set == 1) {
-            proto_tree_add_text(subtree, tvb, start+offs+1, 2, "Code Page: %d", tvb_get_ntohs(tvb, start+offs+1));
+        if (character_set == IBM_MS_DBCS) {
+            proto_tree_add_item(subtree, hf_BACnetCodePage, tvb, start+offs+1, 2, ENC_BIG_ENDIAN);
         }
         /* XXX - put the string value here */
     }
@@ -5974,7 +6378,7 @@ fCharacterString (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
 }
 
 static guint
-fBitStringTagVS (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label,
+fBitStringTagVS(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label,
     const value_string *src)
 {
     guint8      tag_no, tag_info, tmp;
@@ -5984,20 +6388,19 @@ fBitStringTagVS (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
     guint32     lvt, i, numberOfBytes;
     guint8      bf_arr[256];
     proto_tree* subtree = tree;
-    proto_item* ti = 0;
 
-    offs = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    offs = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     numberOfBytes = lvt-1; /* Ignore byte for unused bit count */
     offset += offs;
     unused  = tvb_get_guint8(tvb, offset); /* get the unused Bits */
-    ti      = proto_tree_add_text(tree, tvb, start, offs+lvt,
+    subtree = proto_tree_add_subtree_format(tree, tvb, start, offs+lvt,
+                                  ett_bacapp_tag, NULL,
                                   "%s(Bit String)", label);
-    if (ti) {
-        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    }
+
     fTagHeaderTree(tvb, pinfo, subtree, start, &tag_no, &tag_info, &lvt);
     proto_tree_add_text(subtree, tvb, offset, 1,
                 "Unused bits: %u", unused);
+    memset(bf_arr, 0, 256);
     skip = 0;
     for (i = 0; i < numberOfBytes; i++) {
         tmp = tvb_get_guint8(tvb, (offset)+i+1);
@@ -6019,13 +6422,13 @@ fBitStringTagVS (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
                             src,
                             ASHRAE_Reserved_Fmt));
             } else {
-                bf_arr[MIN(255,(i*8)+j)] = tmp & (1 << (7 - j)) ? '1' : '0';
+                bf_arr[MIN(255, (i*8)+j)] = tmp & (1 << (7 - j)) ? '1' : '0';
             }
         }
     }
 
     if (src == NULL) {
-        bf_arr[MIN(255,numberOfBytes*8-unused)] = 0;
+        bf_arr[MIN(255, numberOfBytes*8-unused)] = 0;
         proto_tree_add_text(subtree, tvb, offset, lvt, "B'%s'", bf_arr);
     }
 
@@ -6035,15 +6438,15 @@ fBitStringTagVS (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
 }
 
 static guint
-fBitStringTag (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
+fBitStringTag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label)
 {
-    return fBitStringTagVS (tvb, pinfo, tree, offset, label, NULL);
+    return fBitStringTagVS(tvb, pinfo, tree, offset, label, NULL);
 }
 
 /* handles generic application types, as well as enumerated and enumerations
    with reserved and proprietarty ranges (split) */
 static guint
-fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
+fApplicationTypesEnumeratedSplit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
     const gchar *label, const value_string *src, guint32 split_val)
 {
     guint8  tag_no, tag_info;
@@ -6052,7 +6455,7 @@ fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, packet_info *pinfo, proto_tree
 
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
 
-        tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (!tag_is_context_specific(tag_info)) {
             switch (tag_no) {
             case 0: /** NULL 20.2.2 */
@@ -6074,25 +6477,25 @@ fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, packet_info *pinfo, proto_tree
                 offset = fDoubleTag(tvb, pinfo, tree, offset, label);
                 break;
             case 6: /** Octet String 20.2.8 */
-                offset = fOctetString (tvb, pinfo, tree, offset, label, lvt);
+                offset = fOctetString(tvb, pinfo, tree, offset, label, lvt);
                 break;
             case 7: /** Character String 20.2.9 */
-                offset = fCharacterString (tvb,pinfo,tree,offset,label);
+                offset = fCharacterString(tvb, pinfo, tree, offset, label);
                 break;
             case 8: /** Bit String 20.2.10 */
-                offset = fBitStringTagVS (tvb, pinfo, tree, offset, label, src);
+                offset = fBitStringTagVS(tvb, pinfo, tree, offset, label, src);
                 break;
             case 9: /** Enumerated 20.2.11 */
-                offset = fEnumeratedTagSplit (tvb, pinfo, tree, offset, label, src, split_val);
+                offset = fEnumeratedTagSplit(tvb, pinfo, tree, offset, label, src, split_val);
                 break;
             case 10: /** Date 20.2.12 */
-                offset = fDate (tvb, pinfo, tree, offset, label);
+                offset = fDate(tvb, pinfo, tree, offset, label);
                 break;
             case 11: /** Time 20.2.13 */
-                offset = fTime (tvb, pinfo, tree, offset, label);
+                offset = fTime(tvb, pinfo, tree, offset, label);
                 break;
             case 12: /** BACnetObjectIdentifier 20.2.14 */
-                offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+                offset = fObjectIdentifier(tvb, pinfo, tree, offset);
                 break;
             case 13: /* reserved for ASHRAE */
             case 14:
@@ -6110,19 +6513,19 @@ fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, packet_info *pinfo, proto_tree
 }
 
 static guint
-fShedLevel (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fShedLevel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
 
-        switch (fTagNo(tvb,offset)) {
+        switch (fTagNo(tvb, offset)) {
         case 0: /* percent */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "shed percent: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "shed percent: ");
             break;
         case 1: /* level */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "shed level: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "shed level: ");
             break;
         case 2: /* amount */
             offset = fRealTag(tvb, pinfo, tree, offset, "shed amount: ");
@@ -6136,14 +6539,14 @@ fShedLevel (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 }
 
 static guint
-fApplicationTypesEnumerated (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
+fApplicationTypesEnumerated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
     const gchar *label, const value_string *vs)
 {
     return fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset, label, vs, 0);
 }
 
 static guint
-fApplicationTypes (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
+fApplicationTypes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
     const gchar *label)
 {
     return fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset, label, NULL, 0);
@@ -6155,7 +6558,6 @@ fContextTaggedValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       tag_len;
-    proto_item *ti;
     proto_tree *subtree;
     gint        tvb_len;
 
@@ -6166,10 +6568,9 @@ fContextTaggedValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
     if ((tvb_len >= 0) && ((guint32)tvb_len < lvt)) {
         lvt = tvb_len;
     }
-    ti = proto_tree_add_text(tree, tvb, offset+tag_len, lvt,
-        "Context Value (as %u DATA octets)", lvt);
+    subtree = proto_tree_add_subtree_format(tree, tvb, offset+tag_len, lvt,
+        ett_bacapp_tag, NULL, "Context Value (as %u DATA octets)", lvt);
 
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
     fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     return offset + tag_len + lvt;
@@ -6181,7 +6582,7 @@ moduloDivide    [1] Unsigned
 }
 */
 static guint
-fPrescale (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
+fPrescale(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6189,16 +6590,16 @@ fPrescale (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
             }
         switch (tag_no) {
         case 0: /* multiplier */
-            offset = fUnsignedTag (tvb,pinfo,tree,offset,"Multiplier: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "Multiplier: ");
             break;
         case 1: /* moduloDivide */
-            offset = fUnsignedTag (tvb,pinfo,tree,offset,"Modulo Divide: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "Modulo Divide: ");
             break;
         default:
             return offset;
@@ -6215,7 +6616,7 @@ integerScale    [1] INTEGER
 }
 */
 static guint
-fScale (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
+fScale(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6223,16 +6624,16 @@ fScale (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset)
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
             }
         switch (tag_no) {
         case 0: /* floatScale */
-            offset = fRealTag (tvb,pinfo,tree,offset,"Float Scale: ");
+            offset = fRealTag(tvb, pinfo, tree, offset, "Float Scale: ");
             break;
         case 1: /* integerScale */
-            offset = fSignedTag (tvb,pinfo,tree,offset,"Integer Scale: ");
+            offset = fSignedTag(tvb, pinfo, tree, offset, "Integer Scale: ");
             break;
         default:
             return offset;
@@ -6256,7 +6657,7 @@ BACnetAccumulatorRecord ::= SEQUENCE {
 }
 */
 static guint
-fLoggingRecord (tvbuff_t *tvb, packet_info *pinfo  _U_, proto_tree *tree, guint offset)
+fLoggingRecord(tvbuff_t *tvb, packet_info *pinfo  _U_, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6264,24 +6665,24 @@ fLoggingRecord (tvbuff_t *tvb, packet_info *pinfo  _U_, proto_tree *tree, guint
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
             }
         switch (tag_no) {
         case 0: /* timestamp */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fDateTime (tvb, pinfo, tree, offset, "Timestamp: ");
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fDateTime(tvb, pinfo, tree, offset, "Timestamp: ");
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 1: /* presentValue */
-            offset  = fUnsignedTag (tvb,pinfo,tree,offset,"Present Value: ");
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "Present Value: ");
             break;
         case 2: /* accumulatedValue */
-            offset  = fUnsignedTag (tvb,pinfo,tree,offset,"Accumulated Value: ");
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "Accumulated Value: ");
             break;
         case 3: /* accumulatorStatus */
-            offset  = fEnumeratedTag (tvb, pinfo, tree, offset, "Accumulator Status: ", BACnetAccumulatorStatus);
+            offset  = fEnumeratedTag(tvb, pinfo, tree, offset, "Accumulator Status: ", BACnetAccumulatorStatus);
             break;
         default:
             return offset;
@@ -6295,7 +6696,7 @@ fLoggingRecord (tvbuff_t *tvb, packet_info *pinfo  _U_, proto_tree *tree, guint
  SEQ OF Any enumeration (current usage is SEQ OF BACnetDoorAlarmState
 */
 static guint
-fSequenceOfEnums (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, const value_string *vs)
+fSequenceOfEnums(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, const gchar *label, const value_string *vs)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6303,7 +6704,7 @@ fSequenceOfEnums (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
             }
@@ -6318,7 +6719,7 @@ SEQ OF BACnetDeviceObjectReference (accessed as an array)
 }
 */
 static guint
-fDoorMembers (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fDoorMembers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6326,7 +6727,7 @@ fDoorMembers (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
             }
@@ -6340,7 +6741,7 @@ fDoorMembers (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 SEQ OF ReadAccessSpecification
 */
 static guint
-fListOfGroupMembers (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fListOfGroupMembers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6348,7 +6749,7 @@ fListOfGroupMembers (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info) ) {
             return offset;
             }
@@ -6359,7 +6760,7 @@ fListOfGroupMembers (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAbstractSyntaxNType(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8  tag_no, tag_info;
     guint32 lvt;
@@ -6368,17 +6769,17 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
     guint32 save_object_type;
 
     if (propertyIdentifier >= 0) {
-        g_snprintf (ar, sizeof(ar), "%s: ",
+        g_snprintf(ar, sizeof(ar), "%s: ",
             val_to_split_str(propertyIdentifier, 512,
                 BACnetPropertyIdentifier,
                 ASHRAE_Reserved_Fmt,
                 Vendor_Proprietary_Fmt));
     } else {
-        g_snprintf (ar, sizeof(ar), "Abstract Type: ");
+        g_snprintf(ar, sizeof(ar), "Abstract Type: ");
     }
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) { /* closing tag, but not for me */
             if (depth <= 0) return offset;
         }
@@ -6390,57 +6791,57 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
                 command object is context tagged */
             if (tag_is_context_specific(tag_info)) {
                 /* BACnetActionList */
-                offset = fActionList (tvb, pinfo, tree,offset);
+                offset = fActionList(tvb, pinfo, tree, offset);
             } else {
                 /* BACnetAction */
-                offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset, ar,
+                offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset, ar,
                     BACnetAction);
             }
             break;
         case 30: /* BACnetAddressBinding */
-            offset = fAddressBinding (tvb,pinfo,tree,offset);
+            offset = fAddressBinding(tvb, pinfo, tree, offset);
             break;
         case 54: /* list of object property reference */
-            offset = fLOPR (tvb, pinfo, tree,offset);
+            offset = fLOPR(tvb, pinfo, tree, offset);
             break;
         case 55: /* list-of-session-keys */
-            fSessionKey (tvb, pinfo, tree, offset);
+            fSessionKey(tvb, pinfo, tree, offset);
             break;
         case 79: /* object-type */
         case 96: /* protocol-object-types-supported */
-            offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset, ar,
+            offset = fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset, ar,
                 BACnetObjectType, 128);
             break;
         case 97: /* Protocol-Services-Supported */
-            offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset, ar,
+            offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset, ar,
                 BACnetServicesSupported);
             break;
         case 102: /* recipient-list */
-            offset = fDestination (tvb, pinfo, tree, offset);
+            offset = fDestination(tvb, pinfo, tree, offset);
             break;
         case 107: /* segmentation-supported */
-            offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset, ar,
+            offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset, ar,
                 BACnetSegmentation);
             break;
         case 111: /* Status-Flags */
-            offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset, ar,
+            offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset, ar,
                 BACnetStatusFlags);
             break;
         case 112: /* System-Status */
-            offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset, ar,
+            offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset, ar,
                 BACnetDeviceStatus);
             break;
         case 117: /* units */
-            offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset, ar,
+            offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset, ar,
                 BACnetEngineeringUnits);
             break;
         case 87:    /* priority-array -- accessed as a BACnetARRAY */
             if (propertyArrayIndex == 0) {
                 /* BACnetARRAY index 0 refers to the length
                 of the array, not the elements of the array */
-                offset = fApplicationTypes (tvb, pinfo, tree, offset, ar);
+                offset = fApplicationTypes(tvb, pinfo, tree, offset, ar);
             } else {
-                offset = fPriorityArray (tvb, pinfo, tree, offset);
+                offset = fPriorityArray(tvb, pinfo, tree, offset);
             }
             break;
         case 38:    /* exception-schedule */
@@ -6448,54 +6849,59 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
                 if (propertyArrayIndex == 0) {
                     /* BACnetARRAY index 0 refers to the length
                     of the array, not the elements of the array */
-                    offset = fApplicationTypes (tvb, pinfo, tree, offset, ar);
+                    offset = fApplicationTypes(tvb, pinfo, tree, offset, ar);
                 } else {
-                    offset = fSpecialEvent (tvb,pinfo,tree,offset);
+                    offset = fSpecialEvent(tvb, pinfo, tree, offset);
                 }
             }
             break;
         case 19:  /* controlled-variable-reference */
         case 60:  /* manipulated-variable-reference */
-        case 109: /* Setpoint-Reference */
         case 132: /* log-device-object-property */
-            offset = fDeviceObjectPropertyReference (tvb, pinfo, tree, offset);
+            offset = fDeviceObjectPropertyReference(tvb, pinfo, tree, offset);
+            break;
+        case 109: /* Setpoint-Reference */
+            /* setpoint-Reference is actually BACnetSetpointReference which is a SEQ of [0] */
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset = fBACnetObjectPropertyReference(tvb, pinfo, tree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 123:   /* weekly-schedule -- accessed as a BACnetARRAY */
             if (object_type < 128) {
                 if (propertyArrayIndex == 0) {
                     /* BACnetARRAY index 0 refers to the length
                     of the array, not the elements of the array */
-                    offset = fApplicationTypes (tvb, pinfo, tree, offset, ar);
+                    offset = fApplicationTypes(tvb, pinfo, tree, offset, ar);
                 } else {
-                    offset = fWeeklySchedule (tvb, pinfo, tree, offset);
+                    offset = fWeeklySchedule(tvb, pinfo, tree, offset);
                 }
             }
             break;
         case 127:   /* client COV increment */
-            offset = fClientCOV (tvb, pinfo, tree, offset);
+            offset = fClientCOV(tvb, pinfo, tree, offset);
             break;
         case 131:  /* log-buffer */
             if ( object_type == 25 )
                 offset = fEventLogRecord(tvb, pinfo, tree, offset);
             else if ( object_type == 27 )
-                offset = fLogMultipleRecord (tvb, pinfo, tree, offset);
+                offset = fLogMultipleRecord(tvb, pinfo, tree, offset);
             else
-                offset = fLogRecord (tvb, pinfo, tree, offset);
+                offset = fLogRecord(tvb, pinfo, tree, offset);
             break;
         case 159: /* member-of */
         case 165: /* zone-members */
-            offset = fDeviceObjectReference (tvb, pinfo, tree, offset);
+            offset = fDeviceObjectReference(tvb, pinfo, tree, offset);
             break;
         case 196: /* last-restart-reason */
-            offset = fRestartReason (tvb, pinfo, tree, offset);
+            offset = fRestartReason(tvb, pinfo, tree, offset);
             break;
         case 212: /* actual-shed-level */
         case 214: /* expected-shed-level */
         case 218: /* requested-shed-level */
-            offset = fShedLevel (tvb, pinfo, tree, offset);
+            offset = fShedLevel(tvb, pinfo, tree, offset);
             break;
         case 152: /* active-cov-subscriptions */
-            offset = fCOVSubscription (tvb, pinfo, tree, offset);
+            offset = fCOVSubscription(tvb, pinfo, tree, offset);
             break;
         case 23: /* date-list */
             offset = fCalendarEntry(tvb, pinfo, tree, offset);
@@ -6507,7 +6913,7 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
             offset = fEventParameter(tvb, pinfo, tree, offset);
             break;
         case 211: /* subordinate-list */
-            offset = fDeviceObjectReference (tvb, pinfo, tree, offset);
+            offset = fDeviceObjectReference(tvb, pinfo, tree, offset);
             break;
         case 130: /* event-time-stamp */
             offset = fEventTimeStamps(tvb, pinfo, tree, offset);
@@ -6608,7 +7014,7 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
                     offset  = fContextTaggedValue(tvb, pinfo, tree, offset, ar);
                 }
             } else {
-                offset = fApplicationTypes (tvb, pinfo, tree, offset, ar);
+                offset = fApplicationTypes(tvb, pinfo, tree, offset, ar);
             }
             break;
         }
@@ -6619,7 +7025,7 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tag_info)
+fPropertyValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tag_info)
 {
     guint8  tag_no;
     guint32 lvt;
@@ -6627,15 +7033,15 @@ fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
     if (tag_is_opening(tag_info)) {
         offset += fTagHeaderTree(tvb, pinfo, tree, offset,
                                  &tag_no, &tag_info, &lvt);
-        offset  = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
-        if (tvb_length_remaining(tvb, offset) > 0) {
+        offset  = fAbstractSyntaxNType(tvb, pinfo, tree, offset);
+        if (tvb_reported_length_remaining(tvb, offset) > 0) {
             offset += fTagHeaderTree(tvb, pinfo, tree, offset,
                                      &tag_no, &tag_info, &lvt);
         }
     } else {
-        proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset,
+        proto_tree_add_text(tree, tvb, offset, tvb_reported_length(tvb) - offset,
                             "expected Opening Tag!");
-        offset = tvb_length(tvb);
+        offset = tvb_reported_length(tvb);
     }
 
     return offset;
@@ -6643,7 +7049,7 @@ fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
 
 
 static guint
-fPropertyIdentifierValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset)
+fPropertyIdentifierValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset)
 {
     guint   lastoffset = offset;
     guint8  tag_no, tag_info;
@@ -6651,16 +7057,16 @@ fPropertyIdentifierValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
 
     offset = fPropertyReference(tvb, pinfo, tree, offset, tagoffset, 0);
     if (offset > lastoffset) {
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_no == tagoffset+2) {  /* Value - might not be present in ReadAccessResult */
-            offset = fPropertyValue (tvb, pinfo, tree, offset, tag_info);
+            offset = fPropertyValue(tvb, pinfo, tree, offset, tag_info);
         }
     }
     return offset;
 }
 
 static guint
-fBACnetPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fBACnetPropertyValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -6672,9 +7078,9 @@ fBACnetPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
         if (offset > lastoffset) {
             /* detect optional priority
             by looking to see if the next tag is context tag number 3 */
-            fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+            fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
             if (tag_is_context_specific(tag_info) && (tag_no == 3))
-                offset = fUnsignedTag (tvb,pinfo,tree,offset,"Priority: ");
+                offset = fUnsignedTag(tvb, pinfo, tree, offset, "Priority: ");
         }
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
@@ -6688,11 +7094,10 @@ fSubscribeCOVPropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             offset += len;
             subtree = tree;
@@ -6701,31 +7106,28 @@ fSubscribeCOVPropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
 
         switch (tag_no) {
         case 0: /* ProcessId */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "subscriber Process Id: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "subscriber Process Id: ");
             break;
         case 1: /* monitored ObjectId */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 2: /* issueConfirmedNotifications */
-            offset = fBooleanTag (tvb, pinfo, tree, offset, "issue Confirmed Notifications: ");
+            offset = fBooleanTag(tvb, pinfo, tree, offset, "issue Confirmed Notifications: ");
             break;
         case 3: /* life time */
-            offset = fTimeSpan (tvb,pinfo,tree,offset,"life time");
+            offset = fTimeSpan(tvb, pinfo, tree, offset, "life time");
             break;
         case 4: /* monitoredPropertyIdentifier */
             if (tag_is_opening(tag_info)) {
-                tt = proto_tree_add_text(subtree, tvb, offset, 1, "monitoredPropertyIdentifier");
-                if (tt) {
-                    subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-                }
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fBACnetPropertyReference (tvb, pinfo, subtree, offset, 1);
-                break;
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, "monitoredPropertyIdentifier");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fBACnetPropertyReference(tvb, pinfo, subtree, offset, 1);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         case 5: /* covIncrement */
-            offset = fRealTag (tvb, pinfo, tree, offset, "COV Increment: ");
+            offset = fRealTag(tvb, pinfo, tree, offset, "COV Increment: ");
             break;
         default:
             return offset;
@@ -6742,7 +7144,7 @@ fSubscribeCOVRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fWhoHas (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fWhoHas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
@@ -6751,16 +7153,16 @@ fWhoHas (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
         switch (fTagNo(tvb, offset)) {
         case 0: /* deviceInstanceLowLimit */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "device Instance Low Limit: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "device Instance Low Limit: ");
             break;
         case 1: /* deviceInstanceHighLimit */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "device Instance High Limit: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "device Instance High Limit: ");
             break;
         case 2: /* BACnetObjectId */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 3: /* messageText */
-            offset = fCharacterString (tvb,pinfo,tree,offset, "Object Name: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "Object Name: ");
             break;
         default:
             return offset;
@@ -6772,43 +7174,42 @@ fWhoHas (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
 
 static guint
-fDailySchedule (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
+fDailySchedule(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
     guint32 lvt;
 
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     if (tag_is_opening(tag_info) && tag_no == 0) {
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt); /* opening context tag 0 */
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt); /* opening context tag 0 */
         while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
             lastoffset = offset;
-            fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+            fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
             if (tag_is_closing(tag_info)) {
                 /* should be closing context tag 0 */
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 return offset;
             }
 
-            offset = fTimeValue (tvb, pinfo, subtree, offset);
+            offset = fTimeValue(tvb, pinfo, subtree, offset);
             if (offset == lastoffset) break;    /* nothing happened, exit loop */
         }
-    } else if (tag_no == 0 && lvt == 0) {
+    } else if ((tag_no == 0) && (lvt == 0)) {
         /* not sure null (empty array element) is legal */
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
     }
     return offset;
 }
 
 static guint
-fWeeklySchedule (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fWeeklySchedule(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     guint       i = 1; /* day of week array index */
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     if (propertyArrayIndex > 0) {
         /* BACnetARRAY index 0 refers to the length
@@ -6822,13 +7223,13 @@ fWeeklySchedule (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
     }
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             return offset; /* outer encoding will print out closing tag */
         }
-        tt = proto_tree_add_text(tree, tvb, offset, 0, "%s", val_to_str(i++, day_of_week, "day of week (%d) not found"));
-        subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-        offset = fDailySchedule (tvb, pinfo, subtree, offset);
+        subtree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_bacapp_value, NULL,
+                                val_to_str(i++, day_of_week, "day of week (%d) not found"));
+        offset = fDailySchedule(tvb, pinfo, subtree, offset);
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
     return offset;
@@ -6836,34 +7237,34 @@ fWeeklySchedule (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
 
 
 static guint
-fUTCTimeSynchronizationRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fUTCTimeSynchronizationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     if (tvb_reported_length_remaining(tvb, offset) <= 0)
         return offset;
 
-    return fDateTime (tvb, pinfo, tree, offset, "UTC-Time: ");
+    return fDateTime(tvb, pinfo, tree, offset, "UTC-Time: ");
 }
 
 static guint
-fTimeSynchronizationRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fTimeSynchronizationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     if (tvb_reported_length_remaining(tvb, offset) <= 0)
         return offset;
 
-    return fDateTime (tvb, pinfo, tree, offset, NULL);
+    return fDateTime(tvb, pinfo, tree, offset, NULL);
 }
 
 static guint
-fDateRange  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fDateRange(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     if (tvb_reported_length_remaining(tvb, offset) <= 0)
         return offset;
-    offset = fDate (tvb,pinfo,tree,offset,"Start Date: ");
-    return fDate (tvb, pinfo, tree, offset, "End Date: ");
+    offset = fDate(tvb, pinfo, tree, offset, "Start Date: ");
+    return fDate(tvb, pinfo, tree, offset, "End Date: ");
 }
 
 static guint
-fVendorIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fVendorIdentifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint32      val   = 0;
     guint8       tag_no, tag_info;
@@ -6873,22 +7274,21 @@ fVendorIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
     proto_tree  *subtree;
     const gchar *label = "Vendor ID";
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    if (fUnsigned32 (tvb, offset + tag_len, lvt, &val))
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s: %s (%u)", label,
-            val_to_str(val,BACnetVendorIdentifiers,"Unknown Vendor"), val);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    if (fUnsigned32(tvb, offset + tag_len, lvt, &val))
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, &ti, "%s: %s (%u)",
+            label,
+            val_to_str_ext_const(val, &BACnetVendorIdentifiers_ext, "Unknown Vendor"),
+            val);
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s - %u octets (Unsigned)", label, lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, &ti, "%s - %u octets (Unsigned)", label, lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     if ((lvt < 1) || (lvt > 2)) { /* vendorIDs >= 1  and <= 2 are supported */
-        proto_item *expert_item;
-        expert_item = proto_tree_add_text(tree, tvb, 0, lvt, "Wrong length indicated. Expected 1 or 2, got %u", lvt);
-        expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1 or 2, got %u", lvt);
-        PROTO_ITEM_SET_GENERATED(expert_item);
+        expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length,
+                                "Wrong length indicated. Expected 1 or 2, got %u", lvt);
         return offset+tag_len+lvt;
     }
 
@@ -6899,7 +7299,7 @@ fVendorIdentifier (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
 }
 
 static guint
-fRestartReason (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fRestartReason(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint32      val   = 0;
     guint8       tag_no, tag_info;
@@ -6909,22 +7309,19 @@ fRestartReason (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
     proto_tree  *subtree;
     const gchar *label = "Restart Reason";
 
-    tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    if (fUnsigned32 (tvb, offset + tag_len, lvt, &val))
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s: %s (%u)", label,
-            val_to_str(val,BACnetRestartReason,"Unknown reason"), val);
+    tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    if (fUnsigned32(tvb, offset + tag_len, lvt, &val))
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, &ti, "%s: %s (%u)", label,
+            val_to_str_const(val, BACnetRestartReason, "Unknown reason"), val);
     else
-        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
-            "%s - %u octets (Unsigned)", label, lvt);
-    subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-    fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt+tag_len,
+            ett_bacapp_tag, &ti, "%s - %u octets (Unsigned)", label, lvt);
+    fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
     if (lvt != 1) {
-        proto_item *expert_item;
-        expert_item = proto_tree_add_text(tree, tvb, 0, lvt, "Wrong length indicated. Expected 1, got %u", lvt);
-        expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", lvt);
-        PROTO_ITEM_SET_GENERATED(expert_item);
+        expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length,
+                                "Wrong length indicated. Expected 1, got %u", lvt);
         return offset+tag_len+lvt;
     }
 
@@ -6944,24 +7341,24 @@ fConfirmedTextMessageRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
         switch (fTagNo(tvb, offset)) {
 
         case 0: /* textMessageSourceDevice */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* messageClass */
             switch (fTagNo(tvb, offset)) {
             case 0: /* numeric */
-                offset = fUnsignedTag (tvb, pinfo, tree, offset, "message Class: ");
+                offset = fUnsignedTag(tvb, pinfo, tree, offset, "message Class: ");
                 break;
             case 1: /* character */
-                offset = fCharacterString (tvb, pinfo, tree, offset, "message Class: ");
+                offset = fCharacterString(tvb, pinfo, tree, offset, "message Class: ");
                 break;
             }
             break;
         case 2: /* messagePriority */
-            offset = fEnumeratedTag (tvb, pinfo, tree, offset, "message Priority: ",
+            offset = fEnumeratedTag(tvb, pinfo, tree, offset, "message Priority: ",
                 BACnetMessagePriority);
             break;
         case 3: /* message */
-            offset = fCharacterString (tvb, pinfo, tree, offset, "message: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "message: ");
             break;
         default:
             return offset;
@@ -6980,27 +7377,25 @@ fUnconfirmedTextMessageRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
 static guint
 fConfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    guint       lastoffset = 0, len;
+    guint       lastoffset, len;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
     tvbuff_t   *next_tvb;
     guint       vendor_identifier = 0;
     guint       service_number = 0;
 
-    lastoffset = offset;
-    len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     fUnsigned32(tvb, offset+len, lvt, &vendor_identifier);
     if (col_get_writable(pinfo->cinfo))
         col_append_fstr(pinfo->cinfo, COL_INFO, "V=%u ", vendor_identifier);
-    offset = fVendorIdentifier (tvb, pinfo, subtree, offset);
+    offset = fVendorIdentifier(tvb, pinfo, subtree, offset);
 
-    next_tvb = tvb_new_subset_remaining(tvb,offset);
+    next_tvb = tvb_new_subset_remaining(tvb, offset);
     if (dissector_try_uint(bacapp_dissector_table,
         vendor_identifier, next_tvb, pinfo, tree)) {
         /* we parsed it so skip over length and we are done */
-        offset += tvb_length(next_tvb);
+        offset += tvb_reported_length(next_tvb);
         return offset;
     }
 
@@ -7009,7 +7404,7 @@ fConfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
     /* exit loop if nothing happens inside */
     while (tvb_reported_length_remaining(tvb, offset) > 0) {
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             if (tag_no == 2) { /* Make sure it's the expected tag */
                 offset += len;
@@ -7026,17 +7421,17 @@ fConfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
             fUnsigned32(tvb, offset+len, lvt, &service_number);
             if (col_get_writable(pinfo->cinfo))
                 col_append_fstr(pinfo->cinfo, COL_INFO, "SN=%u ",   service_number);
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "service Number: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "service Number: ");
             break;
         case 2: /*serviceParameters */
             if (tag_is_opening(tag_info)) {
-                tt = proto_tree_add_text(subtree, tvb, offset, 1, "service Parameters");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1,
+                        ett_bacapp_value, NULL, "service Parameters");
                 propertyIdentifier = -1;
-                offset = fAbstractSyntaxNType (tvb, pinfo, subtree, offset);
-                break;
+                offset = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         default:
             return offset;
@@ -7066,30 +7461,28 @@ fLifeSafetyOperationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     if (label != NULL) {
-        tt = proto_tree_add_text (subtree, tvb, offset, 1, "%s", label);
-        subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+        subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, label);
     }
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
         switch (tag_no) {
         case 0: /* subscriberProcessId */
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "requesting Process Id: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "requesting Process Id: ");
             break;
         case 1: /* requestingSource */
-            offset = fCharacterString (tvb, pinfo, tree, offset, "requesting Source: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "requesting Source: ");
             break;
         case 2: /* request */
-            offset = fEnumeratedTagSplit (tvb, pinfo, tree, offset,
+            offset = fEnumeratedTagSplit(tvb, pinfo, tree, offset,
                 "request: ", BACnetLifeSafetyOperation, 64);
             break;
         case 3: /* objectId */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         default:
             return offset;
@@ -7150,14 +7543,15 @@ fBACnetPropertyStates(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, g
 {
     guint8       tag_no, tag_info;
     guint32      lvt;
-    const gchar* label = NULL;
+    const gchar* label;
 
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    label = ep_strdup_printf( "%s: ", val_to_str_const( tag_no, VALS(BACnetPropertyStates), "unknown-"+tag_no ));
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    label = wmem_strdup_printf(wmem_packet_scope(), "%s: ",
+                               val_to_str_const( tag_no, VALS(BACnetPropertyStates), "Unknown State" ));
 
     switch (tag_no) {
     case 0:
-        offset = fBooleanTag (tvb, pinfo, tree, offset, label);
+        offset = fBooleanTag(tvb, pinfo, tree, offset, label);
         break;
     case 11:
         offset = fUnsignedTag(tvb, pinfo, tree, offset, label);
@@ -7166,7 +7560,7 @@ fBACnetPropertyStates(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, g
         if ( (tag_no > BACnetPropertyStatesEnums_Size) ||
             VALS(BACnetPropertyStatesEnums[tag_no].valstr) == NULL)
         {
-            offset = fEnumeratedTag(tvb, pinfo, tree, offset, "Unknown State: ", NULL);
+            offset = fEnumeratedTag(tvb, pinfo, tree, offset, label, NULL);
             /* don't use Abstract type here because it is context tagged and therefore we don't know app type */
         }
         else
@@ -7190,7 +7584,7 @@ BACnetDeviceObjectPropertyValue ::= SEQUENCE {
       }
 */
 static guint
-fDeviceObjectPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fDeviceObjectPropertyValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -7199,27 +7593,27 @@ fDeviceObjectPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     while (tvb_reported_length_remaining(tvb, offset) > 0) {
         lastoffset = offset;
         /* check the tag.  A closing tag means we are done */
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             return offset;
         }
         switch (tag_no) {
         case 0: /* deviceIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 2: /* propertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, tree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, tree, offset);
             break;
         case 3: /* arrayIndex - OPTIONAL */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset,
+            offset = fUnsignedTag(tvb, pinfo, tree, offset,
                 "arrayIndex: ");
             break;
         case 4: /* value */
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
+            offset  = fAbstractSyntaxNType(tvb, pinfo, tree, offset);
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
@@ -7241,7 +7635,7 @@ BACnetDeviceObjectPropertyReference ::= SEQUENCE {
       }
 */
 static guint
-fObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     return fDeviceObjectPropertyReference(tvb, pinfo, tree, offset);
 }
@@ -7257,7 +7651,7 @@ BACnetDeviceObjectPropertyReference ::= SEQUENCE {
       }
 */
 static guint
-fDeviceObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fDeviceObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -7266,23 +7660,23 @@ fDeviceObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
     while (tvb_reported_length_remaining(tvb, offset) > 0) {
         lastoffset = offset;
         /* check the tag.  A closing tag means we are done */
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             return offset;
         }
         switch (tag_no) {
         case 0: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* propertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, tree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, tree, offset);
             break;
         case 2: /* arrayIndex - OPTIONAL */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset,
+            offset = fUnsignedTag(tvb, pinfo, tree, offset,
                 "arrayIndex: ");
             break;
         case 3: /* deviceIdentifier - OPTIONAL */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         default:
             return offset;
@@ -7293,18 +7687,17 @@ fDeviceObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 }
 
 static guint
-fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fNotificationParameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = offset;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    tt = proto_tree_add_text(subtree, tvb, offset, 0, "notification parameters (%d) %s",
-        tag_no, val_to_str(tag_no, BACnetEventType, "invalid type"));
-    subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0,
+        ett_bacapp_value, NULL, "notification parameters (%d) %s",
+        tag_no, val_to_str_const(tag_no, BACnetEventType, "invalid type"));
     /* Opening tag for parameter choice */
     offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
 
@@ -7314,11 +7707,11 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fBitStringTag (tvb, pinfo, subtree, offset,
+                offset = fBitStringTag(tvb, pinfo, subtree, offset,
                     "referenced-bitstring: ");
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 lastoffset = offset;
                 break;
@@ -7338,7 +7731,7 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 lastoffset = offset;
                 break;
@@ -7356,11 +7749,11 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 switch (fTagNo(tvb, offset)) {
                 case 0:
-                    offset = fBitStringTag (tvb, pinfo, subtree, offset,
+                    offset = fBitStringTag(tvb, pinfo, subtree, offset,
                         "changed-bits: ");
                     break;
                 case 1:
-                    offset = fRealTag (tvb, pinfo, subtree, offset,
+                    offset = fRealTag(tvb, pinfo, subtree, offset,
                         "changed-value: ");
                     break;
                 default:
@@ -7369,7 +7762,7 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 lastoffset = offset;
                 break;
@@ -7388,17 +7781,17 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
                     Standard Object Property Values Returned in Notifications */
                 propertyIdentifier = 85; /* PRESENT_VALUE */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fAbstractSyntaxNType (tvb, pinfo, subtree, offset);
+                offset  = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 break;
             case 2: /* "feedback-value: " */
                 propertyIdentifier = 40; /* FEEDBACK_VALUE */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fAbstractSyntaxNType (tvb, pinfo, subtree, offset);
+                offset  = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 lastoffset = offset;
                 break;
@@ -7413,17 +7806,17 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "reference-value: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "reference-value: ");
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 break;
             case 2:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "setpoint-value: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "setpoint-value: ");
                 break;
             case 3:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "error-limit: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "error-limit: ");
                 lastoffset = offset;
                 break;
             default:
@@ -7437,17 +7830,17 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "exceeding-value: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "exceeding-value: ");
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 break;
             case 2:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "deadband: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "deadband: ");
                 break;
             case 3:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "exceeded-limit: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "exceeded-limit: ");
                 lastoffset = offset;
                 break;
             default:
@@ -7459,28 +7852,28 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
     case 6:
         while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
             lastoffset = offset;
-            offset =fBACnetPropertyValue (tvb,pinfo,subtree,offset);
+            offset =fBACnetPropertyValue(tvb, pinfo, subtree, offset);
             if (offset == lastoffset) break;     /* nothing happened, exit loop */
         }
         break;
-    case 7: /* buffer-ready */
+    case 7: /* deprecated (was 'buffer-ready', changed and moved to [10]) */
         while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fObjectIdentifier (tvb, pinfo, subtree, offset); /* buffer-device */
+                offset = fObjectIdentifier(tvb, pinfo, subtree, offset); /* buffer-device */
                 break;
             case 1:
-                offset = fObjectIdentifier (tvb, pinfo, subtree, offset); /* buffer-object */
+                offset = fObjectIdentifier(tvb, pinfo, subtree, offset); /* buffer-object */
                 break;
             case 2:
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fDateTime (tvb, pinfo, subtree, offset, "previous-notification: ");
+                offset  = fDateTime(tvb, pinfo, subtree, offset, "previous-notification: ");
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 3:
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fDateTime (tvb, pinfo, subtree, offset, "current-notification: ");
+                offset  = fDateTime(tvb, pinfo, subtree, offset, "current-notification: ");
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 lastoffset = offset;
                 break;
@@ -7495,19 +7888,19 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fEnumeratedTagSplit (tvb, pinfo, subtree, offset,
+                offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset,
                     "new-state: ", BACnetLifeSafetyState, 256);
                 break;
             case 1:
-                offset = fEnumeratedTagSplit (tvb, pinfo, subtree, offset,
+                offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset,
                     "new-mode: ", BACnetLifeSafetyMode, 256);
                 break;
             case 2:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 break;
             case 3:
-                offset = fEnumeratedTagSplit (tvb, pinfo, subtree, offset,
+                offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset,
                     "operation-expected: ", BACnetLifeSafetyOperation, 64);
                 lastoffset = offset;
                 break;
@@ -7522,10 +7915,10 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fVendorIdentifier (tvb, pinfo, subtree, offset);
+                offset = fVendorIdentifier(tvb, pinfo, subtree, offset);
                 break;
             case 1:
-                offset = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset,
                     "extended-event-type: ");
                 break;
             case 2: /* parameters */
@@ -7547,15 +7940,15 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             switch (fTagNo(tvb, offset)) {
             case 0: /* buffer-property */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fDeviceObjectPropertyReference (tvb, pinfo, subtree, offset);
+                offset  = fDeviceObjectPropertyReference(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 1:
-                offset  = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset  = fUnsignedTag(tvb, pinfo, subtree, offset,
                     "previous-notification: ");
                 break;
             case 2:
-                offset = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset,
                     "current-notification: ");
                 lastoffset = offset;
                 break;
@@ -7570,15 +7963,15 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset,
                     "exceeding-value: ");
                 break;
             case 1:
-                offset = fBitStringTagVS (tvb, pinfo, subtree, offset,
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
                     "status-flags: ", BACnetStatusFlags);
                 break;
             case 2:
-                offset = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset,
                     "exceeded-limit: ");
                 lastoffset = offset;
                 break;
@@ -7588,54 +7981,174 @@ fNotificationParameters (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
             if (offset == lastoffset) break;     /* nothing happened, exit loop */
         }
         break;
-        /* todo: add new parameters here ... */
-    default:
-        offset = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
+        /* 12 reserved */
+    case 13: /* access-event */
         break;
-    }
-
-    /* Closing tag for parameter choice */
-    offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-
-    return offset;
-}
-
-static guint
-fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
-{
-    guint       lastoffset = offset;
-    guint8      tag_no, tag_info;
-    guint32     lvt;
-    proto_tree *subtree = tree;
-    proto_item *tt;
-
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-    tt = proto_tree_add_text(subtree, tvb, offset, 0, "event parameters (%d) %s",
-        tag_no, val_to_str(tag_no, BACnetEventType, "invalid type"));
-    subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-    /* Opening tag for parameter choice */
-    offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-
-    switch (tag_no) {
-    case 0: /* change-of-bitstring */
-        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+    case 14: /* double-out-of-range */
+        while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
             lastoffset = offset;
-            fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-            if (tag_is_closing(tag_info)) {
-                break;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fDoubleTag(tvb, pinfo, subtree, offset, "exceeding-value: ");
+                break;
+            case 1:
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
+                    "status-flags: ", BACnetStatusFlags);
+                break;
+            case 2:
+                offset = fDoubleTag(tvb, pinfo, subtree, offset, "deadband: ");
+                break;
+            case 3:
+                offset = fDoubleTag(tvb, pinfo, subtree, offset, "exceeded-limit: ");
+                lastoffset = offset;
+                break;
+            default:
+                break;
+            }
+            if (offset == lastoffset) break;     /* nothing happened, exit loop */
+        }
+        break;
+    case 15: /* signed-out-of-range */
+        while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fSignedTag(tvb, pinfo, subtree, offset, "exceeding-value: ");
+                break;
+            case 1:
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
+                    "status-flags: ", BACnetStatusFlags);
+                break;
+            case 2:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "deadband: ");
+                break;
+            case 3:
+                offset = fSignedTag(tvb, pinfo, subtree, offset, "exceeded-limit: ");
+                lastoffset = offset;
+                break;
+            default:
+                break;
+            }
+            if (offset == lastoffset) break;     /* nothing happened, exit loop */
+        }
+        break;
+    case 16: /* unsigned-out-of-range */
+        while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "exceeding-value: ");
+                break;
+            case 1:
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
+                    "status-flags: ", BACnetStatusFlags);
+                break;
+            case 2:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "deadband: ");
+                break;
+            case 3:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "exceeded-limit: ");
+                lastoffset = offset;
+                break;
+            default:
+                break;
+            }
+            if (offset == lastoffset) break;     /* nothing happened, exit loop */
+        }
+        break;
+    case 17: /* change-of-characterstring */
+        while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                 /* changed-value (CharacterString) */
+                offset  = fCharacterString(tvb, pinfo, subtree, offset, "changed-value: ");
+                break;
+            case 1:
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
+                    "status-flags: ", BACnetStatusFlags);
+                break;
+            case 2:
+                /* alarm-value (CharacterString) */
+                offset  = fCharacterString(tvb, pinfo, subtree, offset, "alarm-value: ");
+                lastoffset = offset;
+                break;
+            default:
+                break;
+            }
+            if (offset == lastoffset) break;     /* nothing happened, exit loop */
+        }
+        break;
+    case 18: /* change-of-status-flags */
+        while (tvb_reported_length_remaining(tvb, offset) > 0) {
+            /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset = fApplicationTypesEnumerated(tvb, pinfo, subtree, offset,
+                    "present-value: ", BACnetStatusFlags);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                break;
+            case 1:
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
+                    "referenced-flags: ", BACnetStatusFlags);
+                lastoffset = offset;
+                break;
+            default:
+                break;
+            }
+            if (offset == lastoffset) break;     /* nothing happened, exit loop */
+        }
+        break;
+        /* todo: add new parameters here ... */
+    default:
+        offset = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
+        break;
+    }
+
+    /* Closing tag for parameter choice */
+    offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+
+    return offset;
+}
+
+static guint
+fEventParameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+{
+    guint       lastoffset = offset;
+    guint8      tag_no, tag_info;
+    guint32     lvt;
+    proto_tree *subtree = tree;
+
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    subtree = proto_tree_add_subtree_format(subtree, tvb, offset, 0,
+        ett_bacapp_value, NULL, "event parameters (%d) %s",
+        tag_no, val_to_str_const(tag_no, BACnetEventType, "invalid type"));
+
+    /* Opening tag for parameter choice */
+    offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+
+    switch (tag_no) {
+    case 0: /* change-of-bitstring */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+            if (tag_is_closing(tag_info)) {
+                break;
             }
             switch (tag_no) {
             case 0:
-                offset = fTimeSpan (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1:
-                offset = fBitStringTag (tvb, pinfo, subtree, offset, "bitmask: ");
+                offset = fBitStringTag(tvb, pinfo, subtree, offset, "bitmask: ");
                 break;
             case 2: /* SEQUENCE OF BIT STRING */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
                     lastoffset = offset;
-                    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
                     if (tag_is_closing(tag_info)) {
                         break;
                     }
@@ -7652,19 +8165,19 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
     case 1: /* change-of-state */
         while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
             lastoffset = offset;
-            fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+            fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
             if (tag_is_closing(tag_info)) {
                 break;
             }
             switch (tag_no) {
             case 0:
-                offset = fTimeSpan (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1: /* SEQUENCE OF BACnetPropertyStates */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
                     lastoffset = offset;
-                    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
                     if (tag_is_closing(tag_info)) {
                         break;
                     }
@@ -7682,16 +8195,16 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fTimeSpan   (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1: /* don't loop it, it's a CHOICE */
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 switch (fTagNo(tvb, offset)) {
                 case 0:
-                    offset = fBitStringTag (tvb, pinfo, subtree, offset, "bitmask: ");
+                    offset = fBitStringTag(tvb, pinfo, subtree, offset, "bitmask: ");
                     break;
                 case 1:
-                    offset = fRealTag (tvb, pinfo, subtree, offset,
+                    offset = fRealTag(tvb, pinfo, subtree, offset,
                                        "referenced Property Increment: ");
                     break;
                 default:
@@ -7710,11 +8223,11 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             tag_no = fTagNo(tvb, offset);
             switch (tag_no) {
             case 0:
-                offset = fTimeSpan   (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1:
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fDeviceObjectPropertyReference (tvb,pinfo,subtree,offset);
+                offset  = fDeviceObjectPropertyReference(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             default:
@@ -7725,27 +8238,27 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
     case 4: /* floating-limit */
         while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
             lastoffset = offset;
-            fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+            fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
             if (tag_is_closing(tag_info)) {
                 break;
             }
             switch (tag_no) {
             case 0:
-                offset = fTimeSpan   (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1:
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fDeviceObjectPropertyReference (tvb,pinfo,subtree,offset);
+                offset  = fDeviceObjectPropertyReference(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 2:
-                offset  = fRealTag (tvb, pinfo, subtree, offset, "low diff limit: ");
+                offset  = fRealTag(tvb, pinfo, subtree, offset, "low diff limit: ");
                 break;
             case 3:
-                offset  = fRealTag (tvb, pinfo, subtree, offset, "high diff limit: ");
+                offset  = fRealTag(tvb, pinfo, subtree, offset, "high diff limit: ");
                 break;
             case 4:
-                offset  = fRealTag (tvb, pinfo, subtree, offset, "deadband: ");
+                offset  = fRealTag(tvb, pinfo, subtree, offset, "deadband: ");
                 break;
             default:
                 break;
@@ -7757,16 +8270,16 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fTimeSpan (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "low limit: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "low limit: ");
                 break;
             case 2:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "high limit: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "high limit: ");
                 break;
             case 3:
-                offset = fRealTag (tvb, pinfo, subtree, offset, "deadband: ");
+                offset = fRealTag(tvb, pinfo, subtree, offset, "deadband: ");
                 break;
             default:
                 break;
@@ -7775,7 +8288,7 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
         break;
         /*  deprectated
             case 6:
-            offset = fBACnetPropertyValue (tvb,pinfo,tree,offset);
+            offset = fBACnetPropertyValue (tvb, pinfo, tree, offset);
             break;
         */
 
@@ -7786,10 +8299,10 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fUnsignedTag (tvb,pinfo,tree,offset,"notification threshold");
+                offset = fUnsignedTag(tvb, pinfo, tree, offset, "notification threshold");
                 break;
             case 1:
-                offset = fUnsignedTag (tvb,pinfo,tree,offset,
+                offset = fUnsignedTag(tvb, pinfo, tree, offset,
                                        "previous notification count: ");
                 break;
             default:
@@ -7803,17 +8316,17 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fTimeSpan (tvb, pinfo, subtree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
                 break;
             case 1:
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
                     lastoffset = offset;
-                    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
                     if (tag_is_closing(tag_info)) {
                         break;
                     }
-                    offset = fEnumeratedTagSplit (tvb, pinfo, subtree, offset,
+                    offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset,
                                                   "life safety alarm value: ", BACnetLifeSafetyState, 256);
                 }
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
@@ -7822,18 +8335,18 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
                     lastoffset = offset;
-                    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
                     if (tag_is_closing(tag_info)) {
                         break;
                     }
-                    offset = fEnumeratedTagSplit (tvb, pinfo, subtree, offset,
+                    offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset,
                                                   "alarm value: ", BACnetLifeSafetyState, 256);
                 }
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 3:
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fDeviceObjectPropertyReference (tvb, pinfo, subtree, offset);
+                offset  = fDeviceObjectPropertyReference(tvb, pinfo, subtree, offset);
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             default:
@@ -7846,10 +8359,10 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fVendorIdentifier (tvb, pinfo, tree, offset);
+                offset = fVendorIdentifier(tvb, pinfo, tree, offset);
                 break;
             case 1:
-                offset = fUnsignedTag (tvb, pinfo, tree, offset,
+                offset = fUnsignedTag(tvb, pinfo, tree, offset,
                                        "extended-event-type: ");
                 break;
             case 2: /* parameters */
@@ -7870,11 +8383,11 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset,
                                        "notification-threshold: ");
                 break;
             case 1:
-                offset = fUnsignedTag (tvb, pinfo, subtree, offset,
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset,
                                        "previous-notification-count: ");
                 break;
             default:
@@ -7887,14 +8400,14 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             lastoffset = offset;
             switch (fTagNo(tvb, offset)) {
             case 0:
-                offset = fTimeSpan (tvb, pinfo, tree, offset, "Time Delay");
+                offset = fTimeSpan(tvb, pinfo, tree, offset, "Time Delay");
                 break;
             case 1:
-                offset = fUnsignedTag (tvb, pinfo, tree, offset,
+                offset = fUnsignedTag(tvb, pinfo, tree, offset,
                                        "low-limit: ");
                 break;
             case 2:
-                offset = fUnsignedTag (tvb, pinfo, tree, offset,
+                offset = fUnsignedTag(tvb, pinfo, tree, offset,
                                        "high-limit: ");
                 break;
             default:
@@ -7902,6 +8415,137 @@ fEventParameter (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offs
             }
         }
         break;
+    case 13: /* access-event */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                /* TODO: [0] SEQUENCE OF BACnetAccessEvent */
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+                    lastoffset = offset;
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    if (tag_is_closing(tag_info)) {
+                        break;
+                    }
+                    offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset,
+                                                  "access event: ", BACnetAccessEvent, 512);
+                }
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                break;
+            case 1:
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fDeviceObjectPropertyReference(tvb, pinfo, subtree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                break;
+            default:
+                break;
+            }
+        }
+        break;
+    case 14: /* double-out-of-range */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
+                break;
+            case 1:
+                offset = fDoubleTag(tvb, pinfo, subtree, offset, "low limit: ");
+                break;
+            case 2:
+                offset = fDoubleTag(tvb, pinfo, subtree, offset, "high limit: ");
+                break;
+            case 3:
+                offset = fDoubleTag(tvb, pinfo, subtree, offset, "deadband: ");
+                break;
+            default:
+                break;
+            }
+        }
+        break;
+    case 15: /* signed-out-of-range */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
+                break;
+            case 1:
+                offset = fSignedTag(tvb, pinfo, subtree, offset, "low limit: ");
+                break;
+            case 2:
+                offset = fSignedTag(tvb, pinfo, subtree, offset, "high limit: ");
+                break;
+            case 3:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "deadband: ");
+                break;
+            default:
+                break;
+            }
+        }
+        break;
+    case 16: /* unsigned-out-of-range */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
+                break;
+            case 1:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "low limit: ");
+                break;
+            case 2:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "high limit: ");
+                break;
+            case 3:
+                offset = fUnsignedTag(tvb, pinfo, subtree, offset, "deadband: ");
+                break;
+            default:
+                break;
+            }
+        }
+        break;
+    case 17: /* change-of-characterstring */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
+                break;
+            case 1: /* SEQUENCE OF CharacterString */
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+                    lastoffset = offset;
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    if (tag_is_closing(tag_info)) {
+                        break;
+                    }
+                    offset  = fCharacterString(tvb, pinfo, tree, offset, "alarm value: ");
+                }
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                break;
+            default:
+                break;
+            }
+        }
+        break;
+    case 18: /* change-of-status-flags */
+        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
+            lastoffset = offset;
+            switch (fTagNo(tvb, offset)) {
+            case 0:
+                offset = fTimeSpan(tvb, pinfo, subtree, offset, "Time Delay");
+                break;
+            case 1:
+                offset = fBitStringTagVS(tvb, pinfo, subtree, offset,
+                    "selected flags: ", BACnetStatusFlags);
+                break;
+            default:
+                break;
+            }
+        }
+        break;
         /* todo: add new event-parameter cases here */
     default:
         break;
@@ -7919,37 +8563,35 @@ fEventLogRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
         switch (fTagNo(tvb, offset)) {
         case 0: /* timestamp */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fDate (tvb,pinfo,tree,offset,"Date: ");
-            offset  = fTime (tvb,pinfo,tree,offset,"Time: ");
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fDate(tvb, pinfo, tree, offset, "Date: ");
+            offset  = fTime(tvb, pinfo, tree, offset, "Time: ");
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 1: /* logDatum: don't loop, it's a CHOICE */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             switch (fTagNo(tvb, offset)) {
             case 0: /* logStatus */    /* Changed this to BitString per BACnet Spec. */
                 offset = fBitStringTagVS(tvb, pinfo, tree, offset, "log status:", BACnetLogStatus);
                 break;
             case 1: /* todo: move this to new method fConfirmedEventNotificationRequestTag... */
-                tt = proto_tree_add_text(tree, tvb, offset, 1, "notification: ");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                subtree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_bacapp_value, NULL, "notification: ");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 offset  = fConfirmedEventNotificationRequest(tvb, pinfo, subtree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 2:
-                offset = fRealTag (tvb, pinfo, tree, offset, "time-change: ");
+                offset = fRealTag(tvb, pinfo, tree, offset, "time-change: ");
                 break;
             default:
                 return offset;
             }
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
             return offset;
@@ -7960,7 +8602,7 @@ fEventLogRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
 }
 
 static guint
-fLogRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fLogRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -7970,55 +8612,55 @@ fLogRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
         lastoffset = offset;
         switch (fTagNo(tvb, offset)) {
         case 0: /* timestamp */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fDate (tvb,pinfo,tree,offset,"Date: ");
-            offset  = fTime (tvb,pinfo,tree,offset,"Time: ");
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fDate(tvb, pinfo, tree, offset, "Date: ");
+            offset  = fTime(tvb, pinfo, tree, offset, "Time: ");
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 1: /* logDatum: don't loop, it's a CHOICE */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             switch (fTagNo(tvb, offset)) {
             case 0: /* logStatus */    /* Changed this to BitString per BACnet Spec. */
                 offset = fBitStringTagVS(tvb, pinfo, tree, offset, "log status:", BACnetLogStatus);
                 break;
             case 1:
-                offset = fBooleanTag (tvb, pinfo, tree, offset, "boolean-value: ");
+                offset = fBooleanTag(tvb, pinfo, tree, offset, "boolean-value: ");
                 break;
             case 2:
-                offset = fRealTag (tvb, pinfo, tree, offset, "real value: ");
+                offset = fRealTag(tvb, pinfo, tree, offset, "real value: ");
                 break;
             case 3:
-                offset = fUnsignedTag (tvb, pinfo, tree, offset, "enum value: ");
+                offset = fUnsignedTag(tvb, pinfo, tree, offset, "enum value: ");
                 break;
             case 4:
-                offset = fUnsignedTag (tvb, pinfo, tree, offset, "unsigned value: ");
+                offset = fUnsignedTag(tvb, pinfo, tree, offset, "unsigned value: ");
                 break;
             case 5:
-                offset = fSignedTag (tvb, pinfo, tree, offset, "signed value: ");
+                offset = fSignedTag(tvb, pinfo, tree, offset, "signed value: ");
                 break;
             case 6:
-                offset = fBitStringTag (tvb, pinfo, tree, offset, "bitstring value: ");
+                offset = fBitStringTag(tvb, pinfo, tree, offset, "bitstring value: ");
                 break;
             case 7:
                 offset = fNullTag(tvb, pinfo, tree, offset, "null value: ");
                 break;
             case 8:
-                offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fError (tvb, pinfo, tree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fError(tvb, pinfo, tree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 9:
-                offset = fRealTag (tvb, pinfo, tree, offset, "time change: ");
+                offset = fRealTag(tvb, pinfo, tree, offset, "time change: ");
                 break;
             case 10:    /* any Value */
-                offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fAbstractSyntaxNType(tvb, pinfo, tree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
                 break;
             default:
                 return offset;
             }
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 2:
             /* Changed this to BitString per BACnet Spec. */
@@ -8033,7 +8675,7 @@ fLogRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 }
 
 static guint
-fLogMultipleRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fLogMultipleRecord(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -8043,71 +8685,71 @@ fLogMultipleRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
         lastoffset = offset;
         switch (fTagNo(tvb, offset)) {
         case 0: /* timestamp */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fDate (tvb,pinfo,tree,offset,"Date: ");
-            offset  = fTime (tvb,pinfo,tree,offset,"Time: ");
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fDate(tvb, pinfo, tree, offset, "Date: ");
+            offset  = fTime(tvb, pinfo, tree, offset, "Time: ");
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 1: /* logData: don't loop, it's a CHOICE */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             switch (fTagNo(tvb, offset)) {
             case 0: /* logStatus */    /* Changed this to BitString per BACnet Spec. */
                 offset = fBitStringTagVS(tvb, pinfo, tree, offset, "log status:", BACnetLogStatus);
                 break;
             case 1: /* log-data: SEQUENCE OF CHOICE */
-                offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
                 while ((tvb_reported_length_remaining(tvb, offset) > 0) && (offset != lastoffset)) {  /* exit loop if nothing happens inside */
                     lastoffset = offset;
-                    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+                    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
                     if (tag_is_closing(tag_info)) {
                         lastoffset = offset;
                         break;
                     }
                     switch (tag_no) {
                     case 0:
-                        offset = fBooleanTag (tvb, pinfo, tree, offset, "boolean-value: ");
+                        offset = fBooleanTag(tvb, pinfo, tree, offset, "boolean-value: ");
                         break;
                     case 1:
-                        offset = fRealTag (tvb, pinfo, tree, offset, "real value: ");
+                        offset = fRealTag(tvb, pinfo, tree, offset, "real value: ");
                         break;
                     case 2:
-                        offset = fUnsignedTag (tvb, pinfo, tree, offset, "enum value: ");
+                        offset = fUnsignedTag(tvb, pinfo, tree, offset, "enum value: ");
                         break;
                     case 3:
-                        offset = fUnsignedTag (tvb, pinfo, tree, offset, "unsigned value: ");
+                        offset = fUnsignedTag(tvb, pinfo, tree, offset, "unsigned value: ");
                         break;
                     case 4:
-                        offset = fSignedTag (tvb, pinfo, tree, offset, "signed value: ");
+                        offset = fSignedTag(tvb, pinfo, tree, offset, "signed value: ");
                         break;
                     case 5:
-                        offset = fBitStringTag (tvb, pinfo, tree, offset, "bitstring value: ");
+                        offset = fBitStringTag(tvb, pinfo, tree, offset, "bitstring value: ");
                         break;
                     case 6:
                         offset = fNullTag(tvb, pinfo, tree, offset, "null value: ");
                         break;
                     case 7:
-                        offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-                        offset  = fError (tvb, pinfo, tree, offset);
-                        offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                        offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                        offset  = fError(tvb, pinfo, tree, offset);
+                        offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
                         break;
                     case 8: /* any Value */
-                        offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-                        offset  = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
-                        offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                        offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                        offset  = fAbstractSyntaxNType(tvb, pinfo, tree, offset);
+                        offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
                         break;
                     default:
                         return offset;
                     }
                 }
-                offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
                 break;
             case 2:
-                offset = fRealTag (tvb, pinfo, tree, offset, "time-change: ");
+                offset = fRealTag(tvb, pinfo, tree, offset, "time-change: ");
                 break;
             default:
                 return offset;
             }
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
             return offset;
@@ -8119,7 +8761,7 @@ fLogMultipleRecord (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
 
 
 static guint
-fConfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fConfirmedEventNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -8127,59 +8769,58 @@ fConfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tre
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
-            lastoffset = offset;
             break;
         }
 
         switch (tag_no) {
         case 0: /* ProcessId */
-            offset  = fProcessId (tvb,pinfo,tree,offset);
+            offset  = fProcessId(tvb, pinfo, tree, offset);
             break;
         case 1: /* initiating ObjectId */
-            offset  = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset  = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 2: /* event ObjectId */
-            offset  = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset  = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 3: /* time stamp */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fTimeStamp (tvb, pinfo, tree, offset, NULL);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fTimeStamp(tvb, pinfo, tree, offset, NULL);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 4: /* notificationClass */
-            offset  = fUnsignedTag (tvb, pinfo, tree, offset, "Notification Class: ");
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "Notification Class: ");
             break;
         case 5: /* Priority */
-            offset  = fUnsignedTag (tvb, pinfo, tree, offset, "Priority: ");
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "Priority: ");
             break;
         case 6: /* EventType */
-            offset  = fEnumeratedTagSplit (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTagSplit(tvb, pinfo, tree, offset,
                 "Event Type: ", BACnetEventType, 64);
             break;
         case 7: /* messageText */
-            offset  = fCharacterString (tvb, pinfo, tree, offset, "message Text: ");
+            offset  = fCharacterString(tvb, pinfo, tree, offset, "message Text: ");
             break;
         case 8: /* NotifyType */
-            offset  = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "Notify Type: ", BACnetNotifyType);
             break;
         case 9: /* ackRequired */
-            offset  = fBooleanTag (tvb, pinfo, tree, offset, "ack Required: ");
+            offset  = fBooleanTag(tvb, pinfo, tree, offset, "ack Required: ");
             break;
         case 10: /* fromState */
-            offset  = fEnumeratedTagSplit (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTagSplit(tvb, pinfo, tree, offset,
                 "from State: ", BACnetEventState, 64);
             break;
         case 11: /* toState */
-            offset  = fEnumeratedTagSplit (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTagSplit(tvb, pinfo, tree, offset,
                 "to State: ", BACnetEventState, 64);
             break;
         case 12: /* NotificationParameters */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fNotificationParameters (tvb, pinfo, tree, offset);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fNotificationParameters(tvb, pinfo, tree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
             break;
@@ -8190,23 +8831,22 @@ fConfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tre
 }
 
 static guint
-fUnconfirmedEventNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fUnconfirmedEventNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    return fConfirmedEventNotificationRequest (tvb, pinfo, tree, offset);
+    return fConfirmedEventNotificationRequest(tvb, pinfo, tree, offset);
 }
 
 static guint
-fConfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fConfirmedCOVNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0, len;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree    = tree;
-    proto_item *tt;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             offset += len;
             subtree = tree;
@@ -8215,26 +8855,25 @@ fConfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree
 
         switch (tag_no) {
         case 0: /* ProcessId */
-            offset = fProcessId (tvb,pinfo,tree,offset);
+            offset = fProcessId(tvb, pinfo, tree, offset);
             break;
         case 1: /* initiating DeviceId */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* monitored ObjectId */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 3: /* time remaining */
-            offset = fTimeSpan (tvb, pinfo, tree, offset, "Time remaining");
+            offset = fTimeSpan(tvb, pinfo, tree, offset, "Time remaining");
             break;
         case 4: /* List of Values */
             if (tag_is_opening(tag_info)) {
-                tt = proto_tree_add_text(subtree, tvb, offset, 1, "list of Values");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fBACnetPropertyValue (tvb, pinfo, subtree, offset);
-                break;
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, "list of Values");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fBACnetPropertyValue(tvb, pinfo, subtree, offset);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         default:
             return offset;
@@ -8245,13 +8884,13 @@ fConfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree
 }
 
 static guint
-fUnconfirmedCOVNotificationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fUnconfirmedCOVNotificationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    return fConfirmedCOVNotificationRequest (tvb, pinfo, tree, offset);
+    return fConfirmedCOVNotificationRequest(tvb, pinfo, tree, offset);
 }
 
 static guint
-fAcknowledgeAlarmRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAcknowledgeAlarmRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no = 0, tag_info = 0;
@@ -8261,13 +8900,13 @@ fAcknowledgeAlarmRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
         lastoffset = offset;
         switch (fTagNo(tvb, offset)) {
         case 0: /* acknowledgingProcessId */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "acknowledging Process Id: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "acknowledging Process Id: ");
             break;
         case 1: /* eventObjectId */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 2: /* eventStateAcknowledged */
-            offset = fEnumeratedTagSplit (tvb, pinfo, tree, offset,
+            offset = fEnumeratedTagSplit(tvb, pinfo, tree, offset,
                 "event State Acknowledged: ", BACnetEventState, 64);
             break;
         case 3: /* timeStamp */
@@ -8276,7 +8915,7 @@ fAcknowledgeAlarmRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 4: /* acknowledgementSource */
-            offset  = fCharacterString (tvb, pinfo, tree, offset, "acknowledgement Source: ");
+            offset  = fCharacterString(tvb, pinfo, tree, offset, "acknowledgement Source: ");
             break;
         case 5: /* timeOfAcknowledgement */
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
@@ -8292,16 +8931,16 @@ fAcknowledgeAlarmRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
 }
 
 static guint
-fGetAlarmSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fGetAlarmSummaryAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        offset = fApplicationTypes (tvb, pinfo, tree, offset, "Object Identifier: ");
-        offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
+        offset = fApplicationTypes(tvb, pinfo, tree, offset, "Object Identifier: ");
+        offset = fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset,
             "alarm State: ", BACnetEventState, 64);
-        offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset,
+        offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset,
             "acknowledged Transitions: ", BACnetEventTransitionBits);
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
@@ -8309,7 +8948,7 @@ fGetAlarmSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fGetEnrollmentSummaryRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fGetEnrollmentSummaryRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -8319,30 +8958,30 @@ fGetEnrollmentSummaryRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
         lastoffset = offset;
         switch (fTagNo(tvb, offset)) {
         case 0: /* acknowledgmentFilter */
-            offset = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "acknowledgment Filter: ", BACnetAcknowledgementFilter);
             break;
         case 1: /* eventObjectId - OPTIONAL */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fRecipientProcess (tvb, pinfo, tree, offset);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fRecipientProcess(tvb, pinfo, tree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 2: /* eventStateFilter */
-            offset  = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "event State Filter: ", BACnetEventStateFilter);
             break;
         case 3: /* eventTypeFilter - OPTIONAL */
-            offset  = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "event Type Filter: ", BACnetEventType);
             break;
         case 4: /* priorityFilter */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fUnsignedTag (tvb, pinfo, tree, offset, "min Priority: ");
-            offset  = fUnsignedTag (tvb, pinfo, tree, offset, "max Priority: ");
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "min Priority: ");
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "max Priority: ");
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 5: /* notificationClassFilter - OPTIONAL */
-            offset  = fUnsignedTag (tvb, pinfo, tree, offset, "notification Class Filter: ");
+            offset  = fUnsignedTag(tvb, pinfo, tree, offset, "notification Class Filter: ");
             break;
         default:
             return offset;
@@ -8353,19 +8992,20 @@ fGetEnrollmentSummaryRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
 }
 
 static guint
-fGetEnrollmentSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fGetEnrollmentSummaryAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        offset = fApplicationTypes (tvb, pinfo, tree, offset, "Object Identifier: ");
-        offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
+        offset = fApplicationTypes(tvb, pinfo, tree, offset, "Object Identifier: ");
+        offset = fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset,
             "event Type: ", BACnetEventType, 64);
-        offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset,
+        offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset,
             "event State: ", BACnetEventState);
-        offset = fApplicationTypes (tvb, pinfo, tree, offset, "Priority: ");
-        offset = fApplicationTypes (tvb, pinfo, tree, offset, "Notification Class: ");
+        offset = fApplicationTypes(tvb, pinfo, tree, offset, "Priority: ");
+        if (tvb_reported_length_remaining(tvb, offset) > 0 && fTagNo(tvb, offset) == 2)  /* Notification Class - OPTIONAL */
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "Notification Class: ");
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
 
@@ -8373,73 +9013,66 @@ fGetEnrollmentSummaryAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
 }
 
 static guint
-fGetEventInformationRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fGetEventInformationRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
         if (fTagNo(tvb, offset) == 0) {
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
         }
     }
     return offset;
 }
 
 static guint
-flistOfEventSummaries (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+flistOfEventSummaries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree* subtree = tree;
-    proto_item* ti = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* we are finished here if we spot a closing tag */
         if (tag_is_closing(tag_info)) {
             break;
         }
         switch (tag_no) {
         case 0: /* ObjectId */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* eventState */
-            offset = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "event State: ", BACnetEventState);
             break;
         case 2: /* acknowledgedTransitions */
-            offset = fBitStringTagVS (tvb, pinfo, tree, offset,
+            offset = fBitStringTagVS(tvb, pinfo, tree, offset,
                 "acknowledged Transitions: ", BACnetEventTransitionBits);
             break;
         case 3: /* eventTimeStamps */
-            ti = proto_tree_add_text(tree, tvb, offset, lvt, "eventTimeStamps");
-            if (ti) {
-                subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-            }
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fTimeStamp (tvb, pinfo, subtree, offset,"TO-OFFNORMAL timestamp: ");
-            offset  = fTimeStamp (tvb, pinfo, subtree, offset,"TO-FAULT timestamp: ");
-            offset  = fTimeStamp (tvb, pinfo, subtree, offset,"TO-NORMAL timestamp: ");
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            subtree = proto_tree_add_subtree(tree, tvb, offset, lvt, ett_bacapp_tag, NULL, "eventTimeStamps");
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fTimeStamp(tvb, pinfo, subtree, offset, "TO-OFFNORMAL timestamp: ");
+            offset  = fTimeStamp(tvb, pinfo, subtree, offset, "TO-FAULT timestamp: ");
+            offset  = fTimeStamp(tvb, pinfo, subtree, offset, "TO-NORMAL timestamp: ");
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 4: /* notifyType */
-            offset  = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "Notify Type: ", BACnetNotifyType);
             break;
         case 5: /* eventEnable */
-            offset  = fBitStringTagVS (tvb, pinfo, tree, offset,
+            offset  = fBitStringTagVS(tvb, pinfo, tree, offset,
                 "event Enable: ", BACnetEventTransitionBits);
             break;
         case 6: /* eventPriorities */
-            ti = proto_tree_add_text(tree, tvb, offset, lvt, "eventPriorities");
-            if (ti) {
-                subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-            }
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fUnsignedTag (tvb, pinfo, subtree, offset, "TO-OFFNORMAL Priority: ");
-            offset  = fUnsignedTag (tvb, pinfo, subtree, offset, "TO-FAULT Priority: ");
-            offset  = fUnsignedTag (tvb, pinfo, subtree, offset, "TO-NORMAL Priority: ");
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            subtree = proto_tree_add_subtree(tree, tvb, offset, lvt, ett_bacapp_tag, NULL, "eventPriorities");
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fUnsignedTag(tvb, pinfo, subtree, offset, "TO-OFFNORMAL Priority: ");
+            offset  = fUnsignedTag(tvb, pinfo, subtree, offset, "TO-FAULT Priority: ");
+            offset  = fUnsignedTag(tvb, pinfo, subtree, offset, "TO-NORMAL Priority: ");
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
             return offset;
@@ -8450,7 +9083,7 @@ flistOfEventSummaries (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
 }
 
 static guint
-fLOPR (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fLOPR(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -8459,7 +9092,7 @@ fLOPR (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
     col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* we are finished here if we spot a closing tag */
         if (tag_is_closing(tag_info)) {
             break;
@@ -8471,7 +9104,7 @@ fLOPR (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 }
 
 static guint
-fGetEventInformationACK (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fGetEventInformationACK(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -8481,12 +9114,12 @@ fGetEventInformationACK (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
         lastoffset = offset;
         switch (fTagNo(tvb, offset)) {
         case 0: /* listOfEventSummaries */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = flistOfEventSummaries (tvb, pinfo, tree, offset);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = flistOfEventSummaries(tvb, pinfo, tree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         case 1: /* moreEvents */
-            offset  = fBooleanTag (tvb, pinfo, tree, offset, "more Events: ");
+            offset  = fBooleanTag(tvb, pinfo, tree, offset, "more Events: ");
             break;
         default:
             return offset;
@@ -8503,13 +9136,12 @@ fAddListElementRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree    = tree;
-    proto_item *tt;
 
     col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             offset += len;
             subtree = tree;
@@ -8518,17 +9150,16 @@ fAddListElementRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
 
         switch (tag_no) {
         case 0: /* ObjectId */
-            offset = fBACnetObjectPropertyReference (tvb, pinfo, subtree, offset);
+            offset = fBACnetObjectPropertyReference(tvb, pinfo, subtree, offset);
             break;
         case 3: /* listOfElements */
             if (tag_is_opening(tag_info)) {
-                tt = proto_tree_add_text(subtree, tvb, offset, 1, "listOfElements");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fAbstractSyntaxNType (tvb, pinfo, subtree, offset);
-                break;
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, "listOfElements");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         default:
             return offset;
@@ -8541,7 +9172,7 @@ fAddListElementRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
 static guint
 fDeleteObjectRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    return fObjectIdentifier (tvb, pinfo, tree, offset);
+    return fObjectIdentifier(tvb, pinfo, tree, offset);
 }
 
 static guint
@@ -8554,14 +9185,14 @@ fDeviceCommunicationControlRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree
 
         switch (fTagNo(tvb, offset)) {
         case 0: /* timeDuration */
-            offset = fUnsignedTag (tvb,pinfo,tree,offset,"time Duration: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "time Duration: ");
             break;
         case 1: /* enable-disable */
-            offset = fEnumeratedTag (tvb, pinfo, tree, offset, "enable-disable: ",
+            offset = fEnumeratedTag(tvb, pinfo, tree, offset, "enable-disable: ",
                 BACnetEnableDisable);
             break;
         case 2: /* password - OPTIONAL */
-            offset = fCharacterString (tvb, pinfo, tree, offset, "Password: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "Password: ");
             break;
         default:
             return offset;
@@ -8581,12 +9212,12 @@ fReinitializeDeviceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
         switch (fTagNo(tvb, offset)) {
         case 0: /* reinitializedStateOfDevice */
-            offset = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "reinitialized State Of Device: ",
                 BACnetReinitializedStateOfDevice);
             break;
         case 1: /* password - OPTIONAL */
-            offset = fCharacterString (tvb, pinfo, tree, offset, "Password: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "Password: ");
             break;
         default:
             return offset;
@@ -8599,52 +9230,52 @@ fReinitializeDeviceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 static guint
 fVtOpenRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset,
+    offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset,
                                           "vtClass: ", BACnetVTClass);
-    return fApplicationTypes (tvb, pinfo, tree,offset,"local VT Session ID: ");
+    return fApplicationTypes(tvb, pinfo, tree, offset, "local VT Session ID: ");
 }
 
 static guint
-fVtOpenAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fVtOpenAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    return fApplicationTypes (tvb, pinfo, tree,offset,"remote VT Session ID: ");
+    return fApplicationTypes(tvb, pinfo, tree, offset, "remote VT Session ID: ");
 }
 
 static guint
-fVtCloseRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fVtCloseRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        offset= fApplicationTypes (tvb, pinfo, tree,offset,"remote VT Session ID: ");
+        offset= fApplicationTypes(tvb, pinfo, tree, offset, "remote VT Session ID: ");
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
     return offset;
 }
 
 static guint
-fVtDataRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fVtDataRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset= fApplicationTypes (tvb, pinfo, tree,offset,"VT Session ID: ");
-    offset = fApplicationTypes (tvb, pinfo, tree, offset, "VT New Data: ");
-    return fApplicationTypes (tvb, pinfo, tree,offset,"VT Data Flag: ");
+    offset= fApplicationTypes(tvb, pinfo, tree, offset, "VT Session ID: ");
+    offset = fApplicationTypes(tvb, pinfo, tree, offset, "VT New Data: ");
+    return fApplicationTypes(tvb, pinfo, tree, offset, "VT Data Flag: ");
 }
 
 static guint
-fVtDataAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fVtDataAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
 
-        switch (fTagNo(tvb,offset)) {
+        switch (fTagNo(tvb, offset)) {
         case 0: /* BOOLEAN */
-            offset = fBooleanTag (tvb, pinfo, tree, offset, "all New Data Accepted: ");
+            offset = fBooleanTag(tvb, pinfo, tree, offset, "all New Data Accepted: ");
             break;
         case 1: /* Unsigned OPTIONAL */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "accepted Octet Count: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "accepted Octet Count: ");
             break;
         default:
             return offset;
@@ -8655,28 +9286,28 @@ fVtDataAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 }
 
 static guint
-fAuthenticateRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAuthenticateRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
 
-        switch (fTagNo(tvb,offset)) {
+        switch (fTagNo(tvb, offset)) {
         case 0: /* Unsigned32 */
-            offset = fUnsignedTag (tvb, pinfo, tree, offset, "pseudo Random Number: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "pseudo Random Number: ");
             break;
         case 1: /* expected Invoke ID Unsigned8 OPTIONAL */
             proto_tree_add_item(tree, hf_bacapp_invoke_id, tvb, offset++, 1, ENC_BIG_ENDIAN);
             break;
         case 2: /* Chararacter String OPTIONAL */
-            offset = fCharacterString (tvb, pinfo, tree, offset, "operator Name: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "operator Name: ");
             break;
         case 3: /* Chararacter String OPTIONAL */
-            offset = fCharacterString (tvb, pinfo, tree, offset, "operator Password: ");
+            offset = fCharacterString(tvb, pinfo, tree, offset, "operator Password: ");
             break;
         case 4: /* Boolean OPTIONAL */
-            offset = fBooleanTag (tvb, pinfo, tree, offset, "start Encyphered Session: ");
+            offset = fBooleanTag(tvb, pinfo, tree, offset, "start Encyphered Session: ");
             break;
         default:
             return offset;
@@ -8687,18 +9318,18 @@ fAuthenticateRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fAuthenticateAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAuthenticateAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    return fApplicationTypes (tvb, pinfo, tree, offset, "modified Random Number: ");
+    return fApplicationTypes(tvb, pinfo, tree, offset, "modified Random Number: ");
 }
 
 static guint
-fRequestKeyRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fRequestKeyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fObjectIdentifier (tvb, pinfo, tree, offset); /* Requesting Device Identifier */
-    offset = fAddress (tvb, pinfo, tree, offset);
-    offset = fObjectIdentifier (tvb, pinfo, tree, offset); /* Remote Device Identifier */
-    return fAddress (tvb, pinfo, tree, offset);
+    offset = fObjectIdentifier(tvb, pinfo, tree, offset); /* Requesting Device Identifier */
+    offset = fAddress(tvb, pinfo, tree, offset);
+    offset = fObjectIdentifier(tvb, pinfo, tree, offset); /* Remote Device Identifier */
+    return fAddress(tvb, pinfo, tree, offset);
 }
 
 static guint
@@ -8715,7 +9346,7 @@ fReadPropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fReadPropertyAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadPropertyAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0, len;
     guint8      tag_no, tag_info;
@@ -8726,7 +9357,7 @@ fReadPropertyAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
     propertyArrayIndex = -1;
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
             offset += len;
             subtree = tree;
@@ -8734,16 +9365,16 @@ fReadPropertyAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
         }
         switch (tag_no) {
         case 0: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 1: /* propertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, subtree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* propertyArrayIndex */
-            offset = fPropertyArrayIndex (tvb, pinfo, subtree, offset);
+            offset = fPropertyArrayIndex(tvb, pinfo, subtree, offset);
             break;
         case 3: /* propertyValue */
-            offset = fPropertyValue (tvb, pinfo, subtree, offset, tag_info);
+            offset = fPropertyValue(tvb, pinfo, subtree, offset, tag_info);
             break;
         default:
             break;
@@ -8765,28 +9396,27 @@ fWritePropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
     propertyArrayIndex = -1;
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* quit loop if we spot a closing tag */
         if (tag_is_closing(tag_info)) {
-            subtree = tree;
             break;
         }
 
         switch (tag_no) {
         case 0: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 1: /* propertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, subtree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* propertyArrayIndex */
-            offset = fPropertyArrayIndex (tvb, pinfo, subtree, offset);
+            offset = fPropertyArrayIndex(tvb, pinfo, subtree, offset);
             break;
         case 3: /* propertyValue */
-            offset = fPropertyValue (tvb, pinfo, subtree, offset, tag_info);
+            offset = fPropertyValue(tvb, pinfo, subtree, offset, tag_info);
             break;
         case 4: /* Priority (only used for write) */
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "Priority: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "Priority: ");
             break;
         default:
             return offset;
@@ -8797,7 +9427,7 @@ fWritePropertyRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fWriteAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
+fWriteAccessSpecification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
 {
     guint   lastoffset = 0, len;
     guint8  tag_no, tag_info;
@@ -8805,7 +9435,7 @@ fWriteAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtre
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* maybe a listOfwriteAccessSpecifications if we spot a closing tag */
         if (tag_is_closing(tag_info)) {
             offset += len;
@@ -8814,15 +9444,15 @@ fWriteAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtre
 
         switch (tag_no) {
         case 0: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 1: /* listOfPropertyValues */
             if (tag_is_opening(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fBACnetPropertyValue (tvb, pinfo, subtree, offset);
-                break;
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fBACnetPropertyValue(tvb, pinfo, subtree, offset);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         default:
             return offset;
@@ -8839,11 +9469,11 @@ fWritePropertyMultipleRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
         return offset;
 
     col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
-    return fWriteAccessSpecification (tvb, pinfo, tree, offset);
+    return fWriteAccessSpecification(tvb, pinfo, tree, offset);
 }
 
 static guint
-fPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset, guint8 list)
+fPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 tagoffset, guint8 list)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -8853,7 +9483,7 @@ fPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
     propertyArrayIndex = -1;
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) { /* closing Tag, but not for me */
             return offset;
         } else if (tag_is_opening(tag_info)) { /* opening Tag, but not for me */
@@ -8861,10 +9491,10 @@ fPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
         }
         switch (tag_no-tagoffset) {
         case 0: /* PropertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, tree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* propertyArrayIndex */
-            offset = fPropertyArrayIndex (tvb, pinfo, tree, offset);
+            offset = fPropertyArrayIndex(tvb, pinfo, tree, offset);
             if (list != 0) break; /* Continue decoding if this may be a list */
         default:
             lastoffset = offset; /* Set loop end condition */
@@ -8876,26 +9506,26 @@ fPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
 }
 
 static guint
-fBACnetPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 list)
+fBACnetPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint8 list)
 {
     col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
     return fPropertyReference(tvb, pinfo, tree, offset, 0, list);
 }
 
 static guint
-fBACnetObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fBACnetObjectPropertyReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
 
-        switch (fTagNo(tvb,offset)) {
+        switch (fTagNo(tvb, offset)) {
         case 0: /* ObjectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* PropertyIdentifier and propertyArrayIndex */
-            offset = fPropertyReference (tvb, pinfo, tree, offset, 1, 0);
+            offset = fPropertyReference(tvb, pinfo, tree, offset, 1, 0);
             col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
         default:
             lastoffset = offset; /* Set loop end condition */
@@ -8908,7 +9538,7 @@ fBACnetObjectPropertyReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 
 #if 0
 static guint
-fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset)
+fObjectPropertyValue(tvbuff_t *tvb, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0;
     guint8      tag_no, tag_info;
@@ -8918,27 +9548,27 @@ fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset)
 
     while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_closing(tag_info)) {
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset,
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset,
                 &tag_no, &tag_info, &lvt);
             continue;
         }
         switch (tag_no) {
         case 0: /* ObjectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 1: /* PropertyIdentifier */
-            offset = fPropertyIdentifier (tvb, pinfo, subtree, offset);
+            offset = fPropertyIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* propertyArrayIndex */
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "property Array Index: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "property Array Index: ");
             break;
         case 3:  /* Value */
-            offset = fPropertyValue (tvb, pinfo, subtree, offset, tag_info);
+            offset = fPropertyValue(tvb, pinfo, subtree, offset, tag_info);
             break;
         case 4:  /* Priority */
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "Priority: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "Priority: ");
             break;
         default:
             break;
@@ -8949,7 +9579,7 @@ fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset)
 #endif
 
 static guint
-fPriorityArray (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fPriorityArray(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     char  i = 1, ar[256];
     guint lastoffset = 0;
@@ -8967,7 +9597,7 @@ fPriorityArray (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
     while (tvb_reported_length_remaining(tvb, offset) > 0) {
         /* exit loop if nothing happens inside */
         lastoffset = offset;
-        g_snprintf (ar, sizeof(ar), "%s[%d]: ",
+        g_snprintf(ar, sizeof(ar), "%s[%d]: ",
             val_to_split_str(87 , 512,
                 BACnetPropertyIdentifier,
                 ASHRAE_Reserved_Fmt,
@@ -8986,19 +9616,19 @@ fPriorityArray (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
 }
 
 static guint
-fDeviceObjectReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fDeviceObjectReference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
 
-        switch (fTagNo(tvb,offset)) {
+        switch (fTagNo(tvb, offset)) {
         case 0: /* deviceIdentifier - OPTIONAL */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* ObjectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         default:
             return offset;
@@ -9009,61 +9639,52 @@ fDeviceObjectReference (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
 }
 
 static guint
-fSpecialEvent (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
+fSpecialEvent(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
 {
     guint8 tag_no, tag_info;
     guint32 lvt;
-    guint lastoffset = 0, len;
-    gboolean closing_found = FALSE;  /* tracks when we are done decoding the fSpecialEvent entries */
+    guint lastoffset = 0;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
-        /* maybe a SEQUENCE of SpecialEvents if we spot a closing tag */
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        /* quit loop if we spot an un-matched closing tag */
         if (tag_is_closing(tag_info)) {
-            /* if we find 2 closing tags in succession we need to exit without incrementing the offset again */
-            /* This handles the special case where we have a special event entry in an RPM-ACK msg           */
-            if ( closing_found == TRUE )
-                break;
-            offset += len;
-            closing_found = TRUE;
-            continue;
+            break;
         }
-
         switch (tag_no) {
         case 0: /* calendarEntry */
             if (tag_is_opening(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fCalendarEntry (tvb, pinfo, subtree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fCalendarEntry(tvb, pinfo, subtree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             }
             break;
         case 1: /* calendarReference */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* list of BACnetTimeValue */
             if (tag_is_opening(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fTimeValue (tvb, pinfo, subtree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                break;
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fTimeValue(tvb, pinfo, subtree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         case 3: /* eventPriority */
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "event priority: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "event priority: ");
             break;
         default:
             return offset;
         }
-        closing_found = FALSE; /* reset our closing tag status, we processed another open tag */
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
     return offset;
 }
 
 static guint
-fSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fSelectionCriteria(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0, len;
     guint8  tag_no, tag_info;
@@ -9071,28 +9692,28 @@ fSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* maybe a listOfSelectionCriteria if we spot a closing tag */
         if (tag_is_closing(tag_info)) {
             offset += len;
             continue;
         }
 
-        switch (fTagNo(tvb,offset)) {
+        switch (fTagNo(tvb, offset)) {
         case 0: /* propertyIdentifier */
-            offset  = fPropertyIdentifier (tvb, pinfo, tree, offset);
+            offset  = fPropertyIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* propertyArrayIndex */
-            offset  = fPropertyArrayIndex (tvb, pinfo, tree, offset);
+            offset  = fPropertyArrayIndex(tvb, pinfo, tree, offset);
             break;
         case 2: /* relationSpecifier */
-            offset  = fEnumeratedTag (tvb, pinfo, tree, offset,
+            offset  = fEnumeratedTag(tvb, pinfo, tree, offset,
                 "relation Specifier: ", BACnetRelationSpecifier);
             break;
         case 3: /* comparisonValue */
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
-            offset += fTagHeaderTree (tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
+            offset  = fAbstractSyntaxNType(tvb, pinfo, tree, offset);
+            offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
             break;
         default:
             return offset;
@@ -9103,7 +9724,7 @@ fSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
 }
 
 static guint
-fObjectSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
+fObjectSelectionCriteria(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
 {
     guint   lastoffset = 0;
     guint8  tag_no, tag_info;
@@ -9111,7 +9732,7 @@ fObjectSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* quit loop if we spot a closing tag */
         if (tag_is_closing(tag_info)) {
             break;
@@ -9119,17 +9740,17 @@ fObjectSelectionCriteria (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree
 
         switch (tag_no) {
         case 0: /* selectionLogic */
-            offset = fEnumeratedTag (tvb, pinfo, subtree, offset,
+            offset = fEnumeratedTag(tvb, pinfo, subtree, offset,
                 "selection Logic: ", BACnetSelectionLogic);
             break;
         case 1: /* listOfSelectionCriteria */
             if (tag_is_opening(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fSelectionCriteria (tvb, pinfo, subtree, offset);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                break;
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset  = fSelectionCriteria(tvb, pinfo, subtree, offset);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         default:
             return offset;
@@ -9152,18 +9773,18 @@ fReadPropertyConditionalRequest(tvbuff_t *tvb, packet_info* pinfo, proto_tree *s
         fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
         if (tag_is_opening(tag_info) && tag_no < 2) {
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             switch (tag_no) {
             case 0: /* objectSelectionCriteria */
-                offset = fObjectSelectionCriteria (tvb, pinfo, subtree, offset);
+                offset = fObjectSelectionCriteria(tvb, pinfo, subtree, offset);
                 break;
             case 1: /* listOfPropertyReferences */
-                offset = fBACnetPropertyReference (tvb, pinfo, subtree, offset, 1);
+                offset = fBACnetPropertyReference(tvb, pinfo, subtree, offset, 1);
                 break;
             default:
                 return offset;
             }
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
         }
         if (offset == lastoffset) break;     /* nothing happened, exit loop */
     }
@@ -9171,29 +9792,27 @@ fReadPropertyConditionalRequest(tvbuff_t *tvb, packet_info* pinfo, proto_tree *s
 }
 
 static guint
-fReadAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadAccessSpecification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0;
     guint8      tag_no, tag_info;
     guint32     lvt;
-    proto_item *tt;
     proto_tree *subtree = tree;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         switch (tag_no) {
         case 0: /* objectIdentifier */
-            offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 1: /* listOfPropertyReferences */
             if (tag_is_opening(tag_info)) {
-                tt      = proto_tree_add_text(subtree, tvb, offset, 1, "listOfPropertyReferences");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, "listOfPropertyReferences");
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fBACnetPropertyReference (tvb, pinfo, subtree, offset, 1);
+                offset  = fBACnetPropertyReference(tvb, pinfo, subtree, offset, 1);
             } else if (tag_is_closing(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset,
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset,
                     &tag_no, &tag_info, &lvt);
                 subtree = tree;
             } else {
@@ -9210,18 +9829,17 @@ fReadAccessSpecification (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
 }
 
 static guint
-fReadAccessResult (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadAccessResult(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint       lastoffset = 0, len;
     guint8      tag_no;
     guint8      tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         /* maybe a listOfReadAccessResults if we spot a closing tag here */
         if (tag_is_closing(tag_info)) {
             offset += len;
@@ -9231,30 +9849,28 @@ fReadAccessResult (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
 
         switch (tag_no) {
         case 0: /* objectSpecifier */
-            offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+            offset = fObjectIdentifier(tvb, pinfo, tree, offset);
             break;
         case 1: /* list of Results */
             if (tag_is_opening(tag_info)) {
-                tt = proto_tree_add_text(tree, tvb, offset, 1, "listOfResults");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                break;
+                subtree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_bacapp_value, NULL, "listOfResults");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         case 2: /* propertyIdentifier */
             offset = fPropertyIdentifierValue(tvb, pinfo, subtree, offset, 2);
             break;
         case 5: /* propertyAccessError */
             if (tag_is_opening(tag_info)) {
-                tt      = proto_tree_add_text(subtree, tvb, offset, 1, "propertyAccessError");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, "propertyAccessError");
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
                 /* Error Code follows */
                 offset  = fError(tvb, pinfo, subtree, offset);
-                break;
+            } else {
+                expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
             }
-            FAULT;
             break;
         default:
             return offset;
@@ -9266,10 +9882,10 @@ fReadAccessResult (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
 
 
 static guint
-fReadPropertyConditionalAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadPropertyConditionalAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     /* listOfReadAccessResults */
-    return fReadAccessResult (tvb, pinfo, tree, offset);
+    return fReadAccessResult(tvb, pinfo, tree, offset);
 }
 
 
@@ -9282,18 +9898,18 @@ fCreateObjectRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, gui
 
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
         if (tag_no < 2) {
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             switch (tag_no) {
             case 0: /* objectSpecifier */
                 switch (fTagNo(tvb, offset)) { /* choice of objectType or objectIdentifier */
                 case 0: /* objectType */
-                    offset = fEnumeratedTagSplit (tvb, pinfo, subtree, offset, "Object Type: ", BACnetObjectType, 128);
+                    offset = fEnumeratedTagSplit(tvb, pinfo, subtree, offset, "Object Type: ", BACnetObjectType, 128);
                     break;
                 case 1: /* objectIdentifier */
-                    offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
+                    offset = fObjectIdentifier(tvb, pinfo, subtree, offset);
                     break;
                 default:
                     break;
@@ -9301,15 +9917,15 @@ fCreateObjectRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, gui
                 break;
             case 1: /* propertyValue */
                 if (tag_is_opening(tag_info)) {
-                    offset = fBACnetPropertyValue (tvb, pinfo, subtree, offset);
-                    break;
+                    offset = fBACnetPropertyValue(tvb, pinfo, subtree, offset);
+                } else {
+                    expert_add_info(pinfo, subtree, &ei_bacapp_bad_tag);
                 }
-                FAULT;
                 break;
             default:
                 break;
             }
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
         }
         if (offset == lastoffset) break;    /* nothing happened, exit loop */
     }
@@ -9317,38 +9933,37 @@ fCreateObjectRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, gui
 }
 
 static guint
-fCreateObjectAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fCreateObjectAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    return fObjectIdentifier (tvb, pinfo, tree, offset);
+    return fObjectIdentifier(tvb, pinfo, tree, offset);
 }
 
 static guint
-fReadRangeRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadRangeRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     offset = fBACnetObjectPropertyReference(tvb, pinfo, subtree, offset);
 
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
         /* optional range choice */
-        fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         if (tag_is_opening(tag_info)) {
-            tt = proto_tree_add_text(subtree, tvb, offset, 1, "%s", val_to_str(tag_no, BACnetReadRangeOptions, "unknown range option"));
-            subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL,
+                val_to_str_const(tag_no, BACnetReadRangeOptions, "unknown range option"));
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             switch (tag_no) {
             case 3: /* range byPosition */
             case 6: /* range bySequenceNumber, 2004 spec */
-                offset = fApplicationTypes (tvb, pinfo, subtree, offset, "reference Index: ");
-                offset = fApplicationTypes (tvb, pinfo, subtree, offset, "reference Count: ");
+                offset = fApplicationTypes(tvb, pinfo, subtree, offset, "reference Index: ");
+                offset = fApplicationTypes(tvb, pinfo, subtree, offset, "reference Count: ");
                 break;
             case 4: /* range byTime - deprecated in 2004 */
             case 7: /* 2004 spec */
                 offset = fDateTime(tvb, pinfo, subtree, offset, "reference Date/Time: ");
-                offset = fApplicationTypes (tvb, pinfo, subtree, offset, "reference Count: ");
+                offset = fApplicationTypes(tvb, pinfo, subtree, offset, "reference Count: ");
                 break;
             case 5: /* range timeRange - deprecated in 2004 */
                 offset = fDateTime(tvb, pinfo, subtree, offset, "beginning Time: ");
@@ -9357,19 +9972,18 @@ fReadRangeRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
             default:
                 break;
             }
-            offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+            offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
         }
     }
     return offset;
 }
 
 static guint
-fReadRangeAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadRangeAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
     /* set the optional global properties to indicate not-used */
     propertyArrayIndex = -1;
@@ -9377,24 +9991,23 @@ fReadRangeAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
        OPTIONAL propertyArrayIndex */
     offset = fBACnetObjectPropertyReference(tvb, pinfo, subtree, offset);
     /* resultFlags => BACnetResultFlags ::= BIT STRING */
-    offset = fBitStringTagVS (tvb, pinfo, tree, offset,
+    offset = fBitStringTagVS(tvb, pinfo, tree, offset,
         "resultFlags: ",
         BACnetResultFlags);
     /* itemCount */
-    offset = fUnsignedTag (tvb, pinfo, subtree, offset, "item Count: ");
+    offset = fUnsignedTag(tvb, pinfo, subtree, offset, "item Count: ");
     /* itemData */
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
     if (tag_is_opening(tag_info)) {
         col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
-        tt = proto_tree_add_text(subtree, tvb, offset, 1, "itemData");
-        subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-        offset  = fAbstractSyntaxNType (tvb, pinfo, subtree, offset);
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL, "itemData");
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        offset  = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
     }
     /* firstSequenceNumber - OPTIONAL */
     if (tvb_reported_length_remaining(tvb, offset) > 0) {
-        offset  = fUnsignedTag (tvb, pinfo, subtree, offset, "first Sequence Number: ");
+        offset  = fUnsignedTag(tvb, pinfo, subtree, offset, "first Sequence Number: ");
     }
 
     return offset;
@@ -9406,31 +10019,30 @@ fAccessMethod(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
     guint       lastoffset = 0;
     guint32     lvt;
     guint8      tag_no, tag_info;
-    proto_item* tt;
     proto_tree* subtree = NULL;
 
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
     if (tag_is_opening(tag_info)) {
-        tt = proto_tree_add_text(tree, tvb, offset, 1, "%s", val_to_str(tag_no, BACnetFileAccessOption, "invalid access method"));
-        subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-        offset  = fApplicationTypes (tvb, pinfo, subtree, offset, val_to_str(tag_no, BACnetFileStartOption, "invalid option"));
-        offset  = fApplicationTypes (tvb, pinfo, subtree, offset, val_to_str(tag_no, BACnetFileWriteInfo, "unknown option"));
+        subtree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_bacapp_value, NULL,
+            val_to_str_const(tag_no, BACnetFileAccessOption, "invalid access method"));
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        offset  = fApplicationTypes(tvb, pinfo, subtree, offset, val_to_str_const(tag_no, BACnetFileStartOption, "invalid option"));
+        offset  = fApplicationTypes(tvb, pinfo, subtree, offset, val_to_str_const(tag_no, BACnetFileWriteInfo, "unknown option"));
 
         if (tag_no == 1) {
             while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {
                 /* exit loop if nothing happens inside */
                 lastoffset = offset;
-                offset = fApplicationTypes (tvb, pinfo, subtree, offset, "Record Data: ");
+                offset = fApplicationTypes(tvb, pinfo, subtree, offset, "Record Data: ");
             }
         }
 
         if ((bacapp_flags & BACAPP_MORE_SEGMENTS) == 0) {
             /* More Flag is not set, so we can look for closing tag in this segment */
-            fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+            fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
             if (tag_is_closing(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
             }
         }
     }
@@ -9443,19 +10055,18 @@ fAtomicReadFileRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guin
     guint8      tag_no, tag_info;
     guint32     lvt;
     proto_tree *subtree = tree;
-    proto_item *tt;
 
-    offset = fObjectIdentifier (tvb, pinfo, tree, offset);
+    offset = fObjectIdentifier(tvb, pinfo, tree, offset);
 
-    fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+    fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
     if (tag_is_opening(tag_info)) {
-        tt = proto_tree_add_text(subtree, tvb, offset, 1, "%s", val_to_str(tag_no, BACnetFileAccessOption, "unknown access method"));
-        subtree = proto_item_add_subtree(tt, ett_bacapp_value);
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-        offset  = fSignedTag (tvb, pinfo, subtree, offset, val_to_str(tag_no, BACnetFileStartOption, "unknown option"));
-        offset  = fUnsignedTag (tvb, pinfo, subtree, offset, val_to_str(tag_no, BACnetFileRequestCount, "unknown option"));
-        offset += fTagHeaderTree (tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        subtree = proto_tree_add_subtree(subtree, tvb, offset, 1, ett_bacapp_value, NULL,
+                        val_to_str_const(tag_no, BACnetFileAccessOption, "unknown access method"));
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
+        offset  = fSignedTag(tvb, pinfo, subtree, offset, val_to_str_const(tag_no, BACnetFileStartOption, "unknown option"));
+        offset  = fUnsignedTag(tvb, pinfo, subtree, offset, val_to_str_const(tag_no, BACnetFileRequestCount, "unknown option"));
+        offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
     }
     return offset;
 }
@@ -9464,24 +10075,24 @@ static guint
 fAtomicWriteFileRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
 
-    offset = fObjectIdentifier (tvb, pinfo, tree, offset); /* file Identifier */
+    offset = fObjectIdentifier(tvb, pinfo, tree, offset); /* file Identifier */
     offset = fAccessMethod(tvb, pinfo, tree, offset);
 
     return offset;
 }
 
 static guint
-fAtomicWriteFileAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAtomicWriteFileAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     guint tag_no = fTagNo(tvb, offset);
-    return fSignedTag (tvb, pinfo, tree, offset, val_to_str(tag_no, BACnetFileStartOption, "unknown option"));
+    return fSignedTag(tvb, pinfo, tree, offset, val_to_str_const(tag_no, BACnetFileStartOption, "unknown option"));
 }
 
 static guint
-fAtomicReadFileAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fAtomicReadFileAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fApplicationTypes (tvb, pinfo, tree, offset, "End Of File: ");
-    offset = fAccessMethod(tvb,pinfo, tree, offset);
+    offset = fApplicationTypes(tvb, pinfo, tree, offset, "End Of File: ");
+    offset = fAccessMethod(tvb, pinfo, tree, offset);
 
     return offset;
 }
@@ -9490,36 +10101,36 @@ static guint
 fReadPropertyMultipleRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint offset)
 {
     col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
-    return fReadAccessSpecification (tvb,pinfo,subtree,offset);
+    return fReadAccessSpecification(tvb, pinfo, subtree, offset);
 }
 
 static guint
-fReadPropertyMultipleAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fReadPropertyMultipleAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     col_set_writable(pinfo->cinfo, FALSE); /* don't set all infos into INFO column */
-    return fReadAccessResult (tvb,pinfo,tree,offset);
+    return fReadAccessResult(tvb, pinfo, tree, offset);
 }
 
 static guint
-fConfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice)
+fConfirmedServiceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice)
 {
-    if (tvb_reported_length_remaining(tvb,offset) <= 0)
+    if (tvb_reported_length_remaining(tvb, offset) <= 0)
         return offset;
 
     switch (service_choice) {
     case 0: /* acknowledgeAlarm */
-        offset = fAcknowledgeAlarmRequest (tvb, pinfo, tree, offset);
+        offset = fAcknowledgeAlarmRequest(tvb, pinfo, tree, offset);
         break;
     case 1: /* confirmedCOVNotification */
-        offset = fConfirmedCOVNotificationRequest (tvb, pinfo, tree, offset);
+        offset = fConfirmedCOVNotificationRequest(tvb, pinfo, tree, offset);
         break;
     case 2: /* confirmedEventNotification */
-        offset = fConfirmedEventNotificationRequest (tvb, pinfo, tree, offset);
+        offset = fConfirmedEventNotificationRequest(tvb, pinfo, tree, offset);
         break;
     case 3: /* confirmedGetAlarmSummary conveys no parameters */
         break;
     case 4: /* getEnrollmentSummaryRequest */
-        offset = fGetEnrollmentSummaryRequest (tvb, pinfo, tree, offset);
+        offset = fGetEnrollmentSummaryRequest(tvb, pinfo, tree, offset);
         break;
     case 5: /* subscribeCOVRequest */
         offset = fSubscribeCOVRequest(tvb, pinfo, tree, offset);
@@ -9573,19 +10184,19 @@ fConfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
         offset = fVtOpenRequest(tvb, pinfo, tree, offset);
         break;
     case 22:
-        offset = fVtCloseRequest (tvb, pinfo, tree, offset);
+        offset = fVtCloseRequest(tvb, pinfo, tree, offset);
         break;
     case 23:
-        offset = fVtDataRequest (tvb, pinfo, tree, offset);
+        offset = fVtDataRequest(tvb, pinfo, tree, offset);
         break;
     case 24:
-        offset = fAuthenticateRequest (tvb, pinfo, tree, offset);
+        offset = fAuthenticateRequest(tvb, pinfo, tree, offset);
         break;
     case 25:
-        offset = fRequestKeyRequest (tvb, pinfo, tree, offset);
+        offset = fRequestKeyRequest(tvb, pinfo, tree, offset);
         break;
     case 26:
-        offset = fReadRangeRequest (tvb, pinfo, tree, offset);
+        offset = fReadRangeRequest(tvb, pinfo, tree, offset);
         break;
     case 27:
         offset = fLifeSafetyOperationRequest(tvb, pinfo, tree, offset, NULL);
@@ -9594,7 +10205,7 @@ fConfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
         offset = fSubscribeCOVPropertyRequest(tvb, pinfo, tree, offset);
         break;
     case 29:
-        offset = fGetEventInformationRequest (tvb, pinfo, tree, offset);
+        offset = fGetEventInformationRequest(tvb, pinfo, tree, offset);
         break;
     default:
         return offset;
@@ -9603,53 +10214,53 @@ fConfirmedServiceRequest (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
 }
 
 static guint
-fConfirmedServiceAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice)
+fConfirmedServiceAck(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice)
 {
-    if (tvb_reported_length_remaining(tvb,offset) <= 0)
+    if (tvb_reported_length_remaining(tvb, offset) <= 0)
         return offset;
 
     switch (service_choice) {
     case 3: /* confirmedEventNotificationAck */
-        offset = fGetAlarmSummaryAck (tvb, pinfo, tree, offset);
+        offset = fGetAlarmSummaryAck(tvb, pinfo, tree, offset);
         break;
     case 4: /* getEnrollmentSummaryAck */
-        offset = fGetEnrollmentSummaryAck (tvb, pinfo, tree, offset);
+        offset = fGetEnrollmentSummaryAck(tvb, pinfo, tree, offset);
         break;
     case 6: /* atomicReadFile */
-        offset = fAtomicReadFileAck (tvb, pinfo, tree, offset);
+        offset = fAtomicReadFileAck(tvb, pinfo, tree, offset);
         break;
     case 7: /* atomicReadFileAck */
-        offset = fAtomicWriteFileAck (tvb, pinfo, tree, offset);
+        offset = fAtomicWriteFileAck(tvb, pinfo, tree, offset);
         break;
     case 10: /* createObject */
-        offset = fCreateObjectAck (tvb, pinfo, tree, offset);
+        offset = fCreateObjectAck(tvb, pinfo, tree, offset);
         break;
     case 12:
-        offset = fReadPropertyAck (tvb, pinfo, tree, offset);
+        offset = fReadPropertyAck(tvb, pinfo, tree, offset);
         break;
     case 13:
-        offset = fReadPropertyConditionalAck (tvb, pinfo, tree, offset);
+        offset = fReadPropertyConditionalAck(tvb, pinfo, tree, offset);
         break;
     case 14:
-        offset = fReadPropertyMultipleAck (tvb, pinfo, tree, offset);
+        offset = fReadPropertyMultipleAck(tvb, pinfo, tree, offset);
         break;
     case 18:
         offset = fConfirmedPrivateTransferAck(tvb, pinfo, tree, offset);
         break;
     case 21:
-        offset = fVtOpenAck (tvb, pinfo, tree, offset);
+        offset = fVtOpenAck(tvb, pinfo, tree, offset);
         break;
     case 23:
-        offset = fVtDataAck (tvb, pinfo, tree, offset);
+        offset = fVtDataAck(tvb, pinfo, tree, offset);
         break;
     case 24:
-        offset = fAuthenticateAck (tvb, pinfo, tree, offset);
+        offset = fAuthenticateAck(tvb, pinfo, tree, offset);
         break;
     case 26:
-        offset = fReadRangeAck (tvb, pinfo, tree, offset);
+        offset = fReadRangeAck(tvb, pinfo, tree, offset);
         break;
     case 29:
-        offset = fGetEventInformationACK (tvb, pinfo, tree, offset);
+        offset = fGetEventInformationACK(tvb, pinfo, tree, offset);
         break;
     default:
         return offset;
@@ -9658,38 +10269,38 @@ fConfirmedServiceAck (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
 }
 
 static guint
-fIAmRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fIAmRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     /* BACnetObjectIdentifier */
-    offset = fApplicationTypes (tvb, pinfo, tree, offset, "BACnet Object Identifier: ");
+    offset = fApplicationTypes(tvb, pinfo, tree, offset, "BACnet Object Identifier: ");
 
     /* MaxAPDULengthAccepted */
-    offset = fApplicationTypes (tvb, pinfo, tree, offset, "Maximum ADPU Length Accepted: ");
+    offset = fApplicationTypes(tvb, pinfo, tree, offset, "Maximum ADPU Length Accepted: ");
 
     /* segmentationSupported */
-    offset = fApplicationTypesEnumerated (tvb, pinfo, tree, offset,
+    offset = fApplicationTypesEnumerated(tvb, pinfo, tree, offset,
         "Segmentation Supported: ", BACnetSegmentation);
 
     /* vendor ID */
-    return fVendorIdentifier (tvb, pinfo, tree, offset);
+    return fVendorIdentifier(tvb, pinfo, tree, offset);
 }
 
 static guint
-fIHaveRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fIHaveRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
     /* BACnetDeviceIdentifier */
-    offset = fApplicationTypes (tvb, pinfo, tree, offset, "Device Identifier: ");
+    offset = fApplicationTypes(tvb, pinfo, tree, offset, "Device Identifier: ");
 
     /* BACnetObjectIdentifier */
-    offset = fApplicationTypes (tvb, pinfo, tree, offset, "Object Identifier: ");
+    offset = fApplicationTypes(tvb, pinfo, tree, offset, "Object Identifier: ");
 
     /* ObjectName */
-    return fApplicationTypes (tvb, pinfo, tree, offset, "Object Name: ");
+    return fApplicationTypes(tvb, pinfo, tree, offset, "Object Name: ");
 
 }
 
 static guint
-fWhoIsRequest  (tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, guint offset)
+fWhoIsRequest(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, guint offset)
 {
     guint   lastoffset = 0;
     guint   val;
@@ -9701,14 +10312,14 @@ fWhoIsRequest  (tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, guint offse
     while (tvb_reported_length_remaining(tvb, offset) > 0) {  /* exit loop if nothing happens inside */
         lastoffset = offset;
 
-        tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
 
         switch (tag_no) {
         case 0:
             /* DeviceInstanceRangeLowLimit Optional */
             if (col_get_writable(pinfo->cinfo) && fUnsigned32(tvb, offset+tag_len, lvt, &val))
                 col_append_fstr(pinfo->cinfo, COL_INFO, "%d ", val);
-            offset = fDevice_Instance (tvb, pinfo, tree, offset,
+            offset = fDevice_Instance(tvb, pinfo, tree, offset,
                 hf_Device_Instance_Range_Low_Limit);
             break;
         case 1:
@@ -9716,7 +10327,7 @@ fWhoIsRequest  (tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, guint offse
                 required if DeviceInstanceRangeLowLimit is there */
             if (col_get_writable(pinfo->cinfo) && fUnsigned32(tvb, offset+tag_len, lvt, &val))
                 col_append_fstr(pinfo->cinfo, COL_INFO, "%d ", val);
-            offset = fDevice_Instance (tvb, pinfo, tree, offset,
+            offset = fDevice_Instance(tvb, pinfo, tree, offset,
                 hf_Device_Instance_Range_High_Limit);
             break;
         default:
@@ -9728,23 +10339,23 @@ fWhoIsRequest  (tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, guint offse
 }
 
 static guint
-fUnconfirmedServiceRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice)
+fUnconfirmedServiceRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gint service_choice)
 {
-    if (tvb_reported_length_remaining(tvb,offset) <= 0)
+    if (tvb_reported_length_remaining(tvb, offset) <= 0)
         return offset;
 
     switch (service_choice) {
     case 0: /* I-Am-Request */
-        offset = fIAmRequest  (tvb, pinfo, tree, offset);
+        offset = fIAmRequest(tvb, pinfo, tree, offset);
         break;
     case 1: /* i-Have Request */
-        offset = fIHaveRequest  (tvb, pinfo, tree, offset);
+        offset = fIHaveRequest(tvb, pinfo, tree, offset);
     break;
     case 2: /* unconfirmedCOVNotification */
-        offset = fUnconfirmedCOVNotificationRequest (tvb, pinfo, tree, offset);
+        offset = fUnconfirmedCOVNotificationRequest(tvb, pinfo, tree, offset);
         break;
     case 3: /* unconfirmedEventNotification */
-        offset = fUnconfirmedEventNotificationRequest (tvb, pinfo, tree, offset);
+        offset = fUnconfirmedEventNotificationRequest(tvb, pinfo, tree, offset);
         break;
     case 4: /* unconfirmedPrivateTransfer */
         offset = fUnconfirmedPrivateTransferRequest(tvb, pinfo, tree, offset);
@@ -9752,17 +10363,18 @@ fUnconfirmedServiceRequest  (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
     case 5: /* unconfirmedTextMessage */
         offset = fUnconfirmedTextMessageRequest(tvb, pinfo, tree, offset);
         break;
+    case 206: /* utc-time-synchronization-recipients */
     case 6: /* timeSynchronization */
-        offset = fTimeSynchronizationRequest  (tvb, pinfo, tree, offset);
+        offset = fTimeSynchronizationRequest(tvb, pinfo, tree, offset);
         break;
     case 7: /* who-Has */
-        offset = fWhoHas (tvb, pinfo, tree, offset);
+        offset = fWhoHas(tvb, pinfo, tree, offset);
         break;
     case 8: /* who-Is */
-        offset = fWhoIsRequest  (tvb, pinfo, tree, offset);
+        offset = fWhoIsRequest(tvb, pinfo, tree, offset);
         break;
     case 9: /* utcTimeSynchronization */
-        offset = fUTCTimeSynchronizationRequest  (tvb, pinfo, tree, offset);
+        offset = fUTCTimeSynchronizationRequest(tvb, pinfo, tree, offset);
         break;
     default:
         break;
@@ -9822,7 +10434,7 @@ fContinueConfirmedRequestPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *baca
 {   /* BACnet-Confirmed-Request */
     /* ASHRAE 135-2001 20.1.2 */
 
-    return fConfirmedServiceRequest (tvb, pinfo, bacapp_tree, offset, svc);
+    return fConfirmedServiceRequest(tvb, pinfo, bacapp_tree, offset, svc);
 }
 
 static guint
@@ -9849,7 +10461,7 @@ fUnconfirmedRequestPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bacapp_tre
     proto_tree_add_item(bacapp_tree, hf_bacapp_uservice, tvb,
         offset++, 1, ENC_BIG_ENDIAN);
     /* Service Request follows... Variable Encoding 20.2ff */
-    return fUnconfirmedServiceRequest  (tvb, pinfo, bacapp_tree, offset, tmp);
+    return fUnconfirmedServiceRequest(tvb, pinfo, bacapp_tree, offset, tmp);
 }
 
 static guint
@@ -9873,7 +10485,7 @@ fContinueComplexAckPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bacapp_tre
     /* ASHRAE 135-2001 20.1.5 */
 
     /* Service ACK follows... */
-    return fConfirmedServiceAck (tvb, pinfo, bacapp_tree, offset, svc);
+    return fConfirmedServiceAck(tvb, pinfo, bacapp_tree, offset, svc);
 }
 
 static guint
@@ -9928,7 +10540,6 @@ fConfirmedPrivateTransferError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
     guint8      tag_no            = 0, tag_info = 0;
     guint32     lvt               = 0;
     proto_tree *subtree           = tree;
-    proto_item *tt;
 
     guint       vendor_identifier = 0;
     guint       service_number    = 0;
@@ -9937,7 +10548,7 @@ fConfirmedPrivateTransferError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
     while (tvb_reported_length_remaining(tvb, offset) > 0) {
         /* exit loop if nothing happens inside */
         lastoffset = offset;
-        tag_len = fTagHeader (tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
+        tag_len = fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
         switch (tag_no) {
         case 0: /* errorType */
             offset = fContextTaggedError(tvb, pinfo, subtree, offset);
@@ -9946,24 +10557,23 @@ fConfirmedPrivateTransferError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
             fUnsigned32(tvb, offset+tag_len, lvt, &vendor_identifier);
             if (col_get_writable(pinfo->cinfo))
                 col_append_fstr(pinfo->cinfo, COL_INFO, "V=%u ",    vendor_identifier);
-            offset = fVendorIdentifier (tvb, pinfo, subtree, offset);
+            offset = fVendorIdentifier(tvb, pinfo, subtree, offset);
             break;
         case 2: /* serviceNumber */
             fUnsigned32(tvb, offset+tag_len, lvt, &service_number);
             if (col_get_writable(pinfo->cinfo))
                 col_append_fstr(pinfo->cinfo, COL_INFO, "SN=%u ",   service_number);
-            offset = fUnsignedTag (tvb, pinfo, subtree, offset, "service Number: ");
+            offset = fUnsignedTag(tvb, pinfo, subtree, offset, "service Number: ");
             break;
         case 3: /* errorParameters */
             if (tag_is_opening(tag_info)) {
-                tt = proto_tree_add_text(subtree, tvb, offset, 1,
-                    "error Parameters");
-                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
+                subtree = proto_tree_add_subtree(subtree, tvb, offset, 1,
+                    ett_bacapp_value, NULL, "error Parameters");
                 propertyIdentifier = -1;
                 offset += fTagHeaderTree(tvb, pinfo, subtree, offset, &tag_no, &tag_info, &lvt);
-                offset  = fAbstractSyntaxNType (tvb, pinfo, subtree, offset);
+                offset  = fAbstractSyntaxNType(tvb, pinfo, subtree, offset);
             } else if (tag_is_closing(tag_info)) {
-                offset += fTagHeaderTree (tvb, pinfo, subtree, offset,
+                offset += fTagHeaderTree(tvb, pinfo, subtree, offset,
                     &tag_no, &tag_info, &lvt);
                 subtree = tree;
             } else {
@@ -9991,7 +10601,7 @@ fCreateObjectError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint of
             offset = fContextTaggedError(tvb, pinfo, tree, offset);
             break;
         case 1: /* firstFailedElementNumber */
-            offset = fUnsignedTag (tvb,pinfo,tree,offset,"first failed element number: ");
+            offset = fUnsignedTag(tvb, pinfo, tree, offset, "first failed element number: ");
             break;
         default:
             return offset;
@@ -10016,11 +10626,11 @@ fVTCloseError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 
     if (fTagNo(tvb, offset) == 0) {
         /* errorType */
-        offset = fContextTaggedError(tvb, pinfo, tree,offset);
+        offset = fContextTaggedError(tvb, pinfo, tree, offset);
         if (fTagNo(tvb, offset) == 1) {
             /* listOfVTSessionIdentifiers [OPTIONAL] */
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
-            offset  = fVtCloseRequest (tvb, pinfo, tree, offset);
+            offset  = fVtCloseRequest(tvb, pinfo, tree, offset);
             offset += fTagHeaderTree(tvb, pinfo, tree, offset, &tag_no, &tag_info, &lvt);
         }
     }
@@ -10056,36 +10666,36 @@ fWritePropertyMultipleError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 }
 
 static guint
-fError (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+fError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
+    offset = fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset,
                            "error Class: ", BACnetErrorClass, 64);
-    return fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
+    return fApplicationTypesEnumeratedSplit(tvb, pinfo, tree, offset,
                          "error Code: ", BACnetErrorCode, 256);
 }
 
 static guint
-fBACnetError (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint service)
+fBACnetError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint service)
 {
     switch (service) {
     case 8:  /* no break here !!!! */
     case 9:
-        offset = fChangeListError (tvb, pinfo, tree, offset);
+        offset = fChangeListError(tvb, pinfo, tree, offset);
         break;
     case 10:
-        offset = fCreateObjectError (tvb, pinfo, tree, offset);
+        offset = fCreateObjectError(tvb, pinfo, tree, offset);
         break;
     case 16:
-        offset = fWritePropertyMultipleError (tvb, pinfo, tree, offset);
+        offset = fWritePropertyMultipleError(tvb, pinfo, tree, offset);
         break;
     case 18:
-        offset = fConfirmedPrivateTransferError (tvb,pinfo,tree,offset);
+        offset = fConfirmedPrivateTransferError(tvb, pinfo, tree, offset);
         break;
     case 22:
-        offset = fVTCloseError (tvb, pinfo, tree, offset);
+        offset = fVTCloseError(tvb, pinfo, tree, offset);
         break;
     default:
-        return fError (tvb, pinfo, tree, offset);
+        return fError(tvb, pinfo, tree, offset);
     }
     return offset;
 }
@@ -10108,7 +10718,7 @@ fErrorPDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bacapp_tree, guint offs
     proto_tree_add_item(bacapp_tree_control, hf_bacapp_service, tvb,
                  offset++, 1, ENC_BIG_ENDIAN);
     /* Error Handling follows... */
-    return fBACnetError (tvb, pinfo, bacapp_tree, offset, tmp);
+    return fBACnetError(tvb, pinfo, bacapp_tree, offset, tmp);
 }
 
 static guint
@@ -10196,7 +10806,7 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     guint8      flag, bacapp_type;
     guint       save_fragmented  = FALSE, data_offset = 0, /*bacapp_apdu_size,*/ fragment = FALSE;
-    tvbuff_t*   new_tvb          = NULL;
+    tvbuff_t   *new_tvb          = NULL;
     guint       offset           = 0;
     guint8      bacapp_seqno     = 0;
     guint8      bacapp_service, bacapp_reason/*, bacapp_prop_win_size*/;
@@ -10218,14 +10828,14 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     const gchar confsreqstr[]  = " (Confirmed Service Request)";
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "BACnet-APDU");
-    col_clear (pinfo->cinfo, COL_INFO);
+    col_clear(pinfo->cinfo, COL_INFO);
 
     flag = tvb_get_guint8(tvb, 0);
     bacapp_type = (flag >> 4) & 0x0f;
 
     /* show some descriptive text in the INFO column */
     col_add_fstr(pinfo->cinfo, COL_INFO, "%-16s",
-        val_to_str(bacapp_type, BACnetTypeName, "# unknown APDU #"));
+        val_to_str_const(bacapp_type, BACnetTypeName, "# unknown APDU #"));
 
     bacinfo.service_type = NULL;
     bacinfo.invoke_id = NULL;
@@ -10249,48 +10859,54 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
             bacapp_service = tvb_get_guint8(tvb, offset + 3);
         }
         col_append_fstr(pinfo->cinfo, COL_INFO, "%s[%3u] ",
-                        val_to_str(bacapp_service,
-                                   BACnetConfirmedServiceChoice,
-                                   bacapp_unknown_service_str),bacapp_invoke_id);
+                        val_to_str_const(bacapp_service,
+                                         BACnetConfirmedServiceChoice,
+                                         bacapp_unknown_service_str),
+                        bacapp_invoke_id);
 
         updateBacnetInfoValue(BACINFO_INVOKEID,
-                              ep_strdup_printf("Invoke ID: %d", bacapp_invoke_id));
+                              wmem_strdup_printf(wmem_packet_scope(), "Invoke ID: %d", bacapp_invoke_id));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(val_to_str(bacapp_service,
-                                                      BACnetConfirmedServiceChoice,
-                                                      bacapp_unknown_service_str),
-                                           confsreqstr, NULL));
+                              wmem_strconcat(wmem_packet_scope(),
+                                             val_to_str_const(bacapp_service,
+                                                              BACnetConfirmedServiceChoice,
+                                                              bacapp_unknown_service_str),
+                                             confsreqstr, NULL));
         break;
     case BACAPP_TYPE_UNCONFIRMED_SERVICE_REQUEST:
         bacapp_service = tvb_get_guint8(tvb, offset + 1);
         col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
-                        val_to_str(bacapp_service,
-                                   BACnetUnconfirmedServiceChoice,
-                                   bacapp_unknown_service_str));
+                        val_to_str_const(bacapp_service,
+                                         BACnetUnconfirmedServiceChoice,
+                                         bacapp_unknown_service_str));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(val_to_str(bacapp_service,
-                                                      BACnetUnconfirmedServiceChoice,
-                                                      bacapp_unknown_service_str),
-                                           uconfsreqstr, NULL));
+                              wmem_strconcat(wmem_packet_scope(),
+                                             val_to_str_const(bacapp_service,
+                                                              BACnetUnconfirmedServiceChoice,
+                                                              bacapp_unknown_service_str),
+                                             uconfsreqstr, NULL));
         break;
     case BACAPP_TYPE_SIMPLE_ACK:
         bacapp_invoke_id = tvb_get_guint8(tvb, offset + 1);
         bacapp_service = tvb_get_guint8(tvb, offset + 2);
         col_append_fstr(pinfo->cinfo, COL_INFO, "%s[%3u] ", /* "original-invokeID" replaced */
-                        val_to_str(bacapp_service,
-                                   BACnetConfirmedServiceChoice,
-                                   bacapp_unknown_service_str), bacapp_invoke_id);
+                        val_to_str_const(bacapp_service,
+                                         BACnetConfirmedServiceChoice,
+                                         bacapp_unknown_service_str),
+                        bacapp_invoke_id);
 
         updateBacnetInfoValue(BACINFO_INVOKEID,
-                              ep_strdup_printf("Invoke ID: %d", bacapp_invoke_id));
+                              wmem_strdup_printf(wmem_packet_scope(),
+                                                 "Invoke ID: %d", bacapp_invoke_id));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(val_to_str(bacapp_service,
-                                                      BACnetConfirmedServiceChoice,
-                                                      bacapp_unknown_service_str),
-                                           sackstr, NULL));
+                              wmem_strconcat(wmem_packet_scope(),
+                                             val_to_str_const(bacapp_service,
+                                                              BACnetConfirmedServiceChoice,
+                                                              bacapp_unknown_service_str),
+                                             sackstr, NULL));
         break;
     case BACAPP_TYPE_COMPLEX_ACK:
         /* segmented messages have 2 additional bytes */
@@ -10308,18 +10924,20 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
             bacapp_service = tvb_get_guint8(tvb, offset + 2);
         }
         col_append_fstr(pinfo->cinfo, COL_INFO, "%s[%3u] ", /* "original-invokeID" replaced */
-                        val_to_str(bacapp_service,
-                                   BACnetConfirmedServiceChoice,
-                                   bacapp_unknown_service_str), bacapp_invoke_id);
+                        val_to_str_const(bacapp_service,
+                                         BACnetConfirmedServiceChoice,
+                                         bacapp_unknown_service_str),
+                        bacapp_invoke_id);
 
         updateBacnetInfoValue(BACINFO_INVOKEID,
-                              ep_strdup_printf("Invoke ID: %d", bacapp_invoke_id));
+                              wmem_strdup_printf(wmem_packet_scope(), "Invoke ID: %d", bacapp_invoke_id));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(val_to_str(bacapp_service,
-                                                      BACnetConfirmedServiceChoice,
-                                                      bacapp_unknown_service_str),
-                                           cackstr, NULL));
+                              wmem_strconcat(wmem_packet_scope(),
+                                             val_to_str_const(bacapp_service,
+                                                              BACnetConfirmedServiceChoice,
+                                                              bacapp_unknown_service_str),
+                                             cackstr, NULL));
         break;
     case BACAPP_TYPE_SEGMENT_ACK:
         /* nothing more to add */
@@ -10328,19 +10946,21 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         bacapp_invoke_id = tvb_get_guint8(tvb, offset + 1);
         bacapp_service = tvb_get_guint8(tvb, offset + 2);
         col_append_fstr(pinfo->cinfo, COL_INFO, "%s[%3u] ", /* "original-invokeID" replaced */
-                        val_to_str(bacapp_service,
-                                   BACnetConfirmedServiceChoice,
-                                   bacapp_unknown_service_str), bacapp_invoke_id);
+                        val_to_str_const(bacapp_service,
+                                         BACnetConfirmedServiceChoice,
+                                         bacapp_unknown_service_str),
+                        bacapp_invoke_id);
 
         updateBacnetInfoValue(BACINFO_INVOKEID,
-                              ep_strdup_printf("Invoke ID: %d", bacapp_invoke_id));
+                              wmem_strdup_printf(wmem_packet_scope(), "Invoke ID: %d", bacapp_invoke_id));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(errstr,
-                                           val_to_str(bacapp_service,
-                                                      BACnetConfirmedServiceChoice,
-                                                      bacapp_unknown_service_str),
-                                           NULL));
+                              wmem_strconcat(wmem_packet_scope(),
+                                             errstr,
+                                             val_to_str_const(bacapp_service,
+                                                              BACnetConfirmedServiceChoice,
+                                                              bacapp_unknown_service_str),
+                                             NULL));
         break;
     case BACAPP_TYPE_REJECT:
         bacapp_invoke_id = tvb_get_guint8(tvb, offset + 1);
@@ -10353,15 +10973,15 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                          Vendor_Proprietary_Fmt), bacapp_invoke_id);
 
         updateBacnetInfoValue(BACINFO_INVOKEID,
-                              ep_strdup_printf("Invoke ID: %d", bacapp_invoke_id));
+                              wmem_strdup_printf(wmem_packet_scope(), "Invoke ID: %d", bacapp_invoke_id));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(rejstr,
-                                           val_to_split_str(bacapp_reason, 64,
-                                                            BACnetRejectReason,
-                                                            ASHRAE_Reserved_Fmt,
-                                                            Vendor_Proprietary_Fmt),
-                                           NULL));
+                              wmem_strconcat(wmem_packet_scope(), rejstr,
+                                             val_to_split_str(bacapp_reason, 64,
+                                                              BACnetRejectReason,
+                                                              ASHRAE_Reserved_Fmt,
+                                                              Vendor_Proprietary_Fmt),
+                                             NULL));
         break;
     case BACAPP_TYPE_ABORT:
         bacapp_invoke_id = tvb_get_guint8(tvb, offset + 1);
@@ -10374,16 +10994,16 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                          Vendor_Proprietary_Fmt), bacapp_invoke_id);
 
         updateBacnetInfoValue(BACINFO_INVOKEID,
-                              ep_strdup_printf("Invoke ID: %d", bacapp_invoke_id));
+                              wmem_strdup_printf(wmem_packet_scope(), "Invoke ID: %d", bacapp_invoke_id));
 
         updateBacnetInfoValue(BACINFO_SERVICE,
-                              ep_strconcat(abortstr,
-                                           val_to_split_str(bacapp_reason,
-                                                            64,
-                                                            BACnetAbortReason,
-                                                            ASHRAE_Reserved_Fmt,
-                                                            Vendor_Proprietary_Fmt),
-                                           NULL));
+                              wmem_strconcat(wmem_packet_scope(), abortstr,
+                                             val_to_split_str(bacapp_reason,
+                                                              64,
+                                                              BACnetAbortReason,
+                                                              ASHRAE_Reserved_Fmt,
+                                                              Vendor_Proprietary_Fmt),
+                                             NULL));
         break;
         /* UNKNOWN */
     default:
@@ -10397,21 +11017,21 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     bacapp_tree = proto_item_add_subtree(ti, ett_bacapp);
 
     if (!fragment)
-        offset = do_the_dissection(tvb,pinfo,bacapp_tree);
+        do_the_dissection(tvb, pinfo, bacapp_tree);
     else
         fStartConfirmed(tvb, pinfo, bacapp_tree, offset, ack, &svc, &tt);
             /* not resetting the offset so the remaining can be done */
 
     if (fragment) { /* fragmented */
-        fragment_data *frag_msg = NULL;
+        fragment_head *frag_msg;
 
-        new_tvb = NULL;
         pinfo->fragmented = TRUE;
 
-        frag_msg = fragment_add_seq_check(tvb, data_offset, pinfo,
+        frag_msg = fragment_add_seq_check(&msg_reassembly_table,
+            tvb, data_offset,
+            pinfo,
             bacapp_invoke_id,      /* ID for fragments belonging together */
-            msg_fragment_table,    /* list of message fragments */
-            msg_reassembled_table, /* list of reassembled messages */
+            NULL,
             bacapp_seqno,          /* fragment sequence number */
             tvb_reported_length_remaining(tvb, data_offset), /* fragment length - to the end */
             flag & BACAPP_MORE_SEGMENTS); /* Last fragment reached? */
@@ -10444,76 +11064,20 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     pinfo->fragmented = save_fragmented;
 
     /* tapping */
-    tap_queue_packet(bacapp_tap,pinfo,&bacinfo);
+    tap_queue_packet(bacapp_tap, pinfo, &bacinfo);
 }
 
 static void
 bacapp_init_routine(void)
 {
-    fragment_table_init(&msg_fragment_table);
-    reassembled_table_init(&msg_reassembled_table);
-}
-
-static guint32
-fConvertXXXtoUTF8 (gchar *in, gsize *inbytesleft, gchar *out, gsize *outbytesleft, const gchar *fromcoding)
-{
-    guint32 i;
-    GIConv  icd;
-
-    if ((icd = g_iconv_open ("UTF-8", fromcoding)) != (GIConv) -1) {
-        i = (guint32) g_iconv (icd, &in, inbytesleft, &out, outbytesleft);
-        /* g_iconv incremented 'out'; now ensure it's NULL terminated */
-        out[0] = '\0';
-
-        g_iconv_close (icd);
-        return i;
-    }
-
-    uni_to_string(in,*inbytesleft,out);
-    out[*inbytesleft] = '\0';
-    *outbytesleft -= *inbytesleft;
-    *inbytesleft = 0;
-
-    return 0;
+    reassembly_table_init(&msg_reassembly_table,
+                          &addresses_reassembly_table_functions);
 }
 
 static void
-uni_to_string(char * data, gsize str_length, char *dest_buf)
+bacapp_cleanup_routine(void)
 {
-    gint    i;
-    guint16 c_char;
-    gsize   length_remaining = 0;
-
-    length_remaining = str_length;
-    dest_buf[0] = '\0';
-    if(str_length == 0) {
-        return;
-    }
-    for ( i = 0; i < (gint) str_length; i++ ) {
-        c_char = data[i];
-        if (c_char<0x20 || c_char>0x7e) {
-            if (c_char != 0x00) {
-                c_char = '.';
-                dest_buf[i] = c_char & 0xff;
-            } else {
-                i--;
-                str_length--;
-            }
-        } else {
-            dest_buf[i] = c_char & 0xff;
-        }
-        length_remaining--;
-
-        if(length_remaining==0) {
-            dest_buf[i+1] = '\0';
-            return;
-        }
-    }
-    if (i < 0) {
-        i = 0;
-    }
-    dest_buf[i] = '\0';
-    return;
+    reassembly_table_destroy(&msg_reassembly_table);
 }
 
 void
@@ -10562,7 +11126,7 @@ proto_register_bacapp(void)
         },
         { &hf_BACnetVendorIdentifier,
           { "Vendor Identifier", "bacapp.vendor_identifier",
-            FT_UINT16, BASE_DEC, VALS(BACnetVendorIdentifiers), 0, NULL, HFILL }
+            FT_UINT16, BASE_DEC|BASE_EXT_STRING, &BACnetVendorIdentifiers_ext, 0, NULL, HFILL }
         },
         { &hf_BACnetRestartReason,
           { "Restart Reason", "bacapp.restart_reason",
@@ -10639,7 +11203,13 @@ proto_register_bacapp(void)
         { &hf_BACnetCharacterSet,
           { "String Character Set",
             "bacapp.string_character_set",
-            FT_UINT8, BASE_DEC, VALS(BACnetCharacterSet),0,
+            FT_UINT8, BASE_DEC, VALS(BACnetCharacterSet), 0,
+            NULL, HFILL }
+        },
+        { &hf_BACnetCodePage,
+          { "Code Page",
+            "bacapp.code_page",
+            FT_UINT16, BASE_DEC, NULL, 0,
             NULL, HFILL }
         },
         { &hf_BACnetTagClass,
@@ -10712,13 +11282,23 @@ proto_register_bacapp(void)
 
     };
 
+    static ei_register_info ei[] = {
+        { &ei_bacapp_bad_length, { "bacapp.bad_length", PI_MALFORMED, PI_ERROR, "Wrong length indicated", EXPFILL }},
+        { &ei_bacapp_bad_tag, { "bacapp.bad_tag", PI_MALFORMED, PI_ERROR, "Wrong tag found", EXPFILL }},
+    };
+
+    expert_module_t* expert_bacapp;
+
     proto_bacapp = proto_register_protocol("Building Automation and Control Network APDU",
                                            "BACapp", "bacapp");
 
     proto_register_field_array(proto_bacapp, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
+    expert_bacapp = expert_register_protocol(proto_bacapp);
+    expert_register_field_array(expert_bacapp, ei, array_length(ei));
     register_dissector("bacapp", dissect_bacapp, proto_bacapp);
-    register_init_routine (&bacapp_init_routine);
+    register_init_routine(&bacapp_init_routine);
+    register_cleanup_routine(&bacapp_cleanup_routine);
 
     bacapp_dissector_table = register_dissector_table("bacapp.vendor_identifier",
                                                       "BACapp Vendor Identifier",
@@ -10729,8 +11309,15 @@ proto_register_bacapp(void)
     bacapp_tap = register_tap("bacapp"); /* BACnet statistics tap */
 }
 
-void
-proto_reg_handoff_bacapp(void)
-{
-    data_handle = find_dissector("data");
-}
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */