Sunteți pe pagina 1din 65

BACnet Message Structure

David Fisher, PolarSoft Inc.

1996-2009 PolarSoft Inc., All Rights Reserved

Overview
Basic Message Structure
What is a MAC layer?
NPDU Structure

1996-2009 PolarSoft Inc., All Rights Reserved

What is a MAC Layer?


Destination: 112233445566
Length: 12
Data: 00112233445566778899AABB

MAC Layer
messages

1996-2009 PolarSoft Inc., All Rights Reserved

Message Frames
Start of Message

End of Message

Destination

Data
Source
Length

1996-2009 PolarSoft Inc., All Rights Reserved

Error Detection/Correction

MPDUs
Destination: 112233445566
Length: 12
Data: 00112233445566778899AABB

headers
MPDU

1996-2009 PolarSoft Inc., All Rights Reserved

Version
Control

DNET
DLEN
DADR
SNET
SLEN
SADR

Hop Count
Message Type
Vendor ID
NPDU or APDU
1996-2009 PolarSoft Inc., All Rights Reserved

1 octet
1 octet
2 octets
1 octet
M octets
2 octets
1octet
L octets
1 octet

1 octet
1 octet
N octets

Network Layer
Message
Structure

Local APDUs

1996-2009 PolarSoft Inc., All Rights Reserved

Version

1 octet

Control

1 octet

APDU

N octets

Network Layer Messages

1996-2009 PolarSoft Inc., All Rights Reserved

Version

1 octet

Control

1 octet

Message Type

1 octet

NPDU

2 octets

APDU for Remote Network


Version

1 octet

Control

1 octet

DNET

2 octets

DLEN

1 octet

DADR

M octets

Hop Count
APDU
1996-2009 PolarSoft Inc., All Rights Reserved

1 octet
N octets

APDU passing from Router to Router

SADR
Hop Count

1 octet
1 octet
2 octets
1 octet
M octets
2 octets
1octet
L octets
1 octet

APDU

N octets

Version
Control
DNET
DLEN
DADR
SNET
SLEN

1996-2009 PolarSoft Inc., All Rights Reserved

APDU routed from remote network

Version

1 octet

Control

1 octet

SNET

2 octets

SLEN

1 octet

SADR

M octets

APDU

1996-2009 PolarSoft Inc., All Rights Reserved

N octets

NPCI
7

6
0

Version

Control

0
0
0
1
1

0
1
0
1

Normal
Urgent
Critical Equipment
Life Safety

1 = Reply expected

DNET

DLEN
DADR
SNET

1 = Source Routing Included

1 = Dest Routing Included

SLEN

SADR
Hop Count

0 = AL Message
1 = NL Message

1996-2009 PolarSoft Inc., All Rights Reserved

APDU

Questions

1996-2009 PolarSoft Inc., All Rights Reserved

Overview
ASN.1 Bootcamp
What is ASN.1
Encoding Approaches
Tags
Detailed look at encoding ReadProperty

1996-2009 PolarSoft Inc., All Rights Reserved

Abstract Syntax Notation One (ASN.1)

ProductionName ::= KEYWORD {


list of components
}

This is the basic structure of all ASN.1 Productions.


We will examine the KEYWORDs most commonly
used in BACnet to gain a basic understanding of how
to interpret ASN.1
1996-2009 PolarSoft Inc., All Rights Reserved

ASN.1

