~hv1vdNMKW4PuVRTmoAo2vMh?jDvQ6SwCzL6R=1Fh;lLRni
zs4|%^F2D`JQwD3*-i*q(TV9}bt1%$EKMRPL5fQ`9PFJmRp22%Fga2?QLjE=65@vRL
zU>%pr9eHCc=mK$X`X`D#zMPIT*2Y^HRb7V_5T8!R=>CMm=T~Ry^b6=!1oT4pp=A$`
z&6}d0KBf-&HMQ2YxYnh3!Q}B&JiXmylVr6Y`KwW;-Lm5#o43pIl~XI%Kg>R6mz;<^
zmAJxQ3^JgB3~>X5`Y1m+n0EMvvfr7#-;0o8#&xvJg%!t@Iiz>-ho5MuCCo*rsP@kw
zpgrL;)Cp@k4t;#kdIWe&w0EYCH{u4)W(KQZI+CSMZLk$rT>)2`9YS9sU;g`vlg2uO
zl>Ol-Nk2?i%8Zb&r6*P};1x6X`%i^Gv%KL9)>hOI`u|k24S4iaxBXVs0{XMJYHH39iKO+wUILxLBh*iwb~6HP
zr-J@!ayCPucsqKI`V0+_1SPgC-2tpu
z20?po6xi5Ery?X5|1|Q@5Tf@m%DwmCehnz%HKbl&khnib{k#VcnGMy6MLCJzSB{mSru-M7YIf>C&TK{asy8rb%F
zI0J2{ddgkg_P%$+U07>uEGhXiF>IfuY*B?>PFp<)8O#cFMIu9gxRzhM_L}3WRT{(!
zvT|tI;t12!ldM-%E8S>_&bSt*Tav&3U>3F(GdoBbt{YJLcz(+}1Y;VCwPqn}(iVHf
z53|_BuBEQ;iZwYadD~U5D^_qs=rnYt?Nd6s5K`OA@DnPsV>+8ZJEPbe4*AOef=KN@
zBm%x3kRkp5OocQz^sxW8sW27%1Sj>?1r6z+7vaC9G#Jh)buJJ)mB^JS74`%zRpOQa
z95ogEmOeG=mKDOx^WQ;|)F2<&)SX*2qW>&VP+(xI|I7@513LtG>3`6<67&CD5z+tri~66YM#}#Y
z6(QF8{)=7u$PE!b_#a#uLrxjR`|p0xJP|MOB
diff --git a/.gradle-wrapper/gradle-wrapper.properties b/.gradle-wrapper/gradle-wrapper.properties
index a3638774392..ac72c34e8ac 100644
--- a/.gradle-wrapper/gradle-wrapper.properties
+++ b/.gradle-wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index e8b642ad625..fff4e06f1f1 100755
--- a/gradlew
+++ b/gradlew
@@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
From 63c0ce67e8914da32020e2de2b5805f2115ce032 Mon Sep 17 00:00:00 2001
From: Stefan Feilmeier
Date: Fri, 25 Aug 2023 15:03:22 +0200
Subject: [PATCH 20/81] Implement ENTSO-E, OpenEMS Currency and
exchangerate.host (#2207)
This PR adds:
- ENTSO-E as Time-of-Use Tariff provider for day-ahead prices in European power grids. These tariffs can then be used e.g. in combination with "ESS Time-of-Use Tariff Discharge Controller" (https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.controller.ess.timeofusetariff.discharge) or its future replacement in #2238.
- Global configuration for "Currency" in the Core.Meta Component. Every monetary value in OpenEMS is inherently expressed in this Currency. Values obtained in a different currency (e.g. energy prices from a web service) have to be internally converted to this Currency.
- "exchangerate.host" (Exchange rates API is a free service for current and historical foreign exchange rates & crypto currencies rates). The implementation is currently only local to the ENTSO-E bundle, because we currently do not need this feature anywhere else yet. In future this could be extracted to a separate service. _If you or your company use this project or like what [exchangerate.host] is doing, please consider backing [them] so [they] can continue maintaining and evolving this project." -> "https://exchangerate.host/#/donate"
To request a (free) authentication token for the ENTSO-E transparency platform, please see chapter "2. Authentication and Authorisation" in the official API documentation: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation
Co-authored-by: Sagar Bandi Venu
---
.../src/io/openems/common/utils/XmlUtils.java | 47 ++
io.openems.edge.application/EdgeApp.bndrun | 2 +
.../edge/common/currency/Currency.java | 34 ++
.../edge/common/currency/CurrencyConfig.java | 33 +
.../edge/common/currency/package-info.java | 3 +
.../src/io/openems/edge/common/meta/Meta.java | 41 +-
.../openems/edge/common/test/DummyMeta.java | 22 +
.../src/io/openems/edge/core/meta/Config.java | 6 +
.../io/openems/edge/core/meta/MetaImpl.java | 9 +-
.../.classpath | 12 +
.../.gitignore | 2 +
.../.project | 23 +
.../org.eclipse.core.resources.prefs | 2 +
.../bnd.bnd | 16 +
.../readme.adoc | 11 +
.../timeofusetariff/entsoe/BiddingZone.java | 38 ++
.../edge/timeofusetariff/entsoe/Config.java | 28 +
.../timeofusetariff/entsoe/EntsoeApi.java | 82 +++
.../entsoe/ExchangeRateApi.java | 44 ++
.../timeofusetariff/entsoe/TouEntsoe.java | 27 +
.../timeofusetariff/entsoe/TouEntsoeImpl.java | 162 +++++
.../edge/timeofusetariff/entsoe/Utils.java | 174 ++++++
.../test/.gitignore | 0
.../timeofusetariff/entsoe/EntsoeApiTest.java | 25 +
.../entsoe/ExchangeRateApiTest.java | 214 +++++++
.../edge/timeofusetariff/entsoe/MyConfig.java | 63 ++
.../timeofusetariff/entsoe/ParserTest.java | 564 ++++++++++++++++++
.../timeofusetariff/entsoe/TouEntsoeTest.java | 25 +
28 files changed, 1706 insertions(+), 3 deletions(-)
create mode 100644 io.openems.edge.common/src/io/openems/edge/common/currency/Currency.java
create mode 100644 io.openems.edge.common/src/io/openems/edge/common/currency/CurrencyConfig.java
create mode 100644 io.openems.edge.common/src/io/openems/edge/common/currency/package-info.java
create mode 100644 io.openems.edge.common/src/io/openems/edge/common/test/DummyMeta.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/.classpath
create mode 100644 io.openems.edge.timeofusetariff.entsoe/.gitignore
create mode 100644 io.openems.edge.timeofusetariff.entsoe/.project
create mode 100644 io.openems.edge.timeofusetariff.entsoe/.settings/org.eclipse.core.resources.prefs
create mode 100644 io.openems.edge.timeofusetariff.entsoe/bnd.bnd
create mode 100644 io.openems.edge.timeofusetariff.entsoe/readme.adoc
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/BiddingZone.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Config.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/EntsoeApi.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApi.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoe.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoeImpl.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Utils.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/test/.gitignore
create mode 100644 io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/EntsoeApiTest.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApiTest.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/MyConfig.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ParserTest.java
create mode 100644 io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/TouEntsoeTest.java
diff --git a/io.openems.common/src/io/openems/common/utils/XmlUtils.java b/io.openems.common/src/io/openems/common/utils/XmlUtils.java
index 6431897bda9..b921670e906 100644
--- a/io.openems.common/src/io/openems/common/utils/XmlUtils.java
+++ b/io.openems.common/src/io/openems/common/utils/XmlUtils.java
@@ -1,7 +1,11 @@
package io.openems.common.utils;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
import org.w3c.dom.DOMException;
import org.w3c.dom.NamedNodeMap;
@@ -207,4 +211,47 @@ public static String getContentAsString(Node node) {
public static int getContentAsInt(Node node) {
return Integer.parseInt(node.getTextContent());
}
+
+ /**
+ * Iterates through a {@link Node}.
+ *
+ *
+ * Source: https://stackoverflow.com/a/48153597/4137113
+ *
+ * @param node the {@link Node}
+ * @return the {@link Iterable}
+ */
+ public static Iterable list(final Node node) {
+ return () -> new Iterator() {
+
+ private int index = 0;
+
+ @Override
+ public boolean hasNext() {
+ return this.index < node.getChildNodes().getLength();
+ }
+
+ @Override
+ public Node next() {
+ if (!this.hasNext()) {
+ throw new NoSuchElementException();
+ }
+ return node.getChildNodes().item(this.index++);
+ }
+ };
+ }
+
+ /**
+ * Iterates over {@link Node} through {@link Stream}.
+ *
+ *
+ * Source: https://stackoverflow.com/a/62171621/4137113
+ *
+ * @param node the {@link Node}
+ * @return the {@link Stream}
+ */
+ public static Stream stream(final Node node) {
+ var childNodes = node.getChildNodes();
+ return IntStream.range(0, childNodes.getLength()).boxed().map(childNodes::item);
+ }
}
diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun
index ef8e17d0c4e..8de72d9193d 100644
--- a/io.openems.edge.application/EdgeApp.bndrun
+++ b/io.openems.edge.application/EdgeApp.bndrun
@@ -177,6 +177,7 @@
bnd.identity;id='io.openems.edge.timedata.rrd4j',\
bnd.identity;id='io.openems.edge.timeofusetariff.awattar',\
bnd.identity;id='io.openems.edge.timeofusetariff.corrently',\
+ bnd.identity;id='io.openems.edge.timeofusetariff.entsoe',\
bnd.identity;id='io.openems.edge.timeofusetariff.tibber',\
-runbundles: \
@@ -342,6 +343,7 @@
io.openems.edge.timeofusetariff.api;version=snapshot,\
io.openems.edge.timeofusetariff.awattar;version=snapshot,\
io.openems.edge.timeofusetariff.corrently;version=snapshot,\
+ io.openems.edge.timeofusetariff.entsoe;version=snapshot,\
io.openems.edge.timeofusetariff.tibber;version=snapshot,\
io.openems.shared.influxdb;version=snapshot,\
io.openems.wrapper.eu.chargetime.ocpp;version=snapshot,\
diff --git a/io.openems.edge.common/src/io/openems/edge/common/currency/Currency.java b/io.openems.edge.common/src/io/openems/edge/common/currency/Currency.java
new file mode 100644
index 00000000000..fca2ebca5b5
--- /dev/null
+++ b/io.openems.edge.common/src/io/openems/edge/common/currency/Currency.java
@@ -0,0 +1,34 @@
+package io.openems.edge.common.currency;
+
+import io.openems.common.types.OptionsEnum;
+
+public enum Currency implements OptionsEnum {
+ UNDEFINED(-1, "-"), //
+ EUR(0, "€"), //
+ SEK(1, "kr"), //
+ ;
+
+ private final String name;
+ private final int value;
+
+ private Currency(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return Currency.UNDEFINED;
+ }
+
+}
diff --git a/io.openems.edge.common/src/io/openems/edge/common/currency/CurrencyConfig.java b/io.openems.edge.common/src/io/openems/edge/common/currency/CurrencyConfig.java
new file mode 100644
index 00000000000..aef402c2f16
--- /dev/null
+++ b/io.openems.edge.common/src/io/openems/edge/common/currency/CurrencyConfig.java
@@ -0,0 +1,33 @@
+package io.openems.edge.common.currency;
+
+import io.openems.edge.common.meta.Meta;
+import io.openems.edge.common.meta.Meta.ChannelId;
+
+/**
+ * The {@link ChannelId#CURRENCY} mandates the selection of the 'currency'
+ * configuration property of this specific type. Subsequently, this selected
+ * property is transformed into the corresponding {@link Currency} type before
+ * being written through {@link Meta#_setCurrency(Currency)}.
+ */
+public enum CurrencyConfig {
+ /**
+ * Euro.
+ */
+ EUR,
+ /**
+ * Swedish Krona.
+ */
+ SEK;
+
+ /**
+ * Converts the {@link CurrencyConfig} to the {@link Currency}.
+ *
+ * @return The {@link Currency}.
+ */
+ public Currency toCurrency() {
+ return switch (this) {
+ case EUR -> Currency.EUR;
+ case SEK -> Currency.SEK;
+ };
+ }
+}
diff --git a/io.openems.edge.common/src/io/openems/edge/common/currency/package-info.java b/io.openems.edge.common/src/io/openems/edge/common/currency/package-info.java
new file mode 100644
index 00000000000..af89b5b5e53
--- /dev/null
+++ b/io.openems.edge.common/src/io/openems/edge/common/currency/package-info.java
@@ -0,0 +1,3 @@
+@org.osgi.annotation.versioning.Version("1.0.0")
+@org.osgi.annotation.bundle.Export
+package io.openems.edge.common.currency;
diff --git a/io.openems.edge.common/src/io/openems/edge/common/meta/Meta.java b/io.openems.edge.common/src/io/openems/edge/common/meta/Meta.java
index 7d2c007b7a4..dd7c72b89fb 100644
--- a/io.openems.edge.common/src/io/openems/edge/common/meta/Meta.java
+++ b/io.openems.edge.common/src/io/openems/edge/common/meta/Meta.java
@@ -4,6 +4,9 @@
import io.openems.common.channel.AccessMode;
import io.openems.common.types.OpenemsType;
import io.openems.edge.common.channel.Doc;
+import io.openems.edge.common.channel.EnumReadChannel;
+import io.openems.edge.common.channel.value.Value;
+import io.openems.edge.common.currency.Currency;
import io.openems.edge.common.modbusslave.ModbusSlave;
import io.openems.edge.common.modbusslave.ModbusSlaveNatureTable;
import io.openems.edge.common.modbusslave.ModbusSlaveTable;
@@ -22,7 +25,17 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
* Type: String
*
*/
- VERSION(Doc.of(OpenemsType.STRING));
+ VERSION(Doc.of(OpenemsType.STRING)),
+
+ /**
+ * Edge currency.
+ *
+ *
+ * - Interface: Meta
+ *
- Type: Currency
+ *
+ */
+ CURRENCY(Doc.of(Currency.values()));
private final Doc doc;
@@ -52,4 +65,30 @@ public default ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode) {
.build());
}
+ /**
+ * Gets the Channel for {@link ChannelId#CURRENCY}.
+ *
+ * @return the Channel
+ */
+ public default EnumReadChannel getCurrencyChannel() {
+ return this.channel(ChannelId.CURRENCY);
+ }
+
+ /**
+ * Gets the Capacity in [Wh]. See {@link ChannelId#CURRENCY}.
+ *
+ * @return the Channel {@link Value}
+ */
+ public default Currency getCurrency() {
+ return this.getCurrencyChannel().value().asEnum();
+ }
+
+ /**
+ * Internal method to set the 'nextValue' on {@link ChannelId#CURRENCY} Channel.
+ *
+ * @param value the next value
+ */
+ public default void _setCurrency(Currency value) {
+ this.getCurrencyChannel().setNextValue(value);
+ }
}
diff --git a/io.openems.edge.common/src/io/openems/edge/common/test/DummyMeta.java b/io.openems.edge.common/src/io/openems/edge/common/test/DummyMeta.java
new file mode 100644
index 00000000000..eed1aebcb0f
--- /dev/null
+++ b/io.openems.edge.common/src/io/openems/edge/common/test/DummyMeta.java
@@ -0,0 +1,22 @@
+package io.openems.edge.common.test;
+
+import io.openems.edge.common.channel.Channel;
+import io.openems.edge.common.component.AbstractOpenemsComponent;
+import io.openems.edge.common.component.OpenemsComponent;
+import io.openems.edge.common.currency.Currency;
+import io.openems.edge.common.meta.Meta;
+
+public class DummyMeta extends AbstractOpenemsComponent implements Meta {
+
+ public DummyMeta(String id, Currency currency) {
+ super(//
+ OpenemsComponent.ChannelId.values(), //
+ Meta.ChannelId.values() //
+ );
+ for (Channel> channel : this.channels()) {
+ channel.nextProcessImage();
+ }
+ this._setCurrency(currency);
+ super.activate(null, id, "", true);
+ }
+}
diff --git a/io.openems.edge.core/src/io/openems/edge/core/meta/Config.java b/io.openems.edge.core/src/io/openems/edge/core/meta/Config.java
index 3838315a22a..41b9dd0f734 100644
--- a/io.openems.edge.core/src/io/openems/edge/core/meta/Config.java
+++ b/io.openems.edge.core/src/io/openems/edge/core/meta/Config.java
@@ -1,7 +1,10 @@
package io.openems.edge.core.meta;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+import io.openems.edge.common.currency.CurrencyConfig;
+
@ObjectClassDefinition(//
name = "Core Meta", //
description = "The global manager for Metadata.")
@@ -9,4 +12,7 @@
String webconsole_configurationFactory_nameHint() default "Core Meta";
+ @AttributeDefinition(name = "Currency", description = "Every monetary value is inherently expressed in this Currency. Values obtained in a different currency (e.g. energy prices from a web service) are internally converted to this Currency using the current exchange rate.")
+ CurrencyConfig currency() default CurrencyConfig.EUR;
+
}
\ No newline at end of file
diff --git a/io.openems.edge.core/src/io/openems/edge/core/meta/MetaImpl.java b/io.openems.edge.core/src/io/openems/edge/core/meta/MetaImpl.java
index 54af2dcffc3..0f47201664f 100644
--- a/io.openems.edge.core/src/io/openems/edge/core/meta/MetaImpl.java
+++ b/io.openems.edge.core/src/io/openems/edge/core/meta/MetaImpl.java
@@ -36,18 +36,20 @@ public MetaImpl() {
}
@Activate
- private void activate(ComponentContext context) {
+ private void activate(ComponentContext context, Config config) {
super.activate(context, SINGLETON_COMPONENT_ID, Meta.SINGLETON_SERVICE_PID, true);
+ this.applyConfig(config);
if (OpenemsComponent.validateSingleton(this.cm, Meta.SINGLETON_SERVICE_PID, SINGLETON_COMPONENT_ID)) {
return;
}
}
@Modified
- private void modified(ComponentContext context) {
+ private void modified(ComponentContext context, Config config) {
super.modified(context, SINGLETON_COMPONENT_ID, Meta.SINGLETON_SERVICE_PID, true);
+ this.applyConfig(config);
if (OpenemsComponent.validateSingleton(this.cm, Meta.SINGLETON_SERVICE_PID, SINGLETON_COMPONENT_ID)) {
return;
}
@@ -59,4 +61,7 @@ protected void deactivate() {
super.deactivate();
}
+ private void applyConfig(Config config) {
+ this._setCurrency(config.currency().toCurrency());
+ }
}
diff --git a/io.openems.edge.timeofusetariff.entsoe/.classpath b/io.openems.edge.timeofusetariff.entsoe/.classpath
new file mode 100644
index 00000000000..bbfbdbe40e7
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/.classpath
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/io.openems.edge.timeofusetariff.entsoe/.gitignore b/io.openems.edge.timeofusetariff.entsoe/.gitignore
new file mode 100644
index 00000000000..c2b941a96de
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/.gitignore
@@ -0,0 +1,2 @@
+/bin_test/
+/generated/
diff --git a/io.openems.edge.timeofusetariff.entsoe/.project b/io.openems.edge.timeofusetariff.entsoe/.project
new file mode 100644
index 00000000000..2423c50c37c
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/.project
@@ -0,0 +1,23 @@
+
+
+ io.openems.edge.timeofusetariff.entsoe
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ bndtools.core.bndbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ bndtools.core.bndnature
+
+
diff --git a/io.openems.edge.timeofusetariff.entsoe/.settings/org.eclipse.core.resources.prefs b/io.openems.edge.timeofusetariff.entsoe/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..99f26c0203a
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/io.openems.edge.timeofusetariff.entsoe/bnd.bnd b/io.openems.edge.timeofusetariff.entsoe/bnd.bnd
new file mode 100644
index 00000000000..e1809acc25a
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/bnd.bnd
@@ -0,0 +1,16 @@
+Bundle-Name: OpenEMS Edge Time-Of-Use ENTSO-E
+Bundle-Vendor: FENECON GmbH
+Bundle-License: https://opensource.org/licenses/EPL-2.0
+Bundle-Version: 1.0.0.${tstamp}
+
+-buildpath: \
+ ${buildpath},\
+ com.squareup.okio,\
+ io.openems.common,\
+ io.openems.edge.common,\
+ io.openems.edge.timeofusetariff.api,\
+ io.openems.wrapper.okhttp,\
+
+-testpath: \
+ org.jetbrains.kotlin.osgi-bundle,\
+ ${testpath}
diff --git a/io.openems.edge.timeofusetariff.entsoe/readme.adoc b/io.openems.edge.timeofusetariff.entsoe/readme.adoc
new file mode 100644
index 00000000000..aea3aee6223
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/readme.adoc
@@ -0,0 +1,11 @@
+= Time-Of-Use Tariff ENTSO-E
+
+This implementation uses the ENTSO-E transparency platform to receive day-ahead prices in European power grids.
+
+To request a (free) authentication token, please see chapter "2. Authentication and Authorisation" in the official API documentation: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation
+
+Prices retrieved from ENTSO-E are subsequently converted to the user's currency (defined in Core.Meta Component) using the Exchange Rates API.
+
+For detailed information about the Exchange Rates API, please refer to: https://exchangerate.host/#/docs
+
+https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.timeofusetariff.entsoe[Source Code icon:github[]]
\ No newline at end of file
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/BiddingZone.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/BiddingZone.java
new file mode 100644
index 00000000000..1ade97fa231
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/BiddingZone.java
@@ -0,0 +1,38 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+/**
+ * https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas.
+ */
+public enum BiddingZone {
+ /**
+ * BZN|DE-LU.
+ */
+ GERMANY("10Y1001A1001A82H"), //
+ /**
+ * BZN|AT.
+ */
+ AUSTRIA("10YAT-APG------L"), //
+ /**
+ * BZN|SE1.
+ */
+ SWEDEN_SE1("10Y1001A1001A44P"), //
+ /**
+ * BZN|SE2.
+ */
+ SWEDEN_SE2("10Y1001A1001A45N"), //
+ /**
+ * BZN|SE3.
+ */
+ SWEDEN_SE3("10Y1001A1001A46L"), //
+ /**
+ * BZN|SE4.
+ */
+ SWEDEN_SE4("10Y1001A1001A47J"), //
+ ;
+
+ public final String code;
+
+ private BiddingZone(String code) {
+ this.code = code;
+ }
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Config.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Config.java
new file mode 100644
index 00000000000..dfc74112e38
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Config.java
@@ -0,0 +1,28 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.AttributeType;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+
+@ObjectClassDefinition(//
+ name = "Time-Of-Use Tariff ENTSO-E", //
+ description = "Time-Of-Use Tariff implementation that uses the ENTSO-E transparency platform.")
+@interface Config {
+
+ @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component")
+ String id() default "timeOfUseTariff0";
+
+ @AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID")
+ String alias() default "";
+
+ @AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?")
+ boolean enabled() default true;
+
+ @AttributeDefinition(name = "Security Token", description = "Security token for the ENTSO-E Transparency Platform", type = AttributeType.PASSWORD)
+ String securityToken();
+
+ @AttributeDefinition(name = "Bidding Zone", description = "Zone corresponding to the customer's location")
+ BiddingZone biddingZone();
+
+ String webconsole_configurationFactory_nameHint() default "Time-Of-Use Tariff ENTSO-E [{id}]";
+}
\ No newline at end of file
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/EntsoeApi.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/EntsoeApi.java
new file mode 100644
index 00000000000..1ea088b09d1
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/EntsoeApi.java
@@ -0,0 +1,82 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import java.io.IOException;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
+import okhttp3.MediaType;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+
+public class EntsoeApi {
+
+ public static final DateTimeFormatter FORMATTER_MINUTES = DateTimeFormatter.ofPattern("u-MM-dd'T'HH:mmX");
+ public static final DateTimeFormatter FORMATTER_SECONDS = DateTimeFormatter.ofPattern("u-MM-dd'T'HH:mm:ssX");
+ public static final ZoneId UTC = ZoneId.of("UTC");
+ public static final String URI = "https://web-api.tp.entsoe.eu/api";
+
+ /**
+ * Queries the ENTSO-E API for day-ahead prices.
+ *
+ * @param token the Security Token
+ * @param areaCode Area EIC code; see
+ * https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas
+ * @param fromDate the From-Date
+ * @param toDate the To-Date
+ * @return The response string.
+ * @throws IOException on error
+ */
+ protected static String query(String token, String areaCode, ZonedDateTime fromDate, ZonedDateTime toDate)
+ throws IOException {
+ var client = new OkHttpClient();
+ var request = new Request.Builder() //
+ .url(URI) //
+ .header("SECURITY_TOKEN", token) //
+ .post(RequestBody
+ // ProcessType A01 -> Day ahead
+ // DocumentType A44 -> Price Document
+ .create("""
+
+ SampleCallToRestfulApi
+ A59
+ 10X1001A1001A450
+ A07
+ 10X1001A1001A450
+ A32
+ %s
+
+ DocumentType
+ A44
+
+
+ In_Domain
+ %s
+
+
+ Out_Domain
+ %s
+
+
+ TimeInterval
+ %s/%s
+
+ """
+ .formatted(//
+ FORMATTER_SECONDS.format(ZonedDateTime.now(UTC)), //
+ areaCode, areaCode, //
+ FORMATTER_MINUTES.format(fromDate.withZoneSameInstant(UTC)), //
+ FORMATTER_MINUTES.format(toDate.withZoneSameInstant(UTC)) //
+ ), MediaType.parse("application/xml"))) //
+ .build();
+
+ try (var response = client.newCall(request).execute()) {
+ if (!response.isSuccessful()) {
+ throw new IOException("Unable to get response from ENTSO-E API: " + response);
+ }
+
+ return response.body().string();
+ }
+ }
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApi.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApi.java
new file mode 100644
index 00000000000..569c851fcea
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApi.java
@@ -0,0 +1,44 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import java.io.IOException;
+
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+
+/**
+ * A utility class for fetching exchange rates from a web API.
+ *
+ *
+ * Day ahead prices retrieved from ENTSO-E are usually in EUR and might have to
+ * be converted to the user's currency using the exchange rates provided by
+ * Exchange Rate API. For more information on the ExchangeRate API, visit:
+ * https://exchangerate.host/#/docs
+ */
+public class ExchangeRateApi {
+
+ private static final String BASE_URL = "https://api.exchangerate.host/latest?base=%s";
+ private static final OkHttpClient client = new OkHttpClient();
+ private static final String URL = String.format(BASE_URL, "EUR");
+
+ /**
+ * Fetches the exchange rates from base currency EUR.
+ *
+ * @return the Response string.
+ * @throws IOException on error.
+ */
+ protected static String getExchangeRates() throws IOException {
+ var request = new Request.Builder() //
+ .url(URL) //
+ .build();
+
+ try (var response = client.newCall(request).execute()) {
+ if (!response.isSuccessful()) {
+ throw new IOException("Failed to fetch exchange rate. HTTP status code: " + response.code());
+ }
+
+ return response.body().string();
+ }
+ }
+
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoe.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoe.java
new file mode 100644
index 00000000000..f3bab7a1533
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoe.java
@@ -0,0 +1,27 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import io.openems.common.channel.Level;
+import io.openems.edge.common.channel.Doc;
+import io.openems.edge.common.component.OpenemsComponent;
+import io.openems.edge.timeofusetariff.api.TimeOfUseTariff;
+
+public interface TouEntsoe extends OpenemsComponent, TimeOfUseTariff {
+
+ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
+ UNABLE_TO_UPDATE_PRICES(Doc.of(Level.WARNING) //
+ .text("Unable to update prices from ENTSO-E API")), //
+ ;
+
+ private final Doc doc;
+
+ private ChannelId(Doc doc) {
+ this.doc = doc;
+ }
+
+ @Override
+ public Doc doc() {
+ return this.doc;
+ }
+ }
+
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoeImpl.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoeImpl.java
new file mode 100644
index 00000000000..cea8876928d
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/TouEntsoeImpl.java
@@ -0,0 +1,162 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import java.io.IOException;
+import java.time.Clock;
+import java.time.Duration;
+import java.time.ZonedDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.BiConsumer;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.metatype.annotations.Designate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.SAXException;
+
+import com.google.common.collect.ImmutableSortedMap;
+
+import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
+import io.openems.common.utils.ThreadPoolUtils;
+import io.openems.edge.common.channel.value.Value;
+import io.openems.edge.common.component.AbstractOpenemsComponent;
+import io.openems.edge.common.component.OpenemsComponent;
+import io.openems.edge.common.meta.Meta;
+import io.openems.edge.timeofusetariff.api.TimeOfUsePrices;
+import io.openems.edge.timeofusetariff.api.TimeOfUseTariff;
+import io.openems.edge.timeofusetariff.api.utils.TimeOfUseTariffUtils;
+
+@Designate(ocd = Config.class, factory = true)
+@Component(//
+ name = "TimeOfUseTariff.ENTSO-E", //
+ immediate = true, //
+ configurationPolicy = ConfigurationPolicy.REQUIRE //
+)
+public class TouEntsoeImpl extends AbstractOpenemsComponent implements TouEntsoe, OpenemsComponent, TimeOfUseTariff {
+
+ private static final int API_EXECUTE_HOUR = 14;
+
+ private final Logger log = LoggerFactory.getLogger(TouEntsoeImpl.class);
+ private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
+ private final AtomicReference> prices = new AtomicReference<>(
+ ImmutableSortedMap.of());
+
+ @Reference
+ private Meta meta;
+
+ private Config config = null;
+ private ZonedDateTime updateTimeStamp = null;
+
+ public TouEntsoeImpl() {
+ super(//
+ OpenemsComponent.ChannelId.values(), //
+ TouEntsoe.ChannelId.values() //
+ );
+ }
+
+ private final BiConsumer, Value> onCurrencyChange = (a, b) -> {
+ this.scheduleTask(0);
+ };
+
+ @Activate
+ private void activate(ComponentContext context, Config config) {
+ super.activate(context, config.id(), config.alias(), config.enabled());
+
+ if (!config.enabled()) {
+ return;
+ }
+
+ if (config.securityToken() == null || config.securityToken().isBlank()) {
+ this.logError(this.log, "Please configure Security Token to access ENTSO-E");
+ return;
+ }
+ this.config = config;
+
+ // React on updates to Currency.
+ this.meta.getCurrencyChannel().onChange(this.onCurrencyChange);
+ }
+
+ @Deactivate
+ protected void deactivate() {
+ super.deactivate();
+ this.meta.getCurrencyChannel().removeOnChangeCallback(this.onCurrencyChange);
+ ThreadPoolUtils.shutdownAndAwaitTermination(this.executor, 0);
+ }
+
+ /**
+ * Schedules execution the the update Task.
+ *
+ * @param seconds execute task in seconds
+ */
+ private void scheduleTask(long seconds) {
+ this.executor.schedule(this.task, seconds, TimeUnit.SECONDS);
+ }
+
+ private final Runnable task = () -> {
+ var token = this.config.securityToken();
+ var areaCode = this.config.biddingZone().code;
+ var fromDate = ZonedDateTime.now().truncatedTo(ChronoUnit.HOURS);
+ var toDate = fromDate.plusDays(1);
+ var unableToUpdatePrices = false;
+
+ try {
+ final var result = EntsoeApi.query(token, areaCode, fromDate, toDate);
+ final var entsoeCurrency = Utils.parseCurrency(result);
+ final var globalCurrency = this.meta.getCurrency();
+ final var exchangeRate = globalCurrency.name() == entsoeCurrency //
+ ? 1 // No need to fetch exchange rate from API.
+ : Utils.exchangeRateParser(ExchangeRateApi.getExchangeRates(), globalCurrency);
+
+ // Parse the response for the prices
+ this.prices.set(Utils.parsePrices(result, "PT60M", exchangeRate));
+
+ // store the time stamp
+ this.updateTimeStamp = ZonedDateTime.now();
+
+ } catch (IOException | ParserConfigurationException | SAXException | OpenemsNamedException e) {
+ this.logWarn(this.log, "Unable to Update Entsoe Time-Of-Use Price: " + e.getMessage());
+ e.printStackTrace();
+ unableToUpdatePrices = true;
+ }
+
+ this.channel(TouEntsoe.ChannelId.UNABLE_TO_UPDATE_PRICES).setNextValue(unableToUpdatePrices);
+
+ /*
+ * Schedule next price update at 2 o clock every day.
+ */
+ var now = ZonedDateTime.now();
+ var nextRun = now.withHour(API_EXECUTE_HOUR).truncatedTo(ChronoUnit.HOURS);
+ if (unableToUpdatePrices) {
+ // If the prices are not updated, try again in next minute.
+ nextRun = now.plusMinutes(1).truncatedTo(ChronoUnit.MINUTES);
+ this.logWarn(this.log, "Unable to Update the prices, Trying again at: " + nextRun);
+ } else if (now.isAfter(nextRun)) {
+ nextRun = nextRun.plusDays(1);
+ }
+
+ var delay = Duration.between(now, nextRun).getSeconds();
+ this.scheduleTask(delay);
+ };
+
+ @Override
+ public TimeOfUsePrices getPrices() {
+ // return empty TimeOfUsePrices if data is not yet available.
+ if (!this.config.enabled() || this.updateTimeStamp == null) {
+ return TimeOfUsePrices.empty(ZonedDateTime.now());
+ }
+
+ return TimeOfUseTariffUtils.getNext24HourPrices(Clock.systemDefaultZone() /* can be mocked for testing */,
+ this.prices.get(), this.updateTimeStamp);
+ }
+
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Utils.java b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Utils.java
new file mode 100644
index 00000000000..e1938e71021
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/src/io/openems/edge/timeofusetariff/entsoe/Utils.java
@@ -0,0 +1,174 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import static io.openems.common.utils.XmlUtils.stream;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TreeMap;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import com.google.common.collect.ImmutableSortedMap;
+
+import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
+import io.openems.common.utils.JsonUtils;
+import io.openems.common.utils.XmlUtils;
+import io.openems.edge.common.currency.Currency;
+
+public class Utils {
+
+ private static final DateTimeFormatter FORMATTER_MINUTES = DateTimeFormatter.ofPattern("u-MM-dd'T'HH:mmX");
+
+ private static record QueryResult(ZonedDateTime start, List prices) {
+ protected static class Builder {
+ private ZonedDateTime start;
+ private List prices = new ArrayList<>();
+
+ public Builder start(ZonedDateTime start) {
+ this.start = start;
+ return this;
+ }
+
+ public Builder prices(List prices) {
+ this.prices.addAll(prices);
+ return this;
+ }
+
+ public ImmutableSortedMap toMap() {
+
+ var result = new TreeMap();
+ var timestamp = this.start.withZoneSameInstant(ZoneId.systemDefault());
+ var quarterHourIncrements = this.prices.size() * 4;
+
+ for (int i = 0; i < quarterHourIncrements; i++) {
+ result.put(timestamp, this.prices.get(i / 4));
+ timestamp = timestamp.plusMinutes(15);
+ }
+
+ return ImmutableSortedMap.copyOf(result);
+ }
+ }
+
+ public static Builder create() {
+ return new Builder();
+ }
+ }
+
+ /**
+ * Parses the XML response from the Entso-E API to get the Day-Ahead prices.
+ *
+ * @param xml The XML string to be parsed.
+ * @param resolution PT15M or PT60M
+ * @param exchangeRate The exchange rate of user currency to EUR.
+ * @return The {@link ImmutableSortedMap}
+ * @throws ParserConfigurationException on error.
+ * @throws SAXException on error
+ * @throws IOException on error
+ */
+ protected static ImmutableSortedMap parsePrices(String xml, String resolution, double exchangeRate)
+ throws ParserConfigurationException, SAXException, IOException {
+ var dbFactory = DocumentBuilderFactory.newInstance();
+ var dBuilder = dbFactory.newDocumentBuilder();
+ var is = new InputSource(new StringReader(xml));
+ var doc = dBuilder.parse(is);
+ var root = doc.getDocumentElement();
+ var result = QueryResult.create();
+
+ stream(root) //
+ //
+ .filter(n -> n.getNodeName() == "TimeSeries") //
+ .flatMap(XmlUtils::stream) //
+ //
+ .filter(n -> n.getNodeName() == "Period") //
+ // Find Period with correct resolution
+ .filter(p -> stream(p) //
+ .filter(n -> n.getNodeName() == "resolution") //
+ .map(XmlUtils::getContentAsString) //
+ .anyMatch(r -> r.equals(resolution))) //
+ .forEach(period -> {
+
+ var start = ZonedDateTime.parse(//
+ stream(period) //
+ //
+ .filter(n -> n.getNodeName() == "timeInterval") //
+ .flatMap(XmlUtils::stream) //
+ //
+ .filter(n -> n.getNodeName() == "start") //
+ .map(XmlUtils::getContentAsString) //
+ .findFirst().get(),
+ FORMATTER_MINUTES).withZoneSameInstant(ZoneId.of("UTC"));
+
+ if (result.start == null) {
+ // Avoiding overwriting of start due to multiple periods.
+ result.start(start);
+ }
+
+ result.prices(stream(period) //
+ //
+ .filter(n -> n.getNodeName() == "Point") //
+ .flatMap(XmlUtils::stream) //
+ //
+ .filter(n -> n.getNodeName() == "price.amount") //
+ .map(XmlUtils::getContentAsString) //
+ .map(s -> Float.parseFloat(s) * (float) exchangeRate) //
+ .toList());
+ });
+
+ return result.toMap();
+ }
+
+ /**
+ * Parses the XML response from the Entso-E API to extract the currency
+ * associated with the prices.
+ *
+ * @param xml The XML string to be parsed.
+ * @return The currency string.
+ * @throws ParserConfigurationException on error.
+ * @throws SAXException on error
+ * @throws IOException on error
+ */
+ protected static String parseCurrency(String xml) throws ParserConfigurationException, SAXException, IOException {
+ var dbFactory = DocumentBuilderFactory.newInstance();
+ var dBuilder = dbFactory.newDocumentBuilder();
+ var is = new InputSource(new StringReader(xml));
+ var doc = dBuilder.parse(is);
+ var root = doc.getDocumentElement();
+
+ var result = stream(root) //
+ //
+ .filter(n -> n.getNodeName() == "TimeSeries") //
+ .flatMap(XmlUtils::stream) //
+ //
+ .filter(n -> n.getNodeName() == "currency_Unit.name") //
+ .map(XmlUtils::getContentAsString) //
+ .findFirst().get();
+
+ return result;
+ }
+
+ /**
+ * Parses the response string from Exchange rate API.
+ *
+ * @param response The Response string from ExcahngeRate API.
+ * @param currency The {@link Currency} selected by User.
+ * @return the exchange rate.
+ * @throws OpenemsNamedException on error.
+ */
+ protected static Double exchangeRateParser(String response, Currency currency) throws OpenemsNamedException {
+
+ var line = JsonUtils.parseToJsonObject(response);
+ var data = JsonUtils.getAsJsonObject(line, "rates");
+
+ return JsonUtils.getAsDouble(data, currency.toString());
+ }
+
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/test/.gitignore b/io.openems.edge.timeofusetariff.entsoe/test/.gitignore
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/EntsoeApiTest.java b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/EntsoeApiTest.java
new file mode 100644
index 00000000000..b8e950f4c11
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/EntsoeApiTest.java
@@ -0,0 +1,25 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import java.io.IOException;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.temporal.ChronoUnit;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+public class EntsoeApiTest {
+
+ @Test
+ @Ignore
+ public void testQuery() throws IOException, ParserConfigurationException, SAXException {
+ var token = ""; // Fill personal security token and remove 'Ignore' tag while testing.
+ var areaCode = BiddingZone.SWEDEN_SE3.code;
+ var fromDate = ZonedDateTime.now().truncatedTo(ChronoUnit.HOURS).withZoneSameLocal(ZoneId.systemDefault());
+ var toDate = fromDate.plusDays(1);
+ EntsoeApi.query(token, areaCode, fromDate, toDate);
+ }
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApiTest.java b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApiTest.java
new file mode 100644
index 00000000000..819d30d74f1
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ExchangeRateApiTest.java
@@ -0,0 +1,214 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
+import io.openems.edge.common.currency.Currency;
+
+public class ExchangeRateApiTest {
+
+ private static final String EXCHANGE_DATA = """
+ {
+ "success": true,
+ "base": "EUR",
+ "date": "2023-07-27",
+ "rates": {
+ "AED": 4.074263,
+ "AFN": 96.546557,
+ "ALL": 102.049538,
+ "AMD": 431.402948,
+ "ANG": 2.00055,
+ "AOA": 916.112472,
+ "ARS": 302.239867,
+ "AUD": 1.629808,
+ "AWG": 1.998636,
+ "AZN": 1.886792,
+ "BAM": 1.958547,
+ "BBD": 2.219307,
+ "BDT": 120.446245,
+ "BGN": 1.955529,
+ "BHD": 0.418333,
+ "BIF": 3141.458211,
+ "BMD": 1.109917,
+ "BND": 1.473742,
+ "BOB": 7.669034,
+ "BRL": 5.256284,
+ "BSD": 1.109668,
+ "BTC": 0.000038,
+ "BTN": 91.002709,
+ "BWP": 14.488226,
+ "BYN": 2.802141,
+ "BZD": 2.237335,
+ "CAD": 1.46224,
+ "CDF": 2828.550254,
+ "CHF": 0.954345,
+ "CLF": 0.033979,
+ "CLP": 914.830807,
+ "CNH": 7.91491,
+ "CNY": 7.914035,
+ "COP": 4400.287374,
+ "CRC": 594.125915,
+ "CUC": 1.110171,
+ "CUP": 28.563636,
+ "CVE": 110.417189,
+ "CZK": 24.025043,
+ "DJF": 197.373766,
+ "DKK": 7.448692,
+ "DOP": 62.137242,
+ "DZD": 149.842018,
+ "EGP": 34.274712,
+ "ERN": 16.639118,
+ "ETB": 60.709379,
+ "EUR": 1,
+ "FJD": 2.461322,
+ "FKP": 0.857521,
+ "GBP": 0.857065,
+ "GEL": 2.879232,
+ "GGP": 0.856846,
+ "GHS": 12.563656,
+ "GIP": 0.857444,
+ "GMD": 66.111378,
+ "GNF": 9545.125955,
+ "GTQ": 8.711891,
+ "GYD": 232.184942,
+ "HKD": 8.646912,
+ "HNL": 27.325849,
+ "HRK": 7.53181,
+ "HTG": 152.038911,
+ "HUF": 381.18337,
+ "IDR": 16642.2715,
+ "ILS": 4.089653,
+ "IMP": 0.856722,
+ "INR": 90.963493,
+ "IQD": 1453.098308,
+ "IRR": 46879.045396,
+ "ISK": 145.620797,
+ "JEP": 0.857125,
+ "JMD": 171.374964,
+ "JOD": 0.787314,
+ "JPY": 155.307802,
+ "KES": 157.73419,
+ "KGS": 97.449403,
+ "KHR": 4577.516015,
+ "KMF": 493.194214,
+ "KPW": 998.312097,
+ "KRW": 1415.953271,
+ "KWD": 0.340683,
+ "KYD": 0.924915,
+ "KZT": 493.937153,
+ "LAK": 21383.452835,
+ "LBP": 16776.637925,
+ "LKR": 366.792902,
+ "LRD": 205.652382,
+ "LSL": 19.598023,
+ "LYD": 5.294188,
+ "MAD": 10.787573,
+ "MDL": 19.474446,
+ "MGA": 4984.515277,
+ "MKD": 61.641818,
+ "MMK": 2330.490351,
+ "MNT": 3903.398698,
+ "MOP": 8.922849,
+ "MRU": 37.929989,
+ "MUR": 50.325954,
+ "MVR": 17.027553,
+ "MWK": 1168.023721,
+ "MXN": 18.676827,
+ "MYR": 5.024866,
+ "MZN": 70.714101,
+ "NAD": 19.579235,
+ "NGN": 874.632255,
+ "NIO": 40.574721,
+ "NOK": 11.166941,
+ "NPR": 145.603541,
+ "NZD": 1.775313,
+ "OMR": 0.427697,
+ "PAB": 1.110007,
+ "PEN": 3.990703,
+ "PGK": 3.980789,
+ "PHP": 60.551875,
+ "PKR": 318.444017,
+ "PLN": 4.41964,
+ "PYG": 8080.356808,
+ "QAR": 4.039405,
+ "RON": 4.923793,
+ "RSD": 117.135798,
+ "RUB": 99.859233,
+ "RWF": 1302.494419,
+ "SAR": 4.160461,
+ "SBD": 9.298905,
+ "SCR": 14.821421,
+ "SDG": 667.205497,
+ "SEK": 11.504976,
+ "SGD": 1.469025,
+ "SHP": 0.857181,
+ "SLL": 19594.637867,
+ "SOS": 631.983688,
+ "SRD": 42.561687,
+ "SSP": 144.489173,
+ "STD": 25317.170823,
+ "STN": 24.847059,
+ "SVC": 9.710443,
+ "SYP": 2786.987107,
+ "SZL": 19.625727,
+ "THB": 37.81308,
+ "TJS": 12.130966,
+ "TMT": 3.882521,
+ "TND": 3.428976,
+ "TOP": 2.599614,
+ "TRY": 29.846988,
+ "TTD": 7.539697,
+ "TWD": 34.634021,
+ "TZS": 2717.626941,
+ "UAH": 40.986807,
+ "UGX": 4049.121605,
+ "USD": 1.109987,
+ "UYU": 42.02786,
+ "UZS": 12905.949812,
+ "VES": 32.209006,
+ "VND": 26260.304612,
+ "VUV": 131.976192,
+ "WST": 3.024415,
+ "XAF": 655.638919,
+ "XAG": 0.044704,
+ "XAU": 0.001581,
+ "XCD": 2.997771,
+ "XDR": 0.825364,
+ "XOF": 655.639063,
+ "XPD": 0.001494,
+ "XPF": 119.274762,
+ "XPT": 0.001957,
+ "YER": 277.641934,
+ "ZAR": 19.492845,
+ "ZMW": 21.436533,
+ "ZWL": 357.173757
+ }
+ }
+ """;
+
+ @Test
+ @Ignore
+ public void testExchangeRateApi() throws IOException {
+ ExchangeRateApi.getExchangeRates();
+ }
+
+ @Test
+ public void testExchangeRateParser() throws OpenemsNamedException {
+
+ var currency = Currency.EUR;
+ var response = Utils.exchangeRateParser(EXCHANGE_DATA, currency);
+
+ assertTrue(response == 1.0);
+
+ currency = Currency.SEK;
+ response = Utils.exchangeRateParser(EXCHANGE_DATA, currency);
+
+ assertFalse(response == 1.0);
+ }
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/MyConfig.java b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/MyConfig.java
new file mode 100644
index 00000000000..6627c663921
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/MyConfig.java
@@ -0,0 +1,63 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import io.openems.common.test.AbstractComponentConfig;
+import io.openems.edge.common.currency.CurrencyConfig;
+
+@SuppressWarnings("all")
+public class MyConfig extends AbstractComponentConfig implements Config {
+
+ protected static class Builder {
+ private String id;
+ private String securityToken;
+ private BiddingZone biddingZone;
+
+ private Builder() {
+ }
+
+ public Builder setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ public Builder setSecurityToken(String securityToken) {
+ this.securityToken = securityToken;
+ return this;
+ }
+
+ public Builder setBiddingZone(BiddingZone biddingZone) {
+ this.biddingZone = biddingZone;
+ return this;
+ }
+
+ public MyConfig build() {
+ return new MyConfig(this);
+ }
+ }
+
+ /**
+ * Create a Config builder.
+ *
+ * @return a {@link Builder}
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ private final Builder builder;
+
+ private MyConfig(Builder builder) {
+ super(Config.class, builder.id);
+ this.builder = builder;
+ }
+
+ @Override
+ public String securityToken() {
+ return this.builder.securityToken;
+ }
+
+ @Override
+ public BiddingZone biddingZone() {
+ return this.builder.biddingZone;
+ }
+
+}
\ No newline at end of file
diff --git a/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ParserTest.java b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ParserTest.java
new file mode 100644
index 00000000000..b5f8b250900
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/ParserTest.java
@@ -0,0 +1,564 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import io.openems.edge.common.currency.Currency;
+
+public class ParserTest {
+
+ private static String XML = """
+
+
+ 946edcf0cf33426aa666e1069ececbe7
+ 1
+ A44
+ 10X1001A1001A450
+ A32
+ 10X1001A1001A450
+ A33
+ 2023-06-01T12:40:44Z
+
+ 2023-05-31T22:00Z
+ 2023-06-01T22:00Z
+
+
+ 1
+ A62
+ 10Y1001A1001A82H
+ 10Y1001A1001A82H
+ EUR
+ MWH
+ A01
+
+
+ 2023-05-31T22:00Z
+ 2023-06-01T22:00Z
+
+ PT15M
+
+ 1
+ 109.93
+
+
+ 2
+ 85.84
+
+
+ 3
+ 65.09
+
+
+ 4
+ 55.07
+
+
+ 5
+ 90.10
+
+
+ 6
+ 78.30
+
+
+ 7
+ 71.20
+
+
+ 8
+ 60.80
+
+
+ 9
+ 79.70
+
+
+ 10
+ 70.60
+
+
+ 11
+ 75.10
+
+
+ 12
+ 66.14
+
+
+ 13
+ 74.00
+
+
+ 14
+ 70.60
+
+
+ 15
+ 70.20
+
+
+ 16
+ 71.34
+
+
+ 17
+ 52.70
+
+
+ 18
+ 62.10
+
+
+ 19
+ 77.40
+
+
+ 20
+ 93.40
+
+
+ 21
+ 40.60
+
+
+ 22
+ 56.20
+
+
+ 23
+ 87.20
+
+
+ 24
+ 144.06
+
+
+ 25
+ 50.68
+
+
+ 26
+ 96.20
+
+
+ 27
+ 117.60
+
+
+ 28
+ 121.50
+
+
+ 29
+ 125.10
+
+
+ 30
+ 111.80
+
+
+ 31
+ 91.80
+
+
+ 32
+ 77.46
+
+
+ 33
+ 179.06
+
+
+ 34
+ 111.90
+
+
+ 35
+ 69.50
+
+
+ 36
+ 30.10
+
+
+ 37
+ 151.70
+
+
+ 38
+ 96.20
+
+
+ 39
+ 69.91
+
+
+ 40
+ 7.20
+
+
+ 41
+ 114.91
+
+
+ 42
+ 75.20
+
+
+ 43
+ 49.90
+
+
+ 44
+ 1.20
+
+
+ 45
+ 89.91
+
+
+ 46
+ 64.90
+
+
+ 47
+ 29.20
+
+
+ 48
+ -11.47
+
+
+ 49
+ 69.80
+
+
+ 50
+ 34.90
+
+
+ 51
+ 6.10
+
+
+ 52
+ -20.00
+
+
+ 53
+ 44.20
+
+
+ 54
+ 24.91
+
+
+ 55
+ -12.03
+
+
+ 56
+ -19.94
+
+
+ 57
+ -25.30
+
+
+ 58
+ -13.50
+
+
+ 59
+ 18.83
+
+
+ 60
+ 39.90
+
+
+ 61
+ -49.90
+
+
+ 62
+ -10.80
+
+
+ 63
+ 21.40
+
+
+ 64
+ 61.62
+
+
+ 65
+ -61.69
+
+
+ 66
+ 7.16
+
+
+ 67
+ 58.60
+
+
+ 68
+ 109.92
+
+
+ 69
+ -35.10
+
+
+ 70
+ 39.93
+
+
+ 71
+ 109.93
+
+
+ 72
+ 139.94
+
+
+ 73
+ 29.91
+
+
+ 74
+ 54.10
+
+
+ 75
+ 105.11
+
+
+ 76
+ 149.91
+
+
+ 77
+ 75.05
+
+
+ 78
+ 93.33
+
+
+ 79
+ 130.10
+
+
+ 80
+ 139.96
+
+
+ 81
+ 139.92
+
+
+ 82
+ 110.22
+
+
+ 83
+ 95.08
+
+
+ 84
+ 95.05
+
+
+ 85
+ 139.98
+
+
+ 86
+ 114.80
+
+
+ 87
+ 90.09
+
+
+ 88
+ 80.07
+
+
+ 89
+ 134.70
+
+
+ 90
+ 100.68
+
+
+ 91
+ 80.03
+
+
+ 92
+ 70.02
+
+
+ 93
+ 119.70
+
+
+ 94
+ 82.41
+
+
+ 95
+ 75.10
+
+
+ 96
+ 65.07
+
+
+
+
+ 2
+ A62
+ 10Y1001A1001A82H
+ 10Y1001A1001A82H
+ EUR
+ MWH
+ A01
+
+
+ 2023-05-31T22:00Z
+ 2023-06-01T22:00Z
+
+ PT60M
+
+ 1
+ 84.15
+
+
+ 2
+ 74.30
+
+
+ 3
+ 70.10
+
+
+ 4
+ 66.72
+
+
+ 5
+ 67.70
+
+
+ 6
+ 80.45
+
+
+ 7
+ 97.04
+
+
+ 8
+ 108.23
+
+
+ 9
+ 99.07
+
+
+ 10
+ 87.30
+
+
+ 11
+ 68.19
+
+
+ 12
+ 59.92
+
+
+ 13
+ 38.86
+
+
+ 14
+ 9.35
+
+
+ 15
+ 3.01
+
+
+ 16
+ 13.35
+
+
+ 17
+ 56.14
+
+
+ 18
+ 72.00
+
+
+ 19
+ 87.86
+
+
+ 20
+ 100.46
+
+
+ 21
+ 120.04
+
+
+ 22
+ 103.43
+
+
+ 23
+ 95.41
+
+
+ 24
+ 86.53
+
+
+
+
+ """;
+
+ @Test
+ public void testParse() throws IOException, ParserConfigurationException, SAXException {
+ var currencyExchangeValue = 1.0;
+ var result = Utils.parsePrices(XML, "PT15M", currencyExchangeValue);
+
+ assertTrue(result.firstEntry().getValue() == 109.93f);
+ assertTrue(result.lastEntry().getValue() == 65.07f);
+
+ result = Utils.parsePrices(XML, "PT60M", currencyExchangeValue);
+
+ assertFalse(result.firstEntry().getValue() == 109.93f);
+ assertTrue(result.lastEntry().getValue() == 86.53f);
+
+ var res = Utils.parseCurrency(XML);
+ assertEquals(res, Currency.EUR.toString());
+ }
+}
diff --git a/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/TouEntsoeTest.java b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/TouEntsoeTest.java
new file mode 100644
index 00000000000..719a35fc61d
--- /dev/null
+++ b/io.openems.edge.timeofusetariff.entsoe/test/io/openems/edge/timeofusetariff/entsoe/TouEntsoeTest.java
@@ -0,0 +1,25 @@
+package io.openems.edge.timeofusetariff.entsoe;
+
+import org.junit.Test;
+
+import io.openems.edge.common.currency.Currency;
+import io.openems.edge.common.test.ComponentTest;
+import io.openems.edge.common.test.DummyMeta;
+
+public class TouEntsoeTest {
+
+ private static final String COMPONENT_ID = "tou0";
+
+ @Test
+ public void test() throws Exception {
+ var entsoe = new TouEntsoeImpl();
+ var dummyMeta = new DummyMeta("foo0", Currency.EUR);
+ new ComponentTest(entsoe) //
+ .addReference("meta", dummyMeta)//
+ .activate(MyConfig.create() //
+ .setId(COMPONENT_ID) //
+ .setSecurityToken("foo-bar") //
+ .setBiddingZone(BiddingZone.GERMANY) //
+ .build());
+ }
+}
From 1be37b0254d2cec22d2a5c4bcb2d58b3ef601a91 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 25 Aug 2023 15:54:41 +0200
Subject: [PATCH 21/81] Bump compare-versions from 6.0.0 to 6.1.0 in /ui
(#2319)
Bumps [compare-versions](https://github.com/omichelsen/compare-versions) from 6.0.0 to 6.1.0.
- [Changelog](https://github.com/omichelsen/compare-versions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/omichelsen/compare-versions/compare/v6.0.0...v6.1.0)
---
updated-dependencies:
- dependency-name: compare-versions
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stefan Feilmeier
---
ui/package-lock.json | 14 +++++++-------
ui/package.json | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ui/package-lock.json b/ui/package-lock.json
index 60f9eef11d7..f5bb3d9ca37 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -25,7 +25,7 @@
"angular-mydatepicker": "^0.11.5",
"chart.js": "^2.9.4",
"classlist.js": "^1.1.20150312",
- "compare-versions": "^6.0.0",
+ "compare-versions": "^6.1.0",
"d3": "^7.8.5",
"date-fns": "^2.30.0",
"file-saver-es": "^2.0.5",
@@ -6038,9 +6038,9 @@
"dev": true
},
"node_modules/compare-versions": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz",
- "integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ=="
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz",
+ "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg=="
},
"node_modules/compressible": {
"version": "2.0.18",
@@ -20383,9 +20383,9 @@
"dev": true
},
"compare-versions": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz",
- "integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ=="
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz",
+ "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg=="
},
"compressible": {
"version": "2.0.18",
diff --git a/ui/package.json b/ui/package.json
index bfdac09bbae..9215d8fa925 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -20,7 +20,7 @@
"angular-mydatepicker": "^0.11.5",
"chart.js": "^2.9.4",
"classlist.js": "^1.1.20150312",
- "compare-versions": "^6.0.0",
+ "compare-versions": "^6.1.0",
"d3": "^7.8.5",
"date-fns": "^2.30.0",
"file-saver-es": "^2.0.5",
From 5f207bd4e3523495ffdfefcdab46f058f555f3f2 Mon Sep 17 00:00:00 2001
From: Thomas Sicking <91258335+tsicking@users.noreply.github.com>
Date: Fri, 25 Aug 2023 20:28:01 +0200
Subject: [PATCH 22/81] SunSpecCodeGenerator: refactor, add 7xx models, use
JSON input files (#2324)
Based on PR #2304 by [nlamarti](https://github.com/nlamarti), this new PR handles the comments made there. Comparing the old and new output file `DefaultSunSpecModel.java`, the following changed:
- The descriptions "Ref 3: 8.14.3.2, Ref 4: 17" in the 12x models disappeared, because they are not in the json-files.
- The models 302-304 are now ignored. They only consist of one repeating block (which OpenEMS cannot handle as of now), and as far as I can see, no component uses them currently.
- The models 701-715 are added
- Descriptions of some points changed
Note that the length of model 701 is 155>126=maximum length of a modbus task in j2mod. As the `AbstractOpenemsSunSpecComponent` adds one task for each block, this causes an error (see issue 2311). I have fixed this already, this will be done in a seperate PR.
Furthermore, I used modern syntax in the switch-statements in `SunSpecPoint.java`, as I had to update them anyway due to the new pointn type STRING32.
Lastly, I had to write a new method `getAsStringOrElse` in `JsonUtils.java`, and the other changes in this file are caused by the automatic code clean up.
---------
Co-authored-by: nlamarti <2514024+nlamarti@users.noreply.github.com>
Co-authored-by: Stefan Feilmeier
---
.../io/openems/common/utils/JsonUtils.java | 62 +-
.../openems/common/utils/JsonUtilsTest.java | 4 +
.../modbus/sunspec/DefaultSunSpecModel.java | 5150 ++++++++++++++++-
.../modbus/sunspec/SunSpecCodeGenerator.java | 843 +--
.../bridge/modbus/sunspec/SunSpecModel.java | 4 +-
.../bridge/modbus/sunspec/SunSpecPoint.java | 199 +-
6 files changed, 5222 insertions(+), 1040 deletions(-)
diff --git a/io.openems.common/src/io/openems/common/utils/JsonUtils.java b/io.openems.common/src/io/openems/common/utils/JsonUtils.java
index f8bca713e73..97886d08db5 100644
--- a/io.openems.common/src/io/openems/common/utils/JsonUtils.java
+++ b/io.openems.common/src/io/openems/common/utils/JsonUtils.java
@@ -39,23 +39,22 @@ public class JsonUtils {
/**
* Provide a easy way to generate a JsonArray from a list using the given
* convert function to add each element.
- *
+ *
* @param list to convert
* @param convert function to convert elements
* @param type of an element from list
- *
+ *
* @return list as JsonArray
*/
public static JsonArray generateJsonArray(Collection list, Function convert) {
if (list == null) {
return null;
- } else {
- var jab = new JsonArrayBuilder();
- list.forEach(element -> {
- jab.add(convert.apply(element));
- });
- return jab.build();
}
+ var jab = new JsonArrayBuilder();
+ list.forEach(element -> {
+ jab.add(convert.apply(element));
+ });
+ return jab.build();
}
/**
@@ -262,10 +261,10 @@ public JsonObjectBuilder addProperty(String property, Enum> value) {
/**
* Add a {@link ZonedDateTime} value to the {@link JsonObject}.
- *
+ *
*
* The value gets added in the format of {@link DateTimeFormatter#ISO_INSTANT}.
- *
+ *
* @param property the key
* @param value the value
* @return the {@link JsonObjectBuilder}
@@ -364,10 +363,10 @@ public JsonObjectBuilder addPropertyIfNotNull(String property, Enum> value) {
/**
* Add a {@link ZonedDateTime} value to the {@link JsonObject} if it is not
* null.
- *
+ *
*
* The value gets added in the format of {@link DateTimeFormatter#ISO_INSTANT}.
- *
+ *
* @param property the key
* @param value the value
* @return the {@link JsonObjectBuilder}
@@ -719,6 +718,19 @@ public static Optional getAsOptionalString(JsonElement jElement, String
return Optional.ofNullable(toString(toPrimitive(toSubElement(jElement, memberName))));
}
+ /**
+ * Gets the member of the {@link JsonElement} as {@link String} if it exists,
+ * and the alternative value otherwise.
+ *
+ * @param jElement the {@link JsonElement}
+ * @param memberName the name of the member
+ * @param alternative the alternative value
+ * @return the {@link String} value or the alternative value
+ */
+ public static String getAsStringOrElse(JsonElement jElement, String memberName, String alternative) {
+ return getAsOptionalString(jElement, memberName).orElse(alternative);
+ }
+
/**
* Converts a {@link JsonArray} to a String Array.
*
@@ -1373,17 +1385,20 @@ public static JsonElement getAsJsonElement(Object value) {
* String
*/
return new JsonPrimitive((String) value);
- } else if (value instanceof Boolean) {
+ }
+ if (value instanceof Boolean) {
/*
* Boolean
*/
return new JsonPrimitive((Boolean) value);
- } else if (value instanceof Inet4Address) {
+ }
+ if (value instanceof Inet4Address) {
/*
* Inet4Address
*/
return new JsonPrimitive(((Inet4Address) value).getHostAddress());
- } else if (value instanceof JsonElement) {
+ }
+ if (value instanceof JsonElement) {
/*
* JsonElement
*/
@@ -1497,17 +1512,20 @@ public static Object getAsType(Class> type, JsonElement j) throws NotImplement
* Asking for an Long
*/
return j.getAsLong();
- } else if (Boolean.class.isAssignableFrom(type)) {
+ }
+ if (Boolean.class.isAssignableFrom(type)) {
/*
* Asking for an Boolean
*/
return j.getAsBoolean();
- } else if (Double.class.isAssignableFrom(type)) {
+ }
+ if (Double.class.isAssignableFrom(type)) {
/*
* Asking for an Double
*/
return j.getAsDouble();
- } else if (String.class.isAssignableFrom(type)) {
+ }
+ if (String.class.isAssignableFrom(type)) {
/*
* Asking for a String
*/
@@ -1731,7 +1749,7 @@ public static boolean isEmptyJsonArray(JsonElement j) {
/**
* Check if the given {@link JsonElement} is a {@link Number}.
- *
+ *
* @param j the {@link JsonElement} to check
* @return true if the element is a {@link Number}, otherwise false
*/
@@ -1742,7 +1760,7 @@ public static boolean isNumber(JsonElement j) {
/**
* Returns a sequential stream of the {@link JsonElement JsonElements} in the
* {@link JsonArray}.
- *
+ *
* @param jsonArray The {@link JsonArray}, assumed to be unmodified during use
* @return a Stream of the elements
*/
@@ -1764,7 +1782,7 @@ private static JsonObject toJsonObject(JsonElement jElement) {
/**
* Returns a {@link Collector} that accumulates the input elements into a new
* {@link JsonObject}.
- *
+ *
* @param the type of the input
* @param keyMapper the key mapper
* @param valueMapper the value mapper
@@ -1785,7 +1803,7 @@ private static JsonObject toJsonObject(JsonElement jElement) {
/**
* Returns a Collector that accumulates the input elements into a new JsonArray.
- *
+ *
* @return a Collector which collects all the input elements into a JsonArray
*/
public static Collector toJsonArray() {
diff --git a/io.openems.common/test/io/openems/common/utils/JsonUtilsTest.java b/io.openems.common/test/io/openems/common/utils/JsonUtilsTest.java
index 6b7925267b4..046f2377bf2 100644
--- a/io.openems.common/test/io/openems/common/utils/JsonUtilsTest.java
+++ b/io.openems.common/test/io/openems/common/utils/JsonUtilsTest.java
@@ -219,6 +219,10 @@ public void testGetAsString() throws OpenemsNamedException {
// -> Optional Sub-Element
assertEquals("value", JsonUtils.getAsOptionalString(JSON_OBJECT, "String").get());
assertEquals(Optional.empty(), JsonUtils.getAsOptionalString(JSON_OBJECT, "foo"));
+
+ // -> As String or Else
+ assertEquals("value", JsonUtils.getAsStringOrElse(JSON_OBJECT, "String", "alternative"));
+ assertEquals("alternative", JsonUtils.getAsStringOrElse(JSON_OBJECT, "foo", "alternative"));
}
@Test
diff --git a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/DefaultSunSpecModel.java b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/DefaultSunSpecModel.java
index f430cd05502..f40ce5a9b4e 100644
--- a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/DefaultSunSpecModel.java
+++ b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/DefaultSunSpecModel.java
@@ -93,7 +93,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_120(//
"Nameplate", //
"Inverter Controls Nameplate Ratings", //
- "Ref 3: 8.14.3.2, Ref 4: 17", //
+ "", //
26, //
DefaultSunSpecModel.S120.values(), //
SunSpecModelType.INVERTER //
@@ -101,7 +101,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_121(//
"Basic Settings", //
"Inverter Controls Basic Settings", //
- "Ref 3: 8.4.2.1, Ref 4: 17", //
+ "", //
30, //
DefaultSunSpecModel.S121.values(), //
SunSpecModelType.INVERTER //
@@ -109,7 +109,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_122(//
"Measurements_Status", //
"Inverter Controls Extended Measurements and Status", //
- "Ref 3: 8.14.3.2, Ref 4: 17", //
+ "", //
44, //
DefaultSunSpecModel.S122.values(), //
SunSpecModelType.INVERTER //
@@ -117,7 +117,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_123(//
"Immediate Controls", //
"Immediate Inverter Controls", //
- "Ref 3: 8.7.1.2, 8.7.2.2, 8.7.3.2", //
+ "", //
24, //
DefaultSunSpecModel.S123.values(), //
SunSpecModelType.INVERTER //
@@ -125,7 +125,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_124(//
"Storage", //
"Basic Storage Controls", //
- "Ref 3: 8.7.4.2", //
+ "", //
24, //
DefaultSunSpecModel.S124.values(), //
SunSpecModelType.INVERTER //
@@ -133,7 +133,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_125(//
"Pricing", //
"Pricing Signal", //
- "Ref 3: 8.7.5.1; Ref 4: 6", //
+ "", //
8, //
DefaultSunSpecModel.S125.values(), //
SunSpecModelType.INVERTER //
@@ -141,7 +141,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_127(//
"Freq-Watt Param", //
"Parameterized Frequency-Watt", //
- "Ref 3: 8.9.1.2, 8.9.4.2", //
+ "", //
10, //
DefaultSunSpecModel.S127.values(), //
SunSpecModelType.INVERTER //
@@ -149,7 +149,7 @@ public enum DefaultSunSpecModel implements SunSpecModel {
S_128(//
"Dynamic Reactive Current", //
"Dynamic Reactive Current", //
- "Ref 3: 8.10.1.2; Ref 4: 12", //
+ "", //
14, //
DefaultSunSpecModel.S128.values(), //
SunSpecModelType.INVERTER //
@@ -194,30 +194,6 @@ public enum DefaultSunSpecModel implements SunSpecModel {
DefaultSunSpecModel.S204.values(), //
SunSpecModelType.METER //
), //
- S_302(//
- "Irradiance Model", //
- "Include to support various irradiance measurements", //
- "", //
- 5, //
- DefaultSunSpecModel.S302.values(), //
- SunSpecModelType.ENVIRONMENTAL //
- ), //
- S_303(//
- "Back of Module Temperature Model", //
- "Include to support variable number of back of module temperature measurements", //
- "", //
- 2, //
- DefaultSunSpecModel.S303.values(), //
- SunSpecModelType.ENVIRONMENTAL //
- ), //
- S_304(//
- "Inclinometer Model", //
- "Include to support orientation measurements", //
- "", //
- 6, //
- DefaultSunSpecModel.S304.values(), //
- SunSpecModelType.ENVIRONMENTAL //
- ), //
S_305(//
"GPS", //
"Include to support location measurements", //
@@ -236,8 +212,8 @@ public enum DefaultSunSpecModel implements SunSpecModel {
), //
S_307(//
"Base Met", //
- "Base Meteorolgical Model", //
- "This model supersedes model 301", //
+ "Base Meteorological Model", //
+ "", //
11, //
DefaultSunSpecModel.S307.values(), //
SunSpecModelType.ENVIRONMENTAL //
@@ -250,6 +226,126 @@ public enum DefaultSunSpecModel implements SunSpecModel {
DefaultSunSpecModel.S308.values(), //
SunSpecModelType.ENVIRONMENTAL //
), //
+ S_701(//
+ "DER AC Measurement", //
+ "DER AC measurement model.", //
+ "", //
+ 153, //
+ DefaultSunSpecModel.S701.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_702(//
+ "DER Capacity", //
+ "DER capacity model.", //
+ "", //
+ 50, //
+ DefaultSunSpecModel.S702.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_703(//
+ "Enter Service", //
+ "Enter service model.", //
+ "", //
+ 17, //
+ DefaultSunSpecModel.S703.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_704(//
+ "DER AC Controls", //
+ "DER AC controls model.", //
+ "", //
+ 57, //
+ DefaultSunSpecModel.S704.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_705(//
+ "DER Volt-Var", //
+ "DER Volt-Var model.", //
+ "", //
+ 13, //
+ DefaultSunSpecModel.S705.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_706(//
+ "DER Volt-Watt", //
+ "DER Volt-Watt model.", //
+ "", //
+ 13, //
+ DefaultSunSpecModel.S706.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_707(//
+ "DER Trip LV", //
+ "DER low voltage trip model.", //
+ "", //
+ 7, //
+ DefaultSunSpecModel.S707.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_708(//
+ "DER Trip HV", //
+ "DER high voltage trip model.", //
+ "", //
+ 7, //
+ DefaultSunSpecModel.S708.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_709(//
+ "DER Trip LF", //
+ "DER low frequency trip model.", //
+ "", //
+ 7, //
+ DefaultSunSpecModel.S709.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_710(//
+ "DER Trip HF", //
+ "DER high frequency trip model.", //
+ "", //
+ 7, //
+ DefaultSunSpecModel.S710.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_711(//
+ "DER Frequency Droop", //
+ "DER Frequency Droop model.", //
+ "", //
+ 12, //
+ DefaultSunSpecModel.S711.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_712(//
+ "DER Watt-Var", //
+ "DER Watt-Var model.", //
+ "", //
+ 12, //
+ DefaultSunSpecModel.S712.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_713(//
+ "DER Storage Capacity", //
+ "DER storage capacity.", //
+ "", //
+ 7, //
+ DefaultSunSpecModel.S713.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_714(//
+ "DER DC Measurement", //
+ "DER DC measurement.", //
+ "", //
+ 18, //
+ DefaultSunSpecModel.S714.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
+ S_715(//
+ "DERCtl", //
+ "DER Control", //
+ "", //
+ 7, //
+ DefaultSunSpecModel.S715.values(), //
+ SunSpecModelType.RESERVED_1 //
+ ), //
S_801(//
"Energy Storage Base Model (DEPRECATED)", //
"This model has been deprecated.", //
@@ -377,7 +473,7 @@ public static enum S1 implements SunSpecPoint {
PAD(new PointImpl(//
"S1_PAD", //
"", //
- "", //
+ "Force even alignment", //
"", //
PointType.PAD, //
false, //
@@ -875,7 +971,7 @@ public static enum S101 implements SunSpecPoint {
"S101_APH_A", //
"Amps PhaseA", //
"Phase A Current", //
- "Connected Phase", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -917,8 +1013,8 @@ public static enum S101 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S101_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.UINT16, //
false, //
@@ -928,8 +1024,8 @@ public static enum S101 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S101_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.UINT16, //
false, //
@@ -939,8 +1035,8 @@ public static enum S101 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S101_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.UINT16, //
false, //
@@ -1429,7 +1525,7 @@ public static enum S102 implements SunSpecPoint {
"S102_A", //
"Amps", //
"AC Current", //
- "Sum of active phases", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -1440,7 +1536,7 @@ public static enum S102 implements SunSpecPoint {
"S102_APH_A", //
"Amps PhaseA", //
"Phase A Current", //
- "Connected Phase", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -1451,7 +1547,7 @@ public static enum S102 implements SunSpecPoint {
"S102_APH_B", //
"Amps PhaseB", //
"Phase B Current", //
- "Connected Phase", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -1482,8 +1578,8 @@ public static enum S102 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S102_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.UINT16, //
false, //
@@ -1493,8 +1589,8 @@ public static enum S102 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S102_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.UINT16, //
false, //
@@ -1504,8 +1600,8 @@ public static enum S102 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S102_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.UINT16, //
false, //
@@ -1994,7 +2090,7 @@ public static enum S103 implements SunSpecPoint {
"S103_A", //
"Amps", //
"AC Current", //
- "Sum of active phases", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -2005,7 +2101,7 @@ public static enum S103 implements SunSpecPoint {
"S103_APH_A", //
"Amps PhaseA", //
"Phase A Current", //
- "Connected Phase", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -2016,7 +2112,7 @@ public static enum S103 implements SunSpecPoint {
"S103_APH_B", //
"Amps PhaseB", //
"Phase B Current", //
- "Connected Phase", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -2027,7 +2123,7 @@ public static enum S103 implements SunSpecPoint {
"S103_APH_C", //
"Amps PhaseC", //
"Phase C Current", //
- "Connected Phase", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -2047,8 +2143,8 @@ public static enum S103 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S103_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.UINT16, //
false, //
@@ -2058,8 +2154,8 @@ public static enum S103 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S103_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.UINT16, //
false, //
@@ -2069,8 +2165,8 @@ public static enum S103 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S103_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.UINT16, //
false, //
@@ -2570,7 +2666,7 @@ public static enum S111 implements SunSpecPoint {
"S111_APH_A", //
"Amps PhaseA", //
"Phase A Current", //
- "Connected Phase", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -2601,8 +2697,8 @@ public static enum S111 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S111_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.FLOAT32, //
false, //
@@ -2612,8 +2708,8 @@ public static enum S111 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S111_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.FLOAT32, //
false, //
@@ -2623,8 +2719,8 @@ public static enum S111 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S111_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.FLOAT32, //
false, //
@@ -3003,7 +3099,7 @@ public static enum S112 implements SunSpecPoint {
"S112_APH_A", //
"Amps PhaseA", //
"Phase A Current", //
- "Connected Phase", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -3014,7 +3110,7 @@ public static enum S112 implements SunSpecPoint {
"S112_APH_B", //
"Amps PhaseB", //
"Phase B Current", //
- "Connected Phase", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -3034,8 +3130,8 @@ public static enum S112 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S112_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.FLOAT32, //
false, //
@@ -3045,8 +3141,8 @@ public static enum S112 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S112_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.FLOAT32, //
false, //
@@ -3056,8 +3152,8 @@ public static enum S112 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S112_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.FLOAT32, //
false, //
@@ -3425,7 +3521,7 @@ public static enum S113 implements SunSpecPoint {
"S113_A", //
"Amps", //
"AC Current", //
- "Sum of active phases", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -3436,7 +3532,7 @@ public static enum S113 implements SunSpecPoint {
"S113_APH_A", //
"Amps PhaseA", //
"Phase A Current", //
- "Connected Phase", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -3447,7 +3543,7 @@ public static enum S113 implements SunSpecPoint {
"S113_APH_B", //
"Amps PhaseB", //
"Phase B Current", //
- "Connected Phase", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -3458,7 +3554,7 @@ public static enum S113 implements SunSpecPoint {
"S113_APH_C", //
"Amps PhaseC", //
"Phase C Current", //
- "Connected Phase", //
+ "", //
PointType.FLOAT32, //
true, //
AccessMode.READ_ONLY, //
@@ -3467,8 +3563,8 @@ public static enum S113 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S113_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.FLOAT32, //
false, //
@@ -3478,8 +3574,8 @@ public static enum S113 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S113_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.FLOAT32, //
false, //
@@ -3489,8 +3585,8 @@ public static enum S113 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S113_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.FLOAT32, //
false, //
@@ -3968,7 +4064,7 @@ public static enum S120 implements SunSpecPoint {
"S120_A_RTG", //
"ARtg", //
"Maximum RMS AC current level capability of the inverter.", //
- "Sum of all connected phases. Current rating under nominal voltage under nominal power factor.", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -3990,7 +4086,7 @@ public static enum S120 implements SunSpecPoint {
"S120_P_F_RTG_Q1", //
"PFRtgQ1", //
"Minimum power factor capability of the inverter in quadrant 1.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
true, //
AccessMode.READ_ONLY, //
@@ -4001,7 +4097,7 @@ public static enum S120 implements SunSpecPoint {
"S120_P_F_RTG_Q2", //
"PFRtgQ2", //
"Minimum power factor capability of the inverter in quadrant 2.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
true, //
AccessMode.READ_ONLY, //
@@ -4012,7 +4108,7 @@ public static enum S120 implements SunSpecPoint {
"S120_P_F_RTG_Q3", //
"PFRtgQ3", //
"Minimum power factor capability of the inverter in quadrant 3.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
true, //
AccessMode.READ_ONLY, //
@@ -4023,7 +4119,7 @@ public static enum S120 implements SunSpecPoint {
"S120_P_F_RTG_Q4", //
"PFRtgQ4", //
"Minimum power factor capability of the inverter in quadrant 4.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
true, //
AccessMode.READ_ONLY, //
@@ -4131,8 +4227,8 @@ public static enum S120 implements SunSpecPoint {
new OptionsEnum[0])), //
PAD(new PointImpl(//
"S120_PAD", //
- "", //
- "", //
+ "Pad", //
+ "Pad register.", //
"", //
PointType.PAD, //
false, //
@@ -4308,7 +4404,7 @@ public static enum S121 implements SunSpecPoint {
"S121_P_F_MIN_Q1", //
"PFMinQ1", //
"Setpoint for minimum power factor value in quadrant 1. Default to PFRtgQ1.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_WRITE, //
@@ -4319,7 +4415,7 @@ public static enum S121 implements SunSpecPoint {
"S121_P_F_MIN_Q2", //
"PFMinQ2", //
"Setpoint for minimum power factor value in quadrant 2. Default to PFRtgQ2.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_WRITE, //
@@ -4330,7 +4426,7 @@ public static enum S121 implements SunSpecPoint {
"S121_P_F_MIN_Q3", //
"PFMinQ3", //
"Setpoint for minimum power factor value in quadrant 3. Default to PFRtgQ3.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_WRITE, //
@@ -4341,7 +4437,7 @@ public static enum S121 implements SunSpecPoint {
"S121_P_F_MIN_Q4", //
"PFMinQ4", //
"Setpoint for minimum power factor value in quadrant 4. Default to PFRtgQ4.", //
- "EEI sign convention.", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_WRITE, //
@@ -4762,7 +4858,7 @@ public static enum S122 implements SunSpecPoint {
"S122_ST_SET_LIM_MSK", //
"StSetLimMsk", //
"Bit Mask indicating setpoint limit(s) reached.", //
- "Bits shall be automatically cleared on read.", //
+ "", //
PointType.BITFIELD32, //
false, //
AccessMode.READ_ONLY, //
@@ -5847,7 +5943,7 @@ public static enum S125 implements SunSpecPoint {
MOD_ENA(new PointImpl(//
"S125_MOD_ENA", //
"ModEna", //
- "Is price-based charge/dischage mode active?", //
+ "Is price-based charge/discharge mode active?", //
"", //
PointType.BITFIELD16, //
true, //
@@ -6042,7 +6138,7 @@ public static enum S127 implements SunSpecPoint {
HYS_ENA(new PointImpl(//
"S127_HYS_ENA", //
"HysEna", //
- "Enable hysterisis", //
+ "Enable hysteresis", //
"", //
PointType.BITFIELD16, //
true, //
@@ -6572,7 +6668,7 @@ public static enum S201 implements SunSpecPoint {
"S201_PH_V", //
"Voltage LN", //
"Line to Neutral AC Voltage (average of active phases)", //
- "Conditional AN connection", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_ONLY, //
@@ -6583,7 +6679,7 @@ public static enum S201 implements SunSpecPoint {
"S201_PH_VPH_A", //
"Phase Voltage AN", //
"Phase Voltage AN", //
- "Conditional AN connection", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_ONLY, //
@@ -6625,8 +6721,8 @@ public static enum S201 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_A_B(new PointImpl(//
"S201_P_P_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.INT16, //
false, //
@@ -6636,8 +6732,8 @@ public static enum S201 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_B_C(new PointImpl(//
"S201_P_P_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.INT16, //
false, //
@@ -6647,8 +6743,8 @@ public static enum S201 implements SunSpecPoint {
new OptionsEnum[0])), //
P_P_VPH_C_A(new PointImpl(//
"S201_P_P_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.INT16, //
false, //
@@ -7142,7 +7238,7 @@ public static enum S201 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_IMP_Q1_PH_C(new PointImpl(//
"S201_TOT_V_ARH_IMP_Q1_PH_C", //
- "Total VAr-hourse Imported Q1 phase C", //
+ "Total VAr-hours Imported Q1 phase C", //
"", //
"", //
PointType.ACC32, //
@@ -7263,7 +7359,7 @@ public static enum S201 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_EXP_Q4_PH_B(new PointImpl(//
"S201_TOT_V_ARH_EXP_Q4_PH_B", //
- "", //
+ "Total VAr-hours Exported Q4 Imported phase B", //
"", //
"", //
PointType.ACC32, //
@@ -7479,8 +7575,8 @@ public static enum S202 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_A_B(new PointImpl(//
"S202_PH_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.INT16, //
true, //
@@ -7490,8 +7586,8 @@ public static enum S202 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_B_C(new PointImpl(//
"S202_PH_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.INT16, //
false, //
@@ -7501,8 +7597,8 @@ public static enum S202 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_C_A(new PointImpl(//
"S202_PH_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.INT16, //
false, //
@@ -7996,7 +8092,7 @@ public static enum S202 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_IMP_Q1_PH_C(new PointImpl(//
"S202_TOT_V_ARH_IMP_Q1_PH_C", //
- "Total VAr-hourse Imported Q1 phase C", //
+ "Total VAr-hours Imported Q1 phase C", //
"", //
"", //
PointType.ACC32, //
@@ -8341,8 +8437,8 @@ public static enum S203 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_A_B(new PointImpl(//
"S203_PH_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.INT16, //
true, //
@@ -8352,8 +8448,8 @@ public static enum S203 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_B_C(new PointImpl(//
"S203_PH_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.INT16, //
true, //
@@ -8363,8 +8459,8 @@ public static enum S203 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_C_A(new PointImpl(//
"S203_PH_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.INT16, //
true, //
@@ -8858,7 +8954,7 @@ public static enum S203 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_IMP_Q1_PH_C(new PointImpl(//
"S203_TOT_V_ARH_IMP_Q1_PH_C", //
- "Total VAr-hourse Imported Q1 phase C", //
+ "Total VAr-hours Imported Q1 phase C", //
"", //
"", //
PointType.ACC32, //
@@ -8979,7 +9075,7 @@ public static enum S203 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_EXP_Q4_PH_B(new PointImpl(//
"S203_TOT_V_ARH_EXP_Q4_PH_B", //
- "", //
+ "Total VAr-hours Exported Q4 Imported phase B", //
"", //
"", //
PointType.ACC32, //
@@ -9203,8 +9299,8 @@ public static enum S204 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_A_B(new PointImpl(//
"S204_PH_VPH_A_B", //
- "", //
- "", //
+ "Phase Voltage AB", //
+ "Phase Voltage AB", //
"", //
PointType.INT16, //
true, //
@@ -9214,8 +9310,8 @@ public static enum S204 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_B_C(new PointImpl(//
"S204_PH_VPH_B_C", //
- "", //
- "", //
+ "Phase Voltage BC", //
+ "Phase Voltage BC", //
"", //
PointType.INT16, //
true, //
@@ -9225,8 +9321,8 @@ public static enum S204 implements SunSpecPoint {
new OptionsEnum[0])), //
PH_VPH_C_A(new PointImpl(//
"S204_PH_VPH_C_A", //
- "", //
- "", //
+ "Phase Voltage CA", //
+ "Phase Voltage CA", //
"", //
PointType.INT16, //
true, //
@@ -9720,7 +9816,7 @@ public static enum S204 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_IMP_Q1_PH_C(new PointImpl(//
"S204_TOT_V_ARH_IMP_Q1_PH_C", //
- "Total VAr-hourse Imported Q1 phase C", //
+ "Total VAr-hours Imported Q1 phase C", //
"", //
"", //
PointType.ACC32, //
@@ -9841,7 +9937,7 @@ public static enum S204 implements SunSpecPoint {
new OptionsEnum[0])), //
TOT_V_ARH_EXP_Q4_PH_B(new PointImpl(//
"S204_TOT_V_ARH_EXP_Q4_PH_B", //
- "", //
+ "Total VAr-hours Exported Q4 Imported phase B", //
"", //
"", //
PointType.ACC32, //
@@ -9952,147 +10048,6 @@ public OptionsEnum getUndefined() {
}
}
- public static enum S302 implements SunSpecPoint {
- GHI(new PointImpl(//
- "S302_GHI", //
- "GHI", //
- "Global Horizontal Irradiance", //
- "", //
- PointType.UINT16, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- null, //
- new OptionsEnum[0])), //
- POAI(new PointImpl(//
- "S302_POAI", //
- "POAI", //
- "Plane-of-Array Irradiance", //
- "", //
- PointType.UINT16, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- null, //
- new OptionsEnum[0])), //
- DFI(new PointImpl(//
- "S302_DFI", //
- "DFI", //
- "Diffuse Irradiance", //
- "", //
- PointType.UINT16, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- null, //
- new OptionsEnum[0])), //
- DNI(new PointImpl(//
- "S302_DNI", //
- "DNI", //
- "Direct Normal Irradiance", //
- "", //
- PointType.UINT16, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- null, //
- new OptionsEnum[0])), //
- OTI(new PointImpl(//
- "S302_OTI", //
- "OTI", //
- "Other Irradiance", //
- "", //
- PointType.UINT16, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- null, //
- new OptionsEnum[0])); //
-
- protected final PointImpl impl;
-
- private S302(PointImpl impl) {
- this.impl = impl;
- }
-
- @Override
- public PointImpl get() {
- return this.impl;
- }
- }
-
- public static enum S303 implements SunSpecPoint {
- TMP_B_O_M(new PointImpl(//
- "S303_TMP_B_O_M", //
- "Temp", //
- "Back of module temperature measurement", //
- "", //
- PointType.INT16, //
- true, //
- AccessMode.READ_ONLY, //
- Unit.DEGREE_CELSIUS, //
- "-1", //
- new OptionsEnum[0])); //
-
- protected final PointImpl impl;
-
- private S303(PointImpl impl) {
- this.impl = impl;
- }
-
- @Override
- public PointImpl get() {
- return this.impl;
- }
- }
-
- public static enum S304 implements SunSpecPoint {
- INCLX(new PointImpl(//
- "S304_INCLX", //
- "X", //
- "X-Axis inclination", //
- "", //
- PointType.INT32, //
- true, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- "-2", //
- new OptionsEnum[0])), //
- INCLY(new PointImpl(//
- "S304_INCLY", //
- "Y", //
- "Y-Axis inclination", //
- "", //
- PointType.INT32, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- "-2", //
- new OptionsEnum[0])), //
- INCLZ(new PointImpl(//
- "S304_INCLZ", //
- "Z", //
- "Z-Axis inclination", //
- "", //
- PointType.INT32, //
- false, //
- AccessMode.READ_ONLY, //
- Unit.NONE, //
- "-2", //
- new OptionsEnum[0])); //
-
- protected final PointImpl impl;
-
- private S304(PointImpl impl) {
- this.impl = impl;
- }
-
- @Override
- public PointImpl get() {
- return this.impl;
- }
- }
-
public static enum S305 implements SunSpecPoint {
TM(new PointImpl(//
"S305_TM", //
@@ -10177,7 +10132,7 @@ public static enum S306 implements SunSpecPoint {
GHI(new PointImpl(//
"S306_GHI", //
"GHI", //
- "Global Horizontal Irrandiance", //
+ "Global Horizontal Irradiance", //
"", //
PointType.UINT16, //
false, //
@@ -10424,8 +10379,4575 @@ public PointImpl get() {
}
}
- public static enum S801 implements SunSpecPoint {
- DEPRECATED(new PointImpl(//
+ public static enum S701 implements SunSpecPoint {
+ A_C_TYPE(new PointImpl(//
+ "S701_A_C_TYPE", //
+ "AC Wiring Type", //
+ "AC wiring type.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_ACType.values())), //
+ ST(new PointImpl(//
+ "S701_ST", //
+ "Operating State", //
+ "Operating state of the DER.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_St.values())), //
+ INV_ST(new PointImpl(//
+ "S701_INV_ST", //
+ "Inverter State", //
+ "Enumerated value. Inverter state.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_InvSt.values())), //
+ CONN_ST(new PointImpl(//
+ "S701_CONN_ST", //
+ "Grid Connection State", //
+ "Grid connection state of the DER.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_ConnSt.values())), //
+ ALRM(new PointImpl(//
+ "S701_ALRM", //
+ "Alarm Bitfield", //
+ "Active alarms for the DER.", //
+ "", //
+ PointType.BITFIELD32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_Alrm.values())), //
+ D_E_R_MODE(new PointImpl(//
+ "S701_D_E_R_MODE", //
+ "DER Operational Characteristics", //
+ "Current operational characteristics of the DER.", //
+ "", //
+ PointType.BITFIELD32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_DERMode.values())), //
+ W(new PointImpl(//
+ "S701_W", //
+ "Active Power", //
+ "Total active power. Active power is positive for DER generation and negative for absorption.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ VA(new PointImpl(//
+ "S701_VA", //
+ "Apparent Power", //
+ "Total apparent power.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ VAR(new PointImpl(//
+ "S701_VAR", //
+ "Reactive Power", //
+ "Total reactive power.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ PF(new PointImpl(//
+ "S701_PF", //
+ "Power Factor", //
+ "Power factor. The sign of power factor should be the sign of active power.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ A(new PointImpl(//
+ "S701_A", //
+ "Total AC Current", //
+ "Total AC current.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.AMPERE, //
+ "A_SF", //
+ new OptionsEnum[0])), //
+ LLV(new PointImpl(//
+ "S701_LLV", //
+ "Voltage LL", //
+ "Line to line AC voltage as an average of active phases.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ LNV(new PointImpl(//
+ "S701_LNV", //
+ "Voltage LN", //
+ "Line to neutral AC voltage as an average of active phases.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ HZ(new PointImpl(//
+ "S701_HZ", //
+ "Frequency", //
+ "AC frequency.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.HERTZ, //
+ "Hz_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_INJ(new PointImpl(//
+ "S701_TOT_WH_INJ", //
+ "Total Energy Injected", //
+ "Total active energy injected (Quadrants 1 & 4).", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_ABS(new PointImpl(//
+ "S701_TOT_WH_ABS", //
+ "Total Energy Absorbed", //
+ "Total active energy absorbed (Quadrants 2 & 3).", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_INJ(new PointImpl(//
+ "S701_TOT_VARH_INJ", //
+ "Total Reactive Energy Inj", //
+ "Total reactive energy injected (Quadrants 1 & 2).", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_ABS(new PointImpl(//
+ "S701_TOT_VARH_ABS", //
+ "Total Reactive Energy Abs", //
+ "Total reactive energy absorbed (Quadrants 3 & 4).", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ TMP_AMB(new PointImpl(//
+ "S701_TMP_AMB", //
+ "Ambient Temperature", //
+ "Ambient temperature.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.DEGREE_CELSIUS, //
+ "Tmp_SF", //
+ new OptionsEnum[0])), //
+ TMP_CAB(new PointImpl(//
+ "S701_TMP_CAB", //
+ "Cabinet Temperature", //
+ "Cabinet temperature.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.DEGREE_CELSIUS, //
+ "Tmp_SF", //
+ new OptionsEnum[0])), //
+ TMP_SNK(new PointImpl(//
+ "S701_TMP_SNK", //
+ "Heat Sink Temperature", //
+ "Heat sink temperature.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.DEGREE_CELSIUS, //
+ "Tmp_SF", //
+ new OptionsEnum[0])), //
+ TMP_TRNS(new PointImpl(//
+ "S701_TMP_TRNS", //
+ "Transformer Temperature", //
+ "Transformer temperature.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.DEGREE_CELSIUS, //
+ "Tmp_SF", //
+ new OptionsEnum[0])), //
+ TMP_SW(new PointImpl(//
+ "S701_TMP_SW", //
+ "IGBT/MOSFET Temperature", //
+ "IGBT/MOSFET temperature.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.DEGREE_CELSIUS, //
+ "Tmp_SF", //
+ new OptionsEnum[0])), //
+ TMP_OT(new PointImpl(//
+ "S701_TMP_OT", //
+ "Other Temperature", //
+ "Other temperature.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.DEGREE_CELSIUS, //
+ "Tmp_SF", //
+ new OptionsEnum[0])), //
+ WL1(new PointImpl(//
+ "S701_WL1", //
+ "Watts L1", //
+ "Active power L1.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ VAL1(new PointImpl(//
+ "S701_VAL1", //
+ "VA L1", //
+ "Apparent power L1.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ VAR_L1(new PointImpl(//
+ "S701_VAR_L1", //
+ "Var L1", //
+ "Reactive power L1.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ PFL1(new PointImpl(//
+ "S701_PFL1", //
+ "PF L1", //
+ "Power factor phase L1.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ AL1(new PointImpl(//
+ "S701_AL1", //
+ "Amps L1", //
+ "Current phase L1.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.AMPERE, //
+ "A_SF", //
+ new OptionsEnum[0])), //
+ VL1L2(new PointImpl(//
+ "S701_VL1L2", //
+ "Phase Voltage L1-L2", //
+ "Phase voltage L1-L2.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ VL1(new PointImpl(//
+ "S701_VL1", //
+ "Phase Voltage L1-N", //
+ "Phase voltage L1-N.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_INJ_L1(new PointImpl(//
+ "S701_TOT_WH_INJ_L1", //
+ "Total Watt-Hours Inj L1", //
+ "Total active energy injected L1.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_ABS_L1(new PointImpl(//
+ "S701_TOT_WH_ABS_L1", //
+ "Total Watt-Hours Abs L1", //
+ "Total active energy absorbed L1.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_INJ_L1(new PointImpl(//
+ "S701_TOT_VARH_INJ_L1", //
+ "Total Var-Hours Inj L1", //
+ "Total reactive energy injected L1.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_ABS_L1(new PointImpl(//
+ "S701_TOT_VARH_ABS_L1", //
+ "Total Var-Hours Abs L1", //
+ "Total reactive energy absorbed L1.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ WL2(new PointImpl(//
+ "S701_WL2", //
+ "Watts L2", //
+ "Active power L2.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ VAL2(new PointImpl(//
+ "S701_VAL2", //
+ "VA L2", //
+ "Apparent power L2.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ VAR_L2(new PointImpl(//
+ "S701_VAR_L2", //
+ "Var L2", //
+ "Reactive power L2.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ PFL2(new PointImpl(//
+ "S701_PFL2", //
+ "PF L2", //
+ "Power factor L2.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ AL2(new PointImpl(//
+ "S701_AL2", //
+ "Amps L2", //
+ "Current L2.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.AMPERE, //
+ "A_SF", //
+ new OptionsEnum[0])), //
+ VL2L3(new PointImpl(//
+ "S701_VL2L3", //
+ "Phase Voltage L2-L3", //
+ "Phase voltage L2-L3.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ VL2(new PointImpl(//
+ "S701_VL2", //
+ "Phase Voltage L2-N", //
+ "Phase voltage L2-N.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_INJ_L2(new PointImpl(//
+ "S701_TOT_WH_INJ_L2", //
+ "Total Watt-Hours Inj L2", //
+ "Total active energy injected L2.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_ABS_L2(new PointImpl(//
+ "S701_TOT_WH_ABS_L2", //
+ "Total Watt-Hours Abs L2", //
+ "Total active energy absorbed L2.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_INJ_L2(new PointImpl(//
+ "S701_TOT_VARH_INJ_L2", //
+ "Total Var-Hours Inj L2", //
+ "Total reactive energy injected L2.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_ABS_L2(new PointImpl(//
+ "S701_TOT_VARH_ABS_L2", //
+ "Total Var-Hours Abs L2", //
+ "Total reactive energy absorbed L2.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ WL3(new PointImpl(//
+ "S701_WL3", //
+ "Watts L3", //
+ "Active power L3.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ VAL3(new PointImpl(//
+ "S701_VAL3", //
+ "VA L3", //
+ "Apparent power L3.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ VAR_L3(new PointImpl(//
+ "S701_VAR_L3", //
+ "Var L3", //
+ "Reactive power L3.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ PFL3(new PointImpl(//
+ "S701_PFL3", //
+ "PF L3", //
+ "Power factor L3.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ AL3(new PointImpl(//
+ "S701_AL3", //
+ "Amps L3", //
+ "Current L3.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.AMPERE, //
+ "A_SF", //
+ new OptionsEnum[0])), //
+ VL3L1(new PointImpl(//
+ "S701_VL3L1", //
+ "Phase Voltage L3-L1", //
+ "Phase voltage L3-L1.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ VL3(new PointImpl(//
+ "S701_VL3", //
+ "Phase Voltage L3-N", //
+ "Phase voltage L3-N.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_INJ_L3(new PointImpl(//
+ "S701_TOT_WH_INJ_L3", //
+ "Total Watt-Hours Inj L3", //
+ "Total active energy injected L3.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_WH_ABS_L3(new PointImpl(//
+ "S701_TOT_WH_ABS_L3", //
+ "Total Watt-Hours Abs L3", //
+ "Total active energy absorbed L3.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "TotWh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_INJ_L3(new PointImpl(//
+ "S701_TOT_VARH_INJ_L3", //
+ "Total Var-Hours Inj L3", //
+ "Total reactive energy injected L3.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ TOT_VARH_ABS_L3(new PointImpl(//
+ "S701_TOT_VARH_ABS_L3", //
+ "Total Var-Hours Abs L3", //
+ "Total reactive energy absorbed L3.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE_HOURS, //
+ "TotVarh_SF", //
+ new OptionsEnum[0])), //
+ THROT_PCT(new PointImpl(//
+ "S701_THROT_PCT", //
+ "Throttling In Pct", //
+ "Throttling in pct of maximum active power.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ THROT_SRC(new PointImpl(//
+ "S701_THROT_SRC", //
+ "Throttle Source Information", //
+ "Active throttling source.", //
+ "", //
+ PointType.BITFIELD32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S701_ThrotSrc.values())), //
+ A_SF(new PointImpl(//
+ "S701_A_SF", //
+ "Current Scale Factor", //
+ "Current scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S701_V_SF", //
+ "Voltage Scale Factor", //
+ "Voltage scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ HZ_S_F(new PointImpl(//
+ "S701_HZ_S_F", //
+ "Frequency Scale Factor", //
+ "Frequency scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ W_SF(new PointImpl(//
+ "S701_W_SF", //
+ "Active Power Scale Factor", //
+ "Active power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ PF_SF(new PointImpl(//
+ "S701_PF_SF", //
+ "Power Factor Scale Factor", //
+ "Power factor scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ VA_SF(new PointImpl(//
+ "S701_VA_SF", //
+ "Apparent Power Scale Factor", //
+ "Apparent power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ VAR_S_F(new PointImpl(//
+ "S701_VAR_S_F", //
+ "Reactive Power Scale Factor", //
+ "Reactive power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TOT_WH_S_F(new PointImpl(//
+ "S701_TOT_WH_S_F", //
+ "Active Energy Scale Factor", //
+ "Active energy scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TOT_VARH_S_F(new PointImpl(//
+ "S701_TOT_VARH_S_F", //
+ "Reactive Energy Scale Factor", //
+ "Reactive energy scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TMP_S_F(new PointImpl(//
+ "S701_TMP_S_F", //
+ "Temperature Scale Factor", //
+ "Temperature scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ MN_ALRM_INFO(new PointImpl(//
+ "S701_MN_ALRM_INFO", //
+ "Manufacturer Alarm Info", //
+ "Manufacturer alarm information. Valid if MANUFACTURER_ALRM indication is active.", //
+ "", //
+ PointType.STRING32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S701(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S701_ACType implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ SINGLE_PHASE(0, "SINGLE_PHASE"), //
+ SPLIT_PHASE(1, "SPLIT_PHASE"), //
+ THREE_PHASE(2, "THREE_PHASE"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_ACType(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S701_St implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ OFF(0, "OFF"), //
+ ON(1, "ON"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_St(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S701_InvSt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ OFF(0, "OFF"), //
+ SLEEPING(1, "SLEEPING"), //
+ STARTING(2, "STARTING"), //
+ RUNNING(3, "RUNNING"), //
+ THROTTLED(4, "THROTTLED"), //
+ SHUTTING_DOWN(5, "SHUTTING_DOWN"), //
+ FAULT(6, "FAULT"), //
+ STANDBY(7, "STANDBY"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_InvSt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S701_ConnSt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISCONNECTED(0, "DISCONNECTED"), //
+ CONNECTED(1, "CONNECTED"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_ConnSt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S701_Alrm implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ GROUND_FAULT(0, "GROUND_FAULT"), //
+ DC_OVER_VOLT(1, "DC_OVER_VOLT"), //
+ AC_DISCONNECT(2, "AC_DISCONNECT"), //
+ DC_DISCONNECT(3, "DC_DISCONNECT"), //
+ GRID_DISCONNECT(4, "GRID_DISCONNECT"), //
+ CABINET_OPEN(5, "CABINET_OPEN"), //
+ MANUAL_SHUTDOWN(6, "MANUAL_SHUTDOWN"), //
+ OVER_TEMP(7, "OVER_TEMP"), //
+ OVER_FREQUENCY(8, "OVER_FREQUENCY"), //
+ UNDER_FREQUENCY(9, "UNDER_FREQUENCY"), //
+ AC_OVER_VOLT(10, "AC_OVER_VOLT"), //
+ AC_UNDER_VOLT(11, "AC_UNDER_VOLT"), //
+ BLOWN_STRING_FUSE(12, "BLOWN_STRING_FUSE"), //
+ UNDER_TEMP(13, "UNDER_TEMP"), //
+ MEMORY_LOSS(14, "MEMORY_LOSS"), //
+ HW_TEST_FAILURE(15, "HW_TEST_FAILURE"), //
+ MANUFACTURER_ALRM(16, "MANUFACTURER_ALRM"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_Alrm(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S701_DERMode implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ GRID_FOLLOWING(0, "GRID_FOLLOWING"), //
+ GRID_FORMING(1, "GRID_FORMING"), //
+ PV_CLIPPED(2, "PV_CLIPPED"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_DERMode(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S701_ThrotSrc implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ MAX_W(0, "MAX_W"), //
+ FIXED_W(1, "FIXED_W"), //
+ FIXED_VAR(2, "FIXED_VAR"), //
+ FIXED_PF(3, "FIXED_PF"), //
+ VOLT_VAR(4, "VOLT_VAR"), //
+ FREQ_WATT(5, "FREQ_WATT"), //
+ DYN_REACT_CURR(6, "DYN_REACT_CURR"), //
+ LVRT(7, "LVRT"), //
+ HVRT(8, "HVRT"), //
+ WATT_VAR(9, "WATT_VAR"), //
+ VOLT_WATT(10, "VOLT_WATT"), //
+ SCHEDULED(11, "SCHEDULED"), //
+ LFRT(12, "LFRT"), //
+ HFRT(13, "HFRT"), //
+ DERATED(14, "DERATED"); //
+
+ private final int value;
+ private final String name;
+
+ private S701_ThrotSrc(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S702 implements SunSpecPoint {
+ W_MAX_RTG(new PointImpl(//
+ "S702_W_MAX_RTG", //
+ "Active Power Max Rating", //
+ "Maximum active power rating at unity power factor in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_OVR_EXT_RTG(new PointImpl(//
+ "S702_W_OVR_EXT_RTG", //
+ "Active Power (Over-Excited) Rating", //
+ "Active power rating at specified over-excited power factor in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_OVR_EXT_RTG_P_F(new PointImpl(//
+ "S702_W_OVR_EXT_RTG_P_F", //
+ "Specified Over-Excited PF", //
+ "Specified over-excited power factor.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ W_UND_EXT_RTG(new PointImpl(//
+ "S702_W_UND_EXT_RTG", //
+ "Active Power (Under-Excited) Rating", //
+ "Active power rating at specified under-excited power factor in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_UND_EXT_RTG_P_F(new PointImpl(//
+ "S702_W_UND_EXT_RTG_P_F", //
+ "Specified Under-Excited PF", //
+ "Specified under-excited power factor.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ V_A_MAX_RTG(new PointImpl(//
+ "S702_V_A_MAX_RTG", //
+ "Apparent Power Max Rating", //
+ "Maximum apparent power rating in voltamperes.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ VAR_MAX_INJ_RTG(new PointImpl(//
+ "S702_VAR_MAX_INJ_RTG", //
+ "Reactive Power Injected Rating", //
+ "Maximum injected reactive power rating in vars.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ VAR_MAX_ABS_RTG(new PointImpl(//
+ "S702_VAR_MAX_ABS_RTG", //
+ "Reactive Power Absorbed Rating", //
+ "Maximum absorbed reactive power rating in vars.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ W_CHA_RTE_MAX_RTG(new PointImpl(//
+ "S702_W_CHA_RTE_MAX_RTG", //
+ "Charge Rate Max Rating", //
+ "Maximum active power charge rate in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_DIS_CHA_RTE_MAX_RTG(new PointImpl(//
+ "S702_W_DIS_CHA_RTE_MAX_RTG", //
+ "Discharge Rate Max Rating", //
+ "Maximum active power discharge rate in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ V_A_CHA_RTE_MAX_RTG(new PointImpl(//
+ "S702_V_A_CHA_RTE_MAX_RTG", //
+ "Charge Rate Max VA Rating", //
+ "Maximum apparent power charge rate in voltamperes.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ V_A_DIS_CHA_RTE_MAX_RTG(new PointImpl(//
+ "S702_V_A_DIS_CHA_RTE_MAX_RTG", //
+ "Discharge Rate Max VA Rating", //
+ "Maximum apparent power discharge rate in voltamperes.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ V_NOM_RTG(new PointImpl(//
+ "S702_V_NOM_RTG", //
+ "AC Voltage Nominal Rating", //
+ "AC voltage nominal rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ V_MAX_RTG(new PointImpl(//
+ "S702_V_MAX_RTG", //
+ "AC Voltage Max Rating", //
+ "AC voltage maximum rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ V_MIN_RTG(new PointImpl(//
+ "S702_V_MIN_RTG", //
+ "AC Voltage Min Rating", //
+ "AC voltage minimum rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ A_MAX_RTG(new PointImpl(//
+ "S702_A_MAX_RTG", //
+ "AC Current Max Rating", //
+ "AC current maximum rating in amps.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.AMPERE, //
+ "A_SF", //
+ new OptionsEnum[0])), //
+ P_F_OVR_EXT_RTG(new PointImpl(//
+ "S702_P_F_OVR_EXT_RTG", //
+ "PF Over-Excited Rating", //
+ "Power factor over-excited rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ P_F_UND_EXT_RTG(new PointImpl(//
+ "S702_P_F_UND_EXT_RTG", //
+ "PF Under-Excited Rating", //
+ "Power factor under-excited rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ REACT_SUSCEPT_RTG(new PointImpl(//
+ "S702_REACT_SUSCEPT_RTG", //
+ "Reactive Susceptance", //
+ "Reactive susceptance that remains connected to the Area EPS in the cease to energize and trip state.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "S_SF", //
+ new OptionsEnum[0])), //
+ NOR_OP_CAT_RTG(new PointImpl(//
+ "S702_NOR_OP_CAT_RTG", //
+ "Normal Operating Category", //
+ "Normal operating performance category as specified in IEEE 1547-2018.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S702_NorOpCatRtg.values())), //
+ ABN_OP_CAT_RTG(new PointImpl(//
+ "S702_ABN_OP_CAT_RTG", //
+ "Abnormal Operating Category", //
+ "Abnormal operating performance category as specified in IEEE 1547-2018.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S702_AbnOpCatRtg.values())), //
+ CTRL_MODES(new PointImpl(//
+ "S702_CTRL_MODES", //
+ "Supported Control Modes", //
+ "Supported control mode functions.", //
+ "", //
+ PointType.BITFIELD32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S702_CtrlModes.values())), //
+ INT_ISLAND_CAT_RTG(new PointImpl(//
+ "S702_INT_ISLAND_CAT_RTG", //
+ "Intentional Island Categories", //
+ "Intentional island categories.", //
+ "", //
+ PointType.BITFIELD16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S702_IntIslandCatRtg.values())), //
+ W_MAX(new PointImpl(//
+ "S702_W_MAX", //
+ "Active Power Max Setting", //
+ "Maximum active power setting used to adjust maximum active power setting.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_MAX_OVR_EXT(new PointImpl(//
+ "S702_W_MAX_OVR_EXT", //
+ "Active Power (Over-Excited) Setting", //
+ "Active power setting at specified over-excited power factor in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_OVR_EXT_P_F(new PointImpl(//
+ "S702_W_OVR_EXT_P_F", //
+ "Specified Over-Excited PF", //
+ "Specified over-excited power factor.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ W_MAX_UND_EXT(new PointImpl(//
+ "S702_W_MAX_UND_EXT", //
+ "Active Power (Under-Excited) Setting", //
+ "Active power setting at specified under-excited power factor in watts.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_UND_EXT_P_F(new PointImpl(//
+ "S702_W_UND_EXT_P_F", //
+ "Specified Under-Excited PF", //
+ "Specified under-excited power factor.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ V_A_MAX(new PointImpl(//
+ "S702_V_A_MAX", //
+ "Apparent Power Max Setting", //
+ "Maximum apparent power setting used to adjust maximum apparent power rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ VAR_MAX_INJ(new PointImpl(//
+ "S702_VAR_MAX_INJ", //
+ "Reactive Power Injected Setting", //
+ "Maximum injected reactive power setting used to adjust maximum injected reactive power rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ VAR_MAX_ABS(new PointImpl(//
+ "S702_VAR_MAX_ABS", //
+ "Reactive Power Absorbed Setting", //
+ "Maximum absorbed reactive power setting used to adjust maximum absorbed reactive power rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "Var_SF", //
+ new OptionsEnum[0])), //
+ W_CHA_RTE_MAX(new PointImpl(//
+ "S702_W_CHA_RTE_MAX", //
+ "Charge Rate Max Setting", //
+ "Maximum active power charge rate setting used to adjust maximum active power charge rate rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ W_DIS_CHA_RTE_MAX(new PointImpl(//
+ "S702_W_DIS_CHA_RTE_MAX", //
+ "Discharge Rate Max Setting", //
+ "Maximum active power discharge rate setting used to adjust maximum active power discharge rate rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "W_SF", //
+ new OptionsEnum[0])), //
+ V_A_CHA_RTE_MAX(new PointImpl(//
+ "S702_V_A_CHA_RTE_MAX", //
+ "Charge Rate Max VA Setting", //
+ "Maximum apparent power charge rate setting used to adjust maximum apparent power charge rate rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ V_A_DIS_CHA_RTE_MAX(new PointImpl(//
+ "S702_V_A_DIS_CHA_RTE_MAX", //
+ "Discharge Rate Max VA Setting", //
+ "Maximum apparent power discharge rate setting used to adjust maximum apparent power discharge rate rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE, //
+ "VA_SF", //
+ new OptionsEnum[0])), //
+ V_NOM(new PointImpl(//
+ "S702_V_NOM", //
+ "Nominal AC Voltage Setting", //
+ "Nominal AC voltage setting.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ V_MAX(new PointImpl(//
+ "S702_V_MAX", //
+ "AC Voltage Max Setting", //
+ "AC voltage maximum setting used to adjust AC voltage maximum rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ V_MIN(new PointImpl(//
+ "S702_V_MIN", //
+ "AC Voltage Min Setting", //
+ "AC voltage minimum setting used to adjust AC voltage minimum rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ A_MAX(new PointImpl(//
+ "S702_A_MAX", //
+ "AC Current Max Setting", //
+ "Maximum AC current setting used to adjust maximum AC current rating.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.AMPERE, //
+ "A_SF", //
+ new OptionsEnum[0])), //
+ P_F_OVR_EXT(new PointImpl(//
+ "S702_P_F_OVR_EXT", //
+ "PF Over-Excited Setting", //
+ "Power factor over-excited setting.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ P_F_UND_EXT(new PointImpl(//
+ "S702_P_F_UND_EXT", //
+ "PF Under-Excited Setting", //
+ "Power factor under-excited setting.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "PF_SF", //
+ new OptionsEnum[0])), //
+ INT_ISLAND_CAT(new PointImpl(//
+ "S702_INT_ISLAND_CAT", //
+ "Intentional Island Categories", //
+ "Intentional island categories.", //
+ "", //
+ PointType.BITFIELD16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S702_IntIslandCat.values())), //
+ W_SF(new PointImpl(//
+ "S702_W_SF", //
+ "Active Power Scale Factor", //
+ "Active power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ PF_SF(new PointImpl(//
+ "S702_PF_SF", //
+ "Power Factor Scale Factor", //
+ "Power factor scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ VA_SF(new PointImpl(//
+ "S702_VA_SF", //
+ "Apparent Power Scale Factor", //
+ "Apparent power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ VAR_S_F(new PointImpl(//
+ "S702_VAR_S_F", //
+ "Reactive Power Scale Factor", //
+ "Reactive power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S702_V_SF", //
+ "Voltage Scale Factor", //
+ "Voltage scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ A_SF(new PointImpl(//
+ "S702_A_SF", //
+ "Current Scale Factor", //
+ "Current scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ S_SF(new PointImpl(//
+ "S702_S_SF", //
+ "Susceptance Scale Factor", //
+ "Susceptance scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S702(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S702_NorOpCatRtg implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ CAT_A(0, "CAT_A"), //
+ CAT_B(1, "CAT_B"); //
+
+ private final int value;
+ private final String name;
+
+ private S702_NorOpCatRtg(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S702_AbnOpCatRtg implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ CAT_1(0, "CAT_1"), //
+ CAT_2(1, "CAT_2"), //
+ CAT_3(2, "CAT_3"); //
+
+ private final int value;
+ private final String name;
+
+ private S702_AbnOpCatRtg(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S702_CtrlModes implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ MAX_W(0, "MAX_W"), //
+ FIXED_W(1, "FIXED_W"), //
+ FIXED_VAR(2, "FIXED_VAR"), //
+ FIXED_PF(3, "FIXED_PF"), //
+ VOLT_VAR(4, "VOLT_VAR"), //
+ FREQ_WATT(5, "FREQ_WATT"), //
+ DYN_REACT_CURR(6, "DYN_REACT_CURR"), //
+ LV_TRIP(7, "LV_TRIP"), //
+ HV_TRIP(8, "HV_TRIP"), //
+ WATT_VAR(9, "WATT_VAR"), //
+ VOLT_WATT(10, "VOLT_WATT"), //
+ SCHEDULED(11, "SCHEDULED"), //
+ LF_TRIP(12, "LF_TRIP"), //
+ HF_TRIP(13, "HF_TRIP"); //
+
+ private final int value;
+ private final String name;
+
+ private S702_CtrlModes(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S702_IntIslandCatRtg implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ UNCATEGORIZED(0, "UNCATEGORIZED"), //
+ INT_ISL_CAPABLE(1, "INT_ISL_CAPABLE"), //
+ BLACK_START_CAPABLE(2, "BLACK_START_CAPABLE"), //
+ ISOCH_CAPABLE(3, "ISOCH_CAPABLE"); //
+
+ private final int value;
+ private final String name;
+
+ private S702_IntIslandCatRtg(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S702_IntIslandCat implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ UNCATEGORIZED(0, "UNCATEGORIZED"), //
+ INT_ISL_CAPABLE(1, "INT_ISL_CAPABLE"), //
+ BLACK_START_CAPABLE(2, "BLACK_START_CAPABLE"), //
+ ISOCH_CAPABLE(3, "ISOCH_CAPABLE"); //
+
+ private final int value;
+ private final String name;
+
+ private S702_IntIslandCat(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S703 implements SunSpecPoint {
+ ES(new PointImpl(//
+ "S703_ES", //
+ "Permit Enter Service", //
+ "Permit enter service.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S703_ES.values())), //
+ E_S_V_HI(new PointImpl(//
+ "S703_E_S_V_HI", //
+ "Enter Service Voltage High", //
+ "Enter service voltage high threshold as percent of normal voltage.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ E_S_V_LO(new PointImpl(//
+ "S703_E_S_V_LO", //
+ "Enter Service Voltage Low", //
+ "Enter service voltage low threshold as percent of normal voltage.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "V_SF", //
+ new OptionsEnum[0])), //
+ E_S_HZ_HI(new PointImpl(//
+ "S703_E_S_HZ_HI", //
+ "Enter Service Frequency High", //
+ "Enter service frequency high threshold.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.HERTZ, //
+ "Hz_SF", //
+ new OptionsEnum[0])), //
+ E_S_HZ_LO(new PointImpl(//
+ "S703_E_S_HZ_LO", //
+ "Enter Service Frequency Low", //
+ "Enter service frequency low threshold.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.HERTZ, //
+ "Hz_SF", //
+ new OptionsEnum[0])), //
+ E_S_DLY_TMS(new PointImpl(//
+ "S703_E_S_DLY_TMS", //
+ "Enter Service Delay Time", //
+ "Enter service delay time in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ E_S_RND_TMS(new PointImpl(//
+ "S703_E_S_RND_TMS", //
+ "Enter Service Random Delay", //
+ "Enter service random delay in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ E_S_RMP_TMS(new PointImpl(//
+ "S703_E_S_RMP_TMS", //
+ "Enter Service Ramp Time", //
+ "Enter service ramp time in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ E_S_DLY_REM_TMS(new PointImpl(//
+ "S703_E_S_DLY_REM_TMS", //
+ "Enter Service Delay Remaining", //
+ "Enter service delay time remaining in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S703_V_SF", //
+ "Voltage Scale Factor", //
+ "Voltage percentage scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ HZ_S_F(new PointImpl(//
+ "S703_HZ_S_F", //
+ "Frequency Scale Factor", //
+ "Frequency scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S703(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S703_ES implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S703_ES(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704 implements SunSpecPoint {
+ P_F_W_INJ_ENA(new PointImpl(//
+ "S704_P_F_W_INJ_ENA", //
+ "Power Factor Enable (W Inj) Enable", //
+ "Power factor enable when injecting active power.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_PFWInjEna.values())), //
+ P_F_W_INJ_ENA_RVRT(new PointImpl(//
+ "S704_P_F_W_INJ_ENA_RVRT", //
+ "Power Factor Reversion Enable (W Inj)", //
+ "Power factor reversion timer when injecting active power enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_PFWInjEnaRvrt.values())), //
+ P_F_W_INJ_RVRT_TMS(new PointImpl(//
+ "S704_P_F_W_INJ_RVRT_TMS", //
+ "PF Reversion Time (W Inj)", //
+ "Power factor reversion timer when injecting active power.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ P_F_W_INJ_RVRT_REM(new PointImpl(//
+ "S704_P_F_W_INJ_RVRT_REM", //
+ "PF Reversion Time Rem (W Inj)", //
+ "Power factor reversion time remaining when injecting active power.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ P_F_W_ABS_ENA(new PointImpl(//
+ "S704_P_F_W_ABS_ENA", //
+ "Power Factor Enable (W Abs) Enable", //
+ "Power factor enable when absorbing active power.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_PFWAbsEna.values())), //
+ P_F_W_ABS_ENA_RVRT(new PointImpl(//
+ "S704_P_F_W_ABS_ENA_RVRT", //
+ "Power Factor Reversion Enable (W Abs)", //
+ "Power factor reversion timer when absorbing active power enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_PFWAbsEnaRvrt.values())), //
+ P_F_W_ABS_RVRT_TMS(new PointImpl(//
+ "S704_P_F_W_ABS_RVRT_TMS", //
+ "PF Reversion Time (W Abs)", //
+ "Power factor reversion timer when absorbing active power.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ P_F_W_ABS_RVRT_REM(new PointImpl(//
+ "S704_P_F_W_ABS_RVRT_REM", //
+ "PF Reversion Time Rem (W Abs)", //
+ "Power factor reversion time remaining when absorbing active power.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ W_MAX_LIM_PCT_ENA(new PointImpl(//
+ "S704_W_MAX_LIM_PCT_ENA", //
+ "Limit Max Power Pct Enable", //
+ "Limit maximum active power percent enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_WMaxLimPctEna.values())), //
+ W_MAX_LIM_PCT(new PointImpl(//
+ "S704_W_MAX_LIM_PCT", //
+ "Limit Max Power Pct Setpoint", //
+ "Limit maximum active power percent value.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "WMaxLimPct_SF", //
+ new OptionsEnum[0])), //
+ W_MAX_LIM_PCT_RVRT(new PointImpl(//
+ "S704_W_MAX_LIM_PCT_RVRT", //
+ "Reversion Limit Max Power Pct", //
+ "Reversion limit maximum active power percent value.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "WMaxLimPct_SF", //
+ new OptionsEnum[0])), //
+ W_MAX_LIM_PCT_ENA_RVRT(new PointImpl(//
+ "S704_W_MAX_LIM_PCT_ENA_RVRT", //
+ "Reversion Limit Max Power Pct Enable", //
+ "Reversion limit maximum active power percent value enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_WMaxLimPctEnaRvrt.values())), //
+ W_MAX_LIM_PCT_RVRT_TMS(new PointImpl(//
+ "S704_W_MAX_LIM_PCT_RVRT_TMS", //
+ "Limit Max Power Pct Reversion Time", //
+ "Limit maximum active power percent reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ W_MAX_LIM_PCT_RVRT_REM(new PointImpl(//
+ "S704_W_MAX_LIM_PCT_RVRT_REM", //
+ "Limit Max Power Pct Rev Time Rem", //
+ "Limit maximum active power percent reversion time remaining.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ W_SET_ENA(new PointImpl(//
+ "S704_W_SET_ENA", //
+ "Set Active Power Enable", //
+ "Set active power enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_WSetEna.values())), //
+ W_SET_MOD(new PointImpl(//
+ "S704_W_SET_MOD", //
+ "Set Active Power Mode", //
+ "Set active power mode.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_WSetMod.values())), //
+ W_SET(new PointImpl(//
+ "S704_W_SET", //
+ "Active Power Setpoint (W)", //
+ "Active power setting value in watts.", //
+ "", //
+ PointType.INT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "WSet_SF", //
+ new OptionsEnum[0])), //
+ W_SET_RVRT(new PointImpl(//
+ "S704_W_SET_RVRT", //
+ "Reversion Active Power (W)", //
+ "Reversion active power setting value in watts.", //
+ "", //
+ PointType.INT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.WATT, //
+ "WSet_SF", //
+ new OptionsEnum[0])), //
+ W_SET_PCT(new PointImpl(//
+ "S704_W_SET_PCT", //
+ "Active Power Setpoint (Pct)", //
+ "Active power setting value as percent.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "WSetPct_SF", //
+ new OptionsEnum[0])), //
+ W_SET_PCT_RVRT(new PointImpl(//
+ "S704_W_SET_PCT_RVRT", //
+ "Reversion Active Power (Pct)", //
+ "Reversion active power setting value as percent.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "WSetPct_SF", //
+ new OptionsEnum[0])), //
+ W_SET_ENA_RVRT(new PointImpl(//
+ "S704_W_SET_ENA_RVRT", //
+ "Reversion Active Power Enable", //
+ "Reversion active power function enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_WSetEnaRvrt.values())), //
+ W_SET_RVRT_TMS(new PointImpl(//
+ "S704_W_SET_RVRT_TMS", //
+ "Active Power Reversion Time", //
+ "Set active power reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ W_SET_RVRT_REM(new PointImpl(//
+ "S704_W_SET_RVRT_REM", //
+ "Active Power Rev Time Rem", //
+ "Set active power reversion time remaining.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ VAR_SET_ENA(new PointImpl(//
+ "S704_VAR_SET_ENA", //
+ "Set Reactive Power Enable", //
+ "Set reactive power enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_VarSetEna.values())), //
+ VAR_SET_MOD(new PointImpl(//
+ "S704_VAR_SET_MOD", //
+ "Set Reactive Power Mode", //
+ "Set reactive power mode.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_VarSetMod.values())), //
+ VAR_SET_PRI(new PointImpl(//
+ "S704_VAR_SET_PRI", //
+ "Reactive Power Priority", //
+ "Reactive power priority.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_VarSetPri.values())), //
+ VAR_SET(new PointImpl(//
+ "S704_VAR_SET", //
+ "Reactive Power Setpoint (Vars)", //
+ "Reactive power setting value in vars.", //
+ "", //
+ PointType.INT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "VarSet_SF", //
+ new OptionsEnum[0])), //
+ VAR_SET_RVRT(new PointImpl(//
+ "S704_VAR_SET_RVRT", //
+ "Reversion Reactive Power (Vars)", //
+ "Reversion reactive power setting value in vars.", //
+ "", //
+ PointType.INT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.VOLT_AMPERE_REACTIVE, //
+ "VarSet_SF", //
+ new OptionsEnum[0])), //
+ VAR_SET_PCT(new PointImpl(//
+ "S704_VAR_SET_PCT", //
+ "Reactive Power Setpoint (Pct)", //
+ "Reactive power setting value as percent.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "VarSetPct_SF", //
+ new OptionsEnum[0])), //
+ VAR_SET_PCT_RVRT(new PointImpl(//
+ "S704_VAR_SET_PCT_RVRT", //
+ "Reversion Reactive Power (Pct)", //
+ "Reversion reactive power setting value as percent.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ "VarSetPct_SF", //
+ new OptionsEnum[0])), //
+ VAR_SET_ENA_RVRT(new PointImpl(//
+ "S704_VAR_SET_ENA_RVRT", //
+ "Reversion Reactive Power Enable", //
+ "Reversion reactive power function enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_VarSetEnaRvrt.values())), //
+ VAR_SET_RVRT_TMS(new PointImpl(//
+ "S704_VAR_SET_RVRT_TMS", //
+ "Reactive Power Reversion Time", //
+ "Set reactive power reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ VAR_SET_RVRT_REM(new PointImpl(//
+ "S704_VAR_SET_RVRT_REM", //
+ "Reactive Power Rev Time Rem", //
+ "Set reactive power reversion time remaining.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ W_RMP(new PointImpl(//
+ "S704_W_RMP", //
+ "Normal Ramp Rate", //
+ "Ramp rate for increases in active power during normal generation.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ W_RMP_REF(new PointImpl(//
+ "S704_W_RMP_REF", //
+ "Normal Ramp Rate Reference", //
+ "Ramp rate reference unit for increases in active power or current during normal generation.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_WRmpRef.values())), //
+ VAR_RMP(new PointImpl(//
+ "S704_VAR_RMP", //
+ "Reactive Power Ramp Rate", //
+ "Ramp rate based on max reactive power per second.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ANTI_ISL_ENA(new PointImpl(//
+ "S704_ANTI_ISL_ENA", //
+ "Anti-Islanding Enable", //
+ "Anti-islanding enable.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S704_AntiIslEna.values())), //
+ PF_SF(new PointImpl(//
+ "S704_PF_SF", //
+ "Power Factor Scale Factor", //
+ "Power factor scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ W_MAX_LIM_PCT_S_F(new PointImpl(//
+ "S704_W_MAX_LIM_PCT_S_F", //
+ "Limit Max Power Scale Factor", //
+ "Limit maximum power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ W_SET_S_F(new PointImpl(//
+ "S704_W_SET_S_F", //
+ "Active Power Scale Factor", //
+ "Active power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ W_SET_PCT_S_F(new PointImpl(//
+ "S704_W_SET_PCT_S_F", //
+ "Active Power Pct Scale Factor", //
+ "Active power pct scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ VAR_SET_S_F(new PointImpl(//
+ "S704_VAR_SET_S_F", //
+ "Reactive Power Scale Factor", //
+ "Reactive power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ VAR_SET_PCT_S_F(new PointImpl(//
+ "S704_VAR_SET_PCT_S_F", //
+ "Reactive Power Pct Scale Factor", //
+ "Reactive power pct scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S704(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S704_PFWInjEna implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_PFWInjEna(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_PFWInjEnaRvrt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_PFWInjEnaRvrt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_PFWAbsEna implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_PFWAbsEna(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_PFWAbsEnaRvrt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_PFWAbsEnaRvrt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_WMaxLimPctEna implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_WMaxLimPctEna(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_WMaxLimPctEnaRvrt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_WMaxLimPctEnaRvrt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_WSetEna implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_WSetEna(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_WSetMod implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ W_MAX_PCT(0, "W_MAX_PCT"), //
+ WATTS(1, "WATTS"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_WSetMod(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_WSetEnaRvrt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_WSetEnaRvrt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_VarSetEna implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_VarSetEna(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_VarSetMod implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ W_MAX_PCT(0, "W_MAX_PCT"), //
+ VAR_MAX_PCT(1, "VAR_MAX_PCT"), //
+ VAR_AVAIL_PCT(2, "VAR_AVAIL_PCT"), //
+ VA_MAX_PCT(3, "VA_MAX_PCT"), //
+ VARS(4, "VARS"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_VarSetMod(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_VarSetPri implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ ACTIVE(0, "ACTIVE"), //
+ REACTIVE(1, "REACTIVE"), //
+ VENDOR(2, "VENDOR"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_VarSetPri(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_VarSetEnaRvrt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_VarSetEnaRvrt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_WRmpRef implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ A_MAX(0, "A_MAX"), //
+ W_MAX(1, "W_MAX"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_WRmpRef(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S704_AntiIslEna implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S704_AntiIslEna(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S705 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S705_ENA", //
+ "DER Volt-Var Module Enable", //
+ "Volt-Var control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S705_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S705_ADPT_CRV_REQ", //
+ "Adopt Curve Request", //
+ "Index of curve points to adopt. First curve index is 1.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S705_ADPT_CRV_RSLT", //
+ "Adopt Curve Result", //
+ "Result of last adopt curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S705_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S705_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV(new PointImpl(//
+ "S705_N_CRV", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_TMS(new PointImpl(//
+ "S705_RVRT_TMS", //
+ "Reversion Timeout", //
+ "Reversion time in seconds. 0 = No reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_REM(new PointImpl(//
+ "S705_RVRT_REM", //
+ "Reversion Time Remaining", //
+ "Reversion time remaining in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_CRV(new PointImpl(//
+ "S705_RVRT_CRV", //
+ "Reversion Curve", //
+ "Default curve after reversion timeout.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S705_V_SF", //
+ "Voltage Scale Factor", //
+ "Scale factor for curve voltage points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DEPT_REF_S_F(new PointImpl(//
+ "S705_DEPT_REF_S_F", //
+ "Var Scale Factor", //
+ "Scale factor for curve var points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RSP_TMS_S_F(new PointImpl(//
+ "S705_RSP_TMS_S_F", //
+ "Open-Loop Scale Factor", //
+ "Open loop response time scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S705(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S705_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S705_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S705_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S705_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S706 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S706_ENA", //
+ "DER Volt-Watt Module Enable", //
+ "Volt-Watt control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S706_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S706_ADPT_CRV_REQ", //
+ "Adopt Curve Request", //
+ "Index of curve points to adopt. First curve index is 1.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S706_ADPT_CRV_RSLT", //
+ "Adopt Curve Result", //
+ "Result of last adopt curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S706_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S706_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV(new PointImpl(//
+ "S706_N_CRV", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_TMS(new PointImpl(//
+ "S706_RVRT_TMS", //
+ "Reversion Timeout", //
+ "Reversion time in seconds. 0 = No reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_REM(new PointImpl(//
+ "S706_RVRT_REM", //
+ "Reversion Time Remaining", //
+ "Reversion time remaining in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_CRV(new PointImpl(//
+ "S706_RVRT_CRV", //
+ "Reversion Curve", //
+ "Default curve after reversion timeout.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S706_V_SF", //
+ "Voltage Scale Factor", //
+ "Scale factor for curve voltage points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DEPT_REF_S_F(new PointImpl(//
+ "S706_DEPT_REF_S_F", //
+ "Watt Scale Factor", //
+ "Scale factor for curve watt points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RSP_TMS_S_F(new PointImpl(//
+ "S706_RSP_TMS_S_F", //
+ "Open-Loop Scale Factor", //
+ "Open loop response time scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S706(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S706_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S706_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S706_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S706_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S707 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S707_ENA", //
+ "DER Trip LV Module Enable", //
+ "DER low voltage trip control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S707_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S707_ADPT_CRV_REQ", //
+ "Adopt Curve Request", //
+ "Index of curve points to adopt. First curve index is 1.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S707_ADPT_CRV_RSLT", //
+ "Adopt Curve Result", //
+ "Result of last adopt curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S707_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S707_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV_SET(new PointImpl(//
+ "S707_N_CRV_SET", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S707_V_SF", //
+ "Voltage Scale Factor", //
+ "Scale factor for curve voltage points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TMS_S_F(new PointImpl(//
+ "S707_TMS_S_F", //
+ "Time Point Scale Factor", //
+ "Scale factor for curve time points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S707(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S707_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S707_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S707_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S707_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S708 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S708_ENA", //
+ "DER Trip HV Module Enable", //
+ "DER high voltage trip control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S708_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S708_ADPT_CRV_REQ", //
+ "Adopt Curve Request", //
+ "Index of curve points to adopt. First curve index is 1.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S708_ADPT_CRV_RSLT", //
+ "Adopt Curve Result", //
+ "Result of last adopt curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S708_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S708_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV_SET(new PointImpl(//
+ "S708_N_CRV_SET", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ V_SF(new PointImpl(//
+ "S708_V_SF", //
+ "Voltage Scale Factor", //
+ "Scale factor for curve voltage points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TMS_S_F(new PointImpl(//
+ "S708_TMS_S_F", //
+ "Time Point Scale Factor", //
+ "Scale factor for curve time points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S708(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S708_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S708_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S708_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S708_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S709 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S709_ENA", //
+ "DER Trip LF Module Enable", //
+ "DER low frequency trip control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S709_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S709_ADPT_CRV_REQ", //
+ "Adopt Curve Request", //
+ "Index of curve points to adopt. First curve index is 1.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S709_ADPT_CRV_RSLT", //
+ "Adopt Curve Result", //
+ "Result of last adopt curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S709_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S709_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV_SET(new PointImpl(//
+ "S709_N_CRV_SET", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ HZ_S_F(new PointImpl(//
+ "S709_HZ_S_F", //
+ "Frequency Scale Factor", //
+ "Scale factor for curve frequency points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TMS_S_F(new PointImpl(//
+ "S709_TMS_S_F", //
+ "Time Point Scale Factor", //
+ "Scale factor for curve time points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S709(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S709_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S709_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S709_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S709_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S710 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S710_ENA", //
+ "DER Trip HF Module Enable", //
+ "DER high frequency trip control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S710_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S710_ADPT_CRV_REQ", //
+ "Adopt Curve Request", //
+ "Index of curve points to adopt. First curve index is 1.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S710_ADPT_CRV_RSLT", //
+ "Adopt Curve Result", //
+ "Result of last adopt curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S710_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S710_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV_SET(new PointImpl(//
+ "S710_N_CRV_SET", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ HZ_S_F(new PointImpl(//
+ "S710_HZ_S_F", //
+ "Frequency Scale Factor", //
+ "Scale factor for curve frequency points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TMS_S_F(new PointImpl(//
+ "S710_TMS_S_F", //
+ "Time Point Scale Factor", //
+ "Scale factor for curve time points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S710(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S710_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S710_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S710_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S710_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S711 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S711_ENA", //
+ "DER Frequency Droop Module Enable", //
+ "DER Frequency-Watt (Frequency-Droop) control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S711_Ena.values())), //
+ ADPT_CTL_REQ(new PointImpl(//
+ "S711_ADPT_CTL_REQ", //
+ "Set Active Control Request", //
+ "Set active control. 0 = No active control.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CTL_RSLT(new PointImpl(//
+ "S711_ADPT_CTL_RSLT", //
+ "Set Active Control Result", //
+ "Result of last set active control operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S711_AdptCtlRslt.values())), //
+ N_CTL(new PointImpl(//
+ "S711_N_CTL", //
+ "Stored Control Count", //
+ "Number of stored controls supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_TMS(new PointImpl(//
+ "S711_RVRT_TMS", //
+ "Reversion Timeout", //
+ "Reversion time in seconds. 0 = No reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_REM(new PointImpl(//
+ "S711_RVRT_REM", //
+ "Reversion Time Left", //
+ "Reversion time remaining in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_CTL(new PointImpl(//
+ "S711_RVRT_CTL", //
+ "Reversion Control", //
+ "Default control after reversion timeout.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DB_S_F(new PointImpl(//
+ "S711_DB_S_F", //
+ "Deadband Scale Factor", //
+ "Deadband scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ K_SF(new PointImpl(//
+ "S711_K_SF", //
+ "Frequency Change Scale Factor", //
+ "Frequency change scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RSP_TMS_S_F(new PointImpl(//
+ "S711_RSP_TMS_S_F", //
+ "Open-Loop Scale Factor", //
+ "Open loop response time scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S711(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S711_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S711_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S711_AdptCtlRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S711_AdptCtlRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S712 implements SunSpecPoint {
+ ENA(new PointImpl(//
+ "S712_ENA", //
+ "DER Watt-Var Module Enable", //
+ "DER Watt-Var control enable.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S712_Ena.values())), //
+ ADPT_CRV_REQ(new PointImpl(//
+ "S712_ADPT_CRV_REQ", //
+ "Set Active Curve Request", //
+ "Set active curve. 0 = No active curve.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ADPT_CRV_RSLT(new PointImpl(//
+ "S712_ADPT_CRV_RSLT", //
+ "Set Active Curve Result", //
+ "Result of last set active curve operation.", //
+ "", //
+ PointType.ENUM16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S712_AdptCrvRslt.values())), //
+ N_PT(new PointImpl(//
+ "S712_N_PT", //
+ "Number Of Points", //
+ "Number of curve points supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_CRV(new PointImpl(//
+ "S712_N_CRV", //
+ "Stored Curve Count", //
+ "Number of stored curves supported.", //
+ "", //
+ PointType.UINT16, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_TMS(new PointImpl(//
+ "S712_RVRT_TMS", //
+ "Reversion Timeout", //
+ "Reversion time in seconds. 0 = No reversion time.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_REM(new PointImpl(//
+ "S712_RVRT_REM", //
+ "Reversion Time Left", //
+ "Reversion time remaining in seconds.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.SECONDS, //
+ null, //
+ new OptionsEnum[0])), //
+ RVRT_CRV(new PointImpl(//
+ "S712_RVRT_CRV", //
+ "Reversion Curve", //
+ "Default curve after reversion timeout.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ W_SF(new PointImpl(//
+ "S712_W_SF", //
+ "Active Power Scale Factor", //
+ "Scale factor for curve active power points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DEPT_REF_S_F(new PointImpl(//
+ "S712_DEPT_REF_S_F", //
+ "Var Scale Factor", //
+ "Scale factor for curve var points.", //
+ "", //
+ PointType.SUNSSF, //
+ true, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S712(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S712_Ena implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ DISABLED(0, "DISABLED"), //
+ ENABLED(1, "ENABLED"); //
+
+ private final int value;
+ private final String name;
+
+ private S712_Ena(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S712_AdptCrvRslt implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ IN_PROGRESS(0, "IN_PROGRESS"), //
+ COMPLETED(1, "COMPLETED"), //
+ FAILED(2, "FAILED"); //
+
+ private final int value;
+ private final String name;
+
+ private S712_AdptCrvRslt(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S713 implements SunSpecPoint {
+ W_H_RTG(new PointImpl(//
+ "S713_W_H_RTG", //
+ "Energy Rating", //
+ "Energy rating of the DER storage.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "WH_SF", //
+ new OptionsEnum[0])), //
+ W_H_AVAIL(new PointImpl(//
+ "S713_W_H_AVAIL", //
+ "Energy Available", //
+ "Energy available of the DER storage (WHAvail = WHRtg * SoC * SoH)", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "WH_SF", //
+ new OptionsEnum[0])), //
+ SO_C(new PointImpl(//
+ "S713_SO_C", //
+ "State of Charge", //
+ "State of charge of the DER storage.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "Pct_SF", //
+ new OptionsEnum[0])), //
+ SO_H(new PointImpl(//
+ "S713_SO_H", //
+ "State of Health", //
+ "State of health of the DER storage.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ "Pct_SF", //
+ new OptionsEnum[0])), //
+ STA(new PointImpl(//
+ "S713_STA", //
+ "Status", //
+ "Storage status.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S713_Sta.values())), //
+ WH_SF(new PointImpl(//
+ "S713_WH_SF", //
+ "Energy Scale Factor", //
+ "Scale factor for energy capacity.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ PCT_S_F(new PointImpl(//
+ "S713_PCT_S_F", //
+ "Percent Scale Factor", //
+ "Scale factor for percentage.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S713(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S713_Sta implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ OK(0, "OK"), //
+ WARNING(1, "WARNING"), //
+ ERROR(2, "ERROR"); //
+
+ private final int value;
+ private final String name;
+
+ private S713_Sta(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S714 implements SunSpecPoint {
+ PRT_ALRMS(new PointImpl(//
+ "S714_PRT_ALRMS", //
+ "Port Alarms", //
+ "Bitfield of ports with active alarms. Bit is 1 if port has an active alarm. Bit 0 is first port.", //
+ "", //
+ PointType.BITFIELD32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ N_PRT(new PointImpl(//
+ "S714_N_PRT", //
+ "Number Of Ports", //
+ "Number of DC ports.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DCA(new PointImpl(//
+ "S714_DCA", //
+ "DC Current", //
+ "Total DC current for all ports.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.AMPERE, //
+ "DCA_SF", //
+ new OptionsEnum[0])), //
+ DCW(new PointImpl(//
+ "S714_DCW", //
+ "DC Power", //
+ "Total DC power for all ports.", //
+ "", //
+ PointType.INT16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.WATT, //
+ "DCW_SF", //
+ new OptionsEnum[0])), //
+ D_C_WH_INJ(new PointImpl(//
+ "S714_D_C_WH_INJ", //
+ "DC Energy Injected", //
+ "Total cumulative DC energy injected for all ports.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "DCWH_SF", //
+ new OptionsEnum[0])), //
+ D_C_WH_ABS(new PointImpl(//
+ "S714_D_C_WH_ABS", //
+ "DC Energy Absorbed", //
+ "Total cumulative DC energy absorbed for all ports.", //
+ "", //
+ PointType.UINT64, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.CUMULATED_WATT_HOURS, //
+ "DCWH_SF", //
+ new OptionsEnum[0])), //
+ DCA_SF(new PointImpl(//
+ "S714_DCA_SF", //
+ "DC Current Scale Factor", //
+ "DC current scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DCV_SF(new PointImpl(//
+ "S714_DCV_SF", //
+ "DC Voltage Scale Factor", //
+ "DC voltage scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DCW_SF(new PointImpl(//
+ "S714_DCW_SF", //
+ "DC Power Scale Factor", //
+ "DC power scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ DCWH_SF(new PointImpl(//
+ "S714_DCWH_SF", //
+ "DC Energy Scale Factor", //
+ "DC energy scale factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ TMP_S_F(new PointImpl(//
+ "S714_TMP_S_F", //
+ "Temperature Scale Factor", //
+ "Temperature Scale Factor.", //
+ "", //
+ PointType.SUNSSF, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])); //
+
+ protected final PointImpl impl;
+
+ private S714(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S715 implements SunSpecPoint {
+ LOC_REM_CTL(new PointImpl(//
+ "S715_LOC_REM_CTL", //
+ "Control Mode", //
+ "DER control mode. Enumeration.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ S715_LocRemCtl.values())), //
+ D_E_R_HB(new PointImpl(//
+ "S715_D_E_R_HB", //
+ "DER Heartbeat", //
+ "Value is incremented every second by the DER with periodic resets to zero.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_ONLY, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ CONTROLLER_HB(new PointImpl(//
+ "S715_CONTROLLER_HB", //
+ "Controller Heartbeat", //
+ "Value is incremented every second by the controller with periodic resets to zero.", //
+ "", //
+ PointType.UINT32, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ ALARM_RESET(new PointImpl(//
+ "S715_ALARM_RESET", //
+ "Alarm Reset", //
+ "Used to reset any latched alarms. 1 = Reset.", //
+ "", //
+ PointType.UINT16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ new OptionsEnum[0])), //
+ OP_CTL(new PointImpl(//
+ "S715_OP_CTL", //
+ "Set Operation", //
+ "Commands to PCS. Enumerated value.", //
+ "", //
+ PointType.ENUM16, //
+ false, //
+ AccessMode.READ_WRITE, //
+ Unit.NONE, //
+ null, //
+ S715_OpCtl.values())); //
+
+ protected final PointImpl impl;
+
+ private S715(PointImpl impl) {
+ this.impl = impl;
+ }
+
+ @Override
+ public PointImpl get() {
+ return this.impl;
+ }
+ }
+
+ public static enum S715_LocRemCtl implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ REMOTE(0, "REMOTE"), //
+ LOCAL(1, "LOCAL"); //
+
+ private final int value;
+ private final String name;
+
+ private S715_LocRemCtl(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S715_OpCtl implements OptionsEnum {
+ UNDEFINED(-1, "Undefined"), //
+ STOP(0, "STOP"), //
+ START(1, "START"), //
+ ENTER_STANDBY(2, "ENTER_STANDBY"), //
+ EXIT_STANDBY(3, "EXIT_STANDBY"); //
+
+ private final int value;
+ private final String name;
+
+ private S715_OpCtl(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public int getValue() {
+ return this.value;
+ }
+
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public OptionsEnum getUndefined() {
+ return UNDEFINED;
+ }
+ }
+
+ public static enum S801 implements SunSpecPoint {
+ DEPRECATED(new PointImpl(//
"S801_DEPRECATED", //
"Deprecated Model", //
"This model has been deprecated.", //
@@ -10469,7 +14991,7 @@ public static enum S802 implements SunSpecPoint {
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
- Unit.WATT_HOURS, //
+ Unit.CUMULATED_WATT_HOURS, //
"WHRtg_SF", //
new OptionsEnum[0])), //
W_CHA_RTE_MAX(new PointImpl(//
@@ -10485,7 +15007,7 @@ public static enum S802 implements SunSpecPoint {
new OptionsEnum[0])), //
W_DIS_CHA_RTE_MAX(new PointImpl(//
"S802_W_DIS_CHA_RTE_MAX", //
- "Namplate Max Discharge Rate", //
+ "Nameplate Max Discharge Rate", //
"Maximum rate of energy transfer out of the storage device in DC watts.", //
"", //
PointType.UINT16, //
@@ -10541,7 +15063,7 @@ public static enum S802 implements SunSpecPoint {
SO_C_RSV_MIN(new PointImpl(//
"S802_SO_C_RSV_MIN", //
"Min Reserve Percent", //
- "Setpoint for maximum reserve for storage as a percentage of the nominal maximum storage.", //
+ "Setpoint for minimum reserve for storage as a percentage of the nominal maximum storage.", //
"", //
PointType.UINT16, //
false, //
@@ -10553,7 +15075,7 @@ public static enum S802 implements SunSpecPoint {
"S802_SO_C", //
"State of Charge", //
"State of charge, expressed as a percentage.", //
- "Measurement.", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -10564,7 +15086,7 @@ public static enum S802 implements SunSpecPoint {
"S802_DO_D", //
"Depth of Discharge", //
"Depth of discharge, expressed as a percentage.", //
- "Measurement.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10608,7 +15130,7 @@ public static enum S802 implements SunSpecPoint {
"S802_LOC_REM_CTL", //
"Control Mode", //
"Battery control mode. Enumeration.", //
- "Maps to DRCC.LocRemCtl in IEC 61850.", //
+ "", //
PointType.ENUM16, //
true, //
AccessMode.READ_ONLY, //
@@ -10641,7 +15163,7 @@ public static enum S802 implements SunSpecPoint {
"S802_ALM_RST", //
"Alarm Reset", //
"Used to reset any latched alarms. 1 = Reset.", //
- "Battery should reset to 0 when reset is complete.", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_WRITE, //
@@ -10652,7 +15174,7 @@ public static enum S802 implements SunSpecPoint {
"S802_TYP", //
"Battery Type", //
"Type of battery. Enumeration.", //
- "Maps to DBAT.BatTyp in 61850.", //
+ "", //
PointType.ENUM16, //
true, //
AccessMode.READ_ONLY, //
@@ -10663,7 +15185,7 @@ public static enum S802 implements SunSpecPoint {
"S802_STATE", //
"State of the Battery Bank", //
"State of the battery bank. Enumeration.", //
- "Must be reconciled with State in IEC 61850.", //
+ "", //
PointType.ENUM16, //
true, //
AccessMode.READ_ONLY, //
@@ -10685,7 +15207,7 @@ public static enum S802 implements SunSpecPoint {
"S802_WARR_DT", //
"Warranty Date", //
"Date the device warranty expires.", //
- "Number of days since 1/1/2000.", //
+ "", //
PointType.UINT32, //
false, //
AccessMode.READ_ONLY, //
@@ -10707,7 +15229,7 @@ public static enum S802 implements SunSpecPoint {
"S802_EVT2", //
"Battery Event 2 Bitfield", //
"Alarms and warnings. Bit flags.", //
- "Reserved for future use.", //
+ "", //
PointType.BITFIELD32, //
true, //
AccessMode.READ_ONLY, //
@@ -10740,7 +15262,7 @@ public static enum S802 implements SunSpecPoint {
"S802_V", //
"External Battery Voltage", //
"DC Bus Voltage.", //
- "Maps to ZBAT.V in IEC 61850.", //
+ "", //
PointType.UINT16, //
true, //
AccessMode.READ_ONLY, //
@@ -10751,7 +15273,7 @@ public static enum S802 implements SunSpecPoint {
"S802_V_MAX", //
"Max Battery Voltage", //
"Instantaneous maximum battery voltage.", //
- "If not implemented, must implement AChaMax and ADisChaMax.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10762,7 +15284,7 @@ public static enum S802 implements SunSpecPoint {
"S802_V_MIN", //
"Min Battery Voltage", //
"Instantaneous minimum battery voltage.", //
- "If not implemented, must implement AChaMax and ADisChaMax.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10773,7 +15295,7 @@ public static enum S802 implements SunSpecPoint {
"S802_CELL_V_MAX", //
"Max Cell Voltage", //
"Maximum voltage for all cells in the bank.", //
- "Measurement.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10806,7 +15328,7 @@ public static enum S802 implements SunSpecPoint {
"S802_CELL_V_MIN", //
"Min Cell Voltage", //
"Minimum voltage for all cells in the bank.", //
- "Measurement.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10839,7 +15361,7 @@ public static enum S802 implements SunSpecPoint {
"S802_CELL_V_AVG", //
"Average Cell Voltage", //
"Average cell voltage for all cells in the bank.", //
- "Calculation based on measurements.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10850,7 +15372,7 @@ public static enum S802 implements SunSpecPoint {
"S802_A", //
"Total DC Current", //
"Total DC current flowing to/from the battery bank.", //
- "Measurement.", //
+ "", //
PointType.INT16, //
true, //
AccessMode.READ_ONLY, //
@@ -10861,7 +15383,7 @@ public static enum S802 implements SunSpecPoint {
"S802_A_CHA_MAX", //
"Max Charge Current", //
"Instantaneous maximum DC charge current.", //
- "Calculation which is always unsigned (i.e. magnitude only). If not implemented, must implement VMax and VMin.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10872,7 +15394,7 @@ public static enum S802 implements SunSpecPoint {
"S802_A_DIS_CHA_MAX", //
"Max Discharge Current", //
"Instantaneous maximum DC discharge current.", //
- "Calculation which is always unsigned (i.e. magnitude only). If not implemented, must implement VMax and VMin.", //
+ "", //
PointType.UINT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10883,7 +15405,7 @@ public static enum S802 implements SunSpecPoint {
"S802_W", //
"Total Power", //
"Total power flowing to/from the battery bank.", //
- "Measurement.", //
+ "", //
PointType.INT16, //
true, //
AccessMode.READ_ONLY, //
@@ -10894,7 +15416,7 @@ public static enum S802 implements SunSpecPoint {
"S802_REQ_INV_STATE", //
"Inverter State Request", //
"Request from battery to start or stop the inverter. Enumeration.", //
- "Used in special states such as manual battery charging.", //
+ "", //
PointType.ENUM16, //
false, //
AccessMode.READ_ONLY, //
@@ -10905,7 +15427,7 @@ public static enum S802 implements SunSpecPoint {
"S802_REQ_W", //
"Battery Power Request", //
"AC Power requested by battery.", //
- "Used in special states such as string balancing.", //
+ "", //
PointType.INT16, //
false, //
AccessMode.READ_ONLY, //
@@ -10927,7 +15449,7 @@ public static enum S802 implements SunSpecPoint {
"S802_SET_INV_STATE", //
"Set Inverter State", //
"Set the current state of the inverter.", //
- "Information needed by battery for some operations.", //
+ "", //
PointType.ENUM16, //
true, //
AccessMode.READ_WRITE, //
@@ -11047,7 +15569,7 @@ public static enum S802 implements SunSpecPoint {
A_MAX_S_F(new PointImpl(//
"S802_A_MAX_S_F", //
"", //
- "Scale factor for instantationous DC charge/discharge current.", //
+ "Scale factor for instantaneous DC charge/discharge current.", //
"", //
PointType.SUNSSF, //
true, //
@@ -12634,7 +17156,7 @@ public static enum S64111 implements SunSpecPoint {
new OptionsEnum[0])), //
TODAY_MIN_BAT_V(new PointImpl(//
"S64111_TODAY_MIN_BAT_V", //
- "Todays Minimum Battery Voltage", //
+ "Today's Minimum Battery Voltage", //
"", //
"", //
PointType.UINT16, //
@@ -12645,7 +17167,7 @@ public static enum S64111 implements SunSpecPoint {
new OptionsEnum[0])), //
TODAY_MAX_BAT_V(new PointImpl(//
"S64111_TODAY_MAX_BAT_V", //
- "Todays Maximum Battery Voltage", //
+ "Today's Maximum Battery Voltage", //
"", //
"", //
PointType.UINT16, //
@@ -12667,7 +17189,7 @@ public static enum S64111 implements SunSpecPoint {
new OptionsEnum[0])), //
TODAY_MAX_V_O_C(new PointImpl(//
"S64111_TODAY_MAX_V_O_C", //
- "Todays Maximum VOC", //
+ "Today's Maximum VOC", //
"", //
"", //
PointType.UINT16, //
@@ -12678,7 +17200,7 @@ public static enum S64111 implements SunSpecPoint {
new OptionsEnum[0])), //
TODAYK_WH_OUTPUT(new PointImpl(//
"S64111_TODAYK_WH_OUTPUT", //
- "Todays kWh", //
+ "Today's kWh", //
"", //
"", //
PointType.UINT16, //
@@ -12689,7 +17211,7 @@ public static enum S64111 implements SunSpecPoint {
new OptionsEnum[0])), //
TODAY_A_H_OUTPUT(new PointImpl(//
"S64111_TODAY_A_H_OUTPUT", //
- "Todays AH", //
+ "Today's AH", //
"", //
"", //
PointType.UINT16, //
@@ -13252,7 +17774,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_A_U_X_NLITE_ON_HIST(new PointImpl(//
"S64112_C_C_CONFIG_A_U_X_NLITE_ON_HIST", //
- "AUX Night Light On Hysterisis", //
+ "AUX Night Light On Hysteresis", //
"", //
"", //
PointType.UINT16, //
@@ -13263,7 +17785,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_A_U_X_NLITE_OFF_HIST(new PointImpl(//
"S64112_C_C_CONFIG_A_U_X_NLITE_OFF_HIST", //
- "AUX Night Light Off Hysterisis", //
+ "AUX Night Light Off Hysteresis", //
"", //
"", //
PointType.UINT16, //
@@ -13318,7 +17840,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_A_U_X_DIVERT_HYST_V(new PointImpl(//
"S64112_C_C_CONFIG_A_U_X_DIVERT_HYST_V", //
- "AUX Divert Hysterisis", //
+ "AUX Divert Hysteresis", //
"", //
"", //
PointType.UINT16, //
@@ -13384,7 +17906,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_DATA_LOG_DAILY_A_H(new PointImpl(//
"S64112_C_C_CONFIG_DATA_LOG_DAILY_A_H", //
- "Data Log Daily", //
+ "Data Log Daily (Ah)", //
"", //
"", //
PointType.UINT16, //
@@ -13395,7 +17917,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_DATA_LOG_DAILY_K_W_H(new PointImpl(//
"S64112_C_C_CONFIG_DATA_LOG_DAILY_K_W_H", //
- "Data Log Daily", //
+ "Data Log Daily (kWh)", //
"", //
"", //
PointType.UINT16, //
@@ -13406,7 +17928,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_DATA_LOG_MAX_OUT_A(new PointImpl(//
"S64112_C_C_CONFIG_DATA_LOG_MAX_OUT_A", //
- "Data Log Daily Maximum Output", //
+ "Data Log Daily Maximum Output (A)", //
"", //
"", //
PointType.UINT16, //
@@ -13417,7 +17939,7 @@ public static enum S64112 implements SunSpecPoint {
new OptionsEnum[0])), //
C_C_CONFIG_DATA_LOG_MAX_OUT_W(new PointImpl(//
"S64112_C_C_CONFIG_DATA_LOG_MAX_OUT_W", //
- "Data Log Daily Maximum Output", //
+ "Data Log Daily Maximum Output (W)", //
"", //
"", //
PointType.UINT16, //
diff --git a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/SunSpecCodeGenerator.java b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/SunSpecCodeGenerator.java
index f86213d59fe..a9827f5ce18 100644
--- a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/SunSpecCodeGenerator.java
+++ b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/sunspec/SunSpecCodeGenerator.java
@@ -6,109 +6,109 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
import com.google.common.base.CaseFormat;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
import io.openems.common.channel.AccessMode;
import io.openems.common.channel.Unit;
import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
import io.openems.common.exceptions.OpenemsException;
import io.openems.common.function.ThrowingFunction;
-import io.openems.common.utils.XmlUtils;
-import io.openems.edge.bridge.modbus.sunspec.SunSpecCodeGenerator.Point.Symbol;
+import io.openems.common.utils.JsonUtils;
import io.openems.edge.bridge.modbus.sunspec.SunSpecPoint.PointCategory;
import io.openems.edge.bridge.modbus.sunspec.SunSpecPoint.PointType;
/**
- * This tool converts SunSpec XML definitions to Java code suitable for the
+ * This tool converts SunSpec Json definitions to Java code suitable for the
* OpenEMS SunSpec implementation.
*
*
- * Download XML files from https://github.com/sunspec/models.
+ * Download Json files from https://github.com/sunspec/models.
*/
public class SunSpecCodeGenerator {
/**
- * Path to the SunSpec model XML files; download them from
+ * Path to the SunSpec model Json files; download them from
* https://github.com/sunspec/models.
*/
- private static final String SUNSPEC_XML_PATH = System.getProperty("user.home") + "/git/sunspec/smdx/";
+ private static final String SUNSPEC_JSON_PATH = System.getProperty("user.home") + "\\git\\sunspec\\json\\";
/**
* Path to the generated output file.
*/
- private static final String OUT_FILE_PATH = System.getProperty("user.home") + "/git/sunspec/smdx/SunSpecModel.java";
+ private static final String OUT_FILE_PATH = System.getProperty("user.dir")
+ + "\\src\\io\\openems\\edge\\bridge\\modbus\\sunspec\\DefaultSunSpecModel.java";
/**
- * XML files that should be ignored; mainly because certain features are not
+ * Json files that should be ignored; mainly because certain features are not
* implemented yet.
*/
private static final Set IGNORE_FILES = new HashSet<>(Arrays.asList(//
- "smdx_00003.xml", //
- "smdx_00004.xml", //
- "smdx_00005.xml", //
- "smdx_00006.xml", //
- "smdx_00007.xml", //
- "smdx_00008.xml", //
- "smdx_00009.xml", //
- "smdx_00010.xml", //
- "smdx_00011.xml", //
- "smdx_00012.xml", //
- "smdx_00013.xml", //
- "smdx_00014.xml", //
- "smdx_00016.xml", //
- "smdx_00017.xml", //
- "smdx_00019.xml", //
- "smdx_00126.xml", //
- "smdx_00129.xml", //
- "smdx_00130.xml", //
- "smdx_00131.xml", //
- "smdx_00132.xml", //
- "smdx_00133.xml", //
- "smdx_00134.xml", //
- "smdx_00135.xml", //
- "smdx_00136.xml", //
- "smdx_00137.xml", //
- "smdx_00138.xml", //
- "smdx_00139.xml", //
- "smdx_00140.xml", //
- "smdx_00141.xml", //
- "smdx_00142.xml", //
- "smdx_00143.xml", //
- "smdx_00144.xml", //
- "smdx_00160.xml", //
- "smdx_00211.xml", //
- "smdx_00212.xml", //
- "smdx_00213.xml", //
- "smdx_00214.xml", //
- "smdx_00220.xml", //
- "smdx_00401.xml", //
- "smdx_00402.xml", //
- "smdx_00403.xml", //
- "smdx_00404.xml", //
- "smdx_00501.xml", //
- "smdx_00502.xml", //
- "smdx_00601.xml", //
- "smdx_00803.xml", //
- "smdx_00804.xml", //
- "smdx_00805.xml", //
- "smdx_00806.xml", //
- "smdx_00807.xml", //
- "smdx_00808.xml", //
- "smdx_00809.xml", //
- "smdx_63001.xml", //
- "smdx_63002.xml", //
- "smdx_64020.xml" //
+ "model_3.json", //
+ "model_4.json", //
+ "model_5.json", //
+ "model_6.json", //
+ "model_7.json", //
+ "model_8.json", //
+ "model_9.json", //
+ "model_10.json", //
+ "model_11.json", //
+ "model_12.json", //
+ "model_13.json", //
+ "model_14.json", //
+ "model_16.json", //
+ "model_17.json", //
+ "model_19.json", //
+ "model_126.json", //
+ "model_129.json", //
+ "model_130.json", //
+ "model_131.json", //
+ "model_132.json", //
+ "model_133.json", //
+ "model_134.json", //
+ "model_135.json", //
+ "model_136.json", //
+ "model_137.json", //
+ "model_138.json", //
+ "model_139.json", //
+ "model_140.json", //
+ "model_141.json", //
+ "model_142.json", //
+ "model_143.json", //
+ "model_144.json", //
+ "model_160.json", //
+ "model_211.json", //
+ "model_212.json", //
+ "model_213.json", //
+ "model_214.json", //
+ "model_220.json", //
+ "model_302.json", //
+ "model_303.json", //
+ "model_304.json", //
+ "model_401.json", //
+ "model_402.json", //
+ "model_403.json", //
+ "model_404.json", //
+ "model_501.json", //
+ "model_502.json", //
+ "model_601.json", //
+ "model_803.json", //
+ "model_804.json", //
+ "model_805.json", //
+ "model_806.json", //
+ "model_807.json", //
+ "model_808.json", //
+ "model_809.json", //
+ "model_63001.json", //
+ "model_63002.json", //
+ "model_64020.json" //
));
/**
@@ -118,49 +118,55 @@ public class SunSpecCodeGenerator {
* @throws Exception on error
*/
public static void main(String[] args) throws Exception {
+ System.out.println(SUNSPEC_JSON_PATH);
var generator = new SunSpecCodeGenerator();
- var models = generator.parseSunSpecXmlFiles();
+ var models = generator.parseSunSpecFiles();
generator.writeSunSpecModelJavaFile(models);
}
/**
- * Parses all SunSpec XML files in a directory.
+ * Parses all SunSpec Json files in a directory.
*
* @return a list of Models
* @throws Exception on error
*/
- private List parseSunSpecXmlFiles() throws Exception {
+ private List parseSunSpecFiles() throws Exception {
List result = new ArrayList<>();
- for (File file : new File(SUNSPEC_XML_PATH).listFiles(file -> //
- file.getName().startsWith("smdx_") //
- && file.getName().endsWith(".xml") //
+ for (File file : new File(SUNSPEC_JSON_PATH).listFiles(file -> //
+ file.getName().startsWith("model") //
+ && file.getName().endsWith(".json") //
&& !IGNORE_FILES.contains(file.getName()))) {
try {
- var model = this.parseSunSpecXmlFile(file);
+ var model = this.parseSunSpecFile(Files.readString(file.toPath()));
result.add(model);
} catch (Exception e) {
throw new Exception("Error while reading from " + file, e);
}
}
+ // Sort by model ids to have an ordered output
+ result.sort(new Comparator() {
+ @Override
+ public int compare(Model m1, Model m2) {
+ return m1.id - m2.id;
+ }
+ });
+
return result;
}
/**
- * Parses a SunSpec XML file.
+ * Parses a SunSpec Json file.
*
- * @param file the SunSpec XML file handler
+ * @param file the SunSpec Json file handler
* @return the Model
* @throws Exception on error
*/
- private Model parseSunSpecXmlFile(File file) throws Exception {
- var dbFactory = DocumentBuilderFactory.newInstance();
- var dBuilder = dbFactory.newDocumentBuilder();
- var doc = dBuilder.parse(file);
- doc.getDocumentElement().normalize();
+ private Model parseSunSpecFile(String file) throws Exception {
+ var json = JsonUtils.parseToJsonObject(file);
var generator = new SunSpecCodeGenerator();
- return generator.parseSunSpecModels(doc.getDocumentElement());
+ return generator.parseSunSpecModels(json);
}
/**
@@ -174,417 +180,13 @@ private Model parseSunSpecXmlFile(File file) throws Exception {
* xs:attribute name="v" type="xs:string" default="1"
*
*
- * @param sunSpecModelsElement the 'sunSpecModels' node
- * @return the Model
- * @throws OpenemsNamedException on error
- */
- private Model parseSunSpecModels(Element sunSpecModelsElement) throws OpenemsNamedException {
- // parse all "model" XML elements
- var modelNodes = sunSpecModelsElement.getElementsByTagName("model");
- var modelNode = this.assertExactlyOneNode(modelNodes, node -> node.getAttributes().getLength() != 0);
- var model = this.parseModel(modelNode);
-
- // parse all "strings" XML elements
- var stringsNodes = sunSpecModelsElement.getElementsByTagName("strings");
- var stringsNode = this.assertExactlyOneNode(stringsNodes);
- this.parseStrings(stringsNode, model);
-
- return model;
- }
-
- /**
- * Parses the element sunSpecModels -> model.
- *
- *
- * <model id="1" len="66" name="common">
- *
- *
- *
- * - xs:attribute name="id" type="xs:integer"
- *
- xs:attribute name="len" type="xs:integer"
- *
- *
- * @param node the 'model' node
+ * @param sunSpecModels the 'sunSpecModels' json
* @return the Model
* @throws OpenemsNamedException on error
+ * @throws JSONException on json error
*/
- private Model parseModel(Node node) throws OpenemsNamedException {
- // read attributes
- var attrs = node.getAttributes();
- var id = XmlUtils.getAsInt(attrs, "id");
- var len = XmlUtils.getAsInt(attrs, "len");
- var name = XmlUtils.getAsStringOrElse(attrs, "name", "");
-
- // read points
- var element = (Element) node;
- var blockNodes = element.getElementsByTagName("block");
- var blockNode = this.assertExactlyOneNode(blockNodes);
- var points = this.parseModelBlock(blockNode);
-
- return new Model(id, len, name, points);
- }
-
- /**
- * Parses the element sunSpecModels -> model -> block.
- *
- *
- * <block len="66">
- *
- *
- *
- * - xs:attribute name="id" type="xs:integer"
- *
- xs:attribute name="len" type="xs:integer"
- *
- *
- * @param node the 'block' node
- * @return a list Points
- * @throws OpenemsNamedException on error
- */
- private List parseModelBlock(Node node) throws OpenemsNamedException {
- // TODO implement "repeating" blocks
- List points = new ArrayList<>();
- var element = (Element) node;
- var pointNodes = element.getElementsByTagName("point");
- for (var i = 0; i < pointNodes.getLength(); i++) {
- var pointNode = pointNodes.item(i);
- points.add(this.parseModelBlockPoint(pointNode));
- }
- return points;
- }
-
- /**
- * Parses the element sunSpecModels -> model -> block -> point.
- *
- *
- * <point id="Mn" offset="0" type="string" len="16" mandatory="true" />
- *
- *
- *
- * - xs:attribute name="id" type="xs:string" use="required"
- *
- xs:attribute name="len" type="xs:integer"
- *
- xs:attribute name="offset" type="xs:integer"
- *
- xs:attribute name="type" type="PointTypeDefinition"
- *
- xs:attribute name="sf" type="xs:string"
- *
- xs:attribute name="units" type="xs:string"
- *
- xs:attribute name="access" type="PointAccessDefinition" default="r"
- *
- xs:attribute name="mandatory" type="xs:boolean" default="false"
- *
- xs:attribute name="category" type="CategoryDefinition"
- * default="measurement"
- *
- *
- * @param node the 'point' node.
- * @return the Point
- * @throws OpenemsNamedException on error
- */
- private Point parseModelBlockPoint(Node node) throws OpenemsNamedException {
- var attrs = node.getAttributes();
-
- int len;
- PointType type;
- var typeString = XmlUtils.getAsString(attrs, "type");
- if (typeString.equals("string")) {
- len = XmlUtils.getAsInt(attrs, "len");
- type = PointType.valueOf("STRING" + len);
- } else {
- type = XmlUtils.getAsEnum(PointType.class, attrs, "type");
- len = type.length;
- }
-
- var scaleFactor = XmlUtils.getAsStringOrElse(attrs, "sf", null);
- var unitString = XmlUtils.getAsStringOrElse(attrs, "units", "");
- final ThrowingFunction toUnit = s -> {
- s = s.trim();
- if (s.contains(" ")) {
- s = s.substring(0, s.indexOf(" "));
- }
- switch (s) {
- case "":
- case "%ARtg/%dV":
- case "bps": // not available in OpenEMS
- case "cos()": // not available in OpenEMS
- case "deg": // not available in OpenEMS
- case "Degrees": // not available in OpenEMS
- case "hhmmss": // not available in OpenEMS
- case "hhmmss.sssZ": // not available in OpenEMS
- case "HPa": // not available in OpenEMS
- case "kO": // not available in OpenEMS
- case "Mbps": // not available in OpenEMS
- case "meters": // not available in OpenEMS
- case "mm": // not available in OpenEMS
- case "mps": // not available in OpenEMS
- case "m/s": // not available in OpenEMS
- case "ohms": // not available in OpenEMS
- case "Pct": // not available in OpenEMS
- case "PF": // not available in OpenEMS
- case "SF": // not available in OpenEMS
- case "text": // not available in OpenEMS
- case "Tmd": // not available in OpenEMS
- case "Tmh": // not available in OpenEMS
- case "Tms": // not available in OpenEMS
- case "Various": // not available in OpenEMS
- case "Vm": // not available in OpenEMS
- case "W/m2": // not available in OpenEMS
- case "YYYYMMDD": // not available in OpenEMS
- return Unit.NONE;
- case "%":
- case "%WHRtg":
- return Unit.PERCENT;
- case "A":
- return Unit.AMPERE;
- case "Ah":
- case "AH":
- return Unit.AMPERE_HOURS;
- case "C":
- return Unit.DEGREE_CELSIUS;
- case "Hz":
- return Unit.HERTZ;
- case "kAH":
- return Unit.KILOAMPERE_HOURS;
- case "kWh":
- return Unit.KILOWATT_HOURS;
- case "mSecs":
- return Unit.MILLISECONDS;
- case "Secs":
- return Unit.SECONDS;
- case "V":
- return Unit.VOLT;
- case "VA":
- return Unit.VOLT_AMPERE;
- case "VAh":
- return Unit.VOLT_AMPERE_HOURS;
- case "var":
- return Unit.VOLT_AMPERE_REACTIVE;
- case "varh":
- return Unit.VOLT_AMPERE_REACTIVE_HOURS;
- case "W":
- return Unit.WATT;
- case "Wh":
- // Validate manually: OpenEMS distinguishes CUMULATED and DISCRETE Watt-Hours.
- return Unit.CUMULATED_WATT_HOURS;
- }
- throw new OpenemsException("Unhandled unit [" + s + "]");
- };
- var unit = toUnit.apply(unitString);
-
- var accessModeString = XmlUtils.getAsStringOrElse(attrs, "access", "r");
- AccessMode accessMode;
- switch (accessModeString.toLowerCase()) {
- case "wo":
- accessMode = AccessMode.WRITE_ONLY;
- break;
- case "rw":
- accessMode = AccessMode.READ_WRITE;
- break;
- case "r":
- case "ro":
- default:
- accessMode = AccessMode.READ_ONLY;
- break;
- }
- var mandatory = XmlUtils.getAsBooleanOrElse(attrs, "mandatory", false);
- var category = XmlUtils.getAsEnumOrElse(PointCategory.class, attrs, "category", PointCategory.MEASUREMENT);
-
- // read symbols
- var element = (Element) node;
- var symbolNodes = element.getElementsByTagName("symbol");
- Symbol[] symbols;
- if (symbolNodes.getLength() > 0) {
- symbols = new Symbol[symbolNodes.getLength()];
- for (var i = 0; i < symbolNodes.getLength(); i++) {
- var symbolNode = symbolNodes.item(i);
- symbols[i] = this.parseModelBlockPointSymbol(symbolNode);
- }
- } else {
- symbols = new Symbol[0];
- }
-
- var id = XmlUtils.getAsString(attrs, "id");
- var offset = XmlUtils.getAsInt(attrs, "offset");
-
- return new Point(id, len, offset, type, scaleFactor, unit, accessMode, mandatory, category, symbols);
- }
-
- /**
- * Parses the element sunSpecModels -> model -> block -> point ->
- * symbol.
- *
- *
- * <symbol id="OFF">1<symbol>
- *
- *
- *
- * - xs:attribute name="id" type="xs:string" use="required"
- *
- *
- * @param node the 'symbol' node
- * @return the Symbol
- * @throws OpenemsNamedException on error
- */
- private Symbol parseModelBlockPointSymbol(Node node) throws OpenemsNamedException {
- var attrs = node.getAttributes();
- var id = XmlUtils.getAsString(attrs, "id");
- var value = XmlUtils.getContentAsInt(node);
- return new Symbol(id, value);
- }
-
- /**
- * Parses the element sunSpecModels -> strings.
- *
- *
- * <strings id="1" locale="en">
- *
- *
- *
- * - xs:attribute name="id" type="xs:integer" use="required"
- *
- xs:attribute name="locale" type="xs:string"
- *
- *
- * @param node the 'strings' node
- * @param model the Model, that needs to be completed.
- * @throws OpenemsNamedException on error
- */
- @SuppressWarnings("unused")
- private void parseStrings(Node node, Model model) throws OpenemsNamedException {
- // read attributes
- var attrs = node.getAttributes();
- var id = XmlUtils.getAsInt(attrs, "id");
- var locale = XmlUtils.getAsString(attrs, "locale");
-
- if (model.id != id) {
- throw new OpenemsException("Model-IDs are not matching");
- }
-
- var element = (Element) node;
-
- // read model
- var modelNodes = element.getElementsByTagName("model");
- var modelNode = this.assertExactlyOneNode(modelNodes);
- this.parseStringsModel(modelNode, model);
-
- // read points
- var pointNodes = element.getElementsByTagName("point");
- for (var i = 0; i < pointNodes.getLength(); i++) {
- var pointNode = pointNodes.item(i);
- this.parseStringsPoint(pointNode, model);
- }
- }
-
- /**
- * Parses the element sunSpecModels -> strings -> model.
- *
- *
- * <model>
- *
- *
- * @param node the 'model' node.
- * @param model the Model, that needs to be completed.
- * @throws OpenemsNamedException on error
- */
- private void parseStringsModel(Node node, Model model) throws OpenemsNamedException {
- model.label = this.getTextContent(node, "label");
- model.description = this.getTextContent(node, "description");
- model.notes = this.getTextContent(node, "notes");
- }
-
- /**
- * Parses the element sunSpecModels -> strings -> point.
- *
- *
- * <point>
- *
- *
- * @param node the 'point' node
- * @param model the Model, that needs to be completed.
- * @throws OpenemsNamedException on error
- */
- private void parseStringsPoint(Node node, Model model) throws OpenemsNamedException {
- var attrs = node.getAttributes();
- var id = XmlUtils.getAsString(attrs, "id");
- switch (id) {
- case "VArWMaxPct_SF":
- case "TotVArhExpQ4Ph":
- case "PPVphAB":
- case "PPVphBC":
- case "PPVphCA":
- case "Pad1":
- case "Pad":
- // Special handling for IDs 123, 201, 202, 801, 802
- // TODO: create pull-request to fix XML file upstream
- return;
- }
-
- var point = model.getPoint(id);
-
- var element = (Element) node;
- var subNodes = element.getChildNodes();
- for (var i = 0; i < subNodes.getLength(); i++) {
- var subNode = subNodes.item(i);
- switch (subNode.getNodeName()) {
- case "label":
- point.label = XmlUtils.getContentAsString(subNode);
- break;
- case "description":
- point.description = XmlUtils.getContentAsString(subNode);
- break;
- case "notes":
- point.notes = XmlUtils.getContentAsString(subNode);
- break;
- case "symbol":
- this.parseStringsPointSymbol(subNode, point);
- break;
- case "#text":
- // ignore
- break;
- default:
- throw new OpenemsException("Unable to handle " + subNode.getNodeName());
- }
- }
- }
-
- /**
- * Parses the element sunSpecModels -> strings -> point -> symbol.
- *
- *
- * <point>
- *
- *
- * @param node the 'symbol' node
- * @param point the Model, that needs to be completed.
- * @throws OpenemsNamedException on error
- */
- private void parseStringsPointSymbol(Node node, Point point) throws OpenemsNamedException {
- var attrs = node.getAttributes();
- var id = XmlUtils.getAsString(attrs, "id");
- switch (id) {
- case "OEM16":
- // Special handling for ID 201
- // TODO: create pull-request to fix XML file upstream
- return;
- }
-
- var symbol = point.getSymbol(id);
-
- var element = (Element) node;
- var subNodes = element.getChildNodes();
- for (var i = 0; i < subNodes.getLength(); i++) {
- var subNode = subNodes.item(i);
- switch (subNode.getNodeName()) {
- case "label":
- symbol.label = XmlUtils.getContentAsString(subNode);
- break;
- case "description":
- symbol.description = XmlUtils.getContentAsString(subNode);
- break;
- case "notes":
- symbol.notes = XmlUtils.getContentAsString(subNode);
- break;
- case "#text":
- // ignore
- break;
- default:
- throw new OpenemsException("Unable to handle " + subNode.getNodeName());
- }
- }
+ private Model parseSunSpecModels(JsonObject sunSpecModels) throws OpenemsNamedException {
+ return new Model(sunSpecModels);
}
/**
@@ -595,6 +197,9 @@ private void parseStringsPointSymbol(Node node, Point point) throws OpenemsNamed
*/
private void writeSunSpecModelJavaFile(List models) throws IOException {
try (var w = Files.newBufferedWriter(Paths.get(OUT_FILE_PATH))) {
+ w.write("// CHECKSTYLE:OFF");
+ w.newLine();
+ w.newLine();
w.write("package io.openems.edge.bridge.modbus.sunspec;");
w.newLine();
w.newLine();
@@ -611,7 +216,7 @@ private void writeSunSpecModelJavaFile(List models) throws IOException {
w.newLine();
w.write(" */");
w.newLine();
- w.write("public enum SunSpecModel {");
+ w.write("public enum DefaultSunSpecModel implements SunSpecModel {");
w.newLine();
/*
@@ -629,7 +234,7 @@ private void writeSunSpecModelJavaFile(List models) throws IOException {
w.newLine();
w.write(" " + model.len + ", //");
w.newLine();
- w.write(" SunSpecModel.S" + model.id + ".values(), //");
+ w.write(" DefaultSunSpecModel.S" + model.id + ".values(), //");
w.newLine();
w.write(" SunSpecModelType." + model.modelType + " //");
w.newLine();
@@ -759,7 +364,7 @@ private void writeSunSpecModelJavaFile(List models) throws IOException {
w.newLine();
w.write(" public int getValue() {");
w.newLine();
- w.write(" return value;");
+ w.write(" return this.value;");
w.newLine();
w.write(" }");
w.newLine();
@@ -768,7 +373,7 @@ private void writeSunSpecModelJavaFile(List models) throws IOException {
w.newLine();
w.write(" public String getName() {");
w.newLine();
- w.write(" return name;");
+ w.write(" return this.name;");
w.newLine();
w.write(" }");
w.newLine();
@@ -800,7 +405,7 @@ private void writeSunSpecModelJavaFile(List models) throws IOException {
w.write(" public final SunSpecModelType modelType;");
w.newLine();
w.newLine();
- w.write(" private SunSpecModel(String label, String description, String notes, int length, SunSpecPoint[] points,");
+ w.write(" private DefaultSunSpecModel(String label, String description, String notes, int length, SunSpecPoint[] points,");
w.newLine();
w.write(" SunSpecModelType modelType) {");
w.newLine();
@@ -818,8 +423,28 @@ private void writeSunSpecModelJavaFile(List models) throws IOException {
w.newLine();
w.write(" }");
w.newLine();
+ w.newLine();
+ w.write(" @Override");
+ w.newLine();
+ w.write(" public SunSpecPoint[] points() {");
+ w.newLine();
+ w.write(" return this.points;");
+ w.newLine();
+ w.write(" }");
+ w.newLine();
+ w.newLine();
+ w.write(" @Override");
+ w.newLine();
+ w.write(" public String label() {");
+ w.newLine();
+ w.write(" return this.label;");
+ w.newLine();
+ w.write(" }");
+ w.newLine();
w.write("}");
w.newLine();
+ w.write("// CHECKSTYLE:ON");
+ w.newLine();
}
}
@@ -839,53 +464,6 @@ private static final String esc(String string) {
.trim();
}
- /**
- * Throws an exception if the list does not have exactly one Node that matches
- * the filters. Returns that node otherwise.
- *
- * @param nodes the list of nodes
- * @param filters the filters that need to be matched by the node
- * @return the Node
- * @throws IllegalArgumentException if not exactly one matching Node was found
- */
- @SafeVarargs
- private final Node assertExactlyOneNode(NodeList nodes, Function... filters) {
- if (nodes.getLength() == 1) {
- return nodes.item(0);
- }
- Node result = null;
- for (var i = 0; i < nodes.getLength(); i++) {
- var node = nodes.item(i);
- for (Function filter : filters) {
- if (filter.apply(node)) {
- if (result != null) {
- throw new IllegalArgumentException("Exactly one node matching the filters was expected!");
- }
- result = node;
- }
- }
- }
-
- if (result != null) {
- return result;
- }
- throw new IllegalArgumentException("Exactly one node matching the filters was expected!");
- }
-
- /**
- * Gets the Content of a Sub-Node.
- *
- * @param node the Node
- * @param tagName the tag name of the Sub-Node
- * @return the Content as a String
- */
- private String getTextContent(Node node, String tagName) {
- var element = (Element) node;
- var nodes = element.getElementsByTagName(tagName);
- var subNode = this.assertExactlyOneNode(nodes);
- return subNode.getTextContent();
- }
-
/**
* POJO container for a SunSpec Model.
*/
@@ -900,12 +478,27 @@ public static class Model {
protected String description = "";
protected String notes = "";
- public Model(int id, int len, String name, List points) {
- this.id = id;
- this.len = len;
- this.name = name;
- this.points = points;
- this.modelType = SunSpecModelType.getModelType(id);
+ public Model(JsonObject model) throws OpenemsNamedException {
+ this.id = JsonUtils.getAsInt(model, "id");
+ var group = model.get("group").getAsJsonObject();
+ this.name = JsonUtils.getAsString(group, "name");
+ this.label = JsonUtils.getAsStringOrElse(group, "label", "");
+ this.description = JsonUtils.getAsStringOrElse(group, "desc", "");
+ var points = JsonUtils.getAsJsonArray(group, "points");
+
+ var list = new ArrayList