-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathindex.html
1091 lines (1080 loc) · 46.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<script src='https://www.w3.org/Tools/respec/respec-w3c' class='remove'></script>
<script class='remove'>
var respecConfig = {
specStatus: "ED",
group: "wg/wot",
editors: [{
name: "Klaus Hartke",
w3cid: "107859",
company: "Siemens AG",
companyURL: "https://www.siemens.com/"
},
{
name: "Michael Koster",
w3cid: "110658",
company: "Invited Expert",
companyURL: "https://github.com/mjkoster"
},
{
name: "Dogan Fennibay",
w3cid: "147431",
company: "Siemens AG",
companyURL: "https://www.siemens.com/"
}],
edDraftURI: "https://w3c.github.io/wot-binding-templates/bindings/protocols/bacnet/",
shortName: "wot-bacnet-binding",
github: "https://github.com/w3c/wot-binding-templates",
localBiblio: {
BACnet: {
title: "ANSI/ASHRAE Standard 135-2020: BACnet – A Data Communication Protocol for Building Automation Networks",
href: "https://www.ashrae.org/technical-resources/bookstore/bacnet",
publisher: "ASHRAE",
date: "2020"
},
"X.680": {
title: "ITU-T X.680: Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation",
href: "https://www.itu.int/rec/T-REC-X.680/en",
publisher: "ITU-T",
date: "2021"
},
},
otherLinks: [{
key: "Core Binding Templates Specification",
data: [{
value: "Web of Things (WoT) Binding Templates",
href: "../../../index.html",
}]
},
{
key: "Ontology",
data: [{
value: "BACnet Vocabulary for the Web of Things",
href: "bacnet-model.ttl",
}]
},
{
key: "JSON Schema",
data: [
{
value: "BACnet JSON Schema",
href: "bacnet.schema.json"
}
]
}]
};
</script>
<title>Web of Things (WoT) BACnet Binding Template</title>
</head>
<body>
<section id='abstract'>
<p>
In the context of the Web of Things (WoT), a Binding Template is a blueprint that gives guidance on how to
implement a specific IoT protocol, data format or IoT platform.
The Core Binding Templates specification explains the overall mechanism and requirements for any binding to follow.
This document gives implementation guidelines regarding BACnet [[BACnet]], a building automation and control networking protocol.
</p>
<p>
More specifically, this document defines a set of vocabulary terms that can be used inside a Thing Description document,
and associated rules which allow to describe WoT operations using BACnet over the network.
Additionally, relevant examples are provided to showcase different vocabulary terms and the associated behavior.
</p>
</section>
<section id='sotd'>
<p>
<em>This document is a work in progress</em>
</p>
<p>
BACnet® is a registered trademark of ASHRAE.
This document has not been reviewed for publication by ASHRAE, and no endorsement by ASHRAE is implied.
</p>
</section>
<section id='introduction'>
<h2>Introduction</h2>
<p>
BACnet [[BACnet]] is a building automation and control networking
protocol for applications such as heating, ventilating, and air
conditioning control, lighting control, access control, and fire
detection systems.
</p>
<p>
This document describes how the Web of Things Thing Description [[WOT-THING-DESCRIPTION]] (TD) can be used to represent devices that use BACnet.
In particular, the document explain how to create valid TD Forms for the
different operations that BACnet can perform.
</p>
</section>
<section id="conformance">
<p>
Forms of a Thing Description instance with BACnet Binding complies with this specification if it follows
the normative statements in <a href="#vocabulary"></a> and <a href="#mappings"></a>.
</p>
<p>
A JSON Schema [[?JSON-SCHEMA]] to validate Thing Description instances
containing BACnet Binding is provided in the <a href="bacnet.schema.json">GitHub repository</a>.
</p>
</section>
<section id="scope">
<h2>Binding Scope</h2>
<p>
It is assumed the reader of this document is familiar with the basic
principles and mechanisms of the BACnet standard [[BACnet]].
</p>
<p>
The following subset of BACnet features is supported by this binding:
<ul>
<li>
Services: ReadProperty, WriteProperty, SubscribeCOV, SubscribeCOVproperty
</li>
<li>
Data Model: Device, Object, Property, Index
</li>
</ul>
</p>
<p>
This protocol binding is intended to be used to enable web applications
to interact with data and control affordances exposed by BACnet devices.
It is not intended that this binding be used for device commissioning,
onboarding, or device management.
</p>
<p>
WoT Interaction Affordances are mapped to BACnet Properties. If the BACnet
property-identifier is not present in the URI element of the form, the
object-identifier is used to interact with the BACnet Object, exposing
the present-value Property.
</p>
<p>
When it is necessary to expose properties other than the present-value
property, the property-identifier must be included in the URI element of
the form.
</p>
<p>
Selected BACnet Service parameters are exposed as URI Variables to enable
WoT consumers access to BACnet features, for example Command Priority.
</p>
</section>
<section id="url">
<h2>URI Scheme</h2>
<p>
In cases where a URI is needed to refer to data that is accessible
using BACnet services, the 'bacnet' URI scheme provides a means to
identify a property of an object in the scope of a BACnet device.
The 'bacnet' URI scheme does not provide means to identify the
BACnet network on which a device resides, or the network access
method, physical media, or protocol service to use.
</p>
<p>
The 'bacnet' URI Scheme used herein is defined in Annex Q.8 of
the BACnet Specification [[BACnet]].
</p>
<section>
<h3>URI Syntax</h3>
<p>
The syntax for the 'bacnet' URI scheme is specified below in
Augmented Backus-Naur Form (ABNF) [[RFC5234]]:
</p>
<pre class="abnf">
bacnet-URI = scheme ":" scheme-specific-part
scheme = "bacnet"
scheme-specific-part = "//" device-identifier "/" object-identifier [ "/" property-identifier [ "/" property-array-index ] ]
device-identifier = number / ".this"
object-identifier = object-type "," object-instance
object-type = number / identifier
object-instance = number
property-identifier = number / identifier
property-array-index = number
number = "0" / non-zero-digit *decimal-digit
non-zero-digit = %x31-39 ; "1" to "9"
decimal-digit = %x30-39 ; "0" to "9"
identifier = lowercase *alphanumeric *( "-" 1*alphanumeric )
alphanumeric = uppercase / lowercase / decimal-digit
uppercase = %x41-5A ; "A" to "Z"
lowercase = %x61-7A ; "a" to "z"
</pre>
<section>
<h4><code>device-identifier</code> Component</h4>
<p>
The <code>device</code> component specifies the device
instance number in decimal. A <code>device</code> identifier
of <code>.this</code> means "this device" so that it can be
used in static files that do not need to be changed when the
device identifier changes.
</p>
<pre class="abnf">
device-identifier = number / ".this"
</pre>
<p>
A Protocol Binding conforming to this specification SHALL
use number type for device-identifier.
</p>
</section>
<section>
<h4><code>object-identifier</code> Component</h4>
<p>
The <code>object-identifier</code> component consist of two
sub-components: the object-type and the object-instance
number. The object-type is either a decimal number in the
range 0 to 2<sup>10</sup>-1 (inclusive) or exactly equal to
the identifier text of one of the named items of the
BACnetObjectType enumeration defined in Clause 21 of
[[BACnet]]. The object-instance number is a decimal number
in the range 0 to 2<sup>22</sup>-1 (inclusive).
</p>
<pre class="abnf">
object-identifier = object-type "," object-instance
object-type = number / identifier
object-instance = number
</pre>
<p>
A Protocol Binding conforming to this specification SHALL
use number type for object-type.
</p>
</section>
<section>
<h4><code>property-identifier</code> Component</h4>
<p>
The <code>property-identifier</code> component is either a decimal
number or exactly equal to the identifier text of one of the
named items of the BACnetPropertyIdentifier enumeration
defined in Clause 21 of [[BACnet]]. If it is omitted, it
defaults to <code>present-value</code> except for BACnet
File objects, where the absence of the <code>property</code>
component refers to the entire content of the file accessed
with Stream Access.
</p>
<pre class="abnf">
property-identifier = number / identifier
</pre>
<p>
A Protocol Binding conforming to this specification SHALL
use number type for property-identifier.
</p>
</section>
<section>
<h4><code>property-array-index</code> Component</h4>
<p>
The components of an array property may be individually
accessed (read or written) using an "array index".
The <code>index</code> component is a decimal number.
</p>
<pre class="abnf">
property-array-index = number
</pre>
<p>
An index of 0 (zero) identifies the count of the number of data
elements. If the array index is omitted, it means that all the
elements of the array are to be accessed. An array index N,
greater than zero, identifies the Nth element in the sequence.
</p>
</section>
<section>
<h4>Numbers</h4>
<p>
A decimal number consists of one or more decimal digits. The
first digit is not permitted to be zero unless the number
consists of a single digit.
</p>
<pre class="abnf">
number = "0" / non-zero-digit *decimal-digit
non-zero-digit = %x31-39 ; "1" to "9"
decimal-digit = %x30-39 ; "0" to "9"
</pre>
</section>
<section>
<h4>Identifiers</h4>
<p>
An identifier conforms to the definition of an identifier in
ASN.1 notation (Clause 12.3 of [[X.680]]). It begins with a
lowercase letter and is followed by zero or more letters,
digits, and hyphens. A hyphen is not permitted to be the last
character, nor is it to be followed by another hyphen. The case
of letters in an identifier is significant.
</p>
<pre class="abnf">
identifier = lowercase *alphanumeric *( "-" 1*alphanumeric )
alphanumeric = uppercase / lowercase / decimal-digit
uppercase = %x41-5A ; "A" to "Z"
lowercase = %x61-7A ; "a" to "z"
</pre>
</section>
</section>
</section>
<section id="vocabulary">
<h2>BACnet Vocabulary</h2>
<p>
This section describes the vocabulary used in BACnet. A protocol
binding implementation should use the vocabulary defined in this
section to describe the different configurations that can be used to
exchange data between Web of Things clients, devices, and services.
</p>
<p>
This vocabulary is fully defined in the BACnet ontology published with this document.
</p>
<p class="ednote">
Until the JSON-LD context is published, this document will use the example URI <code>"https://example.org/bacnet"</code>for the context with the prefix <code>"bacv"</code>.
</p>
<section>
<h3>URI Variables</h3>
<table class="def">
<thead>
<tr>
<th>Vocabulary term</th>
<th>Description</th>
<th>Assignment</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>CommandPriority</code></td>
<td>Sets CmdPrio for Writes</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#nonNegativeInteger"><code>integer</code></a>
</td>
</tr>
<tr>
<td><code>covIncrement</code></td>
<td>Sets minimum change for reporting</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#decimal"><code>decimal</code></a>
</td>
</tr>
</tbody>
</table>
<p>
URI Variables are not included in the 'bacnet' URI Scheme, and are included in the Protocol Binding to communicate PDU option settings for the BACnet driver to use when sending requests.
</p>
<p>
The following JSON example shows usage of the BACnet vocabulary for URI Variables, specifically CommandPriority and covIncrement. The semantic annotation is optional.
</p>
<p>
This template could be used to construct the uriVariables element for TD interaction afffordances, to enable the application to communicate URI variables to the BACnet driver, using a consistent format according to the schema constraints below.
</p>
<p>
These variables may be also used in a form element to provide a constant value for the BACnet driver to use for PDU option values. If the variable is set in the forms element, and the application appends a URI variable to the URI in the request to the BACnet driver, the BACnet driver MUST use the value provided by the application in the URI variable when constructing the BACnet PDU for the request.
</p>
<pre id="uri-variables" class="json" title="URI Variables">
{
"@context": ["https://www.w3.org/2022/wot/td/v1.1",
{
"bacv": "https://example.org/bacnet"
}],
"uriVariables": {
"CommandPriority": {
"@type": "bacv:CommandPriority",
"type": "integer",
"minimum": 1,
"maximum": 16
},
"covIncrement": {
"@type": "bacv:covIncrement",
"type": "number",
"minimum": 0
}
}
}
</pre>
</section>
<section>
<h3>Form terms</h3>
<table class="def">
<thead>
<tr>
<th>Vocabulary term</th>
<th>Description</th>
<th>Range</th>
<th>Domain</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bacv:usesService</code></td>
<td>Indicates the BACnet service to use</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a>
<p>(one of <code>"ReadProperty"</code>, <code>"WriteProperty"</code>, <code>"SubscribeCOVproperty"</code>)</p>
</td>
<td>td:forms</td>
</tr>
<tr>
<td><code>bacv:isISO8601</code></td>
<td>This data uses ISO8601 format</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#boolean"><code>boolean</code></a>
</td>
<td>bacv:Sequence</td>
</tr>
<tr>
<td><code>bacv:hasBinaryRepresentation</code></td>
<td>Points to the binary representation of the resource</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a>
<p>(one of <code>"hex"</code>, <code>"dotted-decimal"</code>, <code>"base64"</code>)</p>
</td>
<td>bacv:OctetString</td>
</tr>
<tr>
<td><code>bacv:hasMember</code></td>
<td>Member of a Sequence or List</td>
<td>
bacv:DataType
</td>
<td>bacv:Sequence, bacv:List</td>
</tr>
<tr>
<td><code>bacv:hasNamedMember</code></td>
<td>Named Member of a Sequence or Choice</td>
<td>
bacv:NamedMember
</td>
<td>bacv:Sequence, bacv:Choice</td>
</tr>
<tr>
<td><code>bacv:hasFieldName</code></td>
<td>Name of a Named Member of a Sequence or Choice</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a>
</td>
<td>
bacv:NamedMember
</td>
</tr>
<tr>
<td><code>bacv:hasContextTags</code></td>
<td>Context Tage for a Sequence or Choice</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#boolean"><code>boolean</code></a>
</td>
<td>
bacv:Sequence, bacv:Choice
</td>
</tr>
<tr>
<td><code>bacv:hasMapEntry</code></td>
<td>An value map entry mapping an Enumerated value to text</td>
<td>
bacv:ValueMapEntry
</td>
<td>
bacv:ValueMap
</td>
</tr>
<tr>
<td><code>bacv:hasLogicalVal</code></td>
<td>Logical Value for a ValueMap</td>
<td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#integer"><code>integer</code></a> or <a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> or <a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#boolean">boolean</a></td>
<td>
bacv:ValueMapEntry
</td>
</tr>
<tr>
<td><code>bacv:hasProtocolVal</code></td>
<td>Protocol Value for a ValueMap</td>
<td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#integer"><code>integer</code></a></td>
<td>
bacv:ValueMapEntry
</td>
</tr>
<tr>
<td><code>bacv:hasValueMap</code></td>
<td>Value map for an Enumeration</td>
<td>
bacv:ValueMap
</td>
<td>bacv:Boolean, bacv:Enumerated, bacv:Unsigned, bacv:BitString</td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="mappings">
<h2>Mappings</h2>
<p>
This section describes the strategies and default values to use
protocol specific concepts within the
<a href="https://w3c.github.io/wot-architecture/#dfn-interaction-model">WoT Interaction model</a>.
</p>
<section id="default-mappings">
<h3>Default Operation Mappings</h3>
<table class="def">
<thead>
<tr>
<th>Operation</th>
<th>Default Binding</th>
<th>Variables and parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>readproperty</code></td>
<td><code>"bacv:usesService": "ReadProperty"</code></td>
<td></td>
</tr>
<tr>
<td><code>writeproperty</code></td>
<td><code>"bacv:usesService": "WriteProperty"</code></td>
<td>CommandPriority</td>
</tr>
<tr>
<td><code>observeproperty</code></td>
<td><code>"bacv:usesService": "SubscribeCOVproperty"</code></td>
<td>covIncrement</td>
</tr>
<tr>
<td><code>unobserveproperty</code></td>
<td><code>"bacv:usesService": "SubscribeCOVproperty"</code></td>
<td></td>
</tr>
<tr>
<td><code>observeproperty</code></td>
<td><code>"bacv:usesService": "SubscribeCOV"</code></td>
<td>Note: BACnet driver must handle Status Flags</td>
</tr>
<tr>
<td><code>unobserveproperty</code></td>
<td><code>"bacv:usesService": "SubscribeCOV"</code></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="datatype-mappings">
<h3>WoT Data Schema and BACnet Types</h3>
<p>
BACnet has its own data model, which cannot always be derived
from the data schema of the interaction affordances. Hence
the type information is amended in the Form of the protocol binding.
The goal here is to abstract BACnet's data model into a Web-like JSON-based
data model, by still keeping the wire compatibility on the protocol.
The table below shows how the mappings are done, comprehensively for all BACnet types.
</p>
<table class="def">
<thead>
<tr>
<th>BACnet Type</th>
<th>WoT Data Schema</th>
<th>BACnet Type Description under the Form</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bacv:SequenceOf</code></td>
<td><code>{ "type": "array" }</code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:SequenceOf",
"bacv:hasMember": {
"$comment": "Data type of the element",
"@type": "bacv:..."
}
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Sequence</code></td>
<td>
<code>{ "type": "object" }</code>
<br />
For the special case where a DateTime object is modeled as a Sequence <code>"bacv:isISO8601": true</code>:
<br />
<code>
{
"type": "string",
"pattern": "pattern": "^((([1-9][0-9]*)?[0-9]{4})|\\*)-((1[0-2]|0[1-9])|\\*)-((3[01]|0[1-9]|[12][0-9])|\\*)T((2[0-3]|[01][0-9])|\\*):([0-5][0-9]|\\*):([0-5][0-9]|\\*)(\\.[0-9]+)?(Z|[+-]\\d\\d:\\d\\d)?$",,
"$comment": "ISO8601 Date Time Format with optional wildcards"
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Sequence",
"bacv:isISO8601": true,
"bacv:hasContextTags": false,
"bacv:hasNamedMember": [
{
"bacv:hasFieldName": "date",
"bacv:hasDataType": {
"@type": "bacv:Date"
}
},
{
"bacv:hasFieldName": "time",
"bacv:hasDataType": {
"@type": "bacv:Time"
}
}
]
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:List</code></td>
<td><code> { "type": "array", "uniqueItems": true } </code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:List",
"bacv:hasMember": {
"@type": "bacv:..."
}
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Choice</code></td>
<td>
<code>
{ "oneOf": [
{ "type": "..." },
{ "type": "..." },
{ "...": "..." },
]}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Choice",
"bacv:hasContextTags": true,
"bacv:hasNamedMember": [
{
"bacv:hasFieldName": "...",
"bacv:hasDataType": {
"@type": "bacv:..."
}
},
{
"bacv:hasFieldName": "...",
"bacv:hasDataType": {
"@type": "bacv:..."
}
}
]
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Date</code></td>
<td>
<code>
{
"type": "string",
"pattern": "^((([1-9][0-9]*)?[0-9]{4})|\\*)-((1[0-2]|0[1-9])|\\*)-((3[01]|0[1-9]|[12][0-9])|\\*)$",
"$comment": "ISO8601 Date Format with optional wildcards"
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Date"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Time</code></td>
<td>
<code>
{
"type": "string",
"pattern": "^((2[0-3]|[01][0-9])|\\*):([0-5][0-9]|\\*):([0-5][0-9]|\\*)(\\.[0-9]+)?(Z|[+-]\\d\\d:\\d\\d)?$",
"$comment": "ISO8601 Time Format with optional wildcards"
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Time"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:WeekNDay</code></td>
<td>
<code>
{
"type": "string",
"pattern": "^((1[0-2]|0[1-9])|O|E|\\*)-(01|08|15|22|29|L7|B7|B14|B21|\\*)-([1-7]|\\*)$",
"$comment": "Custom WeekNDay string: first part month 01-12, O for odd, E for even, * for any; second part week of month: beginning on 01st, 08th, the last 7 days, they days before last 7 days, last 14 days.., or any; third part day of week: 1-7 (Mon-Sun) or any"
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:WeekNDay"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Unsigned</code></td>
<td><code>{ "type": "integer", "minimum": 0 } </code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Unsigned"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Signed</code></td>
<td><code>{ "type": "integer" }</code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Signed"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Real</code></td>
<td><code>{ "type": "number" }</code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Real"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Double</code></td>
<td><code>{ "type": "number" }</code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Double"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Boolean</code></td>
<td><code>{ "type": "boolean" }</code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Boolean"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Enumerated</code></td>
<td>
<code>
{
"$comment": "Contains the possible enum members, as strings or integers",
"enum": []
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Enumerated"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:String</code></td>
<td><code>{ "type": "string" }</code></td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:String"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:OctetString</code></td>
<td>
<code>
{
"type": "string",
"pattern": "^(([0-9A-F]{2}-?)+|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}={2}))$",
"$comment": "Binary data encoded in hex, dotted decimal (e.g. IPv4 address) or base64"
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:OctetString",
"bacv:hasBinaryRepresentation": "..."
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:BitString</code></td>
<td>
<code>
{
"type": "array",
"items": {
"$comment": "Contains the possible bit numbers",
"enum": []
}
"uniqueItems": true
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:BitString"
}
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:Any</code></td>
<td>
<code>
{ "anyOf": [
{ "type": "object" },
{ "type": "array" },
{ "type": "number" },
{ "type": "string" },
{ "type": "boolean" },
{ "type": "null" }
]}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:Any"
}
}
</code>
</td>
<tr>
<td><code>bacv:Null</code></td>
<td><code>{ "type": "null" }</code></td>
<td>
<code>
"bacv:hasDataType": {
"@type": "bacv:Null"
}
</code>
</td>
</tr>
<tr>
<td><code>bacv:ObjectIdentifier</code></td>
<td>
<code>
{
"type": "string"
"format": "iri-reference",
"$comment": "BACnet Object Identifier is to be converted to an IRI, using the href schema of this protocol binding"
}
</code>
</td>
<td>
<code>
{
"bacv:hasDataType": {
"@type": "bacv:ObjectIdentifier"
}
}
</code>
</td>
</tr>
</tbody>
</table>
</section>
<!--
<section id="possible-mappings">
<h3>Possible mappings</h3>
<p class="ednote">TODO: This section should describe other mappings that can be used by TD designers.</p>
</section>
-->
</section>
<section>
<h2>Examples</h2>
<p>
This section will present a set of examples about how the terms
defined in this document can be used to describe and configure a
Form.
</p>
<p>
[[[#example-readproperty]]] shows the property with object type
<code>analog-input</code>, object instance <code>1</code>, and
property identifier <code>present-value</code> in the scope of a
BACnet device with device instance number <code>5</code>.
</p>
<pre id="example-readproperty" class="example" title="A BACnet property">
{
"@context": ["https://www.w3.org/2022/wot/td/v1.1",
{
"bacv": "https://example.org/bacnet"
}],
...
"properties": {
"analog1": {
"type": "number",
"readOnly": true,
"forms": [{
"op": [ "readproperty" ],
"href": "bacnet://5/0,1/85",
"bacv:usesService": "ReadProperty",
"bacv:hasDataType": {
"@type": "bacv:Real"
}
}]
}
}
}
</pre>
<pre id="example-affordance-variables" class="example" title="uriVariables in the Interaction Affordance">
{
"@context": ["https://www.w3.org/2022/wot/td/v1.1",
{
"bacv": "https://example.org/bacnet"
}],
...
"properties": {
"analog1": {
"type": "number",
"readOnly": true,
"uriVariables": {