ProductionName ::= CHOICE {


option1
option2
.
.
.
optionN

1996-2009 PolarSoft Inc., All Rights Reserved

[0] Datatype1,
[1] Datatype2,
[N-1] DatatypeN

ASN.1
BACnet defines 13 primitive or
application datatypes.
0 Null
1 Boolean
2 Unsigned Integer
3 Signed Integer
4 Real
5 Double
6 Octet String

1996-2009 PolarSoft Inc., All Rights Reserved

7
8
9
10
11
12

Character String
Bit String
Enumerated
Date
Time
BACnetObjectIdentifier

ASN.1
ProductionName ::= SEQUENCE {
item1
item2
item3
.
.
.
itemN
}

1996-2009 PolarSoft Inc., All Rights Reserved

[0] Datatype1,
[1] Datatype2 OPTIONAL,
[2] Datatype3,
[N-1] DatatypeN

ASN.1
BACnetDayOfWeek ::= BIT STRING {
monday
tuesday
wednesday
thursday
friday
saturday
sunday
}

1996-2009 PolarSoft Inc., All Rights Reserved

(0),
(1),
(2),
(3),
(4),
(5),
(6)

ASN.1
BACnetEventState ::= ENUMERATED
{
normal
(0),
fault
(1),
offnormal
(2),
high-limit
(3),
low-limit
(4)
}

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Approaches
Fixed position encoding
A map is made that indicates exactly
where each piece of the message is to
appear. There is no variation.
Variable position encoding
The pieces of the message can vary. A
special marker called a tag is used to
indicate which piece comes next and how
big it is.
1996-2009 PolarSoft Inc., All Rights Reserved

Format of the BACnet-Confirmed-Request-PDU


Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
|
PDU Type
|SEG|MOR| SA| 0 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 |
Max Resp
|
|---|---|---|---|---|---|---|---|
|
Invoke ID
|
|---|---|---|---|---|---|---|---|
|
Sequence Number
| Only present if SEG = 1
|---|---|---|---|---|---|---|---|
|
Proposed Window Size
| Only present if SEG = 1
|---|---|---|---|---|---|---|---|
|
Service Choice
|
|---|---|---|---|---|---|---|---|
|
Service Request
|
|
.
|
.
|
.
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

Tags
Bit Number:
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
|
Tag Number
|Class|Length/Value/Type|
|-----|-----|-----|-----|-----|-----|-----|-----|

where
Tag Number = the tag number within the class
Class
= application or context specific
Length/Value/Type = whether the data following the tag
is primitive or constructed and specifies the length
or value of primitive data.

1996-2009 PolarSoft Inc., All Rights Reserved

ReadProperty
client

server
ReadProperty(msg#123
objectid=AnalogInput 5
propertyid=Present_Value)
72

1996-2009 PolarSoft Inc., All Rights Reserved

Read Property Service


Table 15-5.Structure of ReadProperty Service Primitives
Parameter Name
Argument
Object Identifier
Property Identifier
Property Array Index

Req

Ind

M
M
M
U

M(=)
M(=)
M(=)
U(=)

Rsp

Cnf

Parameters for the service

Result (+)
Object Identifier
Property Identifier
Property Array Index
Property Value

S
M
M
U
M

S(=)
M(=)
M(=)
U(=)
M(=)

Result (-)
Error Type

S
M

S(=)
M(=)

M
U
S

mandatory
user option
selection

1996-2009 PolarSoft Inc., All Rights Reserved

We get this if the request succeeds

We get this if the request fails

BACnetPDU

::= CHOICE {

confirmed-requestPDU
[0] BACnetConfirmed-RequestPDU,
unconfirmed-request-PDU [1] BACnet-Unconfirmed-RequestPDU,
simpleACKPDU
[2] BACnetSimpleACKPDU,
complexACKPDU
[3] BACnetComplexACKPDU,
segmentAck-PDU
[4] BACnet-SegmentACK-PDU,
errorPDU
[5] BACnetErrorPDU,
reject-PDU
[6] BACnet-Reject-PDU,
abort-PDU
[7] BACnet-Abort-PDU
}

1996-2009 PolarSoft Inc., All Rights Reserved

--

Context-specific tags 0..10 are NOT used in header encoding

BACnet-Confirmed-Request-PDU
pdu-type
segmented-message
more-follows
segmented-response-accepted
reserved
max-APDU-length-accepted
invokeID
sequence-number
proposed-window-size
service-choice
service-request
}

