(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.
(clear! local-device-id)
Destroy all traces of one local-device.
Destroy all traces of one local-device.
(clear-all!)
Destroy all traces of all local-devices.
Destroy all traces of all local-devices.
Some default configurations for device creation.
Some default configurations for device creation.
(get-configs local-device-id)
Return a map of the local-device configurations
Return a map of the local-device configurations
(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.
(get-local-device-id device-object)
Given a local device object, return the device ID.
Given a local device object, return the device ID.
(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.
(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.
(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.
(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.
(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.
(local-objects)
(local-objects device-id)
Return a list of all the local objects.
Return a list of all the local objects.
(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
(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.
(object object-identifier)
(object device-id object-identifier)
Return a local object
Return a local object
(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.
(remove-object! object-identifier)
(remove-object! device-id object-identifier)
(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.
(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.
(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.)
(terminate-all!)
Terminate all local devices.
Terminate all local devices.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close