bacure.coerce

bacnet->clojure

multimethod

Recursively convert objects from the bacnet4j library into clojure datastructure.

bacnet-types

(bacnet-types)
Return a list of the acceptable bacnet types (keywords) for the function
`clojure->bacnet'.

bean-map

(bean-map java-object)
Create a clojure map using `bean' and remove unwanted info

class-to-keyword

(class-to-keyword bacnet-class)

clojure->bacnet

multimethod

Transform clojure data values into the given bacnet type.

Run the function `bacnet-types' to see the available types.

def-subclass-map

macro

(def-subclass-map bacnet-class subclass-map)

enumerated-converter

macro

(enumerated-converter bacnet-class)
Generate the defmethods for `bacnet->clojure' and `clojure->bacnet'
for bacnet enumerated types. 

Also define a <class-name>-map which is a map of keywords and
integer values.

example

(example object-type-keyword)
Generate an example of the expected
datastructure.

from-camel

(from-camel string)

int-to-keyword

(int-to-keyword data-map integer)
Convert the integer to its associated keyword in the data-map. If
no match is found, generate an `unknown-XX' keyword, where XX is the
given integer.

int-to-keyword*

(int-to-keyword* inverted-data-map integer)
Convert the integer to its associated keyword in the data-map. If
no match is found, generate an `unknown-XX' keyword, where XX is the
given integer.

TAKES THE INVERTED DATAMAP

key-or-num-to-int

(key-or-num-to-int data-map key-or-num)
Will convert the key-or-num into the integer value associated in
the data-map. If the keyword is not found in the data-map, check to
see if it's an `unknown-XX' and extract the number.

Default to '0' if the provided value is not a keyword nor a number.

An error is thrown if the keyword doesn't match anything.

object-to-keyword

(object-to-keyword bacnet-object)
Convert bacnet4j objects to clojure keywords

subclass-to-map

(subclass-to-map class)
Make a map of the subclasses and associate them with their integer
value.

to-camel

(to-camel string)