Liking cljdoc? Tell your friends :D

bacure.local-device


add-listener!clj

(add-listener! local-device-id listener)
source

add-object!clj

(add-object! object-map)
(add-object! device-id object-map)

Add the object map to the local device. Returns an object map.

Add the object map to the local device. Returns an object map.
sourceraw docstring

clear!clj

(clear! local-device-id)

Destroy all traces of one local-device.

Destroy all traces of one local-device.
sourceraw docstring

clear-all!clj

(clear-all!)

Destroy all traces of all local-devices.

Destroy all traces of all local-devices.
sourceraw docstring

default-configsclj

Some default configurations for device creation.

Some default configurations for device creation.
sourceraw docstring

default-transportclj

(default-transport network)
source

disable-communications!clj

source

enable-communications!clj

source

get-configsclj

(get-configs local-device-id)

Return a map of the local-device configurations

Return a map of the local-device configurations
sourceraw docstring

get-local-deviceclj

(get-local-device device-id)

Return the local-device associated with the device-id. If device-id is nil, simply return the first found.

Return the local-device associated with the device-id. If device-id
is nil, simply return the first found.
sourceraw docstring

get-local-device-idclj

(get-local-device-id device-object)

Given a local device object, return the device ID.

Given a local device object, return the device ID.
sourceraw docstring

i-am-broadcast!clj

(i-am-broadcast!)
(i-am-broadcast! local-device-id)

Send an 'I am' broadcast on the network.

Send an 'I am' broadcast on the network.
sourceraw docstring

initialize!clj

(initialize!)
(initialize! local-device-id)

Initialize the local device. This will bind it to it's port (most likely 47808), send a WhoIsRequest and load any programs available for the local-device. The port will remain unavailable until the device is terminated. Once terminated, you should discard the device and create a new one if needed.

For more information on the local-device 'programs' operations, see the bacure.local-save namespace.

Return true if initializing (binding to port) is successful.

Initialize the local device. This will bind it to it's port (most
likely 47808), send a WhoIsRequest and load any programs available
for the local-device. The port will remain unavailable until the
device is terminated. Once terminated, you should discard the device
and create a new one if needed.

For more information on the local-device 'programs' operations, see
the bacure.local-save namespace.

Return true if initializing (binding to port) is successful.
sourceraw docstring

list-local-devicesclj

(list-local-devices)
source

load-local-device-backup!clj

(load-local-device-backup! local-device-id)
(load-local-device-backup! local-device-id new-configs)

Load the local-device backup file and reset it with this new configuration.

Load the local-device backup file and reset it with this new
configuration.
sourceraw docstring

local-device-backupclj

(local-device-backup)
(local-device-backup local-device-id)

Get the necessary information to create a local device backup.

Get the necessary information to create a local device backup.
sourceraw docstring

local-device-objectclj

(local-device-object device-id)

Return the local-device bacnet4j object associated with the device-id. If device-id is nil, simply return the first found.

Return the local-device bacnet4j object associated with the
device-id. If device-id is nil, simply return the first found.
sourceraw docstring

local-objectsclj

(local-objects)
(local-objects device-id)

Return a list of all the local objects.

Return a list of all the local objects.
sourceraw docstring

maybe-register-as-foreign-device!clj

(maybe-register-as-foreign-device! local-device-id)

Try to register the device if the key ':foreign-device-target' is present in the configuration

Try to register the device if the key ':foreign-device-target' is
present in the configuration 
sourceraw docstring

new-local-device!clj

(new-local-device!)
(new-local-device! configs-map)

Create a new device and return its ID. (A device is required to communicate over the BACnet network.). Use the function 'initialize' and 'terminate' to bind and unbind the device to the BACnet port. If needed, the initial configurations are associated with the keyword :init-configs inside the local-device map.'

See README for more information about how to specify configs-map.