1996-2009 PolarSoft Inc., All Rights Reserved

::= SEQUENCE {
[0] Unsigned (0..15), -0 for this PDU type
[1] BOOLEAN,
[2] BOOLEAN,
[3] BOOLEAN,
[4] Unsigned (0..31),
[5] Unsigned (0..15),
[6] Unsigned (0..255),
[7] Unsigned (0..255) OPTIONAL,
[8] Unsigned (1..127) OPTIONAL,
[9] BACnetConfirmedServiceChoice,
[10] BACnet-Confirmed-Service-Request
OPTIONAL

BACnetConfirmedServiceChoice ::= ENUMERATED {


.
.
.
-Object Access Services
addListElement
(8),
removeListElement
(9),
createObject
(10),
deleteObject
(11),
readProperty
(12),
readPropertyConditional (13),
readPropertyMultiple
(14),
writeProperty
(15),
writePropertyMultiple
(16),
.
.
.
}
1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-ConfirmedServiceRequest ::= CHOICE {

.
.
.

--

Object Access Services


addListElement
[8] AddListElement-Request,
removeListElement
[9] RemoveListElement-Request,
createObject
[10] CreateObject-Request,
deleteObject
[11] DeleteObject-Request,
readProperty
[12] ReadPropertyRequest,
readPropertyConditional [13] ReadPropertyConditionalRequest,
readPropertyMultiple
[14] ReadPropertyMultiple-Request,
writeProperty
[15] WritePropertyRequest,
writePropertyMultiple
[16] WritePropertyMultipleRequest,

.
.
.

1996-2009 PolarSoft Inc., All Rights Reserved

ReadProperty-Request ::= SEQUENCE {


objectIdentifier
[0]
propertyIdentifier [1]
propertyArrayIndex [2]
---}

1996-2009 PolarSoft Inc., All Rights Reserved

BACnetObjectIdentifier,
BACnetPropertyIdentifier,
Unsigned OPTIONAL
used only with array datatype
if omitted with an array then
the entire array is referenced

Encoded ReadProperty Request

X`00'

Fixed

Variable

X`00'
X`01'
X`0C'

PDU Type=0 (BACnet-Confirmed-RequestPDU, SEG=0, MOR=0, SA=0)


Maximum APDU Size Accepted=50 octets
Invoke ID=1
Service Choice=12 (ReadProperty-Request)

X`0C'
X`00000005'
X`19'
X`55'

SD Context Tag 0 (Object Identifier, L=4)


Analog Input, Instance Number=5
SD Context Tag 1 (Property Identifier, L=1)
85 (PRESENT_VALUE)

1996-2009 PolarSoft Inc., All Rights Reserved

Encoded ReadProperty Request


X`0C'
X`00000005'

SD Context Tag 0 (Object Identifier, L=4)


Analog Input, Instance Number=5

7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
|
Tag Number=0
|Class|Length/Value/Type|
| 0
0
0
0
1
1
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|

Context Tag

objectIdentifier
1996-2009 PolarSoft Inc., All Rights Reserved

[0]

ObjectIdentifiers are
length = 4 octets

BACnetObjectIdentifier,

Encoded ReadProperty Request


X`19'
X`55'

SD Context Tag 1 (Property Identifier, L=1)


85 (PRESENT_VALUE)

7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
|
Tag Number=1
|Class|Length/Value/Type|
| 0
0
0
1
1
0
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|

Context Tag

propertyIdentifier
1996-2009 PolarSoft Inc., All Rights Reserved

[1]

PropertyIdentifiers
are Unsigned, min
length = 1 octet

BACnetPropertyIdentifier,

Questions

1996-2009 PolarSoft Inc., All Rights Reserved

Overview

Encoding Primitive Application Datatypes

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding NULL
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
0
0
0
0
0
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|

NULL = 0

1996-2009 PolarSoft Inc., All Rights Reserved

NULL has no length

Encoding BOOLEAN
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
0
0
1
0
0
0
0/1 |
|-----|-----|-----|-----|-----|-----|-----|-----|

BOOLEAN = 1

Value is 0 or 1

|-----|-----|-----|-----|-----|-----|-----|-----|
| ?
?
?
?
1
0
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
0
0
0
0
0
0
0/1 |
|-----|-----|-----|-----|-----|-----|-----|-----|

Context tagged BOOLEAN values are always followed


by a one octet value

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Unsigned
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
0
1
0
0
001..100
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
1, 2, 3 or 4 octets of big-endian value
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Signed
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
0
1
1
0
001..100
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
1, 2, 3 or 4 octets of big-endian value
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding REAL
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
0
0
0
1
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
4 octets of IEEE real value
|
|
|
|
|
|
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Double
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
0
1
0
1
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
0
0
0
1
0
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
8 octets of IEEE double value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

5 = extended length
extended length = 8

Encoding Octet Strings


Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
1
0
0
001..100
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
1, 2, 3 or 4 octets of octet string value
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Octet Strings


Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
1
0
0
1
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
actual length of octet string 5..253
|
|-----|-----|-----|-----|-----|-----|-----|-----|
~
~
|
octets
|
~
~
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Octet Strings


Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
1
0
0
1
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
1
1
1
1
1
1
1
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
actual length of octet string 254..65535
|
|
big endian 2 octet length
|
|-----|-----|-----|-----|-----|-----|-----|-----|
~
~
|
octets
|
~
~
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Octet Strings


Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
1
0
0
1
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
1
1
1
1
1
1
1
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
actual length of 65536..4294967295
|
|
big endian 4 octet length
|
|
|
|
|
|-----|-----|-----|-----|-----|-----|-----|-----|
~
~
|
octets
|
~
~
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Character Strings


Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 0
1
1
1
0
1
0
1 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
actual length of char string 5..253
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
character set code
|
|-----|-----|-----|-----|-----|-----|-----|-----|
~
~
|
octets
|
~
~
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Character String Example

X`75'
X`06'
X`00'
X`4142434445'

1996-2009 PolarSoft Inc., All Rights Reserved

Character String, extended length


extended length is 6 octets
Character Set is ANSI x3.4
string = ABCDE

Encoding Bit Strings


Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 1
0
0
0
0
001..101
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
number of unused bits 0..7
|
|-----|-----|-----|-----|-----|-----|-----|-----|
~
~
|
octets
|
~
~
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Bit String Example


7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 1
0
1
0
1
0
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|

X`82'
X`03'
X`A8'

1996-2009 PolarSoft Inc., All Rights Reserved

Bit String, length=2


3 unused bits
bit string = B10101

Encoding Enumerations
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 1
0
0
1
0
001..100
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
1, 2, 3 or 4 octets of big-endian value
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Encoding Dates
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 1
0
1
0
0
1
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
year 1900, e.g. 103 = 2003
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
month, 1=January
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
day, e.g. 1..31
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
day of week, 1=Monday, 7=Sunday
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

0xFF = wildcard

Encoding Times
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 1
0
1
1
0
1
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
hours 00..23
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
minutes 00..59
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
seconds 00..59
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
hundredths 00..99
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

0xFF = wildcard

Encoding ObjectIdentifier
Tag Number
Class Length/Value/Type
7
6
5
4
3
2
1
0
|-----|-----|-----|-----|-----|-----|-----|-----|
| 1
1
0
0
0
1
0
0 |
|-----|-----|-----|-----|-----|-----|-----|-----|
|
object type 0..1023
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
object instance 0.. 4194303
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
|
|-----|-----|-----|-----|-----|-----|-----|-----|
|
|
|-----|-----|-----|-----|-----|-----|-----|-----|

1996-2009 PolarSoft Inc., All Rights Reserved

Paired Delimiters
ReadProperty-ACK ::= SEQUENCE {
objectIdentifier
[0]
propertyIdentifier
[1]
propertyArrayIndex [2]
propertyValue
[3]
}

X`0C'
X`00000005'
X`19'
X`55'
X`3E'
X`44'
X`4290999A'
X`3F'

1996-2009 PolarSoft Inc., All Rights Reserved

BACnetObjectIdentifier,
BACnetPropertyIdentifier,
Unsigned OPTIONAL,
ABSTRACT-SYNTAX.&Type

SD Context Tag 0 (Object Identifier, L=4)


Analog Input, Instance Number=5
SD Context Tag 1 (Property Identifier, L=1)
85 (PRESENT_VALUE)
PD Opening Tag 3 (Property Value)
Application Tag 4 (Real, L=4)
72.3
PD Closing Tag 3 (Property Value)

Overview
Detailed look at PDUs
Unconfirmed
Confirmed
Simple ACK
Complex ACK
Error
Reject
Abort
1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-Unconfirmed-Request-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 1 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|
|
Service Choice
|
|---|---|---|---|---|---|---|---|
|
Service Request
|
|
.
|
.
|
.
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-Confirmed-Request-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 0 |SEG|MOR| SA| 0 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 |
Max Resp
|
|---|---|---|---|---|---|---|---|
|
Invoke ID
|
|---|---|---|---|---|---|---|---|
|
Sequence Number
| Only present if SEG = 1
|---|---|---|---|---|---|---|---|
|
Proposed Window Size
| Only present if SEG = 1
|---|---|---|---|---|---|---|---|
|
Service Choice
|
|---|---|---|---|---|---|---|---|
|
Service Request
|
|
.
|
.
|
.
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-SimpleACK-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 2 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|
|
Original InvokeID
|
|---|---|---|---|---|---|---|---|
|
Service Ack Choice
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-ComplexACK-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 3 |SEG|MOR| 0 | 0 |
|---|---|---|---|---|---|---|---|
|
Original Invoke ID
|
|---|---|---|---|---|---|---|---|
|
Sequence Number
| Only present if SEG = 1
|---|---|---|---|---|---|---|---|
|
Proposed Window Size
| Only present if SEG = 1
|---|---|---|---|---|---|---|---|
|
Service-ACK Choice
|
|---|---|---|---|---|---|---|---|
|
Service ACK
|
|
.
|
.
|
.
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-Error-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 5 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|
|
Original Invoke ID
|
|---|---|---|---|---|---|---|---|
|
Error Choice
|
|---|---|---|---|---|---|---|---|
|
Error
|
|
.
|
.
|
.
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-Reject-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 6 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|
|
Original Invoke ID
|
|---|---|---|---|---|---|---|---|
|
Reject Reason
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

BACnet-Abort-PDU
Bit Number:

7
6
5
4
3
2
1
0
|---|---|---|---|---|---|---|---|
| PDU Type = 7 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|
|
Original Invoke ID
|
|---|---|---|---|---|---|---|---|
|
Abort Reason
|
|---|---|---|---|---|---|---|---|

1996-2009 PolarSoft Inc., All Rights Reserved

ReadProperty
client

server
ReadProperty(msg#123
objectid=AnalogInput 29
propertyid=Present_Value)
72

ReadPropertyAck(msg#123
objectid=AnalogInput 29
propertyid=Present_Value
value=72.0)

or

1996-2009 PolarSoft Inc., All Rights Reserved

Error(msg#123
class=object
code=NoSuchObject)

ReadProperty
client

server
ReadProperty Confirmed
Service Request

72

ReadProperty ComplexACK

or

1996-2009 PolarSoft Inc., All Rights Reserved

Error

Questions

1996-2009 PolarSoft Inc., All Rights Reserved

S-ar putea să vă placă și