Liking cljdoc? Tell your friends :D

bacure.read-properties


assemble-arraysclj

(assemble-arrays data)

Reassemble arrays from data returned from a read-property-multiple.

Reassemble arrays from data returned from a
read-property-multiple.
sourceraw docstring

assemble-resultsclj

(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.
sourceraw docstring

BACnet-array?clj

(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.
sourceraw docstring

compact-obj-prop-refclj

(compact-obj-prop-ref obj-prop-refs)

Inverse of 'expand-obj-prop-ref'.

Inverse of 'expand-obj-prop-ref'.
sourceraw docstring

expand-arrayclj

(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.
sourceraw docstring

expand-obj-prop-refclj

(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] ...]
sourceraw docstring

find-max-refsclj

(find-max-refs local-device-id device-id)
source

is-expanded-array?clj

(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]]]
sourceraw docstring

partition-object-property-referencesclj

(partition-object-property-references local-device-id
                                      device-id
                                      obj-prop-references)
source

read-array-in-chunksclj

(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.
sourceraw docstring

read-array-individuallyclj

(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.
sourceraw docstring

read-individuallyclj

(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]})
sourceraw docstring

read-propertiesclj

(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"})
sourceraw docstring

read-properties-multiple-objectsclj

(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.
sourceraw docstring

read-property-multipleclj

(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.
sourceraw docstring

read-property-multiple*clj

(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]]
sourceraw docstring

read-property-multiple-requestclj

(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]]
sourceraw docstring

read-property-requestclj

(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
sourceraw docstring

read-rangeclj

(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).
sourceraw docstring

read-range-requestclj

(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).
sourceraw docstring

read-range-request-byclj

(read-range-request-by reference range & by-what)
source

read-single-propertyclj

(read-single-property local-device-id
                      device-id
                      object-identifier
                      property-reference)

Read a single property.

Read a single property.
sourceraw docstring

read-single-property-with-fallbackclj

(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.
sourceraw docstring

replace-special-identifierclj

(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.)
sourceraw docstring

size-related?clj

(size-related? read-result)

True if the abort reason is size related.

True if the abort reason is size related.
sourceraw docstring

split-oprclj

(split-opr obj-prop-references)
source

when-collclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close