Search in sources :

Example 1 with AttributeType

use of org.openremote.model.attribute.AttributeType in project openremote by openremote.

the class TypeMapper method toAttributeType.

public static AttributeType toAttributeType(Datapoint datapoint) {
    LOG.finer("toTypeClass looking for dptId = " + datapoint.getDPT());
    AttributeType t = dptToTypeMap.get(datapoint.getDPT());
    if (t == null) {
        if (datapoint.getMainNumber() == 1) {
            t = AttributeType.BOOLEAN;
        } else {
            t = AttributeType.STRING;
        }
    }
    return t;
}
Also used : AttributeType(org.openremote.model.attribute.AttributeType)

Aggregations

AttributeType (org.openremote.model.attribute.AttributeType)1