(assemble-arrays data)
Reassemble arrays from data returned from a read-property-multiple.
Reassemble arrays from data returned from a read-property-multiple.
(assemble-results results)
For each object-identifier, check if a property is present is present more than once. If it is, we are most probably dealing with a segmented array... just concat them together.
For each object-identifier, check if a property is present is present more than once. If it is, we are most probably dealing with a segmented array... just concat them together.
(BACnet-array? data)
Return true if the raw data returned by a read property is part of an array.
Return true if the raw data returned by a read property is part of an array.
(compact-obj-prop-ref obj-prop-refs)
Inverse of 'expand-obj-prop-ref'.
Inverse of 'expand-obj-prop-ref'.
(expand-array local-device-id device-id object-identifier property-reference)
(expand-array local-device-id
device-id
object-identifier
property-reference
size)
Ask the remote device what is the length of the BACnet array and return as many object-property-identifiers. If object is not an array (or any other error), return nil.
An array length can be provided to avoid a request to a remote device.
Ask the remote device what is the length of the BACnet array and return as many object-property-identifiers. If object is not an array (or any other error), return nil. An array length can be provided to avoid a request to a remote device.
(expand-obj-prop-ref obj-prop-refs)
Take a normal object-property-references, such as
[ [[:analog-input 0] :description :object-name] ...]
and separate the properties into individual references to obtain: [ [[:analog-input 0] :description] [[:analog-input 0] :object-name] ...]
Take a normal object-property-references, such as [ [[:analog-input 0] :description :object-name] ...] and separate the properties into individual references to obtain: [ [[:analog-input 0] :description] [[:analog-input 0] :object-name] ...]
(is-expanded-array? opr)
Return true if the object-property-references is an expanded array Example : [[[:device 123] [:object-list 1]] [[:device 123] [:object-list 2]]]
Return true if the object-property-references is an expanded array Example : [[[:device 123] [:object-list 1]] [[:device 123] [:object-list 2]]]
(partition-object-property-references local-device-id
device-id
obj-prop-references)
(read-array-in-chunks local-device-id device-id partitioned-array)
Read the partitioned arrays in chunks and then assemble them back together.
Read the partitioned arrays in chunks and then assemble them back together.
(read-array-individually local-device-id
device-id
object-identifier
property-reference)
Read a BACnet array one time at the time and re-assemble the result afterward.
Read a BACnet array one time at the time and re-assemble the result afterward.
(read-individually local-device-id device-id object-property-references)
Given a list of object-property-references, return a list of object properties maps.
[[[:analog-input 0] :description] [[:analog-input 1] :object-name] [[:device 1234] [:object-list 2]]] <---- with array index
---->
({:description "ANALOG INPUT 0", :object-identifier [:analog-input 0]} {:object-name "ANALOG INPUT 1", :object-identifier [:analog-input 1]} {[:object-list 2] [:analog-input 0], :object-identifier [:device 1234]})
Given a list of object-property-references, return a list of object properties maps. [[[:analog-input 0] :description] [[:analog-input 1] :object-name] [[:device 1234] [:object-list 2]]] <---- with array index ----> ({:description "ANALOG INPUT 0", :object-identifier [:analog-input 0]} {:object-name "ANALOG INPUT 1", :object-identifier [:analog-input 1]} {[:object-list 2] [:analog-input 0], :object-identifier [:device 1234]})
(read-properties device-id object-property-references)
(read-properties local-device-id device-id object-property-references)
Retrieve the property values form a remote device. Format for object-property-references should be:
[ [[:analog-input 0] :description :object-name] <--- multiple properties [[:device 1234] [:object-list 0]] <--- array access [[:analog-ouput 1] :present-value] ...]
The result will be a collection of objects properties map.
Example:
({:object-identifier [analog-input 1], :present-value 12.23} {:object-identifier [analog-input 2], :present-value 24.53, object-name "Analog Input 2"})
Retrieve the property values form a remote device. Format for object-property-references should be: [ [[:analog-input 0] :description :object-name] <--- multiple properties [[:device 1234] [:object-list 0]] <--- array access [[:analog-ouput 1] :present-value] ...] The result will be a collection of objects properties map. Example: ({:object-identifier [analog-input 1], :present-value 12.23} {:object-identifier [analog-input 2], :present-value 24.53, object-name "Analog Input 2"})
(read-properties-multiple-objects device-id object-identifiers properties)
(read-properties-multiple-objects local-device-id
device-id
object-identifiers
properties)
A convenience function to retrieve properties for multiple objects.
A convenience function to retrieve properties for multiple objects.
(read-property-multiple local-device-id device-id obj-prop-references)
read-access-specification should be of the form: [[object-identifier property-references] [object-identifier property-references]]
In case of an error (example :unknown-object), will fallback to reading everything individually in order to be able to know which property-reference is problematic.
read-access-specification should be of the form: [[object-identifier property-references] [object-identifier property-references]] In case of an error (example :unknown-object), will fallback to reading everything individually in order to be able to know which property-reference is problematic.
(read-property-multiple* local-device-id device-id obj-prop-references)
read-access-specification should be of the form: [[object-identifier property-references] [object-identifier property-references]]
read-access-specification should be of the form: [[object-identifier property-references] [object-identifier property-references]]
(read-property-multiple-request obj-prop-references)
Create a read-property-multiple request. [[object-identifier property-references] [object-identifier property-references]]
Create a read-property-multiple request. [[object-identifier property-references] [object-identifier property-references]]
(read-property-request object-identifier property-reference)
Create a read-property request.
[:analog-input 0] :description [:analog-input 0] [:description 0] <--- with array index
Create a read-property request. [:analog-input 0] :description [:analog-input 0] [:description 0] <--- with array index
(read-range local-device-id
device-id
object-identifier
property-identifier
array-index
[reference range]
&
by-what?)
'by-what?' can be :sequence, :time, or position (the default if none is provided).
'by-what?' can be :sequence, :time, or position (the default if none is provided).
(read-range-request object-identifier
property-identifier
array-index
[reference range]
&
by-what?)
'by-what?' can be :sequence, :time, or :position (the default if none is provided).
'by-what?' can be :sequence, :time, or :position (the default if none is provided).
(read-single-property local-device-id
device-id
object-identifier
property-reference)
Read a single property.
Read a single property.
(read-single-property-with-fallback local-device-id
device-id
object-identifier
property-reference)
Read a single property. If there's a size-related APDU error, will try to read the BACnet arrays one item at the time.
Read a single property. If there's a size-related APDU error, will try to read the BACnet arrays one item at the time.
(replace-special-identifier object-property-references)
For devices that don't support the special identifiers (i.e. :all, :required and :optional), return a list of properties.
The :all won't be as the one defined by the BACnet standard, because we can't know for sure what are the properties. (Especially in the case of proprietary objects.)
For devices that don't support the special identifiers (i.e. :all, :required and :optional), return a list of properties. The :all won't be as the one defined by the BACnet standard, because we can't know for sure what are the properties. (Especially in the case of proprietary objects.)
(size-related? read-result)
True if the abort reason is size related.
True if the abort reason is size related.
(when-coll coll f)
Apply function 'f' to coll only if it really is a collection. Return nil otherwise.
Apply function 'f' to coll only if it really is a collection. Return nil otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close