Create a new device and return its ID. (A device is required to
communicate over the BACnet network.). Use the function 'initialize'
and 'terminate' to bind and unbind the device to the BACnet port. If
needed, the initial configurations are associated with the
keyword :init-configs inside the local-device map.'

See README for more information about how to specify configs-map.
sourceraw docstring

objectclj

(object object-identifier)
(object device-id object-identifier)

Return a local object

Return a local object
sourceraw docstring

register-as-foreign-deviceclj

(register-as-foreign-device target-ip-or-hostname target-port time-to-live)
(register-as-foreign-device local-device-id
                            target-ip-or-hostname
                            target-port
                            time-to-live)

Register the local device as a foreign device in a device located on another network. Will block until the registration is completed or the request times out.

The time-to-live is the time in minutes after which we should be removed from the foreign device table (if we don't re-register).

Re-registration are handled automatically.

Throws a BACnet exception if timeout, a NAK is received, the device is already registered or if the request couldn't be sent.

Register the local device as a foreign device in a device located
on another network. Will block until the registration is completed
or the request times out.

The time-to-live is the time in minutes after which we should be
removed from the foreign device table (if we don't re-register).

Re-registration are handled automatically.

Throws a BACnet exception if timeout, a NAK is received, the device
is already registered or if the request couldn't be sent.
sourceraw docstring

remove-object!clj

(remove-object! object-identifier)
(remove-object! device-id object-identifier)
source

reset-local-device!clj

(reset-local-device!)
(reset-local-device! config-or-id)
(reset-local-device! local-device-id new-config)

Terminate the local device and discard it. Replace it with a new local device, and apply the same configurations as the previous one. If a map with new configurations is provided, it will be merged with the old config.

(reset-local-device {:device-id 1112}) ---> reset the device and change the device id.

Terminate the local device and discard it. Replace it with a new
local device, and apply the same configurations as the previous one.
If a map with new configurations is provided, it will be merged with
the old config.

(reset-local-device {:device-id 1112})
---> reset the device and change the device id.
sourceraw docstring

save-local-device-backup!clj

(save-local-device-backup!)

Save the device backup on a local file and return the config map.

Save the device backup on a local file and return the config map.
sourceraw docstring

terminate!clj

(terminate!)
(terminate! local-device-id)

Terminate the local device, freeing any bound port in the process. Close its serial connection if it exists afterwards. (If we don't terminate the device first, and it's got an MS/TP node, it'll try to access a closed serial connection in its MS/TP node thread and it'll throw angrily.)

Terminate the local device, freeing any bound port in the process. Close its
serial connection if it exists afterwards. (If we don't terminate the device
first, and it's got an MS/TP node, it'll try to access a closed serial
connection in its MS/TP node thread and it'll throw angrily.)
sourceraw docstring

terminate-all!clj

(terminate-all!)

Terminate all local devices.

Terminate all local devices.
sourceraw docstring

unregister-as-foreign-deviceclj

(unregister-as-foreign-device)
(unregister-as-foreign-device local-device-id)

Unregister as a foreign device. Should be done automatically when terminating a local device.

Unregister as a foreign device. Should be done automatically when
terminating a local device.
sourceraw docstring

update-configs!clj

(update-configs! local-device-id properties-smap)

Given a map of properties, will update the local-device. Return the device configs. Please note that many properties CANNOT be changed while the device is initialized (:object-identifier for example) and will simply be discarded.

Given a map of properties, will update the local-device. Return the
device configs. Please note that many properties CANNOT be changed
while the device is initialized (:object-identifier for example) and
will simply be discarded.
sourceraw docstring

with-temp-devicescljmacro

(with-temp-devices & body)

Execute body with a temporary set of local-devices. Any existing devices will be terminated before the body executes and re-initiated after. Useful for tests.

Execute body with a temporary set of local-devices. Any existing
devices will be terminated before the body executes and re-initiated
after. Useful for tests.
sourceraw docstring

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

× close