From 9f8bd8acd7c9c15f2f031c6ddaa7c97e16b59940 Mon Sep 17 00:00:00 2001 From: pankalog Date: Sun, 24 Dec 2023 18:33:39 +0200 Subject: [PATCH] Corrections and adding TeltonikaParameter to CustomValueTypes --- .../src/main/java/org/openremote/model/custom/CarAsset.java | 5 ++--- .../java/org/openremote/model/custom/CustomValueTypes.java | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/model/src/main/java/org/openremote/model/custom/CarAsset.java b/model/src/main/java/org/openremote/model/custom/CarAsset.java index 1dd304a..3fae91d 100644 --- a/model/src/main/java/org/openremote/model/custom/CarAsset.java +++ b/model/src/main/java/org/openremote/model/custom/CarAsset.java @@ -15,11 +15,10 @@ public class CarAsset extends Asset { public static final AttributeDescriptor LAST_CONTACT = new AttributeDescriptor<>("lastContact", ValueType.DATE_AND_TIME); public static final AttributeDescriptor MAKE_AND_MODEL = new AttributeDescriptor<>("makeAndModel", ValueType.TEXT).withOptional(true); public static final AttributeDescriptor MODEL_YEAR = new AttributeDescriptor<>("modelYear", ValueType.INTEGER).withOptional(true); - /** - * If Rich sees this, sorry for the American spelling! - */ public static final AttributeDescriptor COLOR = new AttributeDescriptor<>("color", ValueType.COLOUR_RGB).withOptional(true); public static final AttributeDescriptor LICENSE_PLATE = new AttributeDescriptor<>("licensePlate", ValueType.TEXT).withOptional(true); + + // Figure out a way to use the colour parameter for the color of the car on the map public static final AssetDescriptor DESCRIPTOR = new AssetDescriptor<>("car", null, CarAsset.class); diff --git a/model/src/main/java/org/openremote/model/custom/CustomValueTypes.java b/model/src/main/java/org/openremote/model/custom/CustomValueTypes.java index a550a1a..be3c626 100644 --- a/model/src/main/java/org/openremote/model/custom/CustomValueTypes.java +++ b/model/src/main/java/org/openremote/model/custom/CustomValueTypes.java @@ -1,7 +1,9 @@ package org.openremote.model.custom; +import org.openremote.model.teltonika.TeltonikaParameter; import org.openremote.model.value.ValueDescriptor; public class CustomValueTypes { public static final ValueDescriptor ASSET_STATE_DURATION = new ValueDescriptor<>("AssetStateDuration", AssetStateDuration.class); + public static final ValueDescriptor TELTONIKA_PARAMETER = new ValueDescriptor<>("TeltonikaParameter", TeltonikaParameter.class); }