@@ -8,6 +8,28 @@ defmodule BACnet.Protocol.ObjectTypes.Device do
88 but is also unique throughout the BACnet internetwork.
99
1010 (ASHRAE 135 - Clause 12.11)
11+
12+ For the following properties the BACnet device server needs to
13+ take special care of when other BACnet user read or write to them:
14+ - `active_cov_subscriptions`
15+ - `apdu_timeout` (propagation on write)
16+ - `auto_slave_discovery`
17+ - `device_address_binding`
18+ - `manual_slave_address_binding`
19+ - `max_info_frames` (marked as "readonly" and "default" value should be `1`)
20+ Propagation to the MS/TP Transport must be done by the BACnet device server
21+ or user of the library, if not implemented in the device server.
22+ - `max_master` (marked as "readonly" and "default" value should be `127`)
23+ Propagation to the MS/TP Transport must be done by the BACnet device server
24+ or user of the library, if not implemented in the device server.
25+ - `number_of_apdu_retries` (propagation on write)
26+ - `object_list`
27+ - `slave_address_binding`
28+ - `slave_proxy_enable`
29+ - `structured_object_list`
30+ - `utc_offset` (when handling UTC Time Synchronization)
31+ - All properties related to Backup/Restore
32+ - All properties related to (UTC) Time Synchronization
1133 """
1234
1335 # TODO: Docs
@@ -136,13 +158,27 @@ defmodule BACnet.Protocol.ObjectTypes.Device do
136158 )
137159
138160 # Properties for when the device is capable of tracking date and time
139- field ( :local_date , BACnetDate . t ( ) , readonly: true , init_fun: & BACnetDate . utc_today / 0 )
140- field ( :local_time , BACnetTime . t ( ) , readonly: true , init_fun: & BACnetTime . utc_now / 0 )
161+ field ( :local_date , BACnetDate . t ( ) ,
162+ readonly: true ,
163+ init_fun: & BACnetDate . utc_today / 0 ,
164+ annotation: [ on_read_function: & update_property ( & 1 , :local_date , BACnetDate . utc_today ( ) ) ]
165+ )
166+
167+ field ( :local_time , BACnetTime . t ( ) ,
168+ readonly: true ,
169+ init_fun: & BACnetTime . utc_now / 0 ,
170+ annotation: [ on_read_function: & update_property ( & 1 , :local_time , BACnetTime . utc_now ( ) ) ]
171+ )
141172
142173 # Properties for COV reporting service
143174 field ( :active_cov_subscriptions , [ CovSubscription . t ( ) ] , readonly: true , default: [ ] )
144175
145176 # Properties for (Utc)TimeSynchronization service
177+ field ( :time_synchronization_interval , non_neg_integer ( ) ,
178+ default: 0 ,
179+ implicit_relationship: :interval_offset
180+ )
181+
146182 field ( :time_synchronization_recipients , [ Recipient . t ( ) ] ,
147183 default: [ ] ,
148184 implicit_relationship: :interval_offset
@@ -242,7 +278,10 @@ defmodule BACnet.Protocol.ObjectTypes.Device do
242278 bac_type: { :with_validator , :unsigned_integer , & ( & 1 >= 1 and & 1 <= 127 ) }
243279 )
244280
245- field ( :max_info_frames , non_neg_integer ( ) , readonly: true )
281+ field ( :max_info_frames , pos_integer ( ) ,
282+ readonly: true ,
283+ bac_type: { :with_validator , :unsigned_integer , & ( & 1 >= 1 ) }
284+ )
246285
247286 # Virtual Terminal properties (not supported by this bacstack)
248287 # :vt_classes_supported, [BACnetVtClass.t()]
0 commit comments