2 * Routines for BACnet (APDU) dissection
3 * Copyright 2004, Herbert Lischka <lischka@kieback-peter.de>, Berlin
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
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.
33 #define min(a,b) (((a)<(b))?(a):(b))
37 #define max(a,b) (((a)>(b))?(a):(b))
41 #define FAULT proto_tree_add_text(subtree, tvb, offset, tvb_length(tvb) - offset, "something is going wrong here !!"); \
42 offset = tvb_length(tvb);
52 /* BACnet PDU Types */
53 #define BACAPP_TYPE_CONFIRMED_SERVICE_REQUEST 0
54 #define BACAPP_TYPE_UNCONFIRMED_SERVICE_REQUEST 1
55 #define BACAPP_TYPE_SIMPLE_ACK 2
56 #define BACAPP_TYPE_COMPLEX_ACK 3
57 #define BACAPP_TYPE_SEGMENT_ACK 4
58 #define BACAPP_TYPE_ERROR 5
59 #define BACAPP_TYPE_REJECT 6
60 #define BACAPP_TYPE_ABORT 7
61 #define MAX_BACAPP_TYPE 8
63 #define BACAPP_SEGMENTED_REQUEST 0x08
64 #define BACAPP_MORE_SEGMENTS 0x04
65 #define BACAPP_SEGMENTED_RESPONSE 0x02
66 #define BACAPP_SEGMENT_NAK 0x02
67 #define BACAPP_SENT_BY 0x01
71 * dissect_bacapp ::= CHOICE {
72 * confirmed-request-PDU [0] BACnet-Confirmed-Request-PDU,
73 * unconfirmed-request-PDU [1] BACnet-Unconfirmed-Request-PDU,
74 * simpleACK-PDU [2] BACnet-SimpleACK-PDU,
75 * complexACK-PDU [3] BACnet-ComplexACK-PDU,
76 * segmentACK-PDU [4] BACnet-SegmentACK-PDU,
77 * error-PDU [5] BACnet-Error-PDU,
78 * reject-PDU [6] BACnet-Reject-PDU,
79 * abort-PDU [7] BACnet-Abort-PDU
86 dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
89 * ConfirmedRequest-PDU ::= SEQUENCE {
90 * pdu-type [0] Unsigned (0..15), -- 0 for this PDU Type
91 * segmentedMessage [1] BOOLEAN,
92 * moreFollows [2] BOOLEAN,
93 * segmented-response-accepted [3] BOOLEAN,
94 * reserved [4] Unsigned (0..3), -- must be set zero
95 * max-segments-accepted [5] Unsigned (0..7), -- as per 20.1.2.4
96 * max-APDU-length-accepted [5] Unsigned (0..15), -- as per 20.1.2.5
97 * invokeID [6] Unsigned (0..255),
98 * sequence-number [7] Unsigned (0..255) OPTIONAL, -- only if segmented msg
99 * proposed-window-size [8] Unsigned (0..127) OPTIONAL, -- only if segmented msg
100 * service-choice [9] BACnetConfirmedServiceChoice,
101 * service-request [10] BACnet-Confirmed-Service-Request OPTIONAL
107 * @return modified offset
110 fConfirmedRequestPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
116 * @param ack - indocates whether working on request or ack
117 * @param svc - output variable to return service choice
118 * @param tt - output varable to return service choice item
119 * @return modified offset
122 fStartConfirmed(tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 ack,
123 gint *svc, proto_item **tt);
126 * Unconfirmed-Request-PDU ::= SEQUENCE {
127 * pdu-type [0] Unsigned (0..15), -- 1 for this PDU type
128 * reserved [1] Unsigned (0..15), -- must be set zero
129 * service-choice [2] BACnetUnconfirmedServiceChoice,
130 * service-request [3] BACnetUnconfirmedServiceRequest -- Context-specific tags 0..3 are NOT used in header encoding
135 * @return modified offset
138 fUnconfirmedRequestPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
141 * SimpleACK-PDU ::= SEQUENCE {
142 * pdu-type [0] Unsigned (0..15), -- 2 for this PDU type
143 * reserved [1] Unsigned (0..15), -- must be set zero
144 * invokeID [2] Unsigned (0..255),
145 * service-ACK-choice [3] BACnetUnconfirmedServiceChoice -- Context-specific tags 0..3 are NOT used in header encoding
150 * @return modified offset
153 fSimpleAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
156 * ComplexACK-PDU ::= SEQUENCE {
157 * pdu-type [0] Unsigned (0..15), -- 3 for this PDU Type
158 * segmentedMessage [1] BOOLEAN,
159 * moreFollows [2] BOOLEAN,
160 * reserved [3] Unsigned (0..3), -- must be set zero
161 * invokeID [4] Unsigned (0..255),
162 * sequence-number [5] Unsigned (0..255) OPTIONAL, -- only if segmented msg
163 * proposed-window-size [6] Unsigned (0..127) OPTIONAL, -- only if segmented msg
164 * service-ACK-choice [7] BACnetConfirmedServiceChoice,
165 * service-ACK [8] BACnet-Confirmed-Service-Request -- Context-specific tags 0..8 are NOT used in header encoding
170 * @return modified offset
173 fComplexAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
176 * SegmentACK-PDU ::= SEQUENCE {
177 * pdu-type [0] Unsigned (0..15), -- 4 for this PDU Type
178 * reserved [1] Unsigned (0..3), -- must be set zero
179 * negative-ACK [2] BOOLEAN,
180 * server [3] BOOLEAN,
181 * original-invokeID [4] Unsigned (0..255),
182 * sequence-number [5] Unsigned (0..255),
183 * actual-window-size [6] Unsigned (0..127)
188 * @return modified offset
191 fSegmentAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
194 * Error-PDU ::= SEQUENCE {
195 * pdu-type [0] Unsigned (0..15), -- 5 for this PDU Type
196 * reserved [1] Unsigned (0..3), -- must be set zero
197 * original-invokeID [2] Unsigned (0..255),
198 * error-choice [3] BACnetConfirmedServiceChoice,
199 * error [4] BACnet-Error
204 * @return modified offset
207 fErrorPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
210 * Reject-PDU ::= SEQUENCE {
211 * pdu-type [0] Unsigned (0..15), -- 6 for this PDU Type
212 * reserved [1] Unsigned (0..3), -- must be set zero
213 * original-invokeID [2] Unsigned (0..255),
214 * reject-reason [3] BACnetRejectReason
219 * @return modified offset
222 fRejectPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
225 * Abort-PDU ::= SEQUENCE {
226 * pdu-type [0] Unsigned (0..15), -- 7 for this PDU Type
227 * reserved [1] Unsigned (0..3), -- must be set zero
228 * server [2] BOOLEAN,
229 * original-invokeID [3] Unsigned (0..255),
230 * abort-reason [4] BACnetAbortReason
235 * @return modified offset
238 fAbortPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
241 * 20.2.4, adds the label with max 64Bit unsigned Integer Value to tree
246 * @return modified offset
249 fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
252 * 20.2.5, adds the label with max 64Bit signed Integer Value to tree
257 * @return modified offset
260 fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
263 * 20.2.8, adds the label with Octet String to tree; if lvt == 0 then lvt = restOfFrame
268 * @param lvt length of String
269 * @return modified offset
272 fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label, guint32 lvt);
275 * 20.2.12, adds the label with Date Value to tree
280 * @return modified offset
283 fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
286 * 20.2.13, adds the label with Time Value to tree
291 * @return modified offset
294 fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
297 * 20.2.14, adds Object Identifier to tree
298 * use BIG ENDIAN: Bits 31..22 Object Type, Bits 21..0 Instance Number
302 * @return modified offset
305 fObjectIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
308 * BACnet-Confirmed-Service-Request ::= CHOICE {
313 * @param service_choice
317 fConfirmedServiceRequest (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
320 * BACnet-Confirmed-Service-ACK ::= CHOICE {
325 * @param service_choice
329 fConfirmedServiceAck (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
332 * AcknowledgeAlarm-Request ::= SEQUENCE {
333 * acknowledgingProcessIdentifier [0] Unsigned32,
334 * eventObjectIdentifier [1] BACnetObjectIdentifer,
335 * eventStateAcknowledge [2] BACnetEventState,
336 * timeStamp [3] BACnetTimeStamp,
337 * acknowledgementSource [4] Character String,
338 * timeOfAcknowledgement [5] BACnetTimeStamp
343 * @return modified offset
346 fAcknowledgeAlarmRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
349 * ConfirmedCOVNotification-Request ::= SEQUENCE {
350 * subscriberProcessIdentifier [0] Unsigned32,
351 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
352 * monitoredObjectIdentifier [2] BACnetObjectIdentifer,
353 * timeRemaining [3] unsigned,
354 * listOfValues [4] SEQUENCE OF BACnetPropertyValues
359 * @return modified offset
362 fConfirmedCOVNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
365 * ConfirmedEventNotification-Request ::= SEQUENCE {
366 * ProcessIdentifier [0] Unsigned32,
367 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
368 * eventObjectIdentifier [2] BACnetObjectIdentifer,
369 * timeStamp [3] BACnetTimeStamp,
370 * notificationClass [4] unsigned,
371 * priority [5] unsigned8,
372 * eventType [6] BACnetEventType,
373 * messageText [7] CharacterString OPTIONAL,
374 * notifyType [8] BACnetNotifyType,
375 * ackRequired [9] BOOLEAN OPTIONAL,
376 * fromState [10] BACnetEventState OPTIONAL,
377 * toState [11] BACnetEventState,
378 * eventValues [12] BACnetNotificationParameters OPTIONAL
383 * @return modified offset
386 fConfirmedEventNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
389 * GetAlarmSummary-ACK ::= SEQUENCE OF SEQUENCE {
390 * objectIdentifier BACnetObjectIdentifer,
391 * alarmState BACnetEventState,
392 * acknowledgedTransitions BACnetEventTransitionBits
397 * @return modified offset
400 fGetAlarmSummaryAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
403 * GetEnrollmentSummary-Request ::= SEQUENCE {
404 * acknowledgmentFilter [0] ENUMERATED {
409 * enrollmentFilter [1] BACnetRecipientProcess OPTIONAL,
410 * eventStateFilter [2] ENUMERATED {
417 * eventTypeFilter [3] BACnetEventType OPTIONAL,
418 * priorityFilter [4] SEQUENCE {
419 * minPriority [0] Unsigned8,
420 * maxPriority [1] Unsigned8
422 * notificationClassFilter [5] Unsigned OPTIONAL
427 * @return modified offset
430 fGetEnrollmentSummaryRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
433 * GetEnrollmentSummary-ACK ::= SEQUENCE OF SEQUENCE {
434 * objectIdentifier BACnetObjectIdentifer,
435 * eventType BACnetEventType,
436 * eventState BACnetEventState,
437 * priority Unsigned8,
438 * notificationClass Unsigned OPTIONAL
443 * @return modified offset
446 fGetEnrollmentSummaryAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
449 * GetEventInformation-Request ::= SEQUENCE {
450 * lastReceivedObjectIdentifier [0] BACnetObjectIdentifer
455 * @return modified offset
458 fGetEventInformationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
461 * GetEventInformation-ACK ::= SEQUENCE {
462 * listOfEventSummaries [0] listOfEventSummaries,
463 * moreEvents [1] BOOLEAN
468 * @return modified offset
471 fGetEventInformationACK (tvbuff_t *tvb, proto_tree *tree, guint offset);
474 * LifeSafetyOperation-Request ::= SEQUENCE {
475 * requestingProcessIdentifier [0] Unsigned32
476 * requestingSource [1] CharacterString
477 * request [2] BACnetLifeSafetyOperation
478 * objectIdentifier [3] BACnetObjectIdentifier OPTIONAL
483 * @return modified offset
486 fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
489 * SubscribeCOV-Request ::= SEQUENCE {
490 * subscriberProcessIdentifier [0] Unsigned32
491 * monitoredObjectIdentifier [1] BACnetObjectIdentifier
492 * issueConfirmedNotifications [2] BOOLEAN OPTIONAL
493 * lifetime [3] Unsigned OPTIONAL
500 * @return modified offset
503 fSubscribeCOVRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
506 * SubscribeCOVProperty-Request ::= SEQUENCE {
507 * subscriberProcessIdentifier [0] Unsigned32
508 * monitoredObjectIdentifier [1] BACnetObjectIdentifier
509 * issueConfirmedNotifications [2] BOOLEAN OPTIONAL
510 * lifetime [3] Unsigned OPTIONAL
511 * monitoredPropertyIdentifier [4] BACnetPropertyReference OPTIONAL
512 * covIncrement [5] Unsigned OPTIONAL
517 * @return modified offset
520 fSubscribeCOVPropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
523 * AtomicReadFile-Request ::= SEQUENCE {
524 * fileIdentifier BACnetObjectIdentifier,
525 * accessMethod CHOICE {
526 * streamAccess [0] SEQUENCE {
527 * fileStartPosition INTEGER,
528 * requestedOctetCount Unsigned
530 * recordAccess [1] SEQUENCE {
531 * fileStartRecord INTEGER,
532 * requestedRecordCount Unsigned
539 * @return modified offset
542 fAtomicReadFileRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
545 * AtomicWriteFile-ACK ::= SEQUENCE {
547 * accessMethod CHOICE {
548 * streamAccess [0] SEQUENCE {
549 * fileStartPosition INTEGER,
550 * fileData OCTET STRING
552 * recordAccess [1] SEQUENCE {
553 * fileStartRecord INTEGER,
554 * returnedRecordCount Unsigned,
555 * fileRecordData SEQUENCE OF OCTET STRING
562 * @return modified offset
565 fAtomicReadFileAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
568 * AtomicWriteFile-Request ::= SEQUENCE {
569 * fileIdentifier BACnetObjectIdentifier,
570 * accessMethod CHOICE {
571 * streamAccess [0] SEQUENCE {
572 * fileStartPosition INTEGER,
573 * fileData OCTET STRING
575 * recordAccess [1] SEQUENCE {
576 * fileStartRecord INTEGER,
577 * recordCount Unsigned,
578 * fileRecordData SEQUENCE OF OCTET STRING
585 * @return modified offset
588 fAtomicWriteFileRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
591 * AtomicWriteFile-ACK ::= SEQUENCE {
592 * fileStartPosition [0] INTEGER,
593 * fileStartRecord [1] INTEGER,
598 * @return modified offset
601 fAtomicWriteFileAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
604 * AddListElement-Request ::= SEQUENCE {
605 * objectIdentifier [0] BACnetObjectIdentifier,
606 * propertyIdentifier [1] BACnetPropertyIdentifier,
607 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
608 * listOfElements [3] ABSTRACT-SYNTAX.&Type
613 * @return modified offset
616 fAddListElementRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
619 * CreateObject-Request ::= SEQUENCE {
620 * objectSpecifier [0] ObjectSpecifier,
621 * listOfInitialValues [1] SEQUENCE OF BACnetPropertyValue OPTIONAL
626 * @return modified offset
629 fCreateObjectRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
632 * CreateObject-Request ::= BACnetObjectIdentifier
636 * @return modified offset
639 fCreateObjectAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
642 * DeleteObject-Request ::= SEQUENCE {
643 * ObjectIdentifier BACnetObjectIdentifer
648 * @return modified offset
651 fDeleteObjectRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
654 * ReadProperty-Request ::= SEQUENCE {
655 * objectIdentifier [0] BACnetObjectIdentifier,
656 * propertyIdentifier [1] BACnetPropertyIdentifier,
657 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
662 * @return modified offset
665 fReadPropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
668 * ReadProperty-ACK ::= SEQUENCE {
669 * objectIdentifier [0] BACnetObjectIdentifier,
670 * propertyIdentifier [1] BACnetPropertyIdentifier,
671 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
672 * propertyValue [3] ABSTRACT-SYNTAX.&Type
677 * @return modified offset
680 fReadPropertyAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
683 * ReadPropertyConditional-Request ::= SEQUENCE {
684 * objectSelectionCriteria [0] objectSelectionCriteria,
685 * listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference OPTIONAL
690 * @return modified offset
693 fReadPropertyConditionalRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
696 * ReadPropertyConditional-ACK ::= SEQUENCE {
697 * listOfPReadAccessResults SEQUENCE OF ReadAccessResult OPTIONAL
702 * @return modified offset
705 fReadPropertyConditionalAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
708 * ReadPropertyMultiple-Request ::= SEQUENCE {
709 * listOfReadAccessSpecs SEQUENCE OF ReadAccessSpecification
714 * @return offset modified
717 fReadPropertyMultipleRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
720 * ReadPropertyMultiple-Ack ::= SEQUENCE {
721 * listOfReadAccessResults SEQUENCE OF ReadAccessResult
726 * @return offset modified
729 fReadPropertyMultipleAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
732 * ReadRange-Request ::= SEQUENCE {
733 * objectIdentifier [0] BACnetObjectIdentifier,
734 * propertyIdentifier [1] BACnetPropertyIdentifier,
735 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
737 * byPosition [3] SEQUENCE {
738 * referencedIndex Unsigned,
741 * byTime [4] SEQUENCE {
742 * referenceTime BACnetDateTime,
745 * timeRange [5] SEQUENCE {
746 * beginningTime BACnetDateTime,
747 * endingTime BACnetDateTime
754 * @return modified offset
757 fReadRangeRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
760 * ReadRange-ACK ::= SEQUENCE {
761 * objectIdentifier [0] BACnetObjectIdentifier,
762 * propertyIdentifier [1] BACnetPropertyIdentifier,
763 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
764 * resultFlags [3] BACnetResultFlags,
765 * itemCount [4] Unsigned,
766 * itemData [5] SEQUENCE OF ABSTRACT-SYNTAX.&Type
771 * @return modified offset
774 fReadRangeAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
777 * RemoveListElement-Request ::= SEQUENCE {
778 * objectIdentifier [0] BACnetObjectIdentifier,
779 * propertyIdentifier [1] BACnetPropertyIdentifier,
780 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
781 * listOfElements [3] ABSTRACT-SYNTAX.&Type
786 * @return modified offset
789 fRemoveListElementRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
792 * WriteProperty-Request ::= SEQUENCE {
793 * objectIdentifier [0] BACnetObjectIdentifier,
794 * propertyIdentifier [1] BACnetPropertyIdentifier,
795 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
796 * propertyValue [3] ABSTRACT-SYNTAX.&Type
797 * priority [4] Unsigned8 (1..16) OPTIONAL --used only when property is commandable
802 * @return modified offset
805 fWritePropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
808 * WritePropertyMultiple-Request ::= SEQUENCE {
809 * listOfWriteAccessSpecifications SEQUENCE OF WriteAccessSpecification
814 * @return modified offset
817 fWritePropertyMultipleRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
820 * DeviceCommunicationControl-Request ::= SEQUENCE {
821 * timeDuration [0] Unsigned16 OPTIONAL,
822 * enable-disable [1] ENUMERATED {
826 * password [2] CharacterString (SIZE(1..20)) OPTIONAL
831 * @return modified offset
834 fDeviceCommunicationControlRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
837 * ConfirmedPrivateTransfer-Request ::= SEQUENCE {
838 * vendorID [0] Unsigned,
839 * serviceNumber [1] Unsigned,
840 * serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
845 * @return modified offset
848 fConfirmedPrivateTransferRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
851 * ConfirmedPrivateTransfer-ACK ::= SEQUENCE {
852 * vendorID [0] Unsigned,
853 * serviceNumber [1] Unsigned,
854 * resultBlock [2] ABSTRACT-SYNTAX.&Type OPTIONAL
859 * @return modified offset
862 fConfirmedPrivateTransferAck(tvbuff_t *tvb, proto_tree *tree, guint offset);
865 * ConfirmedTextMessage-Request ::= SEQUENCE {
866 * textMessageSourceDevice [0] BACnetObjectIdentifier,
867 * messageClass [1] CHOICE {
868 * numeric [0] Unsigned,
869 * character [1] CharacterString
871 * messagePriority [2] ENUMERATED {
875 * message [3] CharacterString
880 * @return modified offset
883 fConfirmedTextMessageRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
886 * ReinitializeDevice-Request ::= SEQUENCE {
887 * reinitializedStateOfDevice [0] ENUMERATED {
896 * password [1] CharacterString (SIZE(1..20)) OPTIONAL
901 * @return modified offset
904 fReinitializeDeviceRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
907 * VTOpen-Request ::= SEQUENCE {
908 * vtClass BACnetVTClass,
909 * localVTSessionIdentifier Unsigned8
914 * @return modified offset
917 fVtOpenRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
920 * VTOpen-ACK ::= SEQUENCE {
921 * remoteVTSessionIdentifier Unsigned8
926 * @return modified offset
929 fVtOpenAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
932 * VTClose-Request ::= SEQUENCE {
933 * listOfRemoteVTSessionIdentifiers SEQUENCE OF Unsigned8
938 * @return modified offset
941 fVtCloseRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
944 * VTData-Request ::= SEQUENCE {
945 * vtSessionIdentifier Unsigned8,
946 * vtNewData OCTET STRING,
947 * vtDataFlag Unsigned (0..1)
952 * @return modified offset
955 fVtDataRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
958 * VTData-ACK ::= SEQUENCE {
959 * allNewDataAccepted [0] BOOLEAN,
960 * acceptedOctetCount [1] Unsigned OPTIONAL -- present only if allNewDataAccepted = FALSE
965 * @return modified offset
968 fVtDataAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
971 * Authenticate-Request ::= SEQUENCE {
972 * pseudoRandomNumber [0] Unsigned32,
973 * excpectedInvokeID [1] Unsigned8 OPTIONAL,
974 * operatorName [2] CharacterString OPTIONAL,
975 * operatorPassword [3] CharacterString (SIZE(1..20)) OPTIONAL,
976 * startEncypheredSession [4] BOOLEAN OPTIONAL
981 * @return modified offset
984 fAuthenticateRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
987 * Authenticate-ACK ::= SEQUENCE {
988 * modifiedRandomNumber Unsigned32,
993 * @return modified offset
996 fAuthenticateAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
999 * RequestKey-Request ::= SEQUENCE {
1000 * requestingDeviceIdentifier BACnetObjectIdentifier,
1001 * requestingDeviceAddress BACnetAddress,
1002 * remoteDeviceIdentifier BACnetObjectIdentifier,
1003 * remoteDeviceAddress BACnetAddress
1008 * @return modified offset
1011 fRequestKeyRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1014 * Unconfirmed-Service-Request ::= CHOICE {
1019 * @param service_choice
1020 * @return modified offset
1023 fUnconfirmedServiceRequest (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
1026 * UnconfirmedCOVNotification-Request ::= SEQUENCE {
1027 * subscriberProcessIdentifier [0] Unsigned32,
1028 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
1029 * monitoredObjectIdentifier [2] BACnetObjectIdentifer,
1030 * timeRemaining [3] unsigned,
1031 * listOfValues [4] SEQUENCE OF BACnetPropertyValues
1036 * @return modified offset
1039 fUnconfirmedCOVNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1042 * UnconfirmedEventNotification-Request ::= SEQUENCE {
1043 * ProcessIdentifier [0] Unsigned32,
1044 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
1045 * eventObjectIdentifier [2] BACnetObjectIdentifer,
1046 * timeStamp [3] BACnetTimeStamp,
1047 * notificationClass [4] unsigned,
1048 * priority [5] unsigned8,
1049 * eventType [6] BACnetEventType,
1050 * messageText [7] CharacterString OPTIONAL,
1051 * notifyType [8] BACnetNotifyType,
1052 * ackRequired [9] BOOLEAN OPTIONAL,
1053 * fromState [10] BACnetEventState OPTIONAL,
1054 * toState [11] BACnetEventState,
1055 * eventValues [12] BACnetNotificationParameters OPTIONAL
1060 * @return modified offset
1063 fUnconfirmedEventNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1066 * I-Am-Request ::= SEQUENCE {
1067 * aAmDeviceIdentifier BACnetObjectIdentifier,
1068 * maxAPDULengthAccepted Unsigned,
1069 * segmentationSupported BACnetSegmentation,
1075 * @return modified offset
1078 fIAmRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1082 * I-Have-Request ::= SEQUENCE {
1083 * deviceIdentifier BACnetObjectIdentifier,
1084 * objectIdentifier BACnetObjectIdentifier,
1085 * objectName CharacterString
1090 * @return modified offset
1093 fIHaveRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1096 * UnconfirmedPrivateTransfer-Request ::= SEQUENCE {
1097 * vendorID [0] Unsigned,
1098 * serviceNumber [1] Unsigned,
1099 * serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
1104 * @return modified offset
1107 fUnconfirmedPrivateTransferRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
1110 * UnconfirmedTextMessage-Request ::= SEQUENCE {
1111 * textMessageSourceDevice [0] BACnetObjectIdentifier,
1112 * messageClass [1] CHOICE {
1113 * numeric [0] Unsigned,
1114 * character [1] CharacterString
1116 * messagePriority [2] ENUMERATED {
1120 * message [3] CharacterString
1125 * @return modified offset
1128 fUnconfirmedTextMessageRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
1131 * TimeSynchronization-Request ::= SEQUENCE {
1137 * @return modified offset
1140 fTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1143 * UTCTimeSynchronization-Request ::= SEQUENCE {
1149 * @return modified offset
1152 fUTCTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1155 * Who-Has-Request ::= SEQUENCE {
1157 * deviceInstanceRangeLowLimit [0] Unsigned (0..4194303),
1158 * deviceInstanceRangeHighLimit [1] Unsigned (0..4194303)
1161 * objectIdentifier [2] BACnetObjectIdentifier,
1162 * objectName [3] CharacterString
1168 * @return modified offset
1171 fWhoHas (tvbuff_t *tvb, proto_tree *tree, guint offset);
1174 * Who-Is-Request ::= SEQUENCE {
1175 * deviceInstanceRangeLowLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
1176 * deviceInstanceRangeHighLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
1181 * @return modified offset
1184 fWhoIsRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1187 * BACnet-Error ::= CHOICE {
1188 * addListElement [8] ChangeList-Error,
1189 * removeListElement [9] ChangeList-Error,
1190 * writePropertyMultiple [16] WritePropertyMultiple-Error,
1191 * confirmedPrivatTransfer [18] ConfirmedPrivateTransfer-Error,
1192 * vtClose [22] VTClose-Error,
1193 * readRange [26] ObjectAccessService-Error
1200 * @return modified offset
1203 fBACnetError(tvbuff_t *tvb, proto_tree *tree, guint offset, guint service);
1206 * Dissect a BACnetError in a context tag
1211 * @return modified offset
1213 static guint fContextTaggedError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1216 * ChangeList-Error ::= SEQUENCE {
1217 * errorType [0] Error,
1218 * firstFailedElementNumber [1] Unsigned
1224 * @return modified offset
1227 fChangeListError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1230 * CreateObject-Error ::= SEQUENCE {
1231 * errorType [0] Error,
1232 * firstFailedElementNumber [1] Unsigned
1238 * @return modified offset
1241 fCreateObjectError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1244 * ConfirmedPrivateTransfer-Error ::= SEQUENCE {
1245 * errorType [0] Error,
1246 * vendorID [1] Unsigned,
1247 * serviceNumber [2] Unsigned,
1248 * errorParameters [3] ABSTRACT-SYNTAX.&Type OPTIONAL
1254 * @return modified offset
1257 fConfirmedPrivateTransferError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1260 * WritePropertyMultiple-Error ::= SEQUENCE {
1261 * errorType [0] Error,
1262 * firstFailedWriteAttempt [1] Unsigned
1268 * @return modified offset
1271 fWritePropertyMultipleError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1274 * VTClose-Error ::= SEQUENCE {
1275 * errorType [0] Error,
1276 * listOfVTSessionIdentifiers [1] SEQUENCE OF Unsigned8 OPTIONAL
1282 * @return modified offset
1285 fVTCloseError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1288 * BACnet Application Types chapter 20.2.1
1293 * @return modified offset
1296 fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1299 * BACnetActionCommand ::= SEQUENCE {
1300 * deviceIdentifier [0] BACnetObjectIdentifier OPTIONAL,
1301 * objectIdentifier [1] BACnetObjectIdentifier,
1302 * propertyIdentifier [2] BACnetPropertyIdentifier,
1303 * propertyArrayIndex [3] Unsigned OPTIONAL, -- used only with array datatype
1304 * propertyValue [4] ABSTRACT-SYNTAX.&Type,
1305 * priority [5] Unsigned (1..16) OPTIONAL, -- used only when property is commandable
1306 * postDelay [6] Unsigned OPTIONAL,
1307 * quitOnFailure [7] BOOLEAN,
1308 * writeSuccessful [8] BOOLEAN
1313 * @return modified offset
1316 fActionCommand (tvbuff_t *tvb, proto_tree *tree, guint offset);
1319 * BACnetActionList ::= SEQUENCE {
1320 * action [0] SEQUENCE of BACnetActionCommand
1325 * @return modified offset
1328 fActionList (tvbuff_t *tvb, proto_tree *tree, guint offset);
1330 /** BACnetAddress ::= SEQUENCE {
1331 * network-number Unsigned16, -- A value 0 indicates the local network
1332 * mac-address OCTET STRING -- A string of length 0 indicates a broadcast
1337 * @return modified offset
1340 fAddress (tvbuff_t *tvb, proto_tree *tree, guint offset);
1343 * BACnetAddressBinding ::= SEQUENCE {
1344 * deviceObjectID BACnetObjectIdentifier
1345 * deviceAddress BacnetAddress
1350 * @return modified offset
1353 fAddressBinding (tvbuff_t *tvb, proto_tree *tree, guint offset);
1356 * BACnetCalendaryEntry ::= CHOICE {
1358 * dateRange [1] BACnetDateRange,
1359 * weekNDay [2] BacnetWeekNday
1364 * @return modified offset
1367 fCalendaryEntry (tvbuff_t *tvb, proto_tree *tree, guint offset);
1371 * BACnetClientCOV ::= CHOICE {
1372 * real-increment REAL,
1373 * default-increment NULL
1378 * @return modified offset
1381 fClientCOV (tvbuff_t *tvb, proto_tree *tree, guint offset);
1385 * BACnetDailySchedule ::= SEQUENCE {
1386 * day-schedule [0] SENQUENCE OF BACnetTimeValue
1391 * @return modified offset
1394 fDailySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
1397 * BACnetWeeklySchedule ::= SEQUENCE {
1398 * week-schedule SENQUENCE SIZE (7) OF BACnetDailySchedule
1403 * @return modified offset
1406 fWeeklySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
1409 * BACnetDateRange ::= SEQUENCE {
1416 * @return modified offset
1419 fDateRange (tvbuff_t *tvb, proto_tree *tree, guint offset);
1422 * BACnetDateTime ::= SEQUENCE {
1430 * @return modified offset
1433 fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1437 * BACnetDestination ::= SEQUENCE {
1438 * validDays BACnetDaysOfWeek,
1441 * recipient BACnetRecipient,
1442 * processIdentifier Unsigned32,
1443 * issueConfirmedNotifications BOOLEAN,
1444 * transitions BACnetEventTransitionBits
1449 * @return modified offset
1452 fDestination (tvbuff_t *tvb, proto_tree *tree, guint offset);
1457 * BACnetDeviceObjectPropertyReference ::= SEQUENCE {
1458 * objectIdentifier [0] BACnetObjectIdentifier,
1459 * propertyIdentifier [1] BACnetPropertyIdentifier,
1460 * propertyArrayIndex [2] Unsigend OPTIONAL,
1461 * deviceIdentifier [3] BACnetObjectIdentifier OPTIONAL
1466 * @return modified offset
1469 fDeviceObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1472 * BACnetDeviceObjectReference ::= SEQUENCE {
1473 * deviceIdentifier [0] BACnetObjectIdentifier OPTIONAL,
1474 * objectIdentifier [1] BACnetObjectIdentifier
1479 * @return modified offset
1482 fDeviceObjectReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1486 * BACnetEventParameter ::= CHOICE {
1487 * change-of-bitstring [0] SEQUENCE {
1488 * time-delay [0] Unsigned,
1489 * bitmask [1] BIT STRING,
1490 * list-of-bitstring-values [2] SEQUENCE OF BIT STRING
1492 * change-of-state [1] SEQUENCE {
1493 * time-delay [0] Unsigned,
1494 * list-of-values [1] SEQUENCE OF BACnetPropertyStates
1496 * change-of-value [2] SEQUENCE {
1497 * time-delay [0] Unsigned,
1498 * cov-criteria [1] CHOICE {
1499 * bitmask [0] BIT STRING,
1500 * referenced-property-increment [1] REAL
1503 * command-failure [3] SEQUENCE {
1504 * time-delay [0] Unsigned,
1505 * feedback-property-reference [1] BACnetDeviceObjectPropertyReference
1507 * floating-limit [4] SEQUENCE {
1508 * time-delay [0] Unsigned,
1509 * setpoint-reference [1] BACnetDeviceObjectPropertyReference,
1510 * low-diff-limit [2] REAL,
1511 * high-diff-limit [3] REAL,
1514 * out-of-range [5] SEQUENCE {
1515 * time-delay [0] Unsigned,
1516 * low-limit [1] REAL,
1517 * high-limit [2] REAL,
1520 * buffer-ready [7] SEQUENCE {
1521 * notification-threshold [0] Unsigned,
1522 * previous-notification-count [1] Unsigned32
1524 * change-of-life-safety [8] SEQUENCE {
1525 * time-delay [0] Unsigned,
1526 * list-of-life-safety-alarm-values [1] SEQUENCE OF BACnetLifeSafetyState,
1527 * list-of-alarm-values [2] SEQUENCE OF BACnetLifeSafetyState,
1528 * mode-property-reference [3] BACnetDeviceObjectPropertyReference
1534 * @return modified offset
1537 fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset);
1543 * BACnetLogRecord ::= SEQUENCE {
1544 * timestamp [0] BACnetDateTime,
1545 * logDatum [1] CHOICE {
1546 * log-status [0] BACnetLogStatus,
1547 * boolean-value [1] BOOLEAN,
1548 * real-value [2] REAL,
1549 * enum-value [3] ENUMERATED, -- Optionally limited to 32 bits
1550 * unsigned-value [4] Unsigned, -- Optionally limited to 32 bits
1551 * signed-value [5] INTEGER, -- Optionally limited to 32 bits
1552 * bitstring-value [6] BIT STRING,-- Optionally limited to 32 bits
1553 * null-value [7] NULL,
1554 * failure [8] Error,
1555 * time-change [9] REAL,
1556 * any-value [10] ABSTRACT-SYNTAX.&Type -- Optional
1558 * statusFlags [2] BACnetStatusFlags OPTIONAL
1563 * @return modified offset
1566 fLogRecord (tvbuff_t *tvb, proto_tree *tree, guint offset);
1570 * BACnetNotificationParameters ::= CHOICE {
1571 * change-of-bitstring [0] SEQUENCE {
1572 * referenced-bitstring [0] BIT STRING,
1573 * status-flags [1] BACnetStatusFlags
1575 * change-of-state [1] SEQUENCE {
1576 * new-state [0] BACnetPropertyStatus,
1577 * status-flags [1] BACnetStatusFlags
1579 * change-of-value [2] SEQUENCE {
1580 * new-value [0] CHOICE {
1581 * changed-bits [0] BIT STRING,
1582 * changed-value [1] REAL
1584 * status-flags [1] BACnetStatusFlags
1586 * command-failure [3] SEQUENCE {
1587 * command-value [0] ABSTRACT-SYNTAX.&Type, -- depends on ref property
1588 * status-flags [1] BACnetStatusFlags
1589 * feedback-value [2] ABSTRACT-SYNTAX.&Type -- depends on ref property
1591 * floating-limit [4] SEQUENCE {
1592 * reference-value [0] REAL,
1593 * status-flags [1] BACnetStatusFlags
1594 * setpoint-value [2] REAL,
1595 * error-limit [3] REAL
1597 * out-of-range [5] SEQUENCE {
1598 * exceeding-value [0] REAL,
1599 * status-flags [1] BACnetStatusFlags
1600 * deadband [2] REAL,
1601 * exceeded-limit [0] REAL
1603 * complex-event-type [6] SEQUENCE OF BACnetPropertyValue,
1604 * buffer-ready [7] SEQUENCE {
1605 * buffer-device [0] BACnetObjectIdentifier,
1606 * buffer-object [1] BACnetObjectIdentifier
1607 * previous-notification [2] BACnetDateTime,
1608 * current-notification [3] BACnetDateTime
1610 * change-of-life-safety [8] SEQUENCE {
1611 * new-state [0] BACnetLifeSafetyState,
1612 * new-mode [1] BACnetLifeSafetyState
1613 * status-flags [2] BACnetStatusFlags,
1614 * operation-expected [3] BACnetLifeSafetyOperation
1620 * @return modified offset
1623 fNotificationParameters (tvbuff_t *tvb, proto_tree *tree, guint offset);
1626 * BACnetObjectPropertyReference ::= SEQUENCE {
1627 * objectIdentifier [0] BACnetObjectIdentifier,
1628 * propertyIdentifier [1] BACnetPropertyIdentifier,
1629 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
1634 * @return modified offset
1637 fBACnetObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1641 * BACnetObjectPropertyValue ::= SEQUENCE {
1642 * objectIdentifier [0] BACnetObjectIdentifier,
1643 * propertyIdentifier [1] BACnetPropertyIdentifier,
1644 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
1645 * -- if omitted with an array the entire array is referenced
1646 * value [3] ABSTRACT-SYNTAX.&Type, --any datatype appropriate for the specified property
1647 * priority [4] Unsigned (1..16) OPTIONAL
1652 * @return modified offset
1655 fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1659 * BACnetPriorityArray ::= SEQUENCE SIZE (16) OF BACnetPriorityValue
1663 * @return modified offset
1666 fPriorityArray (tvbuff_t *tvb, proto_tree *tree, guint offset);
1669 fPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 tagoffset, guint8 list);
1672 * BACnetPropertyReference ::= SEQUENCE {
1673 * propertyIdentifier [0] BACnetPropertyIdentifier,
1674 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatype
1679 * @return modified offset
1682 fBACnetPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 list);
1685 fBACnetObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1688 fLOPR (tvbuff_t *tvb, proto_tree *tree, guint offset);
1691 fRestartReason (tvbuff_t *tvb, proto_tree *tree, guint offset);
1694 * BACnetPropertyValue ::= SEQUENCE {
1695 * PropertyIdentifier [0] BACnetPropertyIdentifier,
1696 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatypes
1697 * -- if omitted with an array the entire array is referenced
1698 * value [2] ABSTRACT-SYNTAX.&Type, -- any datatype appropriate for the specified property
1699 * priority [3] Unsigned (1..16) OPTIONAL -- used only when property is commandable
1704 * @return modified offset
1707 fBACnetPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1710 fPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 tagoffset);
1713 * BACnet Application PDUs chapter 21
1714 * BACnetRecipient::= CHOICE {
1715 * device [0] BACnetObjectIdentifier
1716 * address [1] BACnetAddress
1721 * @return modified offset
1724 fRecipient (tvbuff_t *tvb, proto_tree *tree, guint offset);
1727 * BACnet Application PDUs chapter 21
1728 * BACnetRecipientProcess::= SEQUENCE {
1729 * recipient [0] BACnetRecipient
1730 * processID [1] Unsigned32
1735 * @return modified offset
1738 fRecipientProcess (tvbuff_t *tvb, proto_tree *tree, guint offset);
1742 * BACnetSessionKey ::= SEQUENCE {
1743 * sessionKey OCTET STRING (SIZE(8)), -- 56 bits for key, 8 bits for checksum
1744 * peerAddress BACnetAddress
1749 * @return modified offset
1750 * @todo check if checksum is displayed correctly
1753 fSessionKey (tvbuff_t *tvb, proto_tree *tree, guint offset);
1758 * BACnetSetpointReference ::= SEQUENCE {
1759 * sessionKey [0] BACnetObjectPropertyReference OPTIONAL
1764 * @return modified offset
1767 fSetpointReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1771 * BACnetSpecialEvent ::= SEQUENCE {
1773 * calendarEntry [0] BACnetCalendarEntry,
1774 * calendarRefernce [1] BACnetObjectIdentifier
1776 * listOfTimeValues [2] SEQUENCE OF BACnetTimeValue,
1777 * eventPriority [3] Unsigned (1..16)
1782 * @return modified offset
1785 fSpecialEvent (tvbuff_t *tvb, proto_tree *tree, guint offset);
1788 * BACnetTimeStamp ::= CHOICE {
1790 * sequenceNumber [1] Unsigned (0..65535),
1791 * dateTime [2] BACnetDateTime
1797 * @return modified offset
1800 fTimeStamp (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1803 * BACnetTimeValue ::= SEQUENCE {
1805 * value ABSTRACT-SYNTAX.&Type -- any primitive datatype, complex types cannot be decoded
1810 * @return modified offset
1813 fTimeValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1817 * BACnetVTSession ::= SEQUENCE {
1818 * local-vtSessionID Unsigned8,
1819 * remote-vtSessionID Unsigned8,
1820 * remote-vtAddress BACnetAddress
1825 * @return modified offset
1828 fVTSession (tvbuff_t *tvb, proto_tree *tree, guint offset);
1832 * BACnetWeekNDay ::= OCTET STRING (SIZE (3))
1833 * -- first octet month (1..12) January = 1, X'FF' = any month
1834 * -- second octet weekOfMonth where: 1 = days numbered 1-7
1835 * -- 2 = days numbered 8-14
1836 * -- 3 = days numbered 15-21
1837 * -- 4 = days numbered 22-28
1838 * -- 5 = days numbered 29-31
1839 * -- 6 = last 7 days of this month
1840 * -- X'FF' = any week of this month
1841 * -- third octet dayOfWeek (1..7) where 1 = Monday
1843 * -- X'FF' = any day of week
1847 * @return modified offset
1850 fWeekNDay (tvbuff_t *tvb, proto_tree *tree, guint offset);
1853 * ReadAccessResult ::= SEQUENCE {
1854 * objectIdentifier [0] BACnetObjectIdentifier,
1855 * listOfResults [1] SEQUENCE OF SEQUENCE {
1856 * propertyIdentifier [2] BACnetPropertyIdentifier,
1857 * propertyArrayIndex [3] Unsigned OPTIONAL, -- used only with array datatype if omitted with an array the entire array is referenced
1858 * readResult CHOICE {
1859 * propertyValue [4] ABSTRACT-SYNTAX.&Type,
1860 * propertyAccessError [5] Error
1867 * @return modified offset
1870 fReadAccessResult (tvbuff_t *tvb, proto_tree *tree, guint offset);
1873 * ReadAccessSpecification ::= SEQUENCE {
1874 * objectIdentifier [0] BACnetObjectIdentifier,
1875 * listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference
1880 * @return modified offset
1883 fReadAccessSpecification (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1886 * WriteAccessSpecification ::= SEQUENCE {
1887 * objectIdentifier [0] BACnetObjectIdentifier,
1888 * listOfProperty [1] SEQUENCE OF BACnetPropertyValue
1893 * @return modified offset
1896 fWriteAccessSpecification (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1899 /********************************************************* Helper functions *******************************************/
1902 * extracts the tag number from the tag header.
1903 * @param tvb "TestyVirtualBuffer"
1904 * @param offset in actual tvb
1905 * @return Tag Number corresponding to BACnet 20.2.1.2 Tag Number
1908 fTagNo (tvbuff_t *tvb, guint offset);
1911 * splits Tag Header coresponding to 20.2.1 General Rules For BACnet Tags
1912 * @param tvb = "TestyVirtualBuffer"
1913 * @param offset = offset in actual tvb
1914 * @return tag_no BACnet 20.2.1.2 Tag Number
1915 * @return class_tag BACnet 20.2.1.1 Class
1916 * @return lvt BACnet 20.2.1.3 Length/Value/Type
1917 * @return offs = length of this header
1921 fTagHeader (tvbuff_t *tvb, guint offset, guint8 *tag_no, guint8* class_tag, guint32 *lvt);
1925 * adds processID with max 32Bit unsigned Integer Value to tree
1929 * @return modified offset
1932 fProcessId (tvbuff_t *tvb, proto_tree *tree, guint offset);
1935 * adds timeSpan with max 32Bit unsigned Integer Value to tree
1939 * @return modified offset
1942 fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1945 * BACnet Application PDUs chapter 21
1946 * BACnetPropertyIdentifier::= ENUMERATED {
1947 * @see bacapp_property_identifier
1952 * @param tt returnvalue of this item
1953 * @return modified offset
1956 fPropertyIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
1959 * BACnet Application PDUs chapter 21
1960 * BACnetPropertyArrayIndex::= ENUMERATED {
1961 * @see bacapp_property_array_index
1966 * @param tt returnvalue of this item
1967 * @return modified offset
1970 fPropertyArrayIndex (tvbuff_t *tvb, proto_tree *tree, guint offset);
1973 * listOfEventSummaries ::= SEQUENCE OF SEQUENCE {
1974 * objectIdentifier [0] BACnetObjectIdentifier,
1975 * eventState [1] BACnetEventState,
1976 * acknowledgedTransitions [2] BACnetEventTransitionBits,
1977 * eventTimeStamps [3] SEQURNCE SIZE (3) OF BACnetTimeStamps,
1978 * notifyType [4] BACnetNotifyType,
1979 * eventEnable [5] BACnetEventTransitionBits,
1980 * eventPriorities [6] SEQUENCE SIZE (3) OF Unsigned
1985 * @return modified offset
1988 flistOfEventSummaries (tvbuff_t *tvb, proto_tree *tree, guint offset);
1991 * SelectionCriteria ::= SEQUENCE {
1992 * propertyIdentifier [0] BACnetPropertyIdentifier,
1993 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatype
1994 * relationSpecifier [2] ENUMERATED { bacapp_relationSpecifier },
1995 * comparisonValue [3] ABSTRACT-SYNTAX.&Type
2000 * @return modified offset
2003 fSelectionCriteria (tvbuff_t *tvb, proto_tree *tree, guint offset);
2006 * objectSelectionCriteria ::= SEQUENCE {
2007 * selectionLogic [0] ENUMERATED { bacapp_selectionLogic },
2008 * listOfSelectionCriteria [1] SelectionCriteria
2013 * @return modified offset
2016 fObjectSelectionCriteria (tvbuff_t *tvb, proto_tree *subtree, guint offset);
2019 * BACnet-Error ::= SEQUENCE {
2020 * error-class ENUMERATED {},
2021 * error-code ENUMERATED {}
2027 * @return modified offset
2030 fError(tvbuff_t *tvb, proto_tree *tree, guint offset);
2033 * Generic handler for context tagged values. Mostly for handling
2034 * vendor-defined properties and services.
2038 * @return modified offset
2039 * @todo beautify this ugly construct
2042 fContextTaggedValue(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
2045 * realizes some ABSTRACT-SYNTAX.&Type
2049 * @return modified offset
2050 * @todo beautify this ugly construct
2053 fAbstractSyntaxNType (tvbuff_t *tvb, proto_tree *tree, guint offset);
2059 proto_register_bacapp(void);
2062 * proto_reg_handoff_bacapp
2065 proto_reg_handoff_bacapp(void);
2068 * converts XXX coded strings to UTF-8
2069 * else 'in' is copied to 'out'
2070 * @param in -- pointer to string
2071 * @param inbytesleft
2072 * @param out -- pointer to string
2073 * @param outbytesleft
2075 * @return count of modified characters of returned string, -1 for errors
2078 fConvertXXXtoUTF8(gchar *in, gsize *inbytesleft, gchar *out, gsize *outbytesleft, const gchar *fromcoding);
2081 uni_to_string(char * data, gsize str_length, char *dest_buf);
2083 #endif /* __BACAPP_H__ */