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);
130 * @param ack - indocates whether working on request or ack
131 * @param svc - output variable to return service choice
132 * @param tt - output varable to return service choice item
133 * @return modified offset
136 fStartConfirmed(tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 ack,
137 gint *svc, proto_item **tt);
140 * Unconfirmed-Request-PDU ::= SEQUENCE {
141 * pdu-type [0] Unsigned (0..15), -- 1 for this PDU type
142 * reserved [1] Unsigned (0..15), -- must be set zero
143 * service-choice [2] BACnetUnconfirmedServiceChoice,
144 * service-request [3] BACnetUnconfirmedServiceRequest -- Context-specific tags 0..3 are NOT used in header encoding
149 * @return modified offset
152 fUnconfirmedRequestPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
155 * SimpleACK-PDU ::= SEQUENCE {
156 * pdu-type [0] Unsigned (0..15), -- 2 for this PDU type
157 * reserved [1] Unsigned (0..15), -- must be set zero
158 * invokeID [2] Unsigned (0..255),
159 * service-ACK-choice [3] BACnetUnconfirmedServiceChoice -- Context-specific tags 0..3 are NOT used in header encoding
164 * @return modified offset
167 fSimpleAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
170 * ComplexACK-PDU ::= SEQUENCE {
171 * pdu-type [0] Unsigned (0..15), -- 3 for this PDU Type
172 * segmentedMessage [1] BOOLEAN,
173 * moreFollows [2] BOOLEAN,
174 * reserved [3] Unsigned (0..3), -- must be set zero
175 * invokeID [4] Unsigned (0..255),
176 * sequence-number [5] Unsigned (0..255) OPTIONAL, -- only if segmented msg
177 * proposed-window-size [6] Unsigned (0..127) OPTIONAL, -- only if segmented msg
178 * service-ACK-choice [7] BACnetConfirmedServiceChoice,
179 * service-ACK [8] BACnet-Confirmed-Service-Request -- Context-specific tags 0..8 are NOT used in header encoding
184 * @return modified offset
187 fComplexAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
190 * SegmentACK-PDU ::= SEQUENCE {
191 * pdu-type [0] Unsigned (0..15), -- 4 for this PDU Type
192 * reserved [1] Unsigned (0..3), -- must be set zero
193 * negative-ACK [2] BOOLEAN,
194 * server [3] BOOLEAN,
195 * original-invokeID [4] Unsigned (0..255),
196 * sequence-number [5] Unsigned (0..255),
197 * actual-window-size [6] Unsigned (0..127)
202 * @return modified offset
205 fSegmentAckPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
208 * Error-PDU ::= SEQUENCE {
209 * pdu-type [0] Unsigned (0..15), -- 5 for this PDU Type
210 * reserved [1] Unsigned (0..3), -- must be set zero
211 * original-invokeID [2] Unsigned (0..255),
212 * error-choice [3] BACnetConfirmedServiceChoice,
213 * error [4] BACnet-Error
218 * @return modified offset
221 fErrorPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
224 * Reject-PDU ::= SEQUENCE {
225 * pdu-type [0] Unsigned (0..15), -- 6 for this PDU Type
226 * reserved [1] Unsigned (0..3), -- must be set zero
227 * original-invokeID [2] Unsigned (0..255),
228 * reject-reason [3] BACnetRejectReason
233 * @return modified offset
236 fRejectPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
239 * Abort-PDU ::= SEQUENCE {
240 * pdu-type [0] Unsigned (0..15), -- 7 for this PDU Type
241 * reserved [1] Unsigned (0..3), -- must be set zero
242 * server [2] BOOLEAN,
243 * original-invokeID [3] Unsigned (0..255),
244 * abort-reason [4] BACnetAbortReason
249 * @return modified offset
252 fAbortPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
255 * 20.2.4, adds the label with max 64Bit unsigned Integer Value to tree
260 * @return modified offset
263 fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
266 * 20.2.5, adds the label with max 64Bit signed Integer Value to tree
271 * @return modified offset
274 fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
277 * 20.2.8, adds the label with Octet String to tree; if lvt == 0 then lvt = restOfFrame
282 * @param lvt length of String
283 * @return modified offset
286 fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label, guint32 lvt);
289 * 20.2.12, adds the label with Date Value to tree
294 * @return modified offset
297 fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
300 * 20.2.13, adds the label with Time Value to tree
305 * @return modified offset
308 fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
311 * 20.2.14, adds Object Identifier to tree
312 * use BIG ENDIAN: Bits 31..22 Object Type, Bits 21..0 Instance Number
316 * @return modified offset
319 fObjectIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
322 * BACnet-Confirmed-Service-Request ::= CHOICE {
327 * @param service_choice
331 fConfirmedServiceRequest (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
334 * BACnet-Confirmed-Service-ACK ::= CHOICE {
339 * @param service_choice
343 fConfirmedServiceAck (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
346 * AcknowledgeAlarm-Request ::= SEQUENCE {
347 * acknowledgingProcessIdentifier [0] Unsigned32,
348 * eventObjectIdentifier [1] BACnetObjectIdentifer,
349 * eventStateAcknowledge [2] BACnetEventState,
350 * timeStamp [3] BACnetTimeStamp,
351 * acknowledgementSource [4] Character String,
352 * timeOfAcknowledgement [5] BACnetTimeStamp
357 * @return modified offset
360 fAcknowledgeAlarmRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
363 * ConfirmedCOVNotification-Request ::= SEQUENCE {
364 * subscriberProcessIdentifier [0] Unsigned32,
365 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
366 * monitoredObjectIdentifier [2] BACnetObjectIdentifer,
367 * timeRemaining [3] unsigned,
368 * listOfValues [4] SEQUENCE OF BACnetPropertyValues
373 * @return modified offset
376 fConfirmedCOVNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
379 * ConfirmedEventNotification-Request ::= SEQUENCE {
380 * ProcessIdentifier [0] Unsigned32,
381 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
382 * eventObjectIdentifier [2] BACnetObjectIdentifer,
383 * timeStamp [3] BACnetTimeStamp,
384 * notificationClass [4] unsigned,
385 * priority [5] unsigned8,
386 * eventType [6] BACnetEventType,
387 * messageText [7] CharacterString OPTIONAL,
388 * notifyType [8] BACnetNotifyType,
389 * ackRequired [9] BOOLEAN OPTIONAL,
390 * fromState [10] BACnetEventState OPTIONAL,
391 * toState [11] BACnetEventState,
392 * eventValues [12] BACnetNotificationParameters OPTIONAL
397 * @return modified offset
400 fConfirmedEventNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
403 * GetAlarmSummary-ACK ::= SEQUENCE OF SEQUENCE {
404 * objectIdentifier BACnetObjectIdentifer,
405 * alarmState BACnetEventState,
406 * acknowledgedTransitions BACnetEventTransitionBits
411 * @return modified offset
414 fGetAlarmSummaryAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
417 * GetEnrollmentSummary-Request ::= SEQUENCE {
418 * acknowledgmentFilter [0] ENUMERATED {
423 * enrollmentFilter [1] BACnetRecipientProcess OPTIONAL,
424 * eventStateFilter [2] ENUMERATED {
431 * eventTypeFilter [3] BACnetEventType OPTIONAL,
432 * priorityFilter [4] SEQUENCE {
433 * minPriority [0] Unsigned8,
434 * maxPriority [1] Unsigned8
436 * notificationClassFilter [5] Unsigned OPTIONAL
441 * @return modified offset
444 fGetEnrollmentSummaryRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
447 * GetEnrollmentSummary-ACK ::= SEQUENCE OF SEQUENCE {
448 * objectIdentifier BACnetObjectIdentifer,
449 * eventType BACnetEventType,
450 * eventState BACnetEventState,
451 * priority Unsigned8,
452 * notificationClass Unsigned OPTIONAL
457 * @return modified offset
460 fGetEnrollmentSummaryAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
463 * GetEventInformation-Request ::= SEQUENCE {
464 * lastReceivedObjectIdentifier [0] BACnetObjectIdentifer
469 * @return modified offset
472 fGetEventInformationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
475 * GetEventInformation-ACK ::= SEQUENCE {
476 * listOfEventSummaries [0] listOfEventSummaries,
477 * moreEvents [1] BOOLEAN
482 * @return modified offset
485 fGetEventInformationACK (tvbuff_t *tvb, proto_tree *tree, guint offset);
488 * LifeSafetyOperation-Request ::= SEQUENCE {
489 * requestingProcessIdentifier [0] Unsigned32
490 * requestingSource [1] CharacterString
491 * request [2] BACnetLifeSafetyOperation
492 * objectIdentifier [3] BACnetObjectIdentifier OPTIONAL
497 * @return modified offset
500 fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
503 * SubscribeCOV-Request ::= SEQUENCE {
504 * subscriberProcessIdentifier [0] Unsigned32
505 * monitoredObjectIdentifier [1] BACnetObjectIdentifier
506 * issueConfirmedNotifications [2] BOOLEAN OPTIONAL
507 * lifetime [3] Unsigned OPTIONAL
514 * @return modified offset
517 fSubscribeCOVRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
520 * SubscribeCOVProperty-Request ::= SEQUENCE {
521 * subscriberProcessIdentifier [0] Unsigned32
522 * monitoredObjectIdentifier [1] BACnetObjectIdentifier
523 * issueConfirmedNotifications [2] BOOLEAN OPTIONAL
524 * lifetime [3] Unsigned OPTIONAL
525 * monitoredPropertyIdentifier [4] BACnetPropertyReference OPTIONAL
526 * covIncrement [5] Unsigned OPTIONAL
531 * @return modified offset
534 fSubscribeCOVPropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
537 * AtomicReadFile-Request ::= SEQUENCE {
538 * fileIdentifier BACnetObjectIdentifier,
539 * accessMethod CHOICE {
540 * streamAccess [0] SEQUENCE {
541 * fileStartPosition INTEGER,
542 * requestedOctetCount Unsigned
544 * recordAccess [1] SEQUENCE {
545 * fileStartRecord INTEGER,
546 * requestedRecordCount Unsigned
553 * @return modified offset
556 fAtomicReadFileRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
559 * AtomicWriteFile-ACK ::= SEQUENCE {
561 * accessMethod CHOICE {
562 * streamAccess [0] SEQUENCE {
563 * fileStartPosition INTEGER,
564 * fileData OCTET STRING
566 * recordAccess [1] SEQUENCE {
567 * fileStartRecord INTEGER,
568 * returnedRecordCount Unsigned,
569 * fileRecordData SEQUENCE OF OCTET STRING
576 * @return modified offset
579 fAtomicReadFileAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
582 * AtomicWriteFile-Request ::= SEQUENCE {
583 * fileIdentifier BACnetObjectIdentifier,
584 * accessMethod CHOICE {
585 * streamAccess [0] SEQUENCE {
586 * fileStartPosition INTEGER,
587 * fileData OCTET STRING
589 * recordAccess [1] SEQUENCE {
590 * fileStartRecord INTEGER,
591 * recordCount Unsigned,
592 * fileRecordData SEQUENCE OF OCTET STRING
599 * @return modified offset
602 fAtomicWriteFileRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
605 * AtomicWriteFile-ACK ::= SEQUENCE {
606 * fileStartPosition [0] INTEGER,
607 * fileStartRecord [1] INTEGER,
612 * @return modified offset
615 fAtomicWriteFileAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
618 * AddListElement-Request ::= SEQUENCE {
619 * objectIdentifier [0] BACnetObjectIdentifier,
620 * propertyIdentifier [1] BACnetPropertyIdentifier,
621 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
622 * listOfElements [3] ABSTRACT-SYNTAX.&Type
627 * @return modified offset
630 fAddListElementRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
633 * CreateObject-Request ::= SEQUENCE {
634 * objectSpecifier [0] ObjectSpecifier,
635 * listOfInitialValues [1] SEQUENCE OF BACnetPropertyValue OPTIONAL
640 * @return modified offset
643 fCreateObjectRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
646 * CreateObject-Request ::= BACnetObjectIdentifier
650 * @return modified offset
653 fCreateObjectAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
656 * DeleteObject-Request ::= SEQUENCE {
657 * ObjectIdentifier BACnetObjectIdentifer
662 * @return modified offset
665 fDeleteObjectRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
668 * ReadProperty-Request ::= SEQUENCE {
669 * objectIdentifier [0] BACnetObjectIdentifier,
670 * propertyIdentifier [1] BACnetPropertyIdentifier,
671 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
676 * @return modified offset
679 fReadPropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
682 * ReadProperty-ACK ::= SEQUENCE {
683 * objectIdentifier [0] BACnetObjectIdentifier,
684 * propertyIdentifier [1] BACnetPropertyIdentifier,
685 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
686 * propertyValue [3] ABSTRACT-SYNTAX.&Type
691 * @return modified offset
694 fReadPropertyAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
697 * ReadPropertyConditional-Request ::= SEQUENCE {
698 * objectSelectionCriteria [0] objectSelectionCriteria,
699 * listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference OPTIONAL
704 * @return modified offset
707 fReadPropertyConditionalRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
710 * ReadPropertyConditional-ACK ::= SEQUENCE {
711 * listOfPReadAccessResults SEQUENCE OF ReadAccessResult OPTIONAL
716 * @return modified offset
719 fReadPropertyConditionalAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
722 * ReadPropertyMultiple-Request ::= SEQUENCE {
723 * listOfReadAccessSpecs SEQUENCE OF ReadAccessSpecification
728 * @return offset modified
731 fReadPropertyMultipleRequest(tvbuff_t *tvb, proto_tree *subtree, guint offset);
734 * ReadPropertyMultiple-Ack ::= SEQUENCE {
735 * listOfReadAccessResults SEQUENCE OF ReadAccessResult
740 * @return offset modified
743 fReadPropertyMultipleAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
746 * ReadRange-Request ::= SEQUENCE {
747 * objectIdentifier [0] BACnetObjectIdentifier,
748 * propertyIdentifier [1] BACnetPropertyIdentifier,
749 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
751 * byPosition [3] SEQUENCE {
752 * referencedIndex Unsigned,
755 * byTime [4] SEQUENCE {
756 * referenceTime BACnetDateTime,
759 * timeRange [5] SEQUENCE {
760 * beginningTime BACnetDateTime,
761 * endingTime BACnetDateTime
768 * @return modified offset
771 fReadRangeRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
774 * ReadRange-ACK ::= SEQUENCE {
775 * objectIdentifier [0] BACnetObjectIdentifier,
776 * propertyIdentifier [1] BACnetPropertyIdentifier,
777 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
778 * resultFlags [3] BACnetResultFlags,
779 * itemCount [4] Unsigned,
780 * itemData [5] SEQUENCE OF ABSTRACT-SYNTAX.&Type
785 * @return modified offset
788 fReadRangeAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
791 * RemoveListElement-Request ::= SEQUENCE {
792 * objectIdentifier [0] BACnetObjectIdentifier,
793 * propertyIdentifier [1] BACnetPropertyIdentifier,
794 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
795 * listOfElements [3] ABSTRACT-SYNTAX.&Type
800 * @return modified offset
803 fRemoveListElementRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
806 * WriteProperty-Request ::= SEQUENCE {
807 * objectIdentifier [0] BACnetObjectIdentifier,
808 * propertyIdentifier [1] BACnetPropertyIdentifier,
809 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
810 * propertyValue [3] ABSTRACT-SYNTAX.&Type
811 * priority [4] Unsigned8 (1..16) OPTIONAL --used only when property is commandable
816 * @return modified offset
819 fWritePropertyRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
822 * WritePropertyMultiple-Request ::= SEQUENCE {
823 * listOfWriteAccessSpecifications SEQUENCE OF WriteAccessSpecification
828 * @return modified offset
831 fWritePropertyMultipleRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
834 * DeviceCommunicationControl-Request ::= SEQUENCE {
835 * timeDuration [0] Unsigned16 OPTIONAL,
836 * enable-disable [1] ENUMERATED {
840 * password [2] CharacterString (SIZE(1..20)) OPTIONAL
845 * @return modified offset
848 fDeviceCommunicationControlRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
851 * ConfirmedPrivateTransfer-Request ::= SEQUENCE {
852 * vendorID [0] Unsigned,
853 * serviceNumber [1] Unsigned,
854 * serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
859 * @return modified offset
862 fConfirmedPrivateTransferRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
865 * ConfirmedPrivateTransfer-ACK ::= SEQUENCE {
866 * vendorID [0] Unsigned,
867 * serviceNumber [1] Unsigned,
868 * resultBlock [2] ABSTRACT-SYNTAX.&Type OPTIONAL
873 * @return modified offset
876 fConfirmedPrivateTransferAck(tvbuff_t *tvb, proto_tree *tree, guint offset);
879 * ConfirmedTextMessage-Request ::= SEQUENCE {
880 * textMessageSourceDevice [0] BACnetObjectIdentifier,
881 * messageClass [1] CHOICE {
882 * numeric [0] Unsigned,
883 * character [1] CharacterString
885 * messagePriority [2] ENUMERATED {
889 * message [3] CharacterString
894 * @return modified offset
897 fConfirmedTextMessageRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
900 * ReinitializeDevice-Request ::= SEQUENCE {
901 * reinitializedStateOfDevice [0] ENUMERATED {
910 * password [1] CharacterString (SIZE(1..20)) OPTIONAL
915 * @return modified offset
918 fReinitializeDeviceRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
921 * VTOpen-Request ::= SEQUENCE {
922 * vtClass BACnetVTClass,
923 * localVTSessionIdentifier Unsigned8
928 * @return modified offset
931 fVtOpenRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
934 * VTOpen-ACK ::= SEQUENCE {
935 * remoteVTSessionIdentifier Unsigned8
940 * @return modified offset
943 fVtOpenAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
946 * VTClose-Request ::= SEQUENCE {
947 * listOfRemoteVTSessionIdentifiers SEQUENCE OF Unsigned8
952 * @return modified offset
955 fVtCloseRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
958 * VTData-Request ::= SEQUENCE {
959 * vtSessionIdentifier Unsigned8,
960 * vtNewData OCTET STRING,
961 * vtDataFlag Unsigned (0..1)
966 * @return modified offset
969 fVtDataRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
972 * VTData-ACK ::= SEQUENCE {
973 * allNewDataAccepted [0] BOOLEAN,
974 * acceptedOctetCount [1] Unsigned OPTIONAL -- present only if allNewDataAccepted = FALSE
979 * @return modified offset
982 fVtDataAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
985 * Authenticate-Request ::= SEQUENCE {
986 * pseudoRandomNumber [0] Unsigned32,
987 * excpectedInvokeID [1] Unsigned8 OPTIONAL,
988 * operatorName [2] CharacterString OPTIONAL,
989 * operatorPassword [3] CharacterString (SIZE(1..20)) OPTIONAL,
990 * startEncypheredSession [4] BOOLEAN OPTIONAL
995 * @return modified offset
998 fAuthenticateRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1001 * Authenticate-ACK ::= SEQUENCE {
1002 * modifiedRandomNumber Unsigned32,
1007 * @return modified offset
1010 fAuthenticateAck (tvbuff_t *tvb, proto_tree *tree, guint offset);
1013 * RequestKey-Request ::= SEQUENCE {
1014 * requestingDeviceIdentifier BACnetObjectIdentifier,
1015 * requestingDeviceAddress BACnetAddress,
1016 * remoteDeviceIdentifier BACnetObjectIdentifier,
1017 * remoteDeviceAddress BACnetAddress
1022 * @return modified offset
1025 fRequestKeyRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1028 * Unconfirmed-Service-Request ::= CHOICE {
1033 * @param service_choice
1034 * @return modified offset
1037 fUnconfirmedServiceRequest (tvbuff_t *tvb, proto_tree *tree, guint offset, gint service_choice);
1040 * UnconfirmedCOVNotification-Request ::= SEQUENCE {
1041 * subscriberProcessIdentifier [0] Unsigned32,
1042 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
1043 * monitoredObjectIdentifier [2] BACnetObjectIdentifer,
1044 * timeRemaining [3] unsigned,
1045 * listOfValues [4] SEQUENCE OF BACnetPropertyValues
1050 * @return modified offset
1053 fUnconfirmedCOVNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1056 * UnconfirmedEventNotification-Request ::= SEQUENCE {
1057 * ProcessIdentifier [0] Unsigned32,
1058 * initiatingDeviceIdentifier [1] BACnetObjectIdentifer,
1059 * eventObjectIdentifier [2] BACnetObjectIdentifer,
1060 * timeStamp [3] BACnetTimeStamp,
1061 * notificationClass [4] unsigned,
1062 * priority [5] unsigned8,
1063 * eventType [6] BACnetEventType,
1064 * messageText [7] CharacterString OPTIONAL,
1065 * notifyType [8] BACnetNotifyType,
1066 * ackRequired [9] BOOLEAN OPTIONAL,
1067 * fromState [10] BACnetEventState OPTIONAL,
1068 * toState [11] BACnetEventState,
1069 * eventValues [12] BACnetNotificationParameters OPTIONAL
1074 * @return modified offset
1077 fUnconfirmedEventNotificationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1080 * I-Am-Request ::= SEQUENCE {
1081 * aAmDeviceIdentifier BACnetObjectIdentifier,
1082 * maxAPDULengthAccepted Unsigned,
1083 * segmentationSupported BACnetSegmentation,
1089 * @return modified offset
1092 fIAmRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1096 * I-Have-Request ::= SEQUENCE {
1097 * deviceIdentifier BACnetObjectIdentifier,
1098 * objectIdentifier BACnetObjectIdentifier,
1099 * objectName CharacterString
1104 * @return modified offset
1107 fIHaveRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1110 * UnconfirmedPrivateTransfer-Request ::= SEQUENCE {
1111 * vendorID [0] Unsigned,
1112 * serviceNumber [1] Unsigned,
1113 * serviceParameters [2] ABSTRACT-SYNTAX.&Type OPTIONAL
1118 * @return modified offset
1121 fUnconfirmedPrivateTransferRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
1124 * UnconfirmedTextMessage-Request ::= SEQUENCE {
1125 * textMessageSourceDevice [0] BACnetObjectIdentifier,
1126 * messageClass [1] CHOICE {
1127 * numeric [0] Unsigned,
1128 * character [1] CharacterString
1130 * messagePriority [2] ENUMERATED {
1134 * message [3] CharacterString
1139 * @return modified offset
1142 fUnconfirmedTextMessageRequest(tvbuff_t *tvb, proto_tree *tree, guint offset);
1145 * TimeSynchronization-Request ::= SEQUENCE {
1151 * @return modified offset
1154 fTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1157 * UTCTimeSynchronization-Request ::= SEQUENCE {
1163 * @return modified offset
1166 fUTCTimeSynchronizationRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1169 * Who-Has-Request ::= SEQUENCE {
1171 * deviceInstanceRangeLowLimit [0] Unsigned (0..4194303),
1172 * deviceInstanceRangeHighLimit [1] Unsigned (0..4194303)
1175 * objectIdentifier [2] BACnetObjectIdentifier,
1176 * objectName [3] CharacterString
1182 * @return modified offset
1185 fWhoHas (tvbuff_t *tvb, proto_tree *tree, guint offset);
1188 * Who-Is-Request ::= SEQUENCE {
1189 * deviceInstanceRangeLowLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
1190 * deviceInstanceRangeHighLimit [0] Unsigned (0..4194303) OPTIONAL, -- must be used as a pair, see 16.9,
1195 * @return modified offset
1198 fWhoIsRequest (tvbuff_t *tvb, proto_tree *tree, guint offset);
1201 * BACnet-Error ::= CHOICE {
1202 * addListElement [8] ChangeList-Error,
1203 * removeListElement [9] ChangeList-Error,
1204 * writePropertyMultiple [16] WritePropertyMultiple-Error,
1205 * confirmedPrivatTransfer [18] ConfirmedPrivateTransfer-Error,
1206 * vtClose [22] VTClose-Error,
1207 * readRange [26] ObjectAccessService-Error
1214 * @return modified offset
1217 fBACnetError(tvbuff_t *tvb, proto_tree *tree, guint offset, guint service);
1220 * Dissect a BACnetError in a context tag
1225 * @return modified offset
1227 static guint fContextTaggedError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1230 * ChangeList-Error ::= SEQUENCE {
1231 * errorType [0] Error,
1232 * firstFailedElementNumber [1] Unsigned
1238 * @return modified offset
1241 fChangeListError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1244 * CreateObject-Error ::= SEQUENCE {
1245 * errorType [0] Error,
1246 * firstFailedElementNumber [1] Unsigned
1252 * @return modified offset
1255 fCreateObjectError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1258 * ConfirmedPrivateTransfer-Error ::= SEQUENCE {
1259 * errorType [0] Error,
1260 * vendorID [1] Unsigned,
1261 * serviceNumber [2] Unsigned,
1262 * errorParameters [3] ABSTRACT-SYNTAX.&Type OPTIONAL
1268 * @return modified offset
1271 fConfirmedPrivateTransferError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1274 * WritePropertyMultiple-Error ::= SEQUENCE {
1275 * errorType [0] Error,
1276 * firstFailedWriteAttempt [1] Unsigned
1282 * @return modified offset
1285 fWritePropertyMultipleError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1288 * VTClose-Error ::= SEQUENCE {
1289 * errorType [0] Error,
1290 * listOfVTSessionIdentifiers [1] SEQUENCE OF Unsigned8 OPTIONAL
1296 * @return modified offset
1299 fVTCloseError(tvbuff_t *tvb, proto_tree *tree, guint offset);
1302 * BACnet Application Types chapter 20.2.1
1307 * @return modified offset
1310 fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1313 * BACnetActionCommand ::= SEQUENCE {
1314 * deviceIdentifier [0] BACnetObjectIdentifier OPTIONAL,
1315 * objectIdentifier [1] BACnetObjectIdentifier,
1316 * propertyIdentifier [2] BACnetPropertyIdentifier,
1317 * propertyArrayIndex [3] Unsigned OPTIONAL, -- used only with array datatype
1318 * propertyValue [4] ABSTRACT-SYNTAX.&Type,
1319 * priority [5] Unsigned (1..16) OPTIONAL, -- used only when property is commandable
1320 * postDelay [6] Unsigned OPTIONAL,
1321 * quitOnFailure [7] BOOLEAN,
1322 * writeSuccessful [8] BOOLEAN
1327 * @return modified offset
1330 fActionCommand (tvbuff_t *tvb, proto_tree *tree, guint offset);
1333 * BACnetActionList ::= SEQUENCE {
1334 * action [0] SEQUENCE of BACnetActionCommand
1339 * @return modified offset
1342 fActionList (tvbuff_t *tvb, proto_tree *tree, guint offset);
1344 /** BACnetAddress ::= SEQUENCE {
1345 * network-number Unsigned16, -- A value 0 indicates the local network
1346 * mac-address OCTET STRING -- A string of length 0 indicates a broadcast
1351 * @return modified offset
1354 fAddress (tvbuff_t *tvb, proto_tree *tree, guint offset);
1357 * BACnetAddressBinding ::= SEQUENCE {
1358 * deviceObjectID BACnetObjectIdentifier
1359 * deviceAddress BacnetAddress
1364 * @return modified offset
1367 fAddressBinding (tvbuff_t *tvb, proto_tree *tree, guint offset);
1370 * BACnetCalendaryEntry ::= CHOICE {
1372 * dateRange [1] BACnetDateRange,
1373 * weekNDay [2] BacnetWeekNday
1378 * @return modified offset
1381 fCalendaryEntry (tvbuff_t *tvb, proto_tree *tree, guint offset);
1385 * BACnetClientCOV ::= CHOICE {
1386 * real-increment REAL,
1387 * default-increment NULL
1392 * @return modified offset
1395 fClientCOV (tvbuff_t *tvb, proto_tree *tree, guint offset);
1399 * BACnetDailySchedule ::= SEQUENCE {
1400 * day-schedule [0] SENQUENCE OF BACnetTimeValue
1405 * @return modified offset
1408 fDailySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
1411 * BACnetWeeklySchedule ::= SEQUENCE {
1412 * week-schedule SENQUENCE SIZE (7) OF BACnetDailySchedule
1417 * @return modified offset
1420 fWeeklySchedule (tvbuff_t *tvb, proto_tree *tree, guint offset);
1423 * BACnetDateRange ::= SEQUENCE {
1430 * @return modified offset
1433 fDateRange (tvbuff_t *tvb, proto_tree *tree, guint offset);
1436 * BACnetDateTime ::= SEQUENCE {
1444 * @return modified offset
1447 fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1451 * BACnetDestination ::= SEQUENCE {
1452 * validDays BACnetDaysOfWeek,
1455 * recipient BACnetRecipient,
1456 * processIdentifier Unsigned32,
1457 * issueConfirmedNotifications BOOLEAN,
1458 * transitions BACnetEventTransitionBits
1463 * @return modified offset
1466 fDestination (tvbuff_t *tvb, proto_tree *tree, guint offset);
1471 * BACnetDeviceObjectPropertyReference ::= SEQUENCE {
1472 * objectIdentifier [0] BACnetObjectIdentifier,
1473 * propertyIdentifier [1] BACnetPropertyIdentifier,
1474 * propertyArrayIndex [2] Unsigend OPTIONAL,
1475 * deviceIdentifier [3] BACnetObjectIdentifier OPTIONAL
1480 * @return modified offset
1483 fDeviceObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1488 * BACnetDeviceObjectReference ::= SEQUENCE {
1489 * deviceIdentifier [0] BACnetObjectIdentifier OPTIONAL,
1490 * objectIdentifier [1] BACnetObjectIdentifier
1495 * @return modified offset
1498 fDeviceObjectReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1503 * BACnetEventParameter ::= CHOICE {
1504 * change-of-bitstring [0] SEQUENCE {
1505 * time-delay [0] Unsigned,
1506 * bitmask [1] BIT STRING,
1507 * list-of-bitstring-values [2] SEQUENCE OF BIT STRING
1509 * change-of-state [1] SEQUENCE {
1510 * time-delay [0] Unsigned,
1511 * list-of-values [1] SEQUENCE OF BACnetPropertyStates
1513 * change-of-value [2] SEQUENCE {
1514 * time-delay [0] Unsigned,
1515 * cov-criteria [1] CHOICE {
1516 * bitmask [0] BIT STRING,
1517 * referenced-property-increment [1] REAL
1520 * command-failure [3] SEQUENCE {
1521 * time-delay [0] Unsigned,
1522 * feedback-property-reference [1] BACnetDeviceObjectPropertyReference
1524 * floating-limit [4] SEQUENCE {
1525 * time-delay [0] Unsigned,
1526 * setpoint-reference [1] BACnetDeviceObjectPropertyReference,
1527 * low-diff-limit [2] REAL,
1528 * high-diff-limit [3] REAL,
1531 * out-of-range [5] SEQUENCE {
1532 * time-delay [0] Unsigned,
1533 * low-limit [1] REAL,
1534 * high-limit [2] REAL,
1537 * buffer-ready [7] SEQUENCE {
1538 * notification-threshold [0] Unsigned,
1539 * previous-notification-count [1] Unsigned32
1541 * change-of-life-safety [8] SEQUENCE {
1542 * time-delay [0] Unsigned,
1543 * list-of-life-safety-alarm-values [1] SEQUENCE OF BACnetLifeSafetyState,
1544 * list-of-alarm-values [2] SEQUENCE OF BACnetLifeSafetyState,
1545 * mode-property-reference [3] BACnetDeviceObjectPropertyReference
1551 * @return modified offset
1554 fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset);
1560 * BACnetLogRecord ::= SEQUENCE {
1561 * timestamp [0] BACnetDateTime,
1562 * logDatum [1] CHOICE {
1563 * log-status [0] BACnetLogStatus,
1564 * boolean-value [1] BOOLEAN,
1565 * real-value [2] REAL,
1566 * enum-value [3] ENUMERATED, -- Optionally limited to 32 bits
1567 * unsigned-value [4] Unsigned, -- Optionally limited to 32 bits
1568 * signed-value [5] INTEGER, -- Optionally limited to 32 bits
1569 * bitstring-value [6] BIT STRING,-- Optionally limited to 32 bits
1570 * null-value [7] NULL,
1571 * failure [8] Error,
1572 * time-change [9] REAL,
1573 * any-value [10] ABSTRACT-SYNTAX.&Type -- Optional
1575 * statusFlags [2] BACnetStatusFlags OPTIONAL
1580 * @return modified offset
1583 fLogRecord (tvbuff_t *tvb, proto_tree *tree, guint offset);
1587 * BACnetNotificationParameters ::= CHOICE {
1588 * change-of-bitstring [0] SEQUENCE {
1589 * referenced-bitstring [0] BIT STRING,
1590 * status-flags [1] BACnetStatusFlags
1592 * change-of-state [1] SEQUENCE {
1593 * new-state [0] BACnetPropertyStatus,
1594 * status-flags [1] BACnetStatusFlags
1596 * change-of-value [2] SEQUENCE {
1597 * new-value [0] CHOICE {
1598 * changed-bits [0] BIT STRING,
1599 * changed-value [1] REAL
1601 * status-flags [1] BACnetStatusFlags
1603 * command-failure [3] SEQUENCE {
1604 * command-value [0] ABSTRACT-SYNTAX.&Type, -- depends on ref property
1605 * status-flags [1] BACnetStatusFlags
1606 * feedback-value [2] ABSTRACT-SYNTAX.&Type -- depends on ref property
1608 * floating-limit [4] SEQUENCE {
1609 * reference-value [0] REAL,
1610 * status-flags [1] BACnetStatusFlags
1611 * setpoint-value [2] REAL,
1612 * error-limit [3] REAL
1614 * out-of-range [5] SEQUENCE {
1615 * exceeding-value [0] REAL,
1616 * status-flags [1] BACnetStatusFlags
1617 * deadband [2] REAL,
1618 * exceeded-limit [0] REAL
1620 * complex-event-type [6] SEQUENCE OF BACnetPropertyValue,
1621 * buffer-ready [7] SEQUENCE {
1622 * buffer-device [0] BACnetObjectIdentifier,
1623 * buffer-object [1] BACnetObjectIdentifier
1624 * previous-notification [2] BACnetDateTime,
1625 * current-notification [3] BACnetDateTime
1627 * change-of-life-safety [8] SEQUENCE {
1628 * new-state [0] BACnetLifeSafetyState,
1629 * new-mode [1] BACnetLifeSafetyState
1630 * status-flags [2] BACnetStatusFlags,
1631 * operation-expected [3] BACnetLifeSafetyOperation
1637 * @return modified offset
1640 fNotificationParameters (tvbuff_t *tvb, proto_tree *tree, guint offset);
1643 * BACnetObjectPropertyReference ::= SEQUENCE {
1644 * objectIdentifier [0] BACnetObjectIdentifier,
1645 * propertyIdentifier [1] BACnetPropertyIdentifier,
1646 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
1651 * @return modified offset
1654 fBACnetObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1658 * BACnetObjectPropertyValue ::= SEQUENCE {
1659 * objectIdentifier [0] BACnetObjectIdentifier,
1660 * propertyIdentifier [1] BACnetPropertyIdentifier,
1661 * propertyArrayIndex [2] Unsigned OPTIONAL, -- used only with array datatype
1662 * -- if omitted with an array the entire array is referenced
1663 * value [3] ABSTRACT-SYNTAX.&Type, --any datatype appropriate for the specified property
1664 * priority [4] Unsigned (1..16) OPTIONAL
1669 * @return modified offset
1672 fObjectPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1676 * BACnetPriorityArray ::= SEQUENCE SIZE (16) OF BACnetPriorityValue
1680 * @return modified offset
1683 fPriorityArray (tvbuff_t *tvb, proto_tree *tree, guint offset);
1686 fPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 tagoffset, guint8 list);
1689 * BACnetPropertyReference ::= SEQUENCE {
1690 * propertyIdentifier [0] BACnetPropertyIdentifier,
1691 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatype
1696 * @return modified offset
1699 fBACnetPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 list);
1702 fBACnetObjectPropertyReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1705 * BACnetPropertyValue ::= SEQUENCE {
1706 * PropertyIdentifier [0] BACnetPropertyIdentifier,
1707 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatypes
1708 * -- if omitted with an array the entire array is referenced
1709 * value [2] ABSTRACT-SYNTAX.&Type, -- any datatype appropriate for the specified property
1710 * priority [3] Unsigned (1..16) OPTIONAL -- used only when property is commandable
1715 * @return modified offset
1718 fBACnetPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1721 fPropertyValue (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 tagoffset);
1724 * BACnet Application PDUs chapter 21
1725 * BACnetRecipient::= CHOICE {
1726 * device [0] BACnetObjectIdentifier
1727 * address [1] BACnetAddress
1732 * @return modified offset
1735 fRecipient (tvbuff_t *tvb, proto_tree *tree, guint offset);
1738 * BACnet Application PDUs chapter 21
1739 * BACnetRecipientProcess::= SEQUENCE {
1740 * recipient [0] BACnetRecipient
1741 * processID [1] Unsigned32
1746 * @return modified offset
1749 fRecipientProcess (tvbuff_t *tvb, proto_tree *tree, guint offset);
1753 * BACnetSessionKey ::= SEQUENCE {
1754 * sessionKey OCTET STRING (SIZE(8)), -- 56 bits for key, 8 bits for checksum
1755 * peerAddress BACnetAddress
1760 * @return modified offset
1761 * @todo check if checksum is displayed correctly
1764 fSessionKey (tvbuff_t *tvb, proto_tree *tree, guint offset);
1769 * BACnetSetpointReference ::= SEQUENCE {
1770 * sessionKey [0] BACnetObjectPropertyReference OPTIONAL
1775 * @return modified offset
1778 fSetpointReference (tvbuff_t *tvb, proto_tree *tree, guint offset);
1782 * BACnetSpecialEvent ::= SEQUENCE {
1784 * calendarEntry [0] BACnetCalendarEntry,
1785 * calendarRefernce [1] BACnetObjectIdentifier
1787 * listOfTimeValues [2] SEQUENCE OF BACnetTimeValue,
1788 * eventPriority [3] Unsigned (1..16)
1793 * @return modified offset
1796 fSpecialEvent (tvbuff_t *tvb, proto_tree *tree, guint offset);
1799 * BACnetTimeStamp ::= CHOICE {
1801 * sequenceNumber [1] Unsigned (0..65535),
1802 * dateTime [2] BACnetDateTime
1807 * @return modified offset
1810 fTimeStamp (tvbuff_t *tvb, proto_tree *tree, guint offset);
1813 * BACnetTimeValue ::= SEQUENCE {
1815 * value ABSTRACT-SYNTAX.&Type -- any primitive datatype, complex types cannot be decoded
1820 * @return modified offset
1823 fTimeValue (tvbuff_t *tvb, proto_tree *tree, guint offset);
1827 * BACnetVTSession ::= SEQUENCE {
1828 * local-vtSessionID Unsigned8,
1829 * remote-vtSessionID Unsigned8,
1830 * remote-vtAddress BACnetAddress
1835 * @return modified offset
1838 fVTSession (tvbuff_t *tvb, proto_tree *tree, guint offset);
1842 * BACnetWeekNDay ::= OCTET STRING (SIZE (3))
1843 * -- first octet month (1..12) January = 1, X'FF' = any month
1844 * -- second octet weekOfMonth where: 1 = days numbered 1-7
1845 * -- 2 = days numbered 8-14
1846 * -- 3 = days numbered 15-21
1847 * -- 4 = days numbered 22-28
1848 * -- 5 = days numbered 29-31
1849 * -- 6 = last 7 days of this month
1850 * -- X
\92FF
\92 = any week of this month
1851 * -- third octet dayOfWeek (1..7) where 1 = Monday
1853 * -- X'FF' = any day of week
1857 * @return modified offset
1860 fWeekNDay (tvbuff_t *tvb, proto_tree *tree, guint offset);
1863 * ReadAccessResult ::= SEQUENCE {
1864 * objectIdentifier [0] BACnetObjectIdentifier,
1865 * listOfResults [1] SEQUENCE OF SEQUENCE {
1866 * propertyIdentifier [2] BACnetPropertyIdentifier,
1867 * propertyArrayIndex [3] Unsigned OPTIONAL, -- used only with array datatype if omitted with an array the entire array is referenced
1868 * readResult CHOICE {
1869 * propertyValue [4] ABSTRACT-SYNTAX.&Type,
1870 * propertyAccessError [5] Error
1877 * @return modified offset
1880 fReadAccessResult (tvbuff_t *tvb, proto_tree *tree, guint offset);
1883 * ReadAccessSpecification ::= SEQUENCE {
1884 * objectIdentifier [0] BACnetObjectIdentifier,
1885 * listOfPropertyReferences [1] SEQUENCE OF BACnetPropertyReference
1890 * @return modified offset
1893 fReadAccessSpecification (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1896 * WriteAccessSpecification ::= SEQUENCE {
1897 * objectIdentifier [0] BACnetObjectIdentifier,
1898 * listOfProperty [1] SEQUENCE OF BACnetPropertyValue
1903 * @return modified offset
1906 fWriteAccessSpecification (tvbuff_t *tvb, proto_tree *subtree, guint offset);
1909 /********************************************************* Helper functions *******************************************/
1912 * extracts the tag number from the tag header.
1913 * @param tvb "TestyVirtualBuffer"
1914 * @param offset in actual tvb
1915 * @return Tag Number corresponding to BACnet 20.2.1.2 Tag Number
1918 fTagNo (tvbuff_t *tvb, guint offset);
1921 * splits Tag Header coresponding to 20.2.1 General Rules For BACnet Tags
1922 * @param tvb = "TestyVirtualBuffer"
1923 * @param offset = offset in actual tvb
1924 * @return tag_no BACnet 20.2.1.2 Tag Number
1925 * @return class_tag BACnet 20.2.1.1 Class
1926 * @return lvt BACnet 20.2.1.3 Length/Value/Type
1927 * @return offs = length of this header
1931 fTagHeader (tvbuff_t *tvb, guint offset, guint8 *tag_no, guint8* class_tag, guint32 *lvt);
1935 * adds processID with max 32Bit unsigned Integer Value to tree
1939 * @return modified offset
1942 fProcessId (tvbuff_t *tvb, proto_tree *tree, guint offset);
1945 * adds timeSpan with max 32Bit unsigned Integer Value to tree
1949 * @return modified offset
1952 fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
1955 * BACnet Application PDUs chapter 21
1956 * BACnetPropertyIdentifier::= ENUMERATED {
1957 * @see bacapp_property_identifier
1962 * @param tt returnvalue of this item
1963 * @return modified offset
1966 fPropertyIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
1969 * listOfEventSummaries ::= SEQUENCE OF SEQUENCE {
1970 * objectIdentifier [0] BACnetObjectIdentifier,
1971 * eventState [1] BACnetEventState,
1972 * acknowledgedTransitions [2] BACnetEventTransitionBits,
1973 * eventTimeStamps [3] SEQURNCE SIZE (3) OF BACnetTimeStamps,
1974 * notifyType [4] BACnetNotifyType,
1975 * eventEnable [5] BACnetEventTransitionBits,
1976 * eventPriorities [6] SEQUENCE SIZE (3) OF Unsigned
1981 * @return modified offset
1984 flistOfEventSummaries (tvbuff_t *tvb, proto_tree *tree, guint offset);
1987 * SelectionCriteria ::= SEQUENCE {
1988 * propertyIdentifier [0] BACnetPropertyIdentifier,
1989 * propertyArrayIndex [1] Unsigned OPTIONAL, -- used only with array datatype
1990 * relationSpecifier [2] ENUMERATED { bacapp_relationSpecifier },
1991 * comparisonValue [3] ABSTRACT-SYNTAX.&Type
1996 * @return modified offset
1999 fSelectionCriteria (tvbuff_t *tvb, proto_tree *tree, guint offset);
2002 * objectSelectionCriteria ::= SEQUENCE {
2003 * selectionLogic [0] ENUMERATED { bacapp_selectionLogic },
2004 * listOfSelectionCriteria [1] SelectionCriteria
2009 * @return modified offset
2012 fObjectSelectionCriteria (tvbuff_t *tvb, proto_tree *subtree, guint offset);
2015 * ObjectSpecifier ::= CHOICE {
2016 * objectType [0] BACnetObjectType,
2017 * objectIdentifier [1] BACnetObjectIdentifier
2022 * @return modified offset
2025 fObjectSpecifier (tvbuff_t *tvb, proto_tree *tree, guint offset);
2028 * BACnet-Error ::= SEQUENCE {
2029 * error-class ENUMERATED {},
2030 * error-code ENUMERATED {}
2036 * @return modified offset
2039 fError(tvbuff_t *tvb, proto_tree *tree, guint offset);
2042 * Generic handler for context tagged values. Mostly for handling
2043 * vendor-defined properties and services.
2047 * @return modified offset
2048 * @todo beautify this ugly construct
2051 fContextTaggedValue(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
2054 * realizes some ABSTRACT-SYNTAX.&Type
2058 * @return modified offset
2059 * @todo beautify this ugly construct
2062 fAbstractSyntaxNType (tvbuff_t *tvb, proto_tree *tree, guint offset);
2068 proto_register_bacapp(void);
2071 * proto_reg_handoff_bacapp
2074 proto_reg_handoff_bacapp(void);
2077 * converts XXX coded strings to UTF-8 if iconv is allowed
2078 * else 'in' is copied to 'out'
2079 * @param in -- pointer to string
2080 * @param inbytesleft
2081 * @param out -- pointer to string
2082 * @param outbytesleft
2084 * @return count of modified characters of returned string, -1 for errors
2087 fConvertXXXtoUTF8(const guint8 *in, size_t *inbytesleft,guint8 *out, size_t *outbytesleft, const gchar *fromcoding);
2089 #endif /* __BACAPP_H__ */