2 * Routines for BACnet (APDU) dissection
3 * Copyright 2004, Herbert Lischka <lischka@kieback-peter.de>, Berlin
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
9 * Copyright 1998 Gerald Combs
11 * Copied from README.developer,v 1.23
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
44 #include <epan/packet.h>
47 #define min(a,b) (((a)<(b))?(a):(b))
51 #define max(a,b) (((a)>(b))?(a):(b))
55 #define FAULT proto_tree_add_text(subtree, tvb, offset, tvb_length(tvb) - offset, "something is going wrong here !!"); \
56 offset = tvb_length(tvb);
66 /* BACnet PDU Types */
67 #define BACAPP_TYPE_CONFIRMED_SERVICE_REQUEST 0
68 #define BACAPP_TYPE_UNCONFIRMED_SERVICE_REQUEST 1
69 #define BACAPP_TYPE_SIMPLE_ACK 2
70 #define BACAPP_TYPE_COMPLEX_ACK 3
71 #define BACAPP_TYPE_SEGMENT_ACK 4
72 #define BACAPP_TYPE_ERROR 5
73 #define BACAPP_TYPE_REJECT 6
74 #define BACAPP_TYPE_ABORT 7
75 #define MAX_BACAPP_TYPE 8
77 #define BACAPP_SEGMENTED_REQUEST 0x08
78 #define BACAPP_MORE_SEGMENTS 0x04
79 #define BACAPP_SEGMENTED_RESPONSE 0x02
80 #define BACAPP_SEGMENT_NAK 0x02
81 #define BACAPP_SENT_BY 0x01
85 * dissect_bacapp ::= CHOICE {
86 * confirmed-request-PDU [0] BACnet-Confirmed-Request-PDU,
87 * unconfirmed-request-PDU [1] BACnet-Unconfirmed-Request-PDU,
88 * simpleACK-PDU [2] BACnet-SimpleACK-PDU,
89 * complexACK-PDU [3] BACnet-ComplexACK-PDU,
90 * segmentACK-PDU [4] BACnet-SegmentACK-PDU,
91 * error-PDU [5] BACnet-Error-PDU,
92 * reject-PDU [6] BACnet-Reject-PDU,
93 * abort-PDU [7] BACnet-Abort-PDU
100 dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
103 * ConfirmedRequest-PDU ::= SEQUENCE {
104 * pdu-type [0] Unsigned (0..15), -- 0 for this PDU Type
105 * segmentedMessage [1] BOOLEAN,
106 * moreFollows [2] BOOLEAN,
107 * segmented-response-accepted [3] BOOLEAN,
108 * reserved [4] Unsigned (0..3), -- must be set zero
109 * max-segments-accepted [5] Unsigned (0..7), -- as per 20.1.2.4
110 * max-APDU-length-accepted [5] Unsigned (0..15), -- as per 20.1.2.5
111 * invokeID [6] Unsigned (0..255),
112 * sequence-number [7] Unsigned (0..255) OPTIONAL, -- only if segmented msg
113 * proposed-window-size [8] Unsigned (0..127) OPTIONAL, -- only if segmented msg
114 * service-choice [9] BACnetConfirmedServiceChoice,
115 * service-request [10] BACnet-Confirmed-Service-Request OPTIONAL
121 * @return modified offset
124 fConfirmedRequestPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
127 * Unconfirmed-Request-PDU ::= SEQUENCE {
128 * pdu-type [0] Unsigned (0..15), -- 1 for this PDU type
129 * reserved [1] Unsigned (0..15), -- must be set zero
130 * service-choice [2] BACnetUnconfirmedServiceChoice,
131 * service-request [3] BACnetUnconfirmedServiceRequest -- Context-specific tags 0..3 are NOT used in header encoding
136 * @return modified offset
139 fUnconfirmedRequestPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
142 * SimpleACK-PDU ::= SEQUENCE {
143 * pdu-type [0] Unsigned (0..15), -- 2 for this PDU type
144 * reserved [1] Unsigned (0..15), -- must be set zero
145 * invokeID [2] Unsigned (0..255),
146 * service-ACK-choice [3] BACnetUnconfirmedServiceChoice -- Context-specific tags 0..3 are NOT used in header encoding
151 * @return modified offset
154 fSimpleAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
157 * ComplexACK-PDU ::= SEQUENCE {
158 * pdu-type [0] Unsigned (0..15), -- 3 for this PDU Type
159 * segmentedMessage [1] BOOLEAN,
160 * moreFollows [2] BOOLEAN,
161 * reserved [3] Unsigned (0..3), -- must be set zero
162 * invokeID [4] Unsigned (0..255),
163 * sequence-number [5] Unsigned (0..255) OPTIONAL, -- only if segmented msg
164 * proposed-window-size [6] Unsigned (0..127) OPTIONAL, -- only if segmented msg
165 * service-ACK-choice [7] BACnetConfirmedServiceChoice,
166 * service-ACK [8] BACnet-Confirmed-Service-Request -- Context-specific tags 0..8 are NOT used in header encoding
171 * @return modified offset
174 fComplexAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
177 * SegmentACK-PDU ::= SEQUENCE {
178 * pdu-type [0] Unsigned (0..15), -- 4 for this PDU Type
179 * reserved [1] Unsigned (0..3), -- must be set zero
180 * negative-ACK [2] BOOLEAN,
181 * server [3] BOOLEAN,
182 * original-invokeID [4] Unsigned (0..255),
183 * sequence-number [5] Unsigned (0..255),
184 * actual-window-size [6] Unsigned (0..127)
189 * @return modified offset
192 fSegmentAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
195 * Error-PDU ::= SEQUENCE {
196 * pdu-type [0] Unsigned (0..15), -- 5 for this PDU Type
197 * reserved [1] Unsigned (0..3), -- must be set zero
198 * original-invokeID [2] Unsigned (0..255),
199 * error-choice [3] BACnetConfirmedServiceChoice,
200 * error [4] BACnet-Error
205 * @return modified offset
208 fErrorPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
211 * Reject-PDU ::= SEQUENCE {
212 * pdu-type [0] Unsigned (0..15), -- 6 for this PDU Type
213 * reserved [1] Unsigned (0..3), -- must be set zero
214 * original-invokeID [2] Unsigned (0..255),
215 * reject-reason [3] BACnetRejectReason
220 * @return modified offset
223 fRejectPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
226 * Abort-PDU ::= SEQUENCE {
227 * pdu-type [0] Unsigned (0..15), -- 7 for this PDU Type
228 * reserved [1] Unsigned (0..3), -- must be set zero
229 * server [2] BOOLEAN,
230 * original-invokeID [3] Unsigned (0..255),
231 * abort-reason [4] BACnetAbortReason
236 * @return modified offset
239 fAbortPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
242 * 20.2.4, adds the label with max 64Bit unsigned Integer Value to tree
247 * @return modified offset
250 fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
253 * 20.2.5, adds the label with max 64Bit signed Integer Value to tree
258 * @return modified offset
261 fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
264 * 20.2.8, adds the label with Octet String to tree; if lvt == 0 then lvt = restOfFrame
269 * @param lvt length of String
270 * @return modified offset
273 fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label, guint32 lvt);
276 * 20.2.12, adds the label with Date Value to tree
281 * @return modified offset
284 fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
287 * 20.2.13, adds the label with Time Value to tree
292 * @return modified offset
295 fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
298 * 20.2.14, adds Object Identifier to tree
299 * use BIG ENDIAN: Bits 31..22 Object Type, Bits 21..0 Instance Number
303 * @return modified offset
306 fObjectIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
309 * BACnet-Confirmed-Service-Request ::= CHOICE {
314 * @param service_choice
318 fConfirmedServiceRequest (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
321 * BACnet-Confirmed-Service-ACK ::= CHOICE {
326 * @param service_choice
330 fConfirmedServiceAck (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
333 * AcknowledgeAlarm-Request ::= SEQUENCE {
334 * acknowledgingProcessIdentifier [0] Unsigned32,
335 * eventObjectIdentifier [1] BACnetObjectIdentifer,
336 * eventStateAcknowledge [2] BACnetEventState,
337 * timeStamp [3] BACnetTimeStamp,
338 * acknowledgementSource [4] Character String,
339 * timeOfAcknowledgement [5] BACnetTimeStamp
344 * @return modified offset
347 fAcknowlegdeAlarmRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
350 * ConfirmedCOVNotification-Request ::= SEQUENCE {
351 * subscriberProcessIdentifier [0] Unsigned32,
352 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
353 * monitoredObjectIdentifier [2] BACnetObjectIdentifer,
354 * timeRemaining [3] unsigned,
355 * listOfValues [4] SEQUENCE OF BACnetPropertyValues
360 * @return modified offset
363 fConfirmedCOVNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
366 * ConfirmedEventNotification-Request ::= SEQUENCE {
367 * ProcessIdentifier [0] Unsigned32,
368 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
369 * eventObjectIdentifier [2] BACnetObjectIdentifer,
370 * timeStamp [3] BACnetTimeStamp,
371 * notificationClass [4] unsigned,
372 * priority [5] unsigned8,
373 * eventType [6] BACnetEventType,
374 * messageText [7] CharacterString OPTIONAL,
375 * notifyType [8] BACnetNotifyType,
376 * ackRequired [9] BOOLEAN OPTIONAL,
377 * fromState [10] BACnetEventState OPTIONAL,
378 * toState [11] BACnetEventState,
379 * eventValues [12] BACnetNotificationParameters OPTIONAL
384 * @return modified offset
387 fConfirmedEventNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
390 * GetAlarmSummary-ACK ::= SEQUENCE OF SEQUENCE {
391 * objectIdentifier BACnetObjectIdentifer,
392 * alarmState BACnetEventState,
393 * acknowledgedTransitions BACnetEventTransitionBits
398 * @return modified offset
401 fGetAlarmSummaryAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
404 * GetEnrollmentSummary-Request ::= SEQUENCE {
405 * acknowledgmentFilter [0] ENUMERATED {
410 * enrollmentFilter [1] BACnetRecipientProcess OPTIONAL,
411 * eventStateFilter [2] ENUMERATED {
418 * eventTypeFilter [3] BACnetEventType OPTIONAL,
419 * priorityFilter [4] SEQUENCE {
420 * minPriority [0] Unsigned8,
421 * maxPriority [1] Unsigned8
423 * notificationClassFilter [5] Unsigned OPTIONAL
428 * @return modified offset
431 fGetEnrollmentSummaryRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
434 * GetEnrollmentSummary-ACK ::= SEQUENCE OF SEQUENCE {
435 * objectIdentifier BACnetObjectIdentifer,
436 * eventType BACnetEventType,
437 * eventState BACnetEventState,
438 * priority Unsigned8,
439 * notificationClass Unsigned OPTIONAL
444 * @return modified offset
447 fGetEnrollmentSummaryAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
450 * GetEventInformation-Request ::= SEQUENCE {
451 * lastReceivedObjectIdentifier [0] BACnetObjectIdentifer
456 * @return modified offset
459 fGetEventInformationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
462 * GetEventInformation-ACK ::= SEQUENCE {
463 * listOfEventSummaries [0] listOfEventSummaries,
464 * moreEvents [1] BOOLEAN
469 * @return modified offset
472 fGetEventInformationACK (tvbuff_t *tvb, proto_tree *tree, guint offset);
475 * LifeSafetyOperation-Request ::= SEQUENCE {
476 * requestingProcessIdentifier [0] Unsigned32
477 * requestingSource [1] CharacterString
478 * request [2] BACnetLifeSafetyOperation
479 * objectIdentifier [3] BACnetObjectIdentifier OPTIONAL
484 * @return modified offset
487 fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
490 * SubscribeCOV-Request ::= SEQUENCE {
491 * subscriberProcessIdentifier [0] Unsigned32
492 * monitoredObjectIdentifier [1] BACnetObjectIdentifier
493 * issueConfirmedNotifications [2] BOOLEAN OPTIONAL
494 * lifetime [3] Unsigned OPTIONAL
501 * @return modified offset
504 fSubscribeCOVRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
507 * SubscribeCOVProperty-Request ::= SEQUENCE {
508 * subscriberProcessIdentifier [0] Unsigned32
509 * monitoredObjectIdentifier [1] BACnetObjectIdentifier
510 * issueConfirmedNotifications [2] BOOLEAN OPTIONAL
511 * lifetime [3] Unsigned OPTIONAL
512 * monitoredPropertyIdentifier [4] BACnetPropertyReference OPTIONAL
513 * covIncrement [5] Unsigned OPTIONAL
518 * @return modified offset
521 fSubscribeCOVPropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
524 * AtomicReadFile-Request ::= SEQUENCE {
525 * fileIdentifier BACnetObjectIdentifier,
526 * accessMethod CHOICE {
527 * streamAccess [0] SEQUENCE {
528 * fileStartPosition INTEGER,
529 * requestedOctetCount Unsigned
531 * recordAccess [1] SEQUENCE {
532 * fileStartRecord INTEGER,
533 * requestedRecordCount Unsigned
540 * @return modified offset
543 fAtomicReadFileRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
546 * AtomicWriteFile-ACK ::= SEQUENCE {
548 * accessMethod CHOICE {
549 * streamAccess [0] SEQUENCE {
550 * fileStartPosition INTEGER,
551 * fileData OCTET STRING
553 * recordAccess [1] SEQUENCE {
554 * fileStartRecord INTEGER,
555 * returnedRecordCount Unsigned,
556 * fileRecordData SEQUENCE OF OCTET STRING
563 * @return modified offset
566 fAtomicReadFileAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
569 * AtomicWriteFile-Request ::= SEQUENCE {
570 * fileIdentifier BACnetObjectIdentifier,
571 * accessMethod CHOICE {
572 * streamAccess [0] SEQUENCE {
573 * fileStartPosition INTEGER,
574 * fileData OCTET STRING
576 * recordAccess [1] SEQUENCE {
577 * fileStartRecord INTEGER,
578 * recordCount Unsigned,
579 * fileRecordData SEQUENCE OF OCTET STRING
586 * @return modified offset
589 fAtomicWriteFileRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
592 * AtomicWriteFile-ACK ::= SEQUENCE {
593 * fileStartPosition [0] INTEGER,
594 * fileStartRecord [1] INTEGER,
599 * @return modified offset
602 fAtomicWriteFileAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
605 * AddListElement-Request ::= SEQUENCE {
606 * objectIdentifier [0] BACnetObjectIdentifier,
607 * propertyIdentifier [1] BACnetPropertyIdentifier,
608 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
609 * listOfElements [3] ABSTRACT-SYNTAX.&Type
614 * @return modified offset
617 fAddListElementRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
620 * CreateObject-Request ::= SEQUENCE {
621 * objectSpecifier [0] ObjectSpecifier,
622 * listOfInitialValues [1] SEQUENCE OF BACnetPropertyValue OPTIONAL
627 * @return modified offset
630 fCreateObjectRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
633 * CreateObject-Request ::= BACnetObjectIdentifier
637 * @return modified offset
640 fCreateObjectAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
643 * DeleteObject-Request ::= SEQUENCE {
644 * ObjectIdentifier BACnetObjectIdentifer
649 * @return modified offset
652 fDeleteObjectRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
655 * ReadProperty-Request ::= SEQUENCE {
656 * objectIdentifier [0] BACnetObjectIdentifier,
657 * propertyIdentifier [1] BACnetPropertyIdentifier,
658 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
663 * @return modified offset
666 fReadPropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
669 * ReadProperty-ACK ::= SEQUENCE {
670 * objectIdentifier [0] BACnetObjectIdentifier,
671 * propertyIdentifier [1] BACnetPropertyIdentifier,
672 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
673 * propertyValue [3] ABSTRACT-SYNTAX.&Type
678 * @return modified offset
681 fReadPropertyAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
684 * ReadPropertyConditional-Request ::= SEQUENCE {
685 * objectSelectionCriteria [0] objectSelectionCriteria,
686 * listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference OPTIONAL
691 * @return modified offset
694 fReadPropertyConditionalRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
697 * ReadPropertyConditional-ACK ::= SEQUENCE {
698 * listOfPReadAccessResults SEQUENCE OF ReadAccessResult OPTIONAL
703 * @return modified offset
706 fReadPropertyConditionalAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
709 * ReadPropertyMultiple-Request ::= SEQUENCE {
710 * listOfReadAccessSpecs SEQUENCE OF ReadAccessSpecification
715 * @return offset modified
718 fReadPropertyMultipleRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
721 * ReadPropertyMultiple-Ack ::= SEQUENCE {
722 * listOfReadAccessResults SEQUENCE OF ReadAccessResult
727 * @return offset modified
730 fReadPropertyMultipleAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
733 * ReadRange-Request ::= SEQUENCE {
734 * objectIdentifier [0] BACnetObjectIdentifier,
735 * propertyIdentifier [1] BACnetPropertyIdentifier,
736 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
738 * byPosition [3] SEQUENCE {
739 * referencedIndex Unsigned,
742 * byTime [4] SEQUENCE {
743 * referenceTime BACnetDateTime,
746 * timeRange [5] SEQUENCE {
747 * beginningTime BACnetDateTime,
748 * endingTime BACnetDateTime
755 * @return modified offset
758 fReadRangeRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
761 * ReadRange-ACK ::= SEQUENCE {
762 * objectIdentifier [0] BACnetObjectIdentifier,
763 * propertyIdentifier [1] BACnetPropertyIdentifier,
764 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
765 * resultFlags [3] BACnetResultFlags,
766 * itemCount [4] Unsigned,
767 * itemData [5] SEQUENCE OF ABSTRACT-SYNTAX.&Type
772 * @return modified offset
775 fReadRangeAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
778 * RemoveListElement-Request ::= SEQUENCE {
779 * objectIdentifier [0] BACnetObjectIdentifier,
780 * propertyIdentifier [1] BACnetPropertyIdentifier,
781 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
782 * listOfElements [3] ABSTRACT-SYNTAX.&Type
787 * @return modified offset
790 fRemoveListElementRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
793 * WriteProperty-Request ::= SEQUENCE {
794 * objectIdentifier [0] BACnetObjectIdentifier,
795 * propertyIdentifier [1] BACnetPropertyIdentifier,
796 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
797 * propertyValue [3] ABSTRACT-SYNTAX.&Type
798 * priority [4] Unsigned8 (1..16) OPTIONAL --used only when property is commandable
803 * @return modified offset
806 fWritePropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
809 * WritePropertyMultiple-Request ::= SEQUENCE {
810 * listOfWriteAccessSpecifications SEQUENCE OF WriteAccessSpecification
815 * @return modified offset
818 fWritePropertyMultipleRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
821 * DeviceCommunicationControl-Request ::= SEQUENCE {
822 * timeDuration [0] Unsigned16 OPTIONAL,
823 * enable-disable [1] ENUMERATED {
827 * password [2] CharacterString (SIZE(1..20)) OPTIONAL
832 * @return modified offset
835 fDeviceCommunicationControlRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
838 * ConfirmedPrivateTransfer-Request ::= SEQUENCE {
839 * vendorID [0] Unsigned,
840 * serviceNumber [1] Unsigned,
841 * serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
846 * @return modified offset
849 fConfirmedPrivateTransferRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
852 * ConfirmedPrivateTransfer-ACK ::= SEQUENCE {
853 * vendorID [0] Unsigned,
854 * serviceNumber [1] Unsigned,
855 * resultBlock [2] ABSTRACT-SYNTAX.&Type OPTIONAL
860 * @return modified offset
863 fConfirmedPrivateTransferAck(tvbuff_t *tvb, proto_tree *tree, guint offset);
866 * ConfirmedTextMessage-Request ::= SEQUENCE {
867 * textMessageSourceDevice [0] BACnetObjectIdentifier,
868 * messageClass [1] CHOICE {
869 * numeric [0] Unsigned,
870 * character [1] CharacterString
872 * messagePriority [2] ENUMERATED {
876 * message [3] CharacterString
881 * @return modified offset
884 fConfirmedTextMessageRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
887 * ReinitializeDevice-Request ::= SEQUENCE {
888 * reinitializedStateOfDevice [0] ENUMERATED {
897 * password [1] CharacterString (SIZE(1..20)) OPTIONAL
902 * @return modified offset
905 fReinitializeDeviceRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
908 * VTOpen-Request ::= SEQUENCE {
909 * vtClass BACnetVTClass,
910 * localVTSessionIdentifier Unsigned8
915 * @return modified offset
918 fVtOpenRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
921 * VTOpen-ACK ::= SEQUENCE {
922 * remoteVTSessionIdentifier Unsigned8
927 * @return modified offset
930 fVtOpenAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
933 * VTClose-Request ::= SEQUENCE {
934 * listOfRemoteVTSessionIdentifiers SEQUENCE OF Unsigned8
939 * @return modified offset
942 fVtCloseRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
945 * VTData-Request ::= SEQUENCE {
946 * vtSessionIdentifier Unsigned8,
947 * vtNewData OCTET STRING,
948 * vtDataFlag Unsigned (0..1)
953 * @return modified offset
956 fVtDataRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
959 * VTData-ACK ::= SEQUENCE {
960 * allNewDataAccepted [0] BOOLEAN,
961 * acceptedOctetCount [1] Unsigned OPTIONAL -- present only if allNewDataAccepted = FALSE
966 * @return modified offset
969 fVtDataAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
972 * Authenticate-Request ::= SEQUENCE {
973 * pseudoRandomNumber [0] Unsigned32,
974 * excpectedInvokeID [1] Unsigned8 OPTIONAL,
975 * operatorName [2] CharacterString OPTIONAL,
976 * operatorPassword [3] CharacterString (SIZE(1..20)) OPTIONAL,
977 * startEncypheredSession [4] BOOLEAN OPTIONAL
982 * @return modified offset
985 fAuthenticateRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
988 * Authenticate-ACK ::= SEQUENCE {
989 * modifiedRandomNumber Unsigned32,
994 * @return modified offset
997 fAuthenticateAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
1000 * RequestKey-Request ::= SEQUENCE {
1001 * requestingDeviceIdentifier BACnetObjectIdentifier,
1002 * requestingDeviceAddress BACnetAddress,
1003 * remoteDeviceIdentifier BACnetObjectIdentifier,
1004 * remoteDeviceAddress BACnetAddress
1009 * @return modified offset
1012 fRequestKeyRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1015 * Unconfirmed-Service-Request ::= CHOICE {
1020 * @param service_choice
1021 * @return modified offset
1024 fUnconfirmedServiceRequest (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
1027 * UnconfirmedCOVNotification-Request ::= SEQUENCE {
1028 * subscriberProcessIdentifier [0] Unsigned32,
1029 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
1030 * monitoredObjectIdentifier [2] BACnetObjectIdentifer,
1031 * timeRemaining [3] unsigned,
1032 * listOfValues [4] SEQUENCE OF BACnetPropertyValues
1037 * @return modified offset
1040 fUnconfirmedCOVNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1043 * UnconfirmedEventNotification-Request ::= SEQUENCE {
1044 * ProcessIdentifier [0] Unsigned32,
1045 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
1046 * eventObjectIdentifier [2] BACnetObjectIdentifer,
1047 * timeStamp [3] BACnetTimeStamp,
1048 * notificationClass [4] unsigned,
1049 * priority [5] unsigned8,
1050 * eventType [6] BACnetEventType,
1051 * messageText [7] CharacterString OPTIONAL,
1052 * notifyType [8] BACnetNotifyType,
1053 * ackRequired [9] BOOLEAN OPTIONAL,
1054 * fromState [10] BACnetEventState OPTIONAL,
1055 * toState [11] BACnetEventState,
1056 * eventValues [12] BACnetNotificationParameters OPTIONAL
1061 * @return modified offset
1064 fUnconfirmedEventNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1067 * I-Am-Request ::= SEQUENCE {
1068 * aAmDeviceIdentifier BACnetObjectIdentifier,
1069 * maxAPDULengthAccepted Unsigned,
1070 * segmentationSupported BACnetSegmentation,
1076 * @return modified offset
1079 fIAmRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1083 * I-Have-Request ::= SEQUENCE {
1084 * deviceIdentifier BACnetObjectIdentifier,
1085 * objectIdentifier BACnetObjectIdentifier,
1086 * objectName CharacterString
1091 * @return modified offset
1094 fIHaveRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1097 * UnconfirmedPrivateTransfer-Request ::= SEQUENCE {
1098 * vendorID [0] Unsigned,
1099 * serviceNumber [1] Unsigned,
1100 * serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
1105 * @return modified offset
1108 fUnconfirmedPrivateTransferRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
1111 * UnconfirmedTextMessage-Request ::= SEQUENCE {
1112 * textMessageSourceDevice [0] BACnetObjectIdentifier,
1113 * messageClass [1] CHOICE {
1114 * numeric [0] Unsigned,
1115 * character [1] CharacterString
1117 * messagePriority [2] ENUMERATED {
1121 * message [3] CharacterString
1126 * @return modified offset
1129 fUnconfirmedTextMessageRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
1132 * TimeSynchronization-Request ::= SEQUENCE {
1138 * @return modified offset
1141 fTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1144 * UTCTimeSynchronization-Request ::= SEQUENCE {
1150 * @return modified offset
1153 fUTCTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1156 * Who-Has-Request ::= SEQUENCE {
1158 * deviceInstanceRangeLowLimit [0] Unsigned (0..4194303),
1159 * deviceInstanceRangeHighLimit [1] Unsigned (0..4194303)
1162 * objectIdentifier [2] BACnetObjectIdentifier,
1163 * objectName [3] CharacterString
1169 * @return modified offset
1172 fWhoHas (tvbuff_t *tvb, proto_tree *tree, guint offset);
1175 * Who-Is-Request ::= SEQUENCE {
1176 * deviceInstanceRangeLowLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
1177 * deviceInstanceRangeHighLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
1182 * @return modified offset
1185 fWhoIsRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1188 * BACnet-Error ::= CHOICE {
1189 * addListElement [8] ChangeList-Error,
1190 * removeListElement [9] ChangeList-Error,
1191 * writePropertyMultiple [16] WritePropertyMultiple-Error,
1192 * confirmedPrivatTransfer [18] ConfirmedPrivateTransfer-Error,
1193 * vtClose [22] VTClose-Error,
1194 * readRange [26] ObjectAccessService-Error
1201 * @return modified offset
1204 fBACnetError(tvbuff_t *tvb, proto_tree *tree, guint offset, guint service);
1207 * ChangeList-Error ::= SEQUENCE {
1208 * errorType [0] Error,
1209 * firstFailedElementNumber [1] Unsigned
1215 * @return modified offset
1218 fChangeListError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1221 * CreateObject-Error ::= SEQUENCE {
1222 * errorType [0] Error,
1223 * firstFailedElementNumber [1] Unsigned
1229 * @return modified offset
1232 fCreateObjectError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1235 * ConfirmedPrivateTransfer-Error ::= SEQUENCE {
1236 * errorType [0] Error,
1237 * vendorID [1] Unsigned,
1238 * serviceNumber [2] Unsigned,
1239 * errorParameters [3] ABSTRACT-SYNTAX.&Type OPTIONAL
1245 * @return modified offset
1248 fConfirmedPrivateTransferError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1251 * WritePropertyMultiple-Error ::= SEQUENCE {
1252 * errorType [0] Error,
1253 * firstFailedWriteAttempt [1] Unsigned
1259 * @return modified offset
1262 fWritePropertyMultipleError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1265 * VTClose-Error ::= SEQUENCE {
1266 * errorType [0] Error,
1267 * listOfVTSessionIdentifiers [1] SEQUENCE OF Unsigned8 OPTIONAL
1273 * @return modified offset
1276 fVTCloseError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1279 * BACnet Application Types chapter 20.2.1
1284 * @return modified offset
1287 fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1290 * BACnetActionCommand ::= SEQUENCE {
1291 * deviceIdentifier [0] BACnetObjectIdentifier OPTIONAL,
1292 * objectIdentifier [1] BACnetObjectIdentifier,
1293 * propertyIdentifier [2] BACnetPropertyIdentifier,
1294 * propertyArrayIndex [3] Unsigned OPTIONAL, -- used only with array datatype
1295 * propertyValue [4] ABSTRACT-SYNTAX.&Type,
1296 * priority [5] Unsigned (1..16) OPTIONAL, -- used only when property is commandable
1297 * postDelay [6] Unsigned OPTIONAL,
1298 * quitOnFailure [7] BOOLEAN,
1299 * writeSuccessful [8] BOOLEAN
1304 * @return modified offset
1307 fActionCommand (tvbuff_t *tvb, proto_tree *tree, guint offset);
1310 * BACnetActionList ::= SEQUENCE {
1311 * action [0] SEQUENCE of BACnetActionCommand
1316 * @return modified offset
1319 fActionList (tvbuff_t *tvb, proto_tree *tree, guint offset);
1321 /** BACnetAddress ::= SEQUENCE {
1322 * network-number Unsigned16, -- A value 0 indicates the local network
1323 * mac-address OCTET STRING -- A string of length 0 indicates a broadcast
1328 * @return modified offset
1331 fAddress (tvbuff_t *tvb, proto_tree *tree, guint offset);
1334 * BACnetAddressBinding ::= SEQUENCE {
1335 * deviceObjectID BACnetObjectIdentifier
1336 * deviceAddress BacnetAddress
1341 * @return modified offset
1344 fAddressBinding (tvbuff_t *tvb, proto_tree *tree, guint offset);
1347 * BACnetCalendaryEntry ::= CHOICE {
1349 * dateRange [1] BACnetDateRange,
1350 * weekNDay [2] BacnetWeekNday
1355 * @return modified offset
1358 fCalendaryEntry (tvbuff_t *tvb, proto_tree *tree, guint offset);
1361 * BACnetClientCOV ::= CHOICE {
1362 * real-increment REAL,
1363 * default-increment NULL
1368 * @return modified offset
1371 fClientCOV (tvbuff_t *tvb, proto_tree *tree, guint offset);
1374 fDailySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
1377 * BACnetWeeklySchedule ::= SEQUENCE {
1378 * week-schedule SENQUENCE SIZE (7) OF BACnetDailySchedule
1383 * @return modified offset
1386 fWeeklySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
1389 * BACnetDateRange ::= SEQUENCE {
1396 * @return modified offset
1399 fDateRange (tvbuff_t *tvb, proto_tree *tree, guint offset);
1402 * BACnetDateTime ::= SEQUENCE {
1410 * @return modified offset
1413 fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1416 * BACnetDestination ::= SEQUENCE {
1417 * validDays BACnetDaysOfWeek,
1420 * recipient BACnetRecipient,
1421 * processIdentifier Unsigned32,
1422 * issueConfirmedNotifications BOOLEAN,
1423 * transitions BACnetEventTransitionBits
1428 * @return modified offset
1431 fDestination (tvbuff_t *tvb, proto_tree *tree, guint offset);
1434 * BACnetDeviceObjectPropertyReference ::= SEQUENCE {
1435 * objectIdentifier [0] BACnetObjectIdentifier,
1436 * propertyIdentifier [1] BACnetPropertyIdentifier,
1437 * propertyArrayIndex [2] Unsigend OPTIONAL,
1438 * deviceIdentifier [3] BACnetObjectIdentifier OPTIONAL
1443 * @return modified offset
1446 fDeviceObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1449 * BACnetDeviceObjectReference ::= SEQUENCE {
1450 * deviceIdentifier [0] BACnetObjectIdentifier OPTIONAL,
1451 * objectIdentifier [1] BACnetObjectIdentifier
1456 * @return modified offset
1459 fDeviceObjectReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1462 * BACnetEventParameter ::= CHOICE {
1463 * change-of-bitstring [0] SEQUENCE {
1464 * time-delay [0] Unsigned,
1465 * bitmask [1] BIT STRING,
1466 * list-of-bitstring-values [2] SEQUENCE OF BIT STRING
1468 * change-of-state [1] SEQUENCE {
1469 * time-delay [0] Unsigned,
1470 * list-of-values [1] SEQUENCE OF BACnetPropertyStates
1472 * change-of-value [2] SEQUENCE {
1473 * time-delay [0] Unsigned,
1474 * cov-criteria [1] CHOICE {
1475 * bitmask [0] BIT STRING,
1476 * referenced-property-increment [1] REAL
1479 * command-failure [3] SEQUENCE {
1480 * time-delay [0] Unsigned,
1481 * feedback-property-reference [1] BACnetDeviceObjectPropertyReference
1483 * floating-limit [4] SEQUENCE {
1484 * time-delay [0] Unsigned,
1485 * setpoint-reference [1] BACnetDeviceObjectPropertyReference,
1486 * low-diff-limit [2] REAL,
1487 * high-diff-limit [3] REAL,
1490 * out-of-range [5] SEQUENCE {
1491 * time-delay [0] Unsigned,
1492 * low-limit [1] REAL,
1493 * high-limit [2] REAL,
1496 * buffer-ready [7] SEQUENCE {
1497 * notification-threshold [0] Unsigned,
1498 * previous-notification-count [1] Unsigned32
1500 * change-of-life-safety [8] SEQUENCE {
1501 * time-delay [0] Unsigned,
1502 * list-of-life-safety-alarm-values [1] SEQUENCE OF BACnetLifeSafetyState,
1503 * list-of-alarm-values [2] SEQUENCE OF BACnetLifeSafetyState,
1504 * mode-property-reference [3] BACnetDeviceObjectPropertyReference
1510 * @return modified offset
1513 fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset);
1517 * BACnetLogRecord ::= SEQUENCE {
1518 * timestamp [0] BACnetDateTime,
1519 * logDatum [1] CHOICE {
1520 * log-status [0] BACnetLogStatus,
1521 * boolean-value [1] BOOLEAN,
1522 * real-value [2] REAL,
1523 * enum-value [3] ENUMERATED, -- Optionally limited to 32 bits
1524 * unsigned-value [4] Unsigned, -- Optionally limited to 32 bits
1525 * signed-value [5] INTEGER, -- Optionally limited to 32 bits
1526 * bitstring-value [6] BIT STRING,-- Optionally limited to 32 bits
1527 * null-value [7] NULL,
1528 * failure [8] Error,
1529 * time-change [9] REAL,
1530 * any-value [10] ABSTRACT-SYNTAX.&Type -- Optional
1532 * statusFlags [2] BACnetStatusFlags OPTIONAL
1537 * @return modified offset
1540 fLogRecord (tvbuff_t *tvb, proto_tree *tree, guint offset);
1543 * BACnetNotificationParameters ::= CHOICE {
1544 * change-of-bitstring [0] SEQUENCE {
1545 * referenced-bitstring [0] BIT STRING,
1546 * status-flags [1] BACnetStatusFlags
1548 * change-of-state [1] SEQUENCE {
1549 * new-state [0] BACnetPropertyStatus,
1550 * status-flags [1] BACnetStatusFlags
1552 * change-of-value [2] SEQUENCE {
1553 * new-value [0] CHOICE {
1554 * changed-bits [0] BIT STRING,
1555 * changed-value [1] REAL
1557 * status-flags [1] BACnetStatusFlags
1559 * command-failure [3] SEQUENCE {
1560 * command-value [0] ABSTRACT-SYNTAX.&Type, -- depends on ref property
1561 * status-flags [1] BACnetStatusFlags
1562 * feedback-value [2] ABSTRACT-SYNTAX.&Type -- depends on ref property
1564 * floating-limit [4] SEQUENCE {
1565 * reference-value [0] REAL,
1566 * status-flags [1] BACnetStatusFlags
1567 * setpoint-value [2] REAL,
1568 * error-limit [3] REAL
1570 * out-of-range [5] SEQUENCE {
1571 * exceeding-value [0] REAL,
1572 * status-flags [1] BACnetStatusFlags
1573 * deadband [2] REAL,
1574 * exceeded-limit [0] REAL
1576 * complex-event-type [6] SEQUENCE OF BACnetPropertyValue,
1577 * buffer-ready [7] SEQUENCE {
1578 * buffer-device [0] BACnetObjectIdentifier,
1579 * buffer-object [1] BACnetObjectIdentifier
1580 * previous-notification [2] BACnetDateTime,
1581 * current-notification [3] BACnetDateTime
1583 * change-of-life-safety [8] SEQUENCE {
1584 * new-state [0] BACnetLifeSafetyState,
1585 * new-mode [1] BACnetLifeSafetyState
1586 * status-flags [2] BACnetStatusFlags,
1587 * operation-expected [3] BACnetLifeSafetyOperation
1593 * @return modified offset
1596 fNotificationParameters (tvbuff_t *tvb, proto_tree *tree, guint offset);
1599 * BACnetObjectPropertyReference ::= SEQUENCE {
1600 * objectIdentifier [0] BACnetObjectIdentifier,
1601 * propertyIdentifier [1] BACnetPropertyIdentifier,
1602 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
1607 * @return modified offset
1610 fObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1613 * BACnetObjectPropertyValue ::= SEQUENCE {
1614 * objectIdentifier [0] BACnetObjectIdentifier,
1615 * propertyIdentifier [1] BACnetPropertyIdentifier,
1616 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
1617 * -- if omitted with an array the entire array is referenced
1618 * value [3] ABSTRACT-SYNTAX.&Type, --any datatype appropriate for the specified property
1619 * priority [4] Unsigned (1..16) OPTIONAL
1624 * @return modified offset
1627 fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1630 * BACnetPriorityArray ::= SEQUENCE SIZE (16) OF BACnetPriorityValue
1634 * @return modified offset
1637 fPriorityArray (tvbuff_t *tvb, proto_tree *tree, guint offset);
1640 * BACnetPropertyReference ::= SEQUENCE {
1641 * propertyIdentifier [0] BACnetPropertyIdentifier,
1642 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatype
1647 * @return modified offset
1650 fPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1653 * BACnetPropertyValue ::= SEQUENCE {
1654 * PropertyIdentifier [0] BACnetPropertyIdentifier,
1655 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatypes
1656 * -- if omitted with an array the entire array is referenced
1657 * value [2] ABSTRACT-SYNTAX.&Type, -- any datatype appropriate for the specified property
1658 * priority [3] Unsigned (1..16) OPTIONAL -- used only when property is commandable
1663 * @return modified offset
1666 fPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1669 * BACnet Application PDUs chapter 21
1670 * BACnetRecipient::= CHOICE {
1671 * device [0] BACnetObjectIdentifier
1672 * address [1] BACnetAddress
1677 * @return modified offset
1680 fRecipient (tvbuff_t *tvb, proto_tree *tree, guint offset);
1683 * BACnet Application PDUs chapter 21
1684 * BACnetRecipientProcess::= SEQUENCE {
1685 * recipient [0] BACnetRecipient
1686 * processID [1] Unsigned32
1691 * @return modified offset
1694 fRecipientProcess (tvbuff_t *tvb, proto_tree *tree, guint offset);
1697 * BACnetSessionKey ::= SEQUENCE {
1698 * sessionKey OCTET STRING (SIZE(8)), -- 56 bits for key, 8 bits for checksum
1699 * peerAddress BACnetAddress
1704 * @return modified offset
1705 * @todo check if checksum is displayed correctly
1708 fSessionKey (tvbuff_t *tvb, proto_tree *tree, guint offset);
1711 * BACnetSetpointReference ::= SEQUENCE {
1712 * sessionKey [0] BACnetObjectPropertyReference OPTIONAL
1717 * @return modified offset
1720 fSetpointReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1723 * BACnetSpecialEvent ::= SEQUENCE {
1725 * calendarEntry [0] BACnetCalendarEntry,
1726 * calendarRefernce [1] BACnetObjectIdentifier
1728 * listOfTimeValues [2] SEQUENCE OF BACnetTimeValue,
1729 * eventPriority [3] Unsigned (1..16)
1734 * @return modified offset
1737 fSpecialEvent (tvbuff_t *tvb, proto_tree *tree, guint offset);
1740 * BACnetTimeStamp ::= CHOICE {
1742 * sequenceNumber [1] Unsigned (0..65535),
1743 * dateTime [2] BACnetDateTime
1748 * @return modified offset
1751 fTimeStamp (tvbuff_t *tvb, proto_tree *tree, guint offset);
1754 * BACnetTimeValue ::= SEQUENCE {
1756 * value ABSTRACT-SYNTAX.&Type -- any primitive datatype, complex types cannot be decoded
1761 * @return modified offset
1764 fTimeValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1767 * BACnetVTSession ::= SEQUENCE {
1768 * local-vtSessionID Unsigned8,
1769 * remote-vtSessionID Unsigned8,
1770 * remote-vtAddress BACnetAddress
1775 * @return modified offset
1778 fVTSession (tvbuff_t *tvb, proto_tree *tree, guint offset);
1781 * BACnetWeekNDay ::= OCTET STRING (SIZE (3))
1782 * -- first octet month (1..12) January = 1, X'FF' = any month
1783 * -- second octet weekOfMonth where: 1 = days numbered 1-7
1784 * -- 2 = days numbered 8-14
1785 * -- 3 = days numbered 15-21
1786 * -- 4 = days numbered 22-28
1787 * -- 5 = days numbered 29-31
1788 * -- 6 = last 7 days of this month
1789 * -- X
\92FF
\92 = any week of this month
1790 * -- third octet dayOfWeek (1..7) where 1 = Monday
1792 * -- X'FF' = any day of week
1796 * @return modified offset
1799 fWeekNDay (tvbuff_t *tvb, proto_tree *tree, guint offset);
1802 * ReadAccessResult ::= SEQUENCE {
1803 * objectIdentifier [0] BACnetObjectIdentifier,
1804 * listOfResults [1] SEQUENCE OF SEQUENCE {
1805 * propertyIdentifier [2] BACnetPropertyIdentifier,
1806 * propertyArrayIndex [3] Unsigned OPTIONAL, -- used only with array datatype if omitted with an array the entire array is referenced
1807 * readResult CHOICE {
1808 * propertyValue [4] ABSTRACT-SYNTAX.&Type,
1809 * propertyAccessError [5] Error
1816 * @return modified offset
1819 fReadAccessResult (tvbuff_t *tvb, proto_tree *tree, guint offset);
1822 * ReadAccessSpecification ::= SEQUENCE {
1823 * objectIdentifier [0] BACnetObjectIdentifier,
1824 * listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference
1829 * @return modified offset
1832 fReadAccessSpecification (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1835 * WriteAccessSpecification ::= SEQUENCE {
1836 * objectIdentifier [0] BACnetObjectIdentifier,
1837 * listOfProperty [1] SEQUENCE OF BACnetPropertyValue
1842 * @return modified offset
1845 fWriteAccessSpecification (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1848 /********************************************************* Helper functions *******************************************/
1851 * extracts the tag number from the tag header.
1852 * @param tvb "TestyVirtualBuffer"
1853 * @param offset in actual tvb
1854 * @return Tag Number corresponding to BACnet 20.2.1.2 Tag Number
1857 fTagNo (tvbuff_t *tvb, guint offset);
1860 * splits Tag Header coresponding to 20.2.1 General Rules For BACnet Tags
1861 * @param tvb = "TestyVirtualBuffer"
1862 * @param offset = offset in actual tvb
1863 * @return tag_no BACnet 20.2.1.2 Tag Number
1864 * @return class_tag BACnet 20.2.1.1 Class
1865 * @return lvt BACnet 20.2.1.3 Length/Value/Type
1866 * @return offs = length of this header
1870 fTagHeader (tvbuff_t *tvb, guint offset, guint8 *tag_no, guint8* class_tag, guint32 *lvt);
1874 * adds processID with max 32Bit unsigned Integer Value to tree
1878 * @return modified offset
1881 fProcessId (tvbuff_t *tvb, proto_tree *tree, guint offset);
1884 * adds timeSpan with max 32Bit unsigned Integer Value to tree
1888 * @return modified offset
1891 fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1894 * BACnet Application PDUs chapter 21
1895 * BACnetPropertyIdentifier::= ENUMERATED {
1896 * @see bacapp_property_identifier
1901 * @param tt returnvalue of this item
1902 * @return modified offset
1905 fPropertyIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
1908 * listOfEventSummaries ::= SEQUENCE OF SEQUENCE {
1909 * objectIdentifier [0] BACnetObjectIdentifier,
1910 * eventState [1] BACnetEventState,
1911 * acknowledgedTransitions [2] BACnetEventTransitionBits,
1912 * eventTimeStamps [3] SEQURNCE SIZE (3) OF BACnetTimeStamps,
1913 * notifyType [4] BACnetNotifyType,
1914 * eventEnable [5] BACnetEventTransitionBits,
1915 * eventPriorities [6] SEQUENCE SIZE (3) OF Unsigned
1920 * @return modified offset
1923 flistOfEventSummaries (tvbuff_t *tvb, proto_tree *tree, guint offset);
1926 * SelectionCriteria ::= SEQUENCE {
1927 * propertyIdentifier [0] BACnetPropertyIdentifier,
1928 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatype
1929 * relationSpecifier [2] ENUMERATED { bacapp_relationSpecifier },
1930 * comparisonValue [3] ABSTRACT-SYNTAX.&Type
1935 * @return modified offset
1938 fSelectionCriteria (tvbuff_t *tvb, proto_tree *tree, guint offset);
1941 * objectSelectionCriteria ::= SEQUENCE {
1942 * selectionLogic [0] ENUMERATED { bacapp_selectionLogic },
1943 * listOfSelectionCriteria [1] SelectionCriteria
1948 * @return modified offset
1951 fObjectSelectionCriteria (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1954 * ObjectSpecifier ::= CHOICE {
1955 * objectType [0] BACnetObjectType,
1956 * objectIdentifier [1] BACnetObjectIdentifier
1961 * @return modified offset
1964 fObjectSpecifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
1967 * BACnet-Error ::= SEQUENCE {
1968 * error-class ENUMERATED {},
1969 * error-code ENUMERATED {}
1975 * @return modified offset
1978 fError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1981 * realizes some ABSTRACT-SYNTAX.&Type
1985 * @return modified offset
1986 * @todo beautify this ugly construct
1989 fAbstractSyntaxNType (tvbuff_t *tvb, proto_tree *tree, guint offset);
1995 proto_register_bacapp(void);
1998 * proto_reg_handoff_bacapp
2001 proto_reg_handoff_bacapp(void);
2004 * converts XXX coded strings to UTF-8 if iconv is allowed
2005 * else 'in' is copied to 'out'
2006 * @param in -- pointer to string
2007 * @param inbytesleft
2008 * @param out -- pointer to string
2009 * @param outbytesleft
2011 * @return count of modified characters of returned string, -1 for errors
2014 fConvertXXXtoUTF8(const guint8 *in, size_t *inbytesleft,guint8 *out, size_t *outbytesleft, const gchar *fromcoding);
2016 #endif /* __BACAPP_H__ */