diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a67813b0d63..6f1d4022ad0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,11 +22,14 @@ jobs: - uses: kiancross/checkstyle-annotations-action@v1 + - name: Checkstyle + run: ./gradlew checkstyleAll --console=plain --warn + - name: Build all Java packages - run: ./gradlew build + run: ./gradlew build --console=plain --warn - name: Resolve OpenEMS bundles - run: ./gradlew resolve + run: ./gradlew resolve --console=plain --warn - name: Validate BackendApp.bndrun run: git diff --exit-code io.openems.backend.application/BackendApp.bndrun @@ -64,13 +67,12 @@ jobs: - name: Build OpenEMS UI run: | cd ui - npm install npm ci --prefer-offline --cache ~/.npm node_modules/.bin/ng config cli.cache.path "~/.ng" node_modules/.bin/ng build -c "openems,openems-edge-prod,prod" node_modules/.bin/ng lint export CHROME_BIN=/usr/bin/google-chrome-stable - npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI + npm run test -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessCI - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 37698ef7701..df0a15180f9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -78,7 +78,7 @@ jobs: type=raw,value=develop,enable=${{ github.ref == 'refs/heads/develop' }} - name: Build and push Docker images - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: file: ${{ matrix.dockerfile }} platforms: linux/amd64, linux/arm64 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 07b07ba9953..5050d32b4bf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: run: ./gradlew buildAntoraDocs --continue - name: Deploy to GitHub pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: personal_token: ${{ secrets.DOCS }} external_repository: OpenEMS/openems.io diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8acfebfebf7..aaf7c10fc6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,14 @@ jobs: - uses: kiancross/checkstyle-annotations-action@v1 + - name: Checkstyle + run: ./gradlew checkstyleAll --console=plain --warn + - name: Build all Java packages - run: ./gradlew build + run: ./gradlew build --console=plain --warn - name: Resolve OpenEMS bundles - run: ./gradlew resolve + run: ./gradlew resolve --console=plain --warn - name: Validate BackendApp.bndrun run: git diff --exit-code io.openems.backend.application/BackendApp.bndrun @@ -33,12 +36,12 @@ jobs: run: git diff --exit-code io.openems.edge.application/EdgeApp.bndrun - name: Prepare Edge+Backend assets - run: ./gradlew buildEdge buildBackend + run: ./gradlew buildEdge buildBackend --console=plain --warn - name: Save build-artifacts uses: actions/upload-artifact@v4 with: - name: build-artifacts + name: java-build-artifacts path: | build/openems-edge.jar build/openems-backend.jar @@ -65,7 +68,6 @@ jobs: - name: Build OpenEMS UI run: | cd ui - npm install npm ci --prefer-offline --cache ~/.npm node_modules/.bin/ng config cli.cache.path "~/.ng" node_modules/.bin/ng build -c "openems,openems-edge-prod,prod" @@ -75,24 +77,28 @@ jobs: - name: Prepare UI asset run: | - mkdir build - cd ui/target - zip -r ../../build/openems-ui.zip ./* + tar --xz --transform 's|^ui/target|openems-ui|' -cvf openems-ui.tar.xz ui/target/ - name: Save build-artifacts uses: actions/upload-artifact@v4 with: - name: build-artifacts - path: build/openems-ui.zip + name: ui-build-artifacts + path: openems-ui.tar.xz release: runs-on: ubuntu-latest needs: [build-java, build-ui] steps: - - name: Load build-artifacts + - name: Load Java build-artifacts + uses: actions/download-artifact@v4 + with: + name: java-build-artifacts + path: build + + - name: Load UI build-artifacts uses: actions/download-artifact@v4 with: - name: build-artifacts + name: ui-build-artifacts path: build - name: Create draft Release @@ -102,4 +108,4 @@ jobs: files: | build/openems-edge.jar build/openems-backend.jar - build/openems-ui.zip \ No newline at end of file + build/openems-ui.tar.xz \ No newline at end of file diff --git a/.gradle-wrapper/gradle-wrapper.properties b/.gradle-wrapper/gradle-wrapper.properties index a4413138c96..09523c0e549 100644 --- a/.gradle-wrapper/gradle-wrapper.properties +++ b/.gradle-wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/cnf/pom.xml b/cnf/pom.xml index 79d3e7d73c3..5483a448725 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -105,7 +105,7 @@ de.bytefish pgbulkinsert - 8.1.3 + 8.1.4 @@ -203,7 +203,7 @@ org.apache.felix org.apache.felix.http.jetty - 5.1.22 + 5.1.24 @@ -237,7 +237,7 @@ org.apache.felix org.apache.felix.webconsole - 5.0.4 + 5.0.6 @@ -260,12 +260,12 @@ org.dhatim fastexcel - 0.18.0 + 0.18.1 org.dhatim fastexcel-reader - 0.18.0 + 0.18.1 @@ -312,7 +312,7 @@ org.jsoup jsoup - 1.17.2 + 1.18.1 org.osgi diff --git a/doc/modules/ROOT/pages/edge/deploy.adoc b/doc/modules/ROOT/pages/edge/deploy.adoc index cbeeb1fad82..2088195edbd 100644 --- a/doc/modules/ROOT/pages/edge/deploy.adoc +++ b/doc/modules/ROOT/pages/edge/deploy.adoc @@ -16,7 +16,7 @@ This guide covers a simple, manual approach. For productive systems it is requir Prerequisites: * A target device running Debian Linux like a Raspberry Pi, Beaglebone Black or an IoT gateway. You need the IP address and SSH access. -* Create a JAR-file that should be deployes. See xref:edge/build.adoc[Build OpenEMS Edge] for details. Alternatively you may download the latest release `openems-edge.jar` file from https://github.com/OpenEMS/openems/releases[GitHub] under _Assets_. +* Create a JAR-file that should be deployed. See xref:edge/build.adoc[Build OpenEMS Edge] for details. Alternatively you may download the latest release `openems-edge.jar` file from https://github.com/OpenEMS/openems/releases[GitHub] under _Assets_. * Setup an SSH client to connect to the Linux console, e.g. http://www.9bis.net/kitty/[KiTTY] * Setup an SCP client to copy the JAR file via SSH, e.g. https://winscp.net/eng/docs/lang:de[WinSCP] @@ -132,4 +132,4 @@ Execute `systemctl restart openems --no-block; journalctl -lfu openems` The command restarts the service (_systemctl restart openems_) while not waiting for the OpenEMS startup notification (_--no-block_). Then it directly prints the OpenEMS system log (_journalctl -lfu openems_). + .OpenEMS Edge start-up -image::deploy-openems-start.png[OpenEMS Edge start-up] \ No newline at end of file +image::deploy-openems-start.png[OpenEMS Edge start-up] diff --git a/gradlew b/gradlew index 2b542f22740..09d360f6284 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. diff --git a/io.openems.backend.application/BackendApp.bndrun b/io.openems.backend.application/BackendApp.bndrun index e103405ba64..1d0b0dde4e4 100644 --- a/io.openems.backend.application/BackendApp.bndrun +++ b/io.openems.backend.application/BackendApp.bndrun @@ -60,7 +60,7 @@ -runbundles: \ Java-WebSocket;version='[1.5.4,1.5.5)',\ - com.fasterxml.aalto-xml;version='[1.3.2,1.3.3)',\ + com.fasterxml.aalto-xml;version='[1.3.3,1.3.4)',\ com.google.gson;version='[2.11.0,2.11.1)',\ com.google.guava;version='[33.2.1,33.2.2)',\ com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\ @@ -101,18 +101,17 @@ io.openems.wrapper.retrofit-converter-scalars;version=snapshot,\ io.openems.wrapper.retrofit2;version=snapshot,\ io.reactivex.rxjava3.rxjava;version='[3.1.8,3.1.9)',\ - org.apache.commons.commons-compress;version='[1.26.1,1.26.2)',\ + org.apache.commons.commons-compress;version='[1.26.2,1.26.3)',\ org.apache.commons.commons-csv;version='[1.10.0,1.10.1)',\ - org.apache.commons.commons-io;version='[2.15.1,2.15.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.eventadmin;version='[1.6.4,1.6.5)',\ org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\ - org.apache.felix.http.jetty;version='[5.1.22,5.1.23)',\ + org.apache.felix.http.jetty;version='[5.1.24,5.1.25)',\ org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\ org.apache.felix.inventory;version='[2.0.0,2.0.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ org.apache.felix.scr;version='[2.2.12,2.2.13)',\ - org.apache.felix.webconsole;version='[5.0.4,5.0.5)',\ + org.apache.felix.webconsole;version='[5.0.6,5.0.7)',\ org.apache.felix.webconsole.plugins.ds;version='[2.3.0,2.3.1)',\ org.jetbrains.kotlin.osgi-bundle;version='[2.0.0,2.0.1)',\ org.jsr-305;version='[3.0.2,3.0.3)',\ @@ -125,4 +124,4 @@ org.owasp.encoder;version='[1.2.3,1.2.4)',\ org.postgresql.jdbc;version='[42.7.3,42.7.4)',\ reactive-streams;version='[1.0.4,1.0.5)',\ - stax2-api;version='[4.2.0,4.2.1)' \ No newline at end of file + stax2-api;version='[4.2.2,4.2.3)' \ No newline at end of file diff --git a/io.openems.backend.application/test/io/openems/backend/edge/application/TestClient.java b/io.openems.backend.application/test/io/openems/backend/edge/application/TestClient.java new file mode 100644 index 00000000000..c6030384134 --- /dev/null +++ b/io.openems.backend.application/test/io/openems/backend/edge/application/TestClient.java @@ -0,0 +1,122 @@ +package io.openems.backend.edge.application; + +import java.net.URI; +import java.util.Map; + +import org.java_websocket.WebSocket; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.openems.common.websocket.AbstractWebsocketClient; +import io.openems.common.websocket.OnClose; +import io.openems.common.websocket.OnError; +import io.openems.common.websocket.OnNotification; +import io.openems.common.websocket.OnOpen; +import io.openems.common.websocket.OnRequest; +import io.openems.common.websocket.WsData; + +public class TestClient extends AbstractWebsocketClient { + + private final Logger log = LoggerFactory.getLogger(TestClient.class); + + private OnOpen onOpen; + private OnRequest onRequest; + private OnNotification onNotification; + private OnError onError; + private OnClose onClose; + + protected TestClient(URI serverUri, Map httpHeaders) { + super("WebsocketPerformanceTestApp", serverUri, httpHeaders); + this.onOpen = (ws, handshake) -> { + return null; + }; + this.onRequest = (ws, request) -> { + this.log.info("OnRequest: " + request); + return null; + }; + this.onNotification = (ws, notification) -> { + this.log.info("OnNotification: " + notification); + }; + this.onError = (ws, ex) -> { + this.log.info("onError: " + ex.getMessage()); + }; + this.onClose = (ws, code, reason, remote) -> { + this.log.info("onClose: " + reason); + }; + } + + @Override + public OnOpen getOnOpen() { + return this.onOpen; + } + + public void setOnOpen(OnOpen onOpen) { + this.onOpen = onOpen; + } + + @Override + public OnRequest getOnRequest() { + return this.onRequest; + } + + public void setOnRequest(OnRequest onRequest) { + this.onRequest = onRequest; + } + + @Override + public OnError getOnError() { + return this.onError; + } + + public void setOnError(OnError onError) { + this.onError = onError; + } + + @Override + public OnClose getOnClose() { + return this.onClose; + } + + public void setOnClose(OnClose onClose) { + this.onClose = onClose; + } + + @Override + protected OnNotification getOnNotification() { + return this.onNotification; + } + + public void setOnNotification(OnNotification onNotification) { + this.onNotification = onNotification; + } + + @Override + protected WsData createWsData(WebSocket ws) { + return new WsData(ws) { + @Override + public String toString() { + return "TestClient.WsData []"; + } + }; + } + + @Override + protected void logInfo(Logger log, String message) { + log.info(message); + } + + @Override + protected void logWarn(Logger log, String message) { + log.warn(message); + } + + @Override + protected void logError(Logger log, String message) { + log.error(message); + } + + @Override + protected void execute(Runnable command) { + command.run(); + } +} diff --git a/io.openems.backend.application/test/io/openems/backend/edge/application/WebsocketPerformanceTestApp.java b/io.openems.backend.application/test/io/openems/backend/edge/application/WebsocketPerformanceTestApp.java new file mode 100644 index 00000000000..322fa365c86 --- /dev/null +++ b/io.openems.backend.application/test/io/openems/backend/edge/application/WebsocketPerformanceTestApp.java @@ -0,0 +1,77 @@ +package io.openems.backend.edge.application; + +import java.net.URI; +import java.net.URISyntaxException; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Executors; + +import com.google.common.collect.TreeBasedTable; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; + +import io.openems.common.jsonrpc.notification.EdgeConfigNotification; +import io.openems.common.jsonrpc.notification.TimestampedDataNotification; +import io.openems.common.types.EdgeConfig; + +public class WebsocketPerformanceTestApp { + + /** + * Main. + * + * @param args args + * @throws URISyntaxException on error + * @throws InterruptedException on error + */ + public static void main(String[] args) throws URISyntaxException, InterruptedException { + final var executor = Executors.newCachedThreadPool(); + + for (var i = 0; i < 10000; i++) { + var client = prepareTestClient(String.format("edge%d", i)); + executor.execute(() -> { + client.sendMessage(new EdgeConfigNotification(EdgeConfig.empty())); + for (var j = 0; j < 1000; j++) { + sleep(1000); + if (j % 100 == 0) { + System.out.println("."); + } + client.sendMessage(buildDummyData()); + } + }); + } + } + + private static TestClient prepareTestClient(String edgeId) { + try { + Map httpHeaders = new HashMap<>(); + httpHeaders.put("apikey", edgeId); + var client = new TestClient(new URI("ws://localhost:8081"), httpHeaders); + client.startBlocking(); + return client; + + } catch (URISyntaxException | InterruptedException e) { + e.printStackTrace(); + System.exit(1); + return null; + } + } + + private static void sleep(long millis) { + try { + Thread.sleep(millis); + } catch (InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + } + + private static TimestampedDataNotification buildDummyData() { + var timestamp = Instant.now().toEpochMilli(); + var table = TreeBasedTable.create(); + for (var i = 0; i < 100; i++) { + table.put(timestamp, String.format("channel%d", i), new JsonPrimitive(i)); + } + return new TimestampedDataNotification(table); + } +} diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Backend2BackendWebsocket.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Backend2BackendWebsocket.java index 4e90e76af80..2ac5a5dad70 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Backend2BackendWebsocket.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Backend2BackendWebsocket.java @@ -88,8 +88,7 @@ private void deactivate() { */ private synchronized void startServer() { if (this.server == null) { - this.server = new WebsocketServer(this, this.getName(), this.config.port(), this.config.poolSize(), - this.config.debugMode()); + this.server = new WebsocketServer(this, this.getName(), this.config.port(), this.config.poolSize()); this.server.start(); } } diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Config.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Config.java index 5e6f2e71f8e..1ae6982dddb 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Config.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/Config.java @@ -3,8 +3,6 @@ import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition; -import io.openems.common.websocket.AbstractWebsocketServer.DebugMode; - @ObjectClassDefinition(// name = "Backend2Backend.Websocket", // description = "Provides a websocket server for backend-to-backend communication.") @@ -16,9 +14,5 @@ @AttributeDefinition(name = "Number of Threads", description = "Pool-Size: the number of threads dedicated to handle the tasks") int poolSize() default 10; - @AttributeDefinition(name = "Debug Mode", description = "Activates the debug mode") - DebugMode debugMode() default DebugMode.OFF; - String webconsole_configurationFactory_nameHint() default "Backend2Backend Websocket"; - } \ No newline at end of file diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnClose.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnClose.java index a7aa0411459..9c464da3f7d 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnClose.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnClose.java @@ -4,8 +4,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.openems.common.exceptions.OpenemsException; - public class OnClose implements io.openems.common.websocket.OnClose { private final Logger log = LoggerFactory.getLogger(OnClose.class); @@ -16,7 +14,7 @@ public OnClose(Backend2BackendWebsocket parent) { } @Override - public void run(WebSocket ws, int code, String reason, boolean remote) throws OpenemsException { + public void accept(WebSocket ws, int code, String reason, boolean remote) { WsData wsData = ws.getAttachment(); var user = wsData.getUserOpt(); if (user.isPresent()) { diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnError.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnError.java index 053511987df..46b79cc67b3 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnError.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnError.java @@ -16,7 +16,7 @@ public OnError(Backend2BackendWebsocket parent) { } @Override - public void run(WebSocket ws, Exception ex) throws OpenemsException { + public void accept(WebSocket ws, Exception ex) throws OpenemsException { this.parent.logInfo(this.log, "Error: " + ex.getMessage()); } diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnNotification.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnNotification.java index 09704e2c8c5..78755848fe1 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnNotification.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnNotification.java @@ -17,7 +17,7 @@ public OnNotification(Backend2BackendWebsocket parent) { } @Override - public void run(WebSocket ws, JsonrpcNotification notification) throws OpenemsException { + public void accept(WebSocket ws, JsonrpcNotification notification) throws OpenemsException { this.parent.logWarn(this.log, "Unhandled Notification: " + notification); } diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnOpen.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnOpen.java index 0eaa5d3ccc0..bb585cfcd0e 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnOpen.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnOpen.java @@ -1,57 +1,78 @@ package io.openems.backend.b2bwebsocket; +import static io.openems.common.websocket.WebsocketUtils.getAsString; + import java.nio.charset.StandardCharsets; import java.util.Base64; +import java.util.function.BiConsumer; +import java.util.function.Supplier; import org.java_websocket.WebSocket; +import org.java_websocket.handshake.Handshakedata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.gson.JsonObject; - +import io.openems.backend.common.metadata.Metadata; +import io.openems.backend.common.metadata.User; import io.openems.common.exceptions.OpenemsError; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.utils.JsonUtils; public class OnOpen implements io.openems.common.websocket.OnOpen { private final Logger log = LoggerFactory.getLogger(OnClose.class); - private final Backend2BackendWebsocket parent; + private final Supplier metadata; + private final BiConsumer logInfo; - public OnOpen(Backend2BackendWebsocket parent) { - this.parent = parent; + public OnOpen(// + Supplier metadata, // + BiConsumer logInfo) { + this.metadata = metadata; + this.logInfo = logInfo; } @Override - public void run(WebSocket ws, JsonObject handshake) throws OpenemsNamedException { - try { - // Read "Authorization" header for Simple HTTP authentication. Source: - // https://stackoverflow.com/questions/16000517/how-to-get-password-from-http-basic-authentication - final var authorization = JsonUtils.getAsString(handshake, "authorization"); - if (authorization == null || !authorization.toLowerCase().startsWith("basic")) { - throw OpenemsError.COMMON_AUTHENTICATION_FAILED.exception(); - } - - var base64Credentials = authorization.substring("Basic".length()).trim(); - var credDecoded = Base64.getDecoder().decode(base64Credentials); - var credentials = new String(credDecoded, StandardCharsets.UTF_8); - // credentials = username:password - final var values = credentials.split(":", 2); - if (values.length != 2) { - throw OpenemsError.COMMON_AUTHENTICATION_FAILED.exception(); - } - var username = values[0]; - var password = values[1]; - var user = this.parent.metadata.authenticate(username, password); - - WsData wsData = ws.getAttachment(); - wsData.setUser(user); - this.parent.logInfo(this.log, "User [" + user.getName() + "] logged in"); + public OpenemsError apply(WebSocket ws, Handshakedata handshakedata) { + var error = this._apply(ws, handshakedata); + if (error != null) { + ws.close(); + } + return error; + } + + private OpenemsError _apply(WebSocket ws, Handshakedata handshakedata) { + // Read "Authorization" header for Simple HTTP authentication. Source: + // https://stackoverflow.com/questions/16000517/how-to-get-password-from-http-basic-authentication + final var authorization = getAsString(handshakedata, "authorization"); + if (authorization == null || !authorization.toLowerCase().startsWith("basic")) { + return OpenemsError.COMMON_AUTHENTICATION_FAILED; + } + var base64Credentials = authorization.substring("Basic".length()).trim(); + var credDecoded = Base64.getDecoder().decode(base64Credentials); + var credentials = new String(credDecoded, StandardCharsets.UTF_8); + // credentials = username:password + final var values = credentials.split(":", 2); + if (values.length != 2) { + return OpenemsError.COMMON_AUTHENTICATION_FAILED; + } + var username = values[0]; + var password = values[1]; + final var metadata = this.metadata.get(); + if (metadata == null) { + return OpenemsError.COMMON_SERVICE_NOT_AVAILABLE; + } + User user; + try { + user = this.metadata.get().authenticate(username, password); } catch (OpenemsNamedException e) { - ws.close(); - throw e; + return OpenemsError.COMMON_AUTHENTICATION_FAILED; } + + WsData wsData = ws.getAttachment(); + wsData.setUser(user); + this.logInfo.accept(this.log, "User [" + user.getName() + "] logged in"); + + return null; // No error } } diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnRequest.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnRequest.java index 4343d72c388..5869c0f6356 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnRequest.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/OnRequest.java @@ -24,7 +24,7 @@ public OnRequest(Backend2BackendWebsocket parent) { } @Override - public CompletableFuture run(WebSocket ws, JsonrpcRequest request) + public CompletableFuture apply(WebSocket ws, JsonrpcRequest request) throws OpenemsException, OpenemsNamedException { WsData wsData = ws.getAttachment(); var user = wsData.getUserWithTimeout(5, TimeUnit.SECONDS); diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/SubscribedEdgesChannelsWorker.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/SubscribedEdgesChannelsWorker.java index 276192f8e73..619b716c54d 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/SubscribedEdgesChannelsWorker.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/SubscribedEdgesChannelsWorker.java @@ -12,6 +12,7 @@ import io.openems.backend.b2bwebsocket.jsonrpc.notification.EdgesCurrentDataNotification; import io.openems.backend.b2bwebsocket.jsonrpc.request.SubscribeEdgesChannelsRequest; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.jsonrpc.base.JsonrpcNotification; import io.openems.common.session.Role; import io.openems.common.types.ChannelAddress; @@ -93,12 +94,16 @@ private synchronized void updateSubscription(Set edgeIds, Set { private final OnError onError; private final OnClose onClose; - public WebsocketServer(Backend2BackendWebsocket parent, String name, int port, int poolSize, DebugMode debugMode) { - super(name, port, poolSize, debugMode); + public WebsocketServer(Backend2BackendWebsocket parent, String name, int port, int poolSize) { + super(name, port, poolSize); this.parent = parent; - this.onOpen = new OnOpen(parent); + this.onOpen = new OnOpen(// + () -> parent.metadata, // + this::logInfo); this.onRequest = new OnRequest(parent); this.onNotification = new OnNotification(parent); this.onError = new OnError(parent); @@ -24,8 +27,8 @@ public WebsocketServer(Backend2BackendWebsocket parent, String name, int port, i } @Override - protected WsData createWsData() { - return new WsData(this.parent); + protected WsData createWsData(WebSocket ws) { + return new WsData(ws, this.parent); } @Override diff --git a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/WsData.java b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/WsData.java index 501de1925fb..24298d8c0f2 100644 --- a/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/WsData.java +++ b/io.openems.backend.b2bwebsocket/src/io/openems/backend/b2bwebsocket/WsData.java @@ -6,6 +6,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.java_websocket.WebSocket; + import io.openems.backend.common.metadata.User; import io.openems.common.exceptions.OpenemsError; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; @@ -15,7 +17,8 @@ public class WsData extends io.openems.common.websocket.WsData { private final SubscribedEdgesChannelsWorker worker; private final CompletableFuture user = new CompletableFuture<>(); - public WsData(Backend2BackendWebsocket parent) { + public WsData(WebSocket ws, Backend2BackendWebsocket parent) { + super(ws); this.worker = new SubscribedEdgesChannelsWorker(parent, this); } diff --git a/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/B2bWebsocketTest.java b/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/B2bWebsocketTest.java index b56f303d50c..cfb62d7d473 100644 --- a/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/B2bWebsocketTest.java +++ b/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/B2bWebsocketTest.java @@ -13,7 +13,6 @@ import io.openems.backend.b2bwebsocket.jsonrpc.request.SubscribeEdgesChannelsRequest; import io.openems.backend.common.jsonrpc.request.GetEdgesChannelsValuesRequest; import io.openems.backend.common.jsonrpc.request.GetEdgesStatusRequest; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.jsonrpc.request.EdgeRpcRequest; import io.openems.common.jsonrpc.request.GetEdgeConfigRequest; import io.openems.common.jsonrpc.request.SetGridConnScheduleRequest; @@ -51,7 +50,7 @@ public void getEdgesStatusRequest() throws Exception { try { var responseFuture = client.sendRequest(request); System.out.println(responseFuture.get().toString()); - } catch (InterruptedException | ExecutionException | OpenemsNamedException e) { + } catch (InterruptedException | ExecutionException e) { System.out.println(e.getMessage()); } client.stop(); @@ -65,7 +64,7 @@ public void getEdgeConfigRequest() throws Exception { try { var responseFuture = client.sendRequest(request); System.out.println(responseFuture.get().toString()); - } catch (InterruptedException | ExecutionException | OpenemsNamedException e) { + } catch (InterruptedException | ExecutionException e) { System.out.println(e.getMessage()); } client.stop(); @@ -82,7 +81,7 @@ public void getEdgesChannelsValuesRequest() throws Exception { try { var responseFuture = client.sendRequest(request); System.out.println(responseFuture.get().toString()); - } catch (InterruptedException | ExecutionException | OpenemsNamedException e) { + } catch (InterruptedException | ExecutionException e) { System.out.println(e.getMessage()); } client.stop(); @@ -102,7 +101,7 @@ public void subscribeEdgesChannelsRequest() throws Exception { try { var responseFuture = client.sendRequest(request); System.out.println(responseFuture.get().toString()); - } catch (InterruptedException | ExecutionException | OpenemsNamedException e) { + } catch (InterruptedException | ExecutionException e) { System.out.println(e.getMessage()); } @@ -120,7 +119,7 @@ public void setGridConnSchedule() throws Exception { try { var responseFuture = client.sendRequest(request); System.out.println(responseFuture.get().toString()); - } catch (InterruptedException | ExecutionException | OpenemsNamedException e) { + } catch (InterruptedException | ExecutionException e) { System.out.println(e.getMessage()); } client.stop(); diff --git a/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/TestClient.java b/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/TestClient.java index d016c808f69..3f313d2c93b 100644 --- a/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/TestClient.java +++ b/io.openems.backend.b2bwebsocket/test/io/openems/backend/b2bwebsocket/TestClient.java @@ -3,11 +3,11 @@ import java.net.URI; import java.util.Map; +import org.java_websocket.WebSocket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.openems.common.websocket.AbstractWebsocketClient; -import io.openems.common.websocket.DummyWsData; import io.openems.common.websocket.OnClose; import io.openems.common.websocket.OnError; import io.openems.common.websocket.OnNotification; @@ -29,6 +29,7 @@ protected TestClient(URI serverUri, Map httpHeaders) { super("B2bwebsocket.Unittest", serverUri, httpHeaders); this.onOpen = (ws, handshake) -> { this.log.info("OnOpen: " + handshake); + return null; }; this.onRequest = (ws, request) -> { this.log.info("OnRequest: " + request); @@ -91,8 +92,13 @@ public void setOnNotification(OnNotification onNotification) { } @Override - protected WsData createWsData() { - return new DummyWsData(); + protected WsData createWsData(WebSocket ws) { + return new WsData(ws) { + @Override + public String toString() { + return "TestClient.WsData []"; + } + }; } @Override diff --git a/io.openems.backend.common/src/io/openems/backend/common/edgewebsocket/EdgeWebsocket.java b/io.openems.backend.common/src/io/openems/backend/common/edgewebsocket/EdgeWebsocket.java index b99ee59d9cb..aa8a96cb7d9 100644 --- a/io.openems.backend.common/src/io/openems/backend/common/edgewebsocket/EdgeWebsocket.java +++ b/io.openems.backend.common/src/io/openems/backend/common/edgewebsocket/EdgeWebsocket.java @@ -11,7 +11,6 @@ import com.google.gson.JsonNull; import io.openems.backend.common.metadata.User; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.jsonrpc.base.JsonrpcNotification; import io.openems.common.jsonrpc.base.JsonrpcRequest; import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; @@ -29,19 +28,17 @@ public interface EdgeWebsocket { * @param user the authenticated {@link User} * @param request the {@link JsonrpcRequest} * @return the JSON-RPC Success Response Future - * @throws OpenemsNamedException on error */ - public CompletableFuture send(String edgeId, User user, JsonrpcRequest request) - throws OpenemsNamedException; + public CompletableFuture send(String edgeId, User user, JsonrpcRequest request); /** * Send a JSON-RPC Notification to an Edge. * * @param edgeId the Edge-ID * @param notification the JsonrpcNotification - * @throws OpenemsNamedException on error + * @return true if sending was successful; false otherwise */ - public void send(String edgeId, JsonrpcNotification notification) throws OpenemsNamedException; + public boolean send(String edgeId, JsonrpcNotification notification); /** * Handles a {@link SubscribeSystemLogRequest}. @@ -51,10 +48,9 @@ public CompletableFuture send(String edgeId, User user, * @param websocketId the id of the UI websocket connection * @param request the {@link SubscribeSystemLogRequest} * @return a reply - * @throws OpenemsNamedException on error */ public CompletableFuture handleSubscribeSystemLogRequest(String edgeId, User user, - UUID websocketId, SubscribeSystemLogRequest request) throws OpenemsNamedException; + UUID websocketId, SubscribeSystemLogRequest request); /** * Gets the latest values for the given ChannelAddresses. diff --git a/io.openems.backend.common/src/io/openems/backend/common/jsonrpc/request/GetEmsTypeRequest.java b/io.openems.backend.common/src/io/openems/backend/common/jsonrpc/request/GetEmsTypeRequest.java new file mode 100644 index 00000000000..0b6ff214dad --- /dev/null +++ b/io.openems.backend.common/src/io/openems/backend/common/jsonrpc/request/GetEmsTypeRequest.java @@ -0,0 +1,63 @@ +package io.openems.backend.common.jsonrpc.request; + +import com.google.gson.JsonObject; + +import io.openems.backend.common.metadata.Edge; +import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.jsonrpc.base.JsonrpcRequest; +import io.openems.common.utils.JsonUtils; + +/** + * Gets the ems type of a edge. + * + *
+ * {
+ *   "jsonrpc": "2.0",
+ *   "id": UUID,
+ *   "method": "getEmsType",
+ *   "params": {
+ *      "edgeId": string
+ *   }
+ * }
+ * 
+ */ +public class GetEmsTypeRequest extends JsonrpcRequest { + + public static final String METHOD = "getEmsType"; + + /** + * Create {@link GetEmsTypeRequest} from a template {@link JsonrpcRequest}. + * + * @param request the template {@link JsonrpcRequest} + * @return Created {@link GetEmsTypeRequest} + */ + public static GetEmsTypeRequest from(JsonrpcRequest request) throws OpenemsNamedException { + var params = request.getParams(); + + return new GetEmsTypeRequest(request, JsonUtils.getAsString(params, "edgeId")); + } + + private final String edgeId; + + private GetEmsTypeRequest(JsonrpcRequest request, String edgeId) { + super(request, METHOD); + this.edgeId = edgeId; + } + + @Override + public JsonObject getParams() { + return JsonUtils.buildJsonObject() // + .addProperty("edgeId", this.edgeId) // + .build(); + } + + /** + * Get the {@link Edge} ID. + * + * @return the {@link Edge} ID + */ + public String getEdgeId() { + return this.edgeId; + } + +} diff --git a/io.openems.backend.common/src/io/openems/backend/common/jsonrpc/response/GetEmsTypeResponse.java b/io.openems.backend.common/src/io/openems/backend/common/jsonrpc/response/GetEmsTypeResponse.java new file mode 100644 index 00000000000..cf2b2420c69 --- /dev/null +++ b/io.openems.backend.common/src/io/openems/backend/common/jsonrpc/response/GetEmsTypeResponse.java @@ -0,0 +1,40 @@ +package io.openems.backend.common.jsonrpc.response; + +import java.util.UUID; + +import com.google.gson.JsonObject; + +import io.openems.backend.common.jsonrpc.request.AddEdgeToUserRequest; +import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; +import io.openems.common.utils.JsonUtils; + +/** + * Represents a JSON-RPC Response for {@link AddEdgeToUserRequest}. + * + *
+ * {
+ *   "jsonrpc": "2.0",
+ *   "id": "UUID",
+ *   "result": {
+ *     "emsType": String
+ *   }
+ * }
+ * 
+ */ +public class GetEmsTypeResponse extends JsonrpcResponseSuccess { + + private final String emsType; + + public GetEmsTypeResponse(UUID id, String emsType) { + super(id); + this.emsType = emsType; + } + + @Override + public JsonObject getResult() { + return JsonUtils.buildJsonObject() // + .addPropertyIfNotNull("emsType", this.emsType) // + .build(); + } + +} diff --git a/io.openems.backend.common/src/io/openems/backend/common/metadata/Metadata.java b/io.openems.backend.common/src/io/openems/backend/common/metadata/Metadata.java index 98fb65c4002..79696ccbde7 100644 --- a/io.openems.backend.common/src/io/openems/backend/common/metadata/Metadata.java +++ b/io.openems.backend.common/src/io/openems/backend/common/metadata/Metadata.java @@ -376,6 +376,14 @@ public static final class Events { */ public Optional getSerialNumberForEdge(Edge edge); + /** + * Get ems type for the given {@link Edge}. + * + * @param edgeId id of the edge to search for ems type + * @return ems type or empty {@link Optional} + */ + public Optional getEmsTypeForEdge(String edgeId); + /** * Gets a map of Edge-IDs with the role of the given user. * diff --git a/io.openems.backend.common/src/io/openems/backend/common/metadata/MetadataUtils.java b/io.openems.backend.common/src/io/openems/backend/common/metadata/MetadataUtils.java new file mode 100644 index 00000000000..c298e8b98e5 --- /dev/null +++ b/io.openems.backend.common/src/io/openems/backend/common/metadata/MetadataUtils.java @@ -0,0 +1,71 @@ +package io.openems.backend.common.metadata; + +import static io.openems.common.utils.StringUtils.containsWithNullCheck; + +import java.util.Collection; +import java.util.List; + +import io.openems.common.channel.Level; +import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.jsonrpc.request.GetEdgesRequest.PaginationOptions; +import io.openems.common.jsonrpc.response.GetEdgesResponse.EdgeMetadata; +import io.openems.common.session.Role; + +public class MetadataUtils { + + private MetadataUtils() { + } + + /** + * Common implementation for + * {@link Metadata#getPageDevice(User, PaginationOptions)}. + * + * @param the type of the {@link Edge} + * @param user the {@link User} + * @param edges a Collection of {@link Edge}s + * @param paginationOptions the {@link PaginationOptions} + * @return the result, a list of {@link EdgeMetadata} + * @throws OpenemsNamedException on error + */ + public static List getPageDevice(User user, Collection edges, + PaginationOptions paginationOptions) throws OpenemsNamedException { + var pagesStream = edges.stream(); + final var query = paginationOptions.getQuery(); + if (query != null) { + pagesStream = pagesStream.filter(// + edge -> containsWithNullCheck(edge.getId(), query) // + || containsWithNullCheck(edge.getComment(), query) // + || containsWithNullCheck(edge.getProducttype(), query) // + ); + } + final var searchParams = paginationOptions.getSearchParams(); + if (searchParams != null) { + if (searchParams.searchIsOnline()) { + pagesStream = pagesStream.filter(edge -> edge.isOnline() == searchParams.isOnline()); + } + if (searchParams.productTypes() != null && !searchParams.productTypes().isEmpty()) { + pagesStream = pagesStream.filter(edge -> searchParams.productTypes().contains(edge.getProducttype())); + } + // TODO sum state filter + } + + return pagesStream // + .sorted((s1, s2) -> s1.getId().compareTo(s2.getId())) // + .skip(paginationOptions.getPage() * paginationOptions.getLimit()) // + .limit(paginationOptions.getLimit()) // + .peek(t -> user.setRole(t.getId(), Role.ADMIN)) // + .map(myEdge -> { + return new EdgeMetadata(// + myEdge.getId(), // + myEdge.getComment(), // + myEdge.getProducttype(), // + myEdge.getVersion(), // + Role.ADMIN, // + myEdge.isOnline(), // + myEdge.getLastmessage(), // + null, // firstSetupProtocol + Level.OK); + }).toList(); + } + +} diff --git a/io.openems.backend.common/src/io/openems/backend/common/test/DummyMetadata.java b/io.openems.backend.common/src/io/openems/backend/common/test/DummyMetadata.java index 1d161b9496e..87df24ee5da 100644 --- a/io.openems.backend.common/src/io/openems/backend/common/test/DummyMetadata.java +++ b/io.openems.backend.common/src/io/openems/backend/common/test/DummyMetadata.java @@ -171,6 +171,11 @@ public Optional getSerialNumberForEdge(Edge edge) { throw new UnsupportedOperationException("Unsupported by Dummy Class"); } + @Override + public Optional getEmsTypeForEdge(String edgeId) { + throw new UnsupportedOperationException("Unsupported by Dummy Class"); + } + @Override public List getPageDevice(User user, PaginationOptions paginationOptions) throws OpenemsNamedException { diff --git a/io.openems.backend.common/src/io/openems/backend/common/uiwebsocket/UiWebsocket.java b/io.openems.backend.common/src/io/openems/backend/common/uiwebsocket/UiWebsocket.java index 2174caa1e98..03d39fef744 100644 --- a/io.openems.backend.common/src/io/openems/backend/common/uiwebsocket/UiWebsocket.java +++ b/io.openems.backend.common/src/io/openems/backend/common/uiwebsocket/UiWebsocket.java @@ -23,17 +23,16 @@ public interface UiWebsocket { * @return the JSON-RPC Success Response Future * @throws OpenemsNamedException on error */ - public CompletableFuture send(UUID websocketId, JsonrpcRequest request) - throws OpenemsNamedException; + public CompletableFuture send(UUID websocketId, JsonrpcRequest request); /** * Send a JSON-RPC Notification to a UI session. * * @param websocketId the id of the UI websocket connection * @param notification the JsonrpcNotification - * @throws OpenemsNamedException on error + * @return true if sending was successful; false otherwise */ - public void send(UUID websocketId, JsonrpcNotification notification) throws OpenemsNamedException; + public boolean send(UUID websocketId, JsonrpcNotification notification); /** * Send a JSON-RPC Notification broadcast to all UI sessions with a given @@ -41,9 +40,8 @@ public CompletableFuture send(UUID websocketId, JsonrpcR * * @param edgeId the Edge-ID * @param notification the JsonrpcNotification - * @throws OpenemsNamedException on error */ - public void sendBroadcast(String edgeId, JsonrpcNotification notification) throws OpenemsNamedException; + public void sendBroadcast(String edgeId, JsonrpcNotification notification); /** * Sends the subscribed Channels to the UI session. diff --git a/io.openems.backend.core/src/io/openems/backend/core/debugcycle/DebugCycleExecutor.java b/io.openems.backend.core/src/io/openems/backend/core/debugcycle/DebugCycleExecutor.java index 3df861ff00a..2e262abefc5 100644 --- a/io.openems.backend.core/src/io/openems/backend/core/debugcycle/DebugCycleExecutor.java +++ b/io.openems.backend.core/src/io/openems/backend/core/debugcycle/DebugCycleExecutor.java @@ -49,7 +49,7 @@ public class DebugCycleExecutor implements Runnable { @Activate public DebugCycleExecutor() { - this.debugCycleScheduledExecutor.scheduleAtFixedRate(this, 10, 10, TimeUnit.SECONDS); + this.debugCycleScheduledExecutor.scheduleAtFixedRate(this, 5, 5, TimeUnit.SECONDS); } /** diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/Config.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/Config.java index 560e9f21ae2..fdc781be51f 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/Config.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/Config.java @@ -3,8 +3,6 @@ import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition; -import io.openems.common.websocket.AbstractWebsocketServer.DebugMode; - @ObjectClassDefinition(// name = "Edge.Websocket", // description = "Configures the websocket server for OpenEMS Edge") @@ -16,9 +14,5 @@ @AttributeDefinition(name = "Number of Threads", description = "Pool-Size: the number of threads dedicated to handle the tasks") int poolSize() default 10; - @AttributeDefinition(name = "Debug Mode", description = "Activates the debug mode") - DebugMode debugMode() default DebugMode.OFF; - String webconsole_configurationFactory_nameHint() default "Edge Websocket"; - } diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/EdgeWebsocketImpl.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/EdgeWebsocketImpl.java index 8498c05aefc..bb1b088522c 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/EdgeWebsocketImpl.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/EdgeWebsocketImpl.java @@ -42,7 +42,6 @@ import io.openems.backend.common.uiwebsocket.UiWebsocket; import io.openems.common.exceptions.OpenemsError; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.base.JsonrpcNotification; import io.openems.common.jsonrpc.base.JsonrpcRequest; import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; @@ -111,8 +110,7 @@ private void deactivate() { */ private synchronized void startServer() { if (this.server == null) { - this.server = new WebsocketServer(this, this.getName(), this.config.port(), this.config.poolSize(), - this.config.debugMode()); + this.server = new WebsocketServer(this, this.getName(), this.config.port(), this.config.poolSize()); this.server.start(); } } @@ -140,11 +138,10 @@ protected boolean isOnline(String edgeId) { } @Override - public CompletableFuture send(String edgeId, User user, JsonrpcRequest request) - throws OpenemsNamedException { + public CompletableFuture send(String edgeId, User user, JsonrpcRequest request) { var ws = this.getWebSocketForEdgeId(edgeId); if (ws == null) { - throw OpenemsError.BACKEND_EDGE_NOT_CONNECTED.exception(edgeId); + return CompletableFuture.failedFuture(OpenemsError.BACKEND_EDGE_NOT_CONNECTED.exception(edgeId)); } WsData wsData = ws.getAttachment(); // Wrap Request in AuthenticatedRpc @@ -173,12 +170,13 @@ public CompletableFuture send(String edgeId, User user, } @Override - public void send(String edgeId, JsonrpcNotification notification) throws OpenemsException { + public boolean send(String edgeId, JsonrpcNotification notification) { var ws = this.getWebSocketForEdgeId(edgeId); - if (ws != null) { - WsData wsData = ws.getAttachment(); - wsData.send(notification); + if (ws == null) { + return false; } + WsData wsData = ws.getAttachment(); + return wsData.send(notification); } /** @@ -247,7 +245,7 @@ protected void logError(Logger log, String message) { @Override public CompletableFuture handleSubscribeSystemLogRequest(String edgeId, User user, - UUID websocketId, SubscribeSystemLogRequest request) throws OpenemsNamedException { + UUID websocketId, SubscribeSystemLogRequest request) { return this.systemLogHandler.handleSubscribeSystemLogRequest(edgeId, user, websocketId, request); } diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnClose.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnClose.java index 5366fe34072..e21a648c899 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnClose.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnClose.java @@ -5,8 +5,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.openems.common.exceptions.OpenemsException; - public class OnClose implements io.openems.common.websocket.OnClose { private final Logger log = LoggerFactory.getLogger(OnClose.class); @@ -17,7 +15,7 @@ public OnClose(EdgeWebsocketImpl parent) { } @Override - public void run(WebSocket ws, int code, String reason, boolean remote) throws OpenemsException { + public void accept(WebSocket ws, int code, String reason, boolean remote) { // get edgeId from websocket WsData wsData = ws.getAttachment(); var edgeIdOpt = wsData.getEdgeId(); @@ -30,7 +28,6 @@ public void run(WebSocket ws, int code, String reason, boolean remote) throws Op if (edgeOpt.isPresent()) { var isOnline = this.parent.isOnline(edgeId); edgeOpt.get().setOnline(isOnline); - } } else { @@ -47,7 +44,9 @@ public void run(WebSocket ws, int code, String reason, boolean remote) throws Op // pong in time. For more information check: // https://github.com/TooTallNate/Java-WebSocket/wiki/Lost-connection-detection" } else { - this.parent.logInfo(this.log, edgeId, "Disconnected. Code [" + code + "] Reason [" + reason + "]"); + this.parent.logInfo(this.log, edgeId, new StringBuilder() // + .append("Disconnected. Code [").append(code).append("] Reason [").append(reason).append("]") + .toString()); } } diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnError.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnError.java index b1cc0720688..afb3cedb4e7 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnError.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnError.java @@ -16,7 +16,7 @@ public OnError(EdgeWebsocketImpl parent) { } @Override - public void run(WebSocket ws, Exception ex) throws OpenemsException { + public void accept(WebSocket ws, Exception ex) throws OpenemsException { WsData wsData = ws.getAttachment(); var edgeIdOpt = wsData.getEdgeId(); this.parent.logWarn(this.log, edgeIdOpt.orElse(null), diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnNotification.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnNotification.java index 3f6c0498372..2ccb8cc68a9 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnNotification.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnNotification.java @@ -36,7 +36,7 @@ public OnNotification(EdgeWebsocketImpl parent) { } @Override - public void run(WebSocket ws, JsonrpcNotification notification) throws OpenemsNamedException { + public void accept(WebSocket ws, JsonrpcNotification notification) throws OpenemsNamedException { // Validate authentication WsData wsData = ws.getAttachment(); final String edgeId; @@ -92,8 +92,6 @@ private void handleEdgeConfigNotification(EdgeConfigNotification message, WsData if (this.parent.uiWebsocket != null) { this.parent.uiWebsocket.sendBroadcast(edgeId, new EdgeRpcNotification(edgeId, message)); } - } catch (OpenemsNamedException e) { - this.parent.logWarn(this.log, edgeId, "Unable to forward EdgeConfigNotification to UI: " + e.getMessage()); } catch (NullPointerException e) { this.parent.logWarn(this.log, edgeId, "Unable to forward EdgeConfigNotification to UI: NullPointerException"); diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnOpen.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnOpen.java index e92aed90a5f..fbf05fe7a7f 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnOpen.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnOpen.java @@ -1,12 +1,14 @@ package io.openems.backend.edgewebsocket; -import org.java_websocket.WebSocket; -import org.java_websocket.framing.CloseFrame; +import static io.openems.common.websocket.WebsocketUtils.getAsString; +import static io.openems.common.websocket.WebsocketUtils.parseRemoteIdentifier; +import static org.java_websocket.framing.CloseFrame.REFUSE; +import static org.java_websocket.framing.CloseFrame.TRY_AGAIN_LATER; -import com.google.gson.JsonObject; +import org.java_websocket.WebSocket; +import org.java_websocket.handshake.Handshakedata; -import io.openems.common.exceptions.OpenemsException; -import io.openems.common.utils.JsonUtils; +import io.openems.common.exceptions.OpenemsError; public class OnOpen implements io.openems.common.websocket.OnOpen { @@ -17,81 +19,54 @@ public OnOpen(EdgeWebsocketImpl parent) { } @Override - public void run(WebSocket ws, JsonObject handshake) { - // get websocket attachment - WsData wsData = ws.getAttachment(); - - var apikey = ""; - try { - // get apikey from handshake - var apikeyOpt = JsonUtils.getAsOptionalString(handshake, "apikey"); - if (!apikeyOpt.isPresent()) { - throw new OpenemsException("Apikey is missing in handshake"); - } - apikey = apikeyOpt.get().trim(); - - // get edgeId for apikey - var edgeIdOpt = this.parent.metadata.getEdgeIdForApikey(apikey); - if (!edgeIdOpt.isPresent()) { - throw new OpenemsException("Unable to authenticate this Apikey"); - } - var edgeId = edgeIdOpt.get(); - - // get metadata for Edge - var edgeOpt = this.parent.metadata.getEdge(edgeId); - if (!edgeOpt.isPresent()) { - throw new OpenemsException("Unable to get metadata for Edge [" + edgeId + "]"); - } - var edge = edgeOpt.get(); - - // announce Edge as online - edge.setOnline(true); - edge.setLastmessage(); - wsData.setEdgeId(edgeId); + public OpenemsError apply(WebSocket ws, Handshakedata handshakedata) { + // get apikey from handshake + final var apikey = getAsString(handshakedata, "apikey"); - // TODO send notification to UI - } catch (OpenemsException e) { + var error = this._apply(ws, apikey); + if (error != null) { if (this.parent.metadata.isInitialized()) { - // close websocket - ws.closeConnection(CloseFrame.REFUSE, "Connection to backend failed. " // + ws.closeConnection(REFUSE, "Connection to backend failed. " // + "Apikey [" + apikey + "]. " // - + "Remote [" + parseRemoteIdentifier(ws, handshake) + "] " // - + "Error: " + e.getMessage()); + + "Remote [" + parseRemoteIdentifier(ws, handshakedata) + "] " // + + "Error: " + error.name()); } else { - // close websocket - ws.closeConnection(CloseFrame.TRY_AGAIN_LATER, - "Connection to backend failed. Metadata is not yet initialized. " // - + "Apikey [" + apikey + "]. " // - + "Remote [" + parseRemoteIdentifier(ws, handshake) + "] " // - + "Error: " + e.getMessage()); + ws.closeConnection(TRY_AGAIN_LATER, "Connection to backend failed. Metadata is not yet initialized. " // + + "Apikey [" + apikey + "]. " // + + "Remote [" + parseRemoteIdentifier(ws, handshakedata) + "] " // + + "Error: " + error.name()); } } + return error; } - /** - * Parses a identifier for the Remote from the handshake. - * - *

- * Tries to use the headers "Forwarded", "X-Forwarded-For" or "X-Real-IP". Falls - * back to `ws.getRemoteSocketAddress()`. See https://serverfault.com/a/920060 - * - * @param ws the {@link WebSocket} - * @param handshake the Handshake - * @return an identifier String - */ - private static String parseRemoteIdentifier(WebSocket ws, JsonObject handshake) { - for (var key : REMOTE_IDENTIFICATION_HEADERS) { - var value = JsonUtils.getAsOptionalString(handshake, - key.toLowerCase() /* handshake keys are all lower case */); - if (value.isPresent()) { - return value.get(); - } + private OpenemsError _apply(WebSocket ws, String apikey) { + // get websocket attachment + final WsData wsData = ws.getAttachment(); + + if (apikey == null) { + return OpenemsError.COMMON_AUTHENTICATION_FAILED; } - // fallback - return ws.getRemoteSocketAddress().toString(); - } - private static final String[] REMOTE_IDENTIFICATION_HEADERS = new String[] { // - "Forwarded", "X-Forwarded-For", "X-Real-IP" }; + // get edgeId for apikey + var edgeIdOpt = this.parent.metadata.getEdgeIdForApikey(apikey); + if (!edgeIdOpt.isPresent()) { + return OpenemsError.COMMON_AUTHENTICATION_FAILED; + } + var edgeId = edgeIdOpt.get(); + + // get metadata for Edge + var edgeOpt = this.parent.metadata.getEdge(edgeId); + if (!edgeOpt.isPresent()) { + return OpenemsError.COMMON_SERVICE_NOT_AVAILABLE; + } + var edge = edgeOpt.get(); + // announce Edge as online + edge.setOnline(true); + edge.setLastmessage(); + wsData.setEdgeId(edgeId); + + return null; // No error + } } diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnRequest.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnRequest.java index 778d47a9a80..f81752aa6ec 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnRequest.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/OnRequest.java @@ -1,12 +1,15 @@ package io.openems.backend.edgewebsocket; import java.util.concurrent.CompletableFuture; +import java.util.function.BiConsumer; +import java.util.function.Supplier; import org.java_websocket.WebSocket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.openems.backend.common.metadata.AppCenterHandler; +import io.openems.backend.common.metadata.AppCenterMetadata; import io.openems.common.exceptions.OpenemsError; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.exceptions.OpenemsException; @@ -17,14 +20,18 @@ public class OnRequest implements io.openems.common.websocket.OnRequest { private final Logger log = LoggerFactory.getLogger(OnRequest.class); - private final EdgeWebsocketImpl parent; - - public OnRequest(EdgeWebsocketImpl parent) { - this.parent = parent; + private final Supplier appCenterMetadata; + private final BiConsumer logWarn; + + public OnRequest(// + Supplier appCenterMetadata, // + BiConsumer logWarn) { + this.appCenterMetadata = appCenterMetadata; + this.logWarn = logWarn; } @Override - public CompletableFuture run(WebSocket ws, JsonrpcRequest request) + public CompletableFuture apply(WebSocket ws, JsonrpcRequest request) throws OpenemsException, OpenemsNamedException { final WsData wsData = ws.getAttachment(); @@ -34,7 +41,7 @@ public CompletableFuture run(WebSocket ws, Jso switch (request.getMethod()) { case AppCenterRequest.METHOD: - resultFuture = AppCenterHandler.handleEdgeRequest(this.parent.appCenterMetadata, // + resultFuture = AppCenterHandler.handleEdgeRequest(this.appCenterMetadata.get(), // AppCenterRequest.from(request), edgeId); break; @@ -43,7 +50,7 @@ public CompletableFuture run(WebSocket ws, Jso if (resultFuture != null) { return resultFuture; } - this.parent.logWarn(this.log, "Unhandled Request: " + request); + this.logWarn.accept(this.log, "Unhandled Request: " + request); throw OpenemsError.JSONRPC_UNHANDLED_METHOD.exception(request.getMethod()); } diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/SystemLogHandler.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/SystemLogHandler.java index 41bd8ce5961..45078b35435 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/SystemLogHandler.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/SystemLogHandler.java @@ -12,7 +12,6 @@ import com.google.gson.JsonObject; import io.openems.backend.common.metadata.User; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.jsonrpc.base.GenericJsonrpcResponseSuccess; import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; import io.openems.common.jsonrpc.notification.EdgeRpcNotification; @@ -43,10 +42,9 @@ public SystemLogHandler(EdgeWebsocketImpl parent) { * @param websocketId the id of the UI websocket connection * @param request the {@link SubscribeSystemLogRequest} * @return a reply - * @throws OpenemsNamedException on error */ public CompletableFuture handleSubscribeSystemLogRequest(String edgeId, User user, - UUID websocketId, SubscribeSystemLogRequest request) throws OpenemsNamedException { + UUID websocketId, SubscribeSystemLogRequest request) { if (request.isSubscribe()) { // Add subscription this.addSubscriptionId(edgeId, websocketId); @@ -81,39 +79,18 @@ public void handleSystemLogNotification(String edgeId, SystemLogNotification not if (ids == null) { // No Tokens exist, but we still receive Notification? -> send unsubscribe - try { - var dummyGuestUser = new User("internal", "UnsubscribeSystemLogNotification", - UUID.randomUUID().toString(), Language.EN, Role.GUEST, false, new JsonObject()); - this.parent.send(edgeId, dummyGuestUser, SubscribeSystemLogRequest.unsubscribe()); - this.parent.logInfo(this.log, edgeId, "Was still sending SystemLogNotification. Sent unsubscribe."); - - } catch (OpenemsNamedException e) { - this.parent.logWarn(this.log, edgeId, - "Was still sending SystemLogNotification. Unable to send unsubscribe: " + e.getMessage()); - } + var dummyGuestUser = new User("internal", "UnsubscribeSystemLogNotification", UUID.randomUUID().toString(), + Language.EN, Role.GUEST, false, new JsonObject()); + this.parent.send(edgeId, dummyGuestUser, SubscribeSystemLogRequest.unsubscribe()); + this.parent.logInfo(this.log, edgeId, "Was still sending SystemLogNotification. Sent unsubscribe."); return; } // Forward Notification to each Session token for (var id : ids) { - try { - // TODO use events - if (this.parent.uiWebsocket != null) { - this.parent.uiWebsocket.send(id, new EdgeRpcNotification(edgeId, notification)); - } - - } catch (OpenemsNamedException | NullPointerException e) { - this.parent.logWarn(this.log, edgeId, "Unable to handle SystemLogNotification: " + e.getMessage()); - // error -> send unsubscribe - try { - var dummyGuestUser = new User("internal", "UnsubscribeSystemLogNotification", - UUID.randomUUID().toString(), Language.EN, Role.GUEST, false, new JsonObject()); - this.handleSubscribeSystemLogRequest(edgeId, dummyGuestUser, id, - SubscribeSystemLogRequest.unsubscribe()); - - } catch (OpenemsNamedException e1) { - this.parent.logWarn(this.log, edgeId, "Unable to send unsubscribe: " + e1.getMessage()); - } + // TODO use events + if (this.parent.uiWebsocket != null) { + this.parent.uiWebsocket.send(id, new EdgeRpcNotification(edgeId, notification)); } } } diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WebsocketServer.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WebsocketServer.java index 1e9abdcac89..d1bfefd54ad 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WebsocketServer.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WebsocketServer.java @@ -1,11 +1,5 @@ package io.openems.backend.edgewebsocket; -import java.time.Instant; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; import java.util.Objects; import java.util.Optional; import java.util.Set; @@ -18,14 +12,7 @@ import com.google.gson.JsonElement; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; -import io.openems.common.jsonrpc.base.JsonrpcMessage; -import io.openems.common.jsonrpc.notification.SystemLogNotification; -import io.openems.common.jsonrpc.notification.TimestampedDataNotification; import io.openems.common.types.ChannelAddress; -import io.openems.common.types.SystemLog; -import io.openems.common.utils.JsonUtils; import io.openems.common.websocket.AbstractWebsocketServer; public class WebsocketServer extends AbstractWebsocketServer { @@ -37,19 +24,21 @@ public class WebsocketServer extends AbstractWebsocketServer { private final OnError onError; private final OnClose onClose; - public WebsocketServer(EdgeWebsocketImpl parent, String name, int port, int poolSize, DebugMode debugMode) { - super(name, port, poolSize, debugMode); + public WebsocketServer(EdgeWebsocketImpl parent, String name, int port, int poolSize) { + super(name, port, poolSize); this.parent = parent; this.onOpen = new OnOpen(parent); - this.onRequest = new OnRequest(parent); + this.onRequest = new OnRequest(// + () -> parent.appCenterMetadata, // + this::logWarn); this.onNotification = new OnNotification(parent); this.onError = new OnError(parent); this.onClose = new OnClose(parent); } @Override - protected WsData createWsData() { - return new WsData(); + protected WsData createWsData(WebSocket ws) { + return new WsData(ws); } /** @@ -89,47 +78,6 @@ protected OnClose getOnClose() { return this.onClose; } - @Override - protected JsonrpcMessage handleNonJsonrpcMessage(WebSocket ws, String stringMessage, - OpenemsNamedException lastException) throws OpenemsNamedException { - var message = JsonUtils.parseToJsonObject(stringMessage); - - // config - if (message.has("config")) { - // Unable to handle deprecated configurations - return null; - } - - // timedata - if (message.has("timedata")) { - var d = new TimestampedDataNotification(); - var timedata = JsonUtils.getAsJsonObject(message, "timedata"); - for (Entry entry : timedata.entrySet()) { - var timestamp = Long.parseLong(entry.getKey()); - var values = JsonUtils.getAsJsonObject(entry.getValue()); - Map data = new HashMap<>(); - for (Entry value : values.entrySet()) { - data.put(value.getKey(), value.getValue()); - } - d.add(timestamp, data); - } - return d; - } - - // log - if (message.has("log")) { - var log = JsonUtils.getAsJsonObject(message, "log"); - return new SystemLogNotification(new SystemLog( - ZonedDateTime.ofInstant(Instant.ofEpochMilli(JsonUtils.getAsLong(log, "time")), - ZoneId.systemDefault()), // - SystemLog.Level.valueOf(JsonUtils.getAsString(log, "level").toUpperCase()), // - JsonUtils.getAsString(log, "source"), // - JsonUtils.getAsString(log, "message"))); - } - - throw new OpenemsException("EdgeWs. handleNonJsonrpcMessage", lastException); - } - @Override protected void logInfo(Logger log, String message) { this.parent.logInfo(log, message); diff --git a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WsData.java b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WsData.java index 6a0abcf2479..180eaca7c5a 100644 --- a/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WsData.java +++ b/io.openems.backend.edgewebsocket/src/io/openems/backend/edgewebsocket/WsData.java @@ -6,6 +6,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.java_websocket.WebSocket; + import io.openems.backend.common.edgewebsocket.EdgeCache; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.exceptions.OpenemsException; @@ -23,6 +25,10 @@ public class WsData extends io.openems.common.websocket.WsData { private final CompletableFuture isAuthenticated = new CompletableFuture<>(); public final EdgeCache edgeCache = new EdgeCache(); + public WsData(WebSocket ws) { + super(ws); + } + /** * Asserts that the Edge-ID is available (i.e. properly authenticated). * diff --git a/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/Config.java b/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/Config.java index b21abffdd83..b76c1d977dd 100644 --- a/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/Config.java +++ b/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/Config.java @@ -1,5 +1,6 @@ package io.openems.backend.metadata.dummy; +import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition; @ObjectClassDefinition(// @@ -7,6 +8,12 @@ description = "Configures the Metadata Dummy provider") @interface Config { + @AttributeDefinition(name = "Edge-ID template", description = "Template for Edge-IDs, defaults to 'edge%d'") + String edgeIdTemplate() default "edge%d"; + + @AttributeDefinition(name = "Max Edge-ID", description = "Default predefines Edge-IDs from 'edge0' to 'edge10'") + int edgeIdMax() default 10; + String webconsole_configurationFactory_nameHint() default "Metadata Dummy"; } diff --git a/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/MetadataDummy.java b/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/MetadataDummy.java index 899de4292de..584835bae5d 100644 --- a/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/MetadataDummy.java +++ b/io.openems.backend.metadata.dummy/src/io/openems/backend/metadata/dummy/MetadataDummy.java @@ -37,6 +37,7 @@ import io.openems.backend.common.metadata.Edge; import io.openems.backend.common.metadata.EdgeHandler; import io.openems.backend.common.metadata.Metadata; +import io.openems.backend.common.metadata.MetadataUtils; import io.openems.backend.common.metadata.SimpleEdgeHandler; import io.openems.backend.common.metadata.User; import io.openems.common.channel.Level; @@ -48,7 +49,6 @@ import io.openems.common.jsonrpc.response.GetEdgesResponse.EdgeMetadata; import io.openems.common.session.Language; import io.openems.common.session.Role; -import io.openems.common.utils.StringUtils; import io.openems.common.utils.ThreadPoolUtils; @Designate(ocd = Config.class, factory = false) @@ -79,11 +79,20 @@ public class MetadataDummy extends AbstractMetadata implements Metadata, EventHa private JsonObject settings = new JsonObject(); @Activate - public MetadataDummy(@Reference EventAdmin eventadmin) { + public MetadataDummy(@Reference EventAdmin eventadmin, Config config) { super("Metadata.Dummy"); this.eventAdmin = eventadmin; this.logInfo(this.log, "Activate"); + // Prefill + this.logInfo(this.log, "Prefilling Edges [" // + + String.format(config.edgeIdTemplate(), 0) + "..." + + String.format(config.edgeIdTemplate(), config.edgeIdMax()) + "]"); + for (var i = 0; i < config.edgeIdMax() + 1; i++) { + this.createEdge(config.edgeIdTemplate(), i); + } + this.nextEdgeId.set(config.edgeIdMax() + 1); + // Allow the services some time to settle this.executor.schedule(() -> { this.setInitialized(); @@ -166,7 +175,18 @@ public Optional getEdgeIdForApikey(String apikey) { var edge = new MyEdge(this, edgeId, apikey, setupPassword, "OpenEMS Edge #" + id, "", ""); this.edges.put(edgeId, edge); return Optional.ofNullable(edgeId); + } + /** + * Creates and adds a {@link MyEdge}. + * + * @param edgeIdTemplate the Edge-ID template + * @param i value to be filled in the template + */ + private void createEdge(String edgeIdTemplate, int i) { + var edgeId = String.format(edgeIdTemplate, i); + var edge = new MyEdge(this, edgeId, edgeId, edgeId, "OpenEMS Edge #" + i, "", ""); + this.edges.put(edgeId, edge); } @Override @@ -277,6 +297,11 @@ public Optional getSerialNumberForEdge(Edge edge) { throw new UnsupportedOperationException("DummyMetadata.getSerialNumberForEdge() is not implemented"); } + @Override + public Optional getEmsTypeForEdge(String edgeId) { + throw new UnsupportedOperationException("DummyMetadata.getEmsTypeForEdge() is not implemented"); + } + @Override public UserAlertingSettings getUserAlertingSettings(String edgeId, String userId) throws OpenemsException { throw new UnsupportedOperationException("DummyMetadata.getUserAlertingSettings() is not implemented"); @@ -305,43 +330,7 @@ public void setUserAlertingSettings(User user, String edgeId, List getPageDevice(User user, PaginationOptions paginationOptions) throws OpenemsNamedException { - var pagesStream = this.edges.values().stream(); - final var query = paginationOptions.getQuery(); - if (query != null) { - pagesStream = pagesStream.filter(// - edge -> StringUtils.containsWithNullCheck(edge.getId(), query) // - || StringUtils.containsWithNullCheck(edge.getComment(), query) // - || StringUtils.containsWithNullCheck(edge.getProducttype(), query) // - ); - } - final var searchParams = paginationOptions.getSearchParams(); - if (searchParams != null) { - if (searchParams.searchIsOnline()) { - pagesStream = pagesStream.filter(edge -> edge.isOnline() == searchParams.isOnline()); - } - if (searchParams.productTypes() != null && !searchParams.productTypes().isEmpty()) { - pagesStream = pagesStream.filter(edge -> searchParams.productTypes().contains(edge.getProducttype())); - } - // TODO sum state filter - } - - return pagesStream // - .sorted((s1, s2) -> s1.getId().compareTo(s2.getId())) // - .skip(paginationOptions.getPage() * paginationOptions.getLimit()) // - .limit(paginationOptions.getLimit()) // - .peek(t -> user.setRole(t.getId(), Role.ADMIN)) // - .map(myEdge -> { - return new EdgeMetadata(// - myEdge.getId(), // - myEdge.getComment(), // - myEdge.getProducttype(), // - myEdge.getVersion(), // - Role.ADMIN, // - myEdge.isOnline(), // - myEdge.getLastmessage(), // - null, // firstSetupProtocol - Level.OK); - }).toList(); + return MetadataUtils.getPageDevice(user, this.edges.values(), paginationOptions); } @Override @@ -383,5 +372,4 @@ public void logGenericSystemLog(GenericSystemLog systemLog) { public void updateUserSettings(User user, JsonObject settings) { this.settings = settings == null ? new JsonObject() : settings; } - } diff --git a/io.openems.backend.metadata.file/src/io/openems/backend/metadata/file/MetadataFile.java b/io.openems.backend.metadata.file/src/io/openems/backend/metadata/file/MetadataFile.java index e1fda5d7540..9ac20615469 100644 --- a/io.openems.backend.metadata.file/src/io/openems/backend/metadata/file/MetadataFile.java +++ b/io.openems.backend.metadata.file/src/io/openems/backend/metadata/file/MetadataFile.java @@ -39,6 +39,7 @@ import io.openems.backend.common.metadata.Edge; import io.openems.backend.common.metadata.EdgeHandler; import io.openems.backend.common.metadata.Metadata; +import io.openems.backend.common.metadata.MetadataUtils; import io.openems.backend.common.metadata.SimpleEdgeHandler; import io.openems.backend.common.metadata.User; import io.openems.common.channel.Level; @@ -51,7 +52,6 @@ import io.openems.common.session.Language; import io.openems.common.session.Role; import io.openems.common.utils.JsonUtils; -import io.openems.common.utils.StringUtils; /** * This implementation of MetadataService reads Edges configuration from a file. @@ -306,6 +306,11 @@ public Optional getSerialNumberForEdge(Edge edge) { throw new UnsupportedOperationException("FileMetadata.getSerialNumberForEdge() is not implemented"); } + @Override + public Optional getEmsTypeForEdge(String edgeId) { + throw new UnsupportedOperationException("FileMetadata.getEmsTypeForEdge() is not implemented"); + } + @Override public UserAlertingSettings getUserAlertingSettings(String edgeId, String userId) throws OpenemsException { throw new UnsupportedOperationException("FileMetadata.getUserAlertingSettings() is not implemented"); @@ -334,42 +339,7 @@ public void setUserAlertingSettings(User user, String edgeId, List getPageDevice(User user, PaginationOptions paginationOptions) throws OpenemsNamedException { - var pagesStream = this.edges.values().stream(); - final var query = paginationOptions.getQuery(); - if (query != null) { - pagesStream = pagesStream.filter(// - edge -> StringUtils.containsWithNullCheck(edge.getId(), query) // - || StringUtils.containsWithNullCheck(edge.getComment(), query) // - || StringUtils.containsWithNullCheck(edge.getProducttype(), query) // - ); - } - final var searchParams = paginationOptions.getSearchParams(); - if (searchParams != null) { - if (searchParams.searchIsOnline()) { - pagesStream = pagesStream.filter(edge -> edge.isOnline() == searchParams.isOnline()); - } - if (searchParams.productTypes() != null) { - pagesStream = pagesStream.filter(edge -> searchParams.productTypes().contains(edge.getProducttype())); - } - // TODO sum state filter - } - return pagesStream // - .sorted((s1, s2) -> s1.getId().compareTo(s2.getId())) // - .skip(paginationOptions.getPage() * paginationOptions.getLimit()) // - .limit(paginationOptions.getLimit()) // - .peek(t -> user.setRole(t.getId(), Role.ADMIN)) // - .map(myEdge -> { - return new EdgeMetadata(// - myEdge.getId(), // - myEdge.getComment(), // - myEdge.getProducttype(), // - myEdge.getVersion(), // - Role.ADMIN, // - myEdge.isOnline(), // - myEdge.getLastmessage(), // - null, // firstSetupProtocol - Level.OK); - }).toList(); + return MetadataUtils.getPageDevice(user, this.edges.values(), paginationOptions); } @Override diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Config.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Config.java index 24780745baa..8512870c35e 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Config.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Config.java @@ -4,7 +4,6 @@ import org.osgi.service.metatype.annotations.ObjectClassDefinition; import io.openems.backend.metadata.odoo.odoo.Protocol; -import io.openems.common.websocket.AbstractWebsocketServer.DebugMode; @ObjectClassDefinition(// name = "Metadata.Odoo", // diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/DebugMode.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/DebugMode.java new file mode 100644 index 00000000000..66c334c44c9 --- /dev/null +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/DebugMode.java @@ -0,0 +1,16 @@ +package io.openems.backend.metadata.odoo; + +public enum DebugMode { + + OFF, SIMPLE, DETAILED; + + /** + * Is this {@link DebugMode} at least as high as the other {@link DebugMode}?. + * + * @param other the other {@link DebugMode} + * @return true if yes + */ + public boolean isAtLeast(DebugMode other) { + return this.ordinal() >= other.ordinal(); + } +} diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java index cfd7dc2ef1c..b2e415dd370 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java @@ -114,14 +114,22 @@ public enum EdgeDevice implements Field { NAME("name", true), // COMMENT("comment", true), // OPENEMS_VERSION("openems_version", true), // - PRODUCTTYPE("producttype", true), // - OPENEMS_CONFIG("openems_config", false), // - OPENEMS_CONFIG_COMPONENTS("openems_config_components", false), // LASTMESSAGE("lastmessage", true), // OPENEMS_SUM_STATE("openems_sum_state_level", false), // OPENEMS_IS_CONNECTED("openems_is_connected", false), // - STOCK_PRODUCTION_LOT_ID("stock_production_lot_id", false), - FIRST_SETUP_PROTOCOL("first_setup_protocol_date", false); + FIRST_SETUP_PROTOCOL("first_setup_protocol_date", false), // + + // Hardware + PRODUCTTYPE("producttype", true), // + EMS_TYPE("ems_type", false), // + + // Configuration + OPENEMS_CONFIG("openems_config", false), // + OPENEMS_CONFIG_COMPONENTS("openems_config_components", false), // + + // Product + STOCK_PRODUCTION_LOT_ID("stock_production_lot_id", false), // + ; public static final String ODOO_MODEL = "openems.device"; public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_"); diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MetadataOdoo.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MetadataOdoo.java index 6c544232e40..9f28bc32346 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MetadataOdoo.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MetadataOdoo.java @@ -76,7 +76,6 @@ import io.openems.common.types.SemanticVersion; import io.openems.common.utils.JsonUtils; import io.openems.common.utils.ThreadPoolUtils; -import io.openems.common.websocket.AbstractWebsocketServer.DebugMode; @Designate(ocd = Config.class, factory = false) @Component(// @@ -457,6 +456,11 @@ public Optional getSerialNumberForEdge(Edge edge) { return this.odooHandler.getSerialNumberForEdge(edge); } + @Override + public Optional getEmsTypeForEdge(String edgeId) { + return this.odooHandler.getEmsTypeForEdge(edgeId); + } + @Override public void sendMail(ZonedDateTime sendAt, String template, JsonElement params) { try { diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooHandler.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooHandler.java index faf69a04d76..b79cab0cace 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooHandler.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooHandler.java @@ -936,6 +936,33 @@ public Optional getSerialNumberForEdge(Edge edge) { return Optional.empty(); } + /** + * Get ems type for the given {@link Edge}. + * + * @param edgeId the id of the edge for the ems type + * @return ems type or empty {@link Optional} + */ + public Optional getEmsTypeForEdge(String edgeId) { + try { + final var queryResult = OdooUtils.searchRead(this.credentials, Field.EdgeDevice.ODOO_MODEL, + new Field[] { Field.EdgeDevice.EMS_TYPE }, new Domain(Field.EdgeDevice.NAME, Operator.EQ, edgeId)); + + if (queryResult.length != 1) { + return Optional.empty(); + } + + final var emsTypeObj = queryResult[0].get(Field.EdgeDevice.EMS_TYPE.id()); + + if (emsTypeObj instanceof String emsTypeString) { + return Optional.of(emsTypeString); + } + } catch (OpenemsException ex) { + this.parent.logInfo(this.log, "Unable to find serial number for Edge [" + edgeId + "]"); + } + + return Optional.empty(); + } + /** * Gets if the given key can be applied to the given app and edge id. * diff --git a/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AggregatedInflux.java b/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AggregatedInflux.java index 4781e471dbb..a9027b47f54 100644 --- a/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AggregatedInflux.java +++ b/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AggregatedInflux.java @@ -421,7 +421,71 @@ private String getMeasurement(ZoneId zoneId) throws OpenemsNamedException { if (measurement != null) { return measurement; } - this.log.warn("No measurement provided for zoneId " + zoneId); + // this.log.warn("No measurement provided for zoneId " + zoneId); + + // TODO: add more zoneToMeasurement. Logs from 2024-07-21: + // - +00:00:02 + // - +01:00 + // - +02:00 + // - -07:00 + // - Africa/Cairo + // - Africa/Casablanca + // - Africa/Johannesburg + // - Africa/Nairobi + // - Africa/Windhoek + // - America/Chicago + // - America/Detroit + // - America/Edmonton + // - America/Los_Angeles + // - America/New_York + // - America/Sao_Paulo + // - America/Toronto + // - America/Vancouver + // - Asia/Calcutta + // - Asia/Colombo + // - Asia/Jerusalem + // - Asia/Makassar + // - Asia/Nicosia + // - Asia/Shanghai + // - Asia/Tbilisi + // - Atlantic/Canary + // - Atlantic/Reykjavik + // - Australia/Adelaide + // - Etc/GMT-2 + // - Europe/Amsterdam + // - Europe/Athens + // - Europe/Bratislava + // - Europe/Brussels + // - Europe/Bucharest + // - Europe/Budapest + // - Europe/Copenhagen + // - Europe/Dublin + // - Europe/Helsinki + // - Europe/Istanbul + // - Europe/Lisbon + // - Europe/Ljubljana + // - Europe/London + // - Europe/Luxembourg + // - Europe/Madrid + // - Europe/Malta + // - Europe/Oslo + // - Europe/Paris + // - Europe/Podgorica + // - Europe/Prague + // - Europe/Riga + // - Europe/Rome + // - Europe/Sarajevo + // - Europe/Sofia + // - Europe/Stockholm + // - Europe/Tallinn + // - Europe/Tirane + // - Europe/Vaduz + // - Europe/Vienna + // - Europe/Vilnius + // - Europe/Warsaw + // - Europe/Zagreb + // - Europe/Zurich + // - Indian/Maldives for (var entry : this.zoneToMeasurement.entrySet()) { return entry.getValue(); } diff --git a/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AllowedChannels.java b/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AllowedChannels.java index 4a85a09cf1e..5b93270894c 100644 --- a/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AllowedChannels.java +++ b/io.openems.backend.timedata.aggregatedinflux/src/io/openems/backend/timedata/aggregatedinflux/AllowedChannels.java @@ -70,6 +70,7 @@ private AllowedChannels() { .putAll(multiChannels("ctrlApiModbusTcp", 0, 3, "Ess0SetReactivePowerLessOrEquals", DataType.LONG)) // .putAll(multiChannels("ctrlApiModbusTcp", 0, 3, "Ess0SetReactivePowerGreaterOrEquals", DataType.LONG)) // .putAll(multiChannels("ctrlApiModbusTcp", 0, 3, "Ess0SetActivePowerGreaterOrEquals", DataType.LONG)) // + .put("ctrlEssLimiter14a0/RestrictionMode", DataType.LONG) // .build(); ALLOWED_CUMULATED_CHANNELS = ImmutableMap.builder() // @@ -115,6 +116,7 @@ private AllowedChannels() { .putAll(multiChannels("ess", 0, 17, "ActiveDischargeEnergy", DataType.LONG)) // .putAll(multiChannels("ctrlApiModbusTcp", 0, 3, "CumulatedActiveTime", DataType.LONG)) // .putAll(multiChannels("ctrlApiModbusTcp", 0, 3, "CumulatedInactiveTime", DataType.LONG)) // + .put("ctrlEssLimiter14a0/CumulatedRestrictionTime", DataType.LONG) // .build(); } diff --git a/io.openems.backend.timedata.influx/src/io/openems/backend/timedata/influx/ChannelFilter.java b/io.openems.backend.timedata.influx/src/io/openems/backend/timedata/influx/ChannelFilter.java index 3bdeef18022..6193e38775f 100644 --- a/io.openems.backend.timedata.influx/src/io/openems/backend/timedata/influx/ChannelFilter.java +++ b/io.openems.backend.timedata.influx/src/io/openems/backend/timedata/influx/ChannelFilter.java @@ -9,9 +9,6 @@ public class ChannelFilter { - private static final Predicate SUNSPEC_PATTERN = // - Pattern.compile("^S[0-9]+[A-Z][a-zA-Z0-9]*$").asPredicate(); - /** * Pattern for Component-IDs. * @@ -82,15 +79,7 @@ public boolean isValid(String channelAddress) { return false; } - // Valid Channel-ID - final var channelId = c[1]; - if (SUNSPEC_PATTERN.test(channelId)) { - // SunSpec Channels - return false; - } - return true; } - } diff --git a/io.openems.backend.timedata.influx/test/io/openems/backend/timedata/influx/ChannelFilterTest.java b/io.openems.backend.timedata.influx/test/io/openems/backend/timedata/influx/ChannelFilterTest.java index 0f473a6d56d..e3d8447a915 100644 --- a/io.openems.backend.timedata.influx/test/io/openems/backend/timedata/influx/ChannelFilterTest.java +++ b/io.openems.backend.timedata.influx/test/io/openems/backend/timedata/influx/ChannelFilterTest.java @@ -45,8 +45,8 @@ public void testIsValid() { assertFalse(filter.isValid("äöü0/Status")); // SunSpec - assertFalse(filter.isValid("pvInverter0/S1Evt")); - assertFalse(filter.isValid("pvInverter0/S111A")); + assertTrue(filter.isValid("pvInverter0/S1Evt")); + assertTrue(filter.isValid("pvInverter0/S111A")); } } diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/Config.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/Config.java index ca928c2920c..1c578a6ccff 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/Config.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/Config.java @@ -3,8 +3,6 @@ import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition; -import io.openems.common.websocket.AbstractWebsocketServer.DebugMode; - @ObjectClassDefinition(// name = "Ui.Websocket", // description = "Configures the websocket server for OpenEMS UI") @@ -16,9 +14,5 @@ @AttributeDefinition(name = "Number of Threads", description = "Pool-Size: the number of threads dedicated to handle the tasks") int poolSize() default 10; - @AttributeDefinition(name = "Debug Mode", description = "Activates the debug mode") - DebugMode debugMode() default DebugMode.OFF; - String webconsole_configurationFactory_nameHint() default "Ui Websocket"; - } diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnClose.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnClose.java deleted file mode 100644 index 3ac723327a7..00000000000 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnClose.java +++ /dev/null @@ -1,21 +0,0 @@ -package io.openems.backend.uiwebsocket.impl; - -import org.java_websocket.WebSocket; - -import io.openems.common.exceptions.OpenemsException; - -public class OnClose implements io.openems.common.websocket.OnClose { - - public OnClose(UiWebsocketImpl parent) { - } - - @Override - public void run(WebSocket ws, int code, String reason, boolean remote) throws OpenemsException { - // get current User - WsData wsData = ws.getAttachment(); - if (wsData != null) { - wsData.dispose(); - } - } - -} diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnError.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnError.java index e66a53fc58b..37e5afb936e 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnError.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnError.java @@ -16,7 +16,7 @@ public OnError(UiWebsocketImpl parent) { } @Override - public void run(WebSocket ws, Exception ex) throws OpenemsException { + public void accept(WebSocket ws, Exception ex) throws OpenemsException { WsData wsData = ws.getAttachment(); this.parent.logWarn(this.log, "User [" + wsData.getUserId().orElse("UNKNOWN") + "] websocket error. " + ex.getClass().getSimpleName() + ": " + ex.getMessage()); diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnNotification.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnNotification.java index 43063567657..15a9900ac96 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnNotification.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnNotification.java @@ -19,7 +19,7 @@ public OnNotification(UiWebsocketImpl parent) { } @Override - public void run(WebSocket ws, JsonrpcNotification notification) throws OpenemsNamedException { + public void accept(WebSocket ws, JsonrpcNotification notification) throws OpenemsNamedException { WsData wsData = ws.getAttachment(); User user = null; try { diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnOpen.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnOpen.java deleted file mode 100644 index 4d467dab6b6..00000000000 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnOpen.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.openems.backend.uiwebsocket.impl; - -import org.java_websocket.WebSocket; - -import com.google.gson.JsonObject; - -import io.openems.common.exceptions.OpenemsException; - -public class OnOpen implements io.openems.common.websocket.OnOpen { - - public OnOpen(UiWebsocketImpl parent) { - } - - @Override - public void run(WebSocket ws, JsonObject handshake) throws OpenemsException { - } -} diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnRequest.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnRequest.java index 9883cf030ac..39ea48803f6 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnRequest.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/OnRequest.java @@ -11,6 +11,7 @@ import io.openems.backend.common.alerting.UserAlertingSettings; import io.openems.backend.common.jsonrpc.request.AddEdgeToUserRequest; +import io.openems.backend.common.jsonrpc.request.GetEmsTypeRequest; import io.openems.backend.common.jsonrpc.request.GetSetupProtocolDataRequest; import io.openems.backend.common.jsonrpc.request.GetSetupProtocolRequest; import io.openems.backend.common.jsonrpc.request.GetUserAlertingConfigsRequest; @@ -22,6 +23,7 @@ import io.openems.backend.common.jsonrpc.request.SubmitSetupProtocolRequest; import io.openems.backend.common.jsonrpc.request.SubscribeEdgesRequest; import io.openems.backend.common.jsonrpc.response.AddEdgeToUserResponse; +import io.openems.backend.common.jsonrpc.response.GetEmsTypeResponse; import io.openems.backend.common.jsonrpc.response.GetUserAlertingConfigsResponse; import io.openems.backend.common.jsonrpc.response.GetUserInformationResponse; import io.openems.backend.common.metadata.User; @@ -60,7 +62,7 @@ public OnRequest(UiWebsocketImpl parent) { } @Override - public CompletableFuture run(WebSocket ws, JsonrpcRequest request) + public CompletableFuture apply(WebSocket ws, JsonrpcRequest request) throws OpenemsNamedException { WsData wsData = ws.getAttachment(); @@ -87,6 +89,8 @@ public CompletableFuture run(WebSocket ws, Jso this.handleEdgeRpcRequest(wsData, user, EdgeRpcRequest.from(request)); case AddEdgeToUserRequest.METHOD -> // this.handleAddEdgeToUserRequest(user, AddEdgeToUserRequest.from(request)); + case GetEmsTypeRequest.METHOD -> // + this.handleGetEmsTypeRequest(user, GetEmsTypeRequest.from(request)); case GetUserInformationRequest.METHOD -> // this.handleGetUserInformationRequest(user, GetUserInformationRequest.from(request)); case SetUserInformationRequest.METHOD -> // @@ -347,6 +351,25 @@ private CompletableFuture handleAddEdgeToUserRequest(User .completedFuture(new AddEdgeToUserResponse(request.getId(), edge, serialNumber.orElse(null))); } + /** + * Handles an {@link GetEmsTypeRequest}. + * + * @param user the {@link User} + * @param request the {@link GetEmsTypeRequest} + * @return the JSON-RPC Success Response Future + * @throws OpenemsNamedException on error + */ + private CompletableFuture handleGetEmsTypeRequest(User user, GetEmsTypeRequest request) + throws OpenemsNamedException { + if (user.getRole(request.getEdgeId()).isEmpty()) { + this.parent.metadata.getEdgeMetadataForUser(user, request.getEdgeId()); + } + user.assertEdgeRoleIsAtLeast(GetEmsTypeRequest.METHOD, request.getEdgeId(), Role.GUEST); + final var emsType = this.parent.metadata.getEmsTypeForEdge(request.getEdgeId()); + + return CompletableFuture.completedFuture(new GetEmsTypeResponse(request.getId(), emsType.orElse(null))); + } + /** * Handles a {@link GetUserInformationRequest}. * diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/UiWebsocketImpl.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/UiWebsocketImpl.java index 98fe60fb108..6c63b521b4b 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/UiWebsocketImpl.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/UiWebsocketImpl.java @@ -69,7 +69,7 @@ public class UiWebsocketImpl extends AbstractOpenemsBackendComponent @Reference protected volatile TimedataManager timedataManager; - + @Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL) protected volatile SimulationEngine simulation; @@ -98,8 +98,7 @@ private void deactivate() { */ private synchronized void startServer() { if (this.server == null) { - this.server = new WebsocketServer(this, this.getName(), this.config.port(), this.config.poolSize(), - this.config.debugMode()); + this.server = new WebsocketServer(this, this.getName(), this.config.port(), this.config.poolSize()); this.server.start(); } } @@ -130,37 +129,38 @@ protected void logError(Logger log, String message) { } @Override - public void send(UUID websocketId, JsonrpcNotification notification) throws OpenemsNamedException { - var wsData = this.getWsDataForIdOrError(websocketId); - wsData.send(notification); + public boolean send(UUID websocketId, JsonrpcNotification notification) { + final WsData wsData; + try { + wsData = this.getWsDataForIdOrError(websocketId); + } catch (OpenemsNamedException e) { + return false; + } + return wsData.send(notification); } @Override - public CompletableFuture send(UUID websocketId, JsonrpcRequest request) - throws OpenemsNamedException { - var wsData = this.getWsDataForIdOrError(websocketId); + public CompletableFuture send(UUID websocketId, JsonrpcRequest request) { + WsData wsData; + try { + wsData = this.getWsDataForIdOrError(websocketId); + } catch (OpenemsNamedException e) { + return CompletableFuture.failedFuture(e); + } return wsData.send(request); } @Override - public void sendBroadcast(String edgeId, JsonrpcNotification notification) throws OpenemsNamedException { + public void sendBroadcast(String edgeId, JsonrpcNotification notification) { if (this.server == null) { return; } var wsDatas = this.getWsDatasForEdgeId(edgeId); - OpenemsNamedException exception = null; for (WsData wsData : wsDatas) { if (!wsData.isEdgeSubscribed(edgeId)) { continue; } - try { - wsData.send(notification); - } catch (OpenemsNamedException e) { - exception = e; - } - } - if (exception != null) { - throw exception; + wsData.send(notification); } } diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WebsocketServer.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WebsocketServer.java index 9f8212b9b44..321a4fc9f9d 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WebsocketServer.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WebsocketServer.java @@ -2,42 +2,34 @@ import org.java_websocket.WebSocket; import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; -import io.openems.common.jsonrpc.base.JsonrpcMessage; import io.openems.common.websocket.AbstractWebsocketServer; +import io.openems.common.websocket.OnClose; +import io.openems.common.websocket.OnOpen; public class WebsocketServer extends AbstractWebsocketServer { - private final Logger log = LoggerFactory.getLogger(WebsocketServer.class); - protected final UiWebsocketImpl parent; - private final OnOpen onOpen; private final OnRequest onRequest; private final OnNotification onNotification; private final OnError onError; - private final OnClose onClose; - public WebsocketServer(UiWebsocketImpl parent, String name, int port, int poolSize, DebugMode debugMode) { - super(name, port, poolSize, debugMode); + public WebsocketServer(UiWebsocketImpl parent, String name, int port, int poolSize) { + super(name, port, poolSize); this.parent = parent; - this.onOpen = new OnOpen(parent); this.onRequest = new OnRequest(parent); this.onNotification = new OnNotification(parent); this.onError = new OnError(parent); - this.onClose = new OnClose(parent); } @Override - protected WsData createWsData() { - return new WsData(this); + protected WsData createWsData(WebSocket ws) { + return new WsData(ws); } @Override protected OnOpen getOnOpen() { - return this.onOpen; + return OnOpen.NO_OP; } @Override @@ -57,14 +49,7 @@ protected OnError getOnError() { @Override protected OnClose getOnClose() { - return this.onClose; - } - - @Override - protected JsonrpcMessage handleNonJsonrpcMessage(WebSocket ws, String stringMessage, - OpenemsNamedException lastException) throws OpenemsNamedException { - this.log.info("UiWs. handleNonJsonrpcMessage: " + stringMessage); - throw new OpenemsException("UiWs. handleNonJsonrpcMessage", lastException); + return OnClose.NO_OP; } @Override diff --git a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WsData.java b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WsData.java index 885e71cb4d6..c60424b0d3d 100644 --- a/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WsData.java +++ b/io.openems.backend.uiwebsocket/src/io/openems/backend/uiwebsocket/impl/WsData.java @@ -9,8 +9,7 @@ import java.util.SortedSet; import java.util.UUID; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.java_websocket.WebSocket; import com.google.gson.JsonElement; @@ -19,7 +18,6 @@ import io.openems.backend.common.metadata.User; import io.openems.common.exceptions.OpenemsError; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.notification.CurrentDataNotification; import io.openems.common.jsonrpc.notification.EdgeRpcNotification; import io.openems.common.jsonrpc.request.SubscribeChannelsRequest; @@ -28,13 +26,9 @@ public class WsData extends io.openems.common.websocket.WsData { private static class SubscribedChannels { - private static final Logger LOG = LoggerFactory.getLogger(SubscribedChannels.class); - private int lastRequestCount = Integer.MIN_VALUE; private final Map> subscribedChannels = new HashMap<>(); - private Set currentDataMissingChannelValues = Collections.emptySet(); - /** * Applies a SubscribeChannelsRequest. * @@ -61,13 +55,6 @@ public Map getChannelValues(String edgeId, EdgeCache edgeCa } var result = edgeCache.getChannelValues(subscribedChannels); - if (!result.b().isEmpty()) { - if (!result.b().equals(this.currentDataMissingChannelValues)) { - LOG.info("[" + edgeId + "] Channels missing in Current-Data: [" + String.join(", ", result.b()) - + "]"); - } - this.currentDataMissingChannelValues = result.b(); - } return result.a(); } @@ -76,19 +63,16 @@ protected void dispose() { } } - private final Logger log = LoggerFactory.getLogger(WsData.class); - private final UUID id = UUID.randomUUID(); - private final WebsocketServer parent; private final SubscribedChannels subscribedChannels = new SubscribedChannels(); private Optional userId = Optional.empty(); private Optional token = Optional.empty(); private Set subscribedEdges = new HashSet<>(); - public WsData(WebsocketServer parent) { - this.parent = parent; + public WsData(WebSocket ws) { + super(ws); } /** @@ -214,16 +198,9 @@ public void sendSubscribedChannels(String edgeId, EdgeCache edgeCache) { if (values.isEmpty()) { return; } - try { - this.send(// - new EdgeRpcNotification(edgeId, // - new CurrentDataNotification(values))); - - } catch (OpenemsException e) { - // Log & stop subscribes - this.parent.logWarn(this.log, "Unable to send CurrentDataNotification: " + e.getMessage()); - this.subscribedChannels.dispose(); - } + this.send(// + new EdgeRpcNotification(edgeId, // + new CurrentDataNotification(values))); } /** diff --git a/io.openems.common/src/io/openems/common/OpenemsConstants.java b/io.openems.common/src/io/openems/common/OpenemsConstants.java index 848265f9c22..14f7bd4db52 100644 --- a/io.openems.common/src/io/openems/common/OpenemsConstants.java +++ b/io.openems.common/src/io/openems/common/OpenemsConstants.java @@ -22,7 +22,7 @@ public class OpenemsConstants { *

* This is the month of the release. */ - public static final short VERSION_MINOR = 7; + public static final short VERSION_MINOR = 8; /** * The patch version of OpenEMS. diff --git a/io.openems.common/src/io/openems/common/exceptions/OpenemsError.java b/io.openems.common/src/io/openems/common/exceptions/OpenemsError.java index 5f43f05d9b5..36b11e48cb3 100644 --- a/io.openems.common/src/io/openems/common/exceptions/OpenemsError.java +++ b/io.openems.common/src/io/openems/common/exceptions/OpenemsError.java @@ -24,6 +24,7 @@ public enum OpenemsError { COMMON_AUTHENTICATION_FAILED(1003, "Authentication failed"), // COMMON_USER_UNDEFINED(1004, "User [%s] is not defined"), // COMMON_ROLE_UNDEFINED(1005, "Access to this resource [%s] is denied. Role for User [%s] is not defined"), // + COMMON_SERVICE_NOT_AVAILABLE(1006, "This service is currently not available. Please try again later"), // /* * Edge errors. 2000-2999 */ @@ -46,6 +47,7 @@ public enum OpenemsError { JSONRPC_UNHANDLED_METHOD(4001, "Unhandled JSON-RPC method [%s]"), // JSONRPC_INVALID_MESSAGE(4002, "JSON-RPC Message is not a valid Request, Result or Notification: %s"), // JSONRPC_RESPONSE_WITHOUT_REQUEST(4003, "Got Response without Request: %s"), // + JSONRPC_SEND_FAILED(4004, "Send failed"), // /* * JSON Errors. 5000-5999 diff --git a/io.openems.common/src/io/openems/common/websocket/AbstractWebsocket.java b/io.openems.common/src/io/openems/common/websocket/AbstractWebsocket.java index 5e89a3c20d4..c76b34dd560 100644 --- a/io.openems.common/src/io/openems/common/websocket/AbstractWebsocket.java +++ b/io.openems.common/src/io/openems/common/websocket/AbstractWebsocket.java @@ -1,18 +1,30 @@ package io.openems.common.websocket; +import static io.openems.common.utils.JsonrpcUtils.simplifyJsonrpcMessage; +import static io.openems.common.utils.StringUtils.toShortString; +import static io.openems.common.websocket.WebsocketUtils.generateWsDataString; + +import org.java_websocket.WebSocket; +import org.java_websocket.exceptions.WebsocketNotConnectedException; import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.openems.common.jsonrpc.base.JsonrpcMessage; public abstract class AbstractWebsocket { + private final Logger log = LoggerFactory.getLogger(AbstractWebsocket.class); + private final String name; /** - * Creates an empty WsData object that is attached to the WebSocket as early as - * possible. - * + * Creates an empty WsData object that is attached to the given + * {@link WebSocket} as early as possible. + * + * @param ws the {@link WebSocket} * @return the typed {@link WsData} */ - protected abstract T createWsData(); + protected abstract T createWsData(WebSocket ws); /** * Callback for internal error. @@ -86,25 +98,43 @@ protected void stop() { * * @param command the {@link Runnable} */ - protected abstract void execute(Runnable command) throws Exception; + protected abstract void execute(Runnable command); /** - * Handles an internal Error asynchronously. - * - * @param t the {@link Throwable} to be handled - * @param wsDataString the toString() content of the WsData attachment of the - * WebSocket + * Sends a {@link JsonrpcMessage} to the {@link WebSocket}. Returns true if + * sending was successful, otherwise false. Also logs a warning in that case. + * + * @param ws the {@link WebSocket} + * @param message the {@link JsonrpcMessage} + * @return true if sending was successful */ - protected void handleInternalErrorAsync(Throwable t, String wsDataString) { + protected final boolean sendMessage(WebSocket ws, JsonrpcMessage message) { + if (!ws.isOpen()) { + // Catch status before to avoid throwing an expensive + // WebsocketNotConnectedException + this.sendMessageFailedLog(ws, message); + return false; + } + try { - this.execute(new OnInternalErrorHandler(this.getOnInternalError(), t, wsDataString)); + ws.send(message.toString()); + return true; - } catch (Throwable t1) { - this.handleInternalErrorSync(t, wsDataString); - this.handleInternalErrorSync(t1, wsDataString); + } catch (WebsocketNotConnectedException e) { + // Fallback for race condition if Connection was closed inbetween + this.sendMessageFailedLog(ws, message); + return false; } } + private void sendMessageFailedLog(WebSocket ws, JsonrpcMessage message) { + this.logWarn(this.log, new StringBuilder() // + .append("[").append(generateWsDataString(ws)) // + .append("] Unable to send message: Connection is closed. ") // + .append(toShortString(simplifyJsonrpcMessage(message), 100)) // + .toString()); + } + /** * Handles an internal Error synchronously. * @@ -112,8 +142,8 @@ protected void handleInternalErrorAsync(Throwable t, String wsDataString) { * @param wsDataString the toString() content of the WsData attachment of the * WebSocket */ - protected void handleInternalErrorSync(Throwable t, String wsDataString) { - this.getOnInternalError().run(t, wsDataString); + protected void handleInternalError(Throwable t, String wsDataString) { + this.getOnInternalError().accept(t, wsDataString); } /** diff --git a/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketClient.java b/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketClient.java index 79c805a69c3..23ea41409e3 100644 --- a/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketClient.java +++ b/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketClient.java @@ -6,24 +6,19 @@ import java.util.Map; import java.util.concurrent.CompletableFuture; +import org.java_websocket.WebSocket; import org.java_websocket.client.WebSocketClient; import org.java_websocket.drafts.Draft; import org.java_websocket.drafts.Draft_6455; -import org.java_websocket.exceptions.WebsocketNotConnectedException; import org.java_websocket.extensions.permessage_deflate.PerMessageDeflateExtension; import org.java_websocket.framing.CloseFrame; import org.java_websocket.handshake.ServerHandshake; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.base.JsonrpcMessage; -import io.openems.common.jsonrpc.base.JsonrpcNotification; import io.openems.common.jsonrpc.base.JsonrpcRequest; -import io.openems.common.jsonrpc.base.JsonrpcResponse; import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; -import io.openems.common.utils.StringUtils; /** * A Websocket Client implementation that automatically tries to reconnect a @@ -68,75 +63,44 @@ private void logInfo(String message) { @Override public void onOpen(ServerHandshake handshake) { - try { - var jHandshake = WebsocketUtils.handshakeToJsonObject(handshake); - AbstractWebsocketClient.this.execute(new OnOpenHandler(AbstractWebsocketClient.this, - AbstractWebsocketClient.this.ws, jHandshake)); - - } catch (Exception e) { - AbstractWebsocketClient.this.handleInternalErrorSync(e, - WebsocketUtils.getWsDataString(AbstractWebsocketClient.this.ws)); - } + AbstractWebsocketClient.this.execute(new OnOpenHandler(// + AbstractWebsocketClient.this.ws, handshake, // + AbstractWebsocketClient.this.getOnOpen(), // + AbstractWebsocketClient.this::logWarn, // + AbstractWebsocketClient.this::handleInternalError)); } @Override - public void onMessage(String stringMessage) { - final JsonrpcMessage message; - try { - message = JsonrpcMessage.from(stringMessage); - } catch (OpenemsNamedException e) { - AbstractWebsocketClient.this.handleInternalErrorAsync(e, - WebsocketUtils.getWsDataString(AbstractWebsocketClient.this.ws)); - return; - } - - try { - if (message instanceof JsonrpcRequest) { - AbstractWebsocketClient.this.execute(new OnRequestHandler(AbstractWebsocketClient.this, - AbstractWebsocketClient.this.ws, (JsonrpcRequest) message, response -> { - AbstractWebsocketClient.this.sendMessage(response); - })); - - } else if (message instanceof JsonrpcResponse) { - AbstractWebsocketClient.this.execute(new OnResponseHandler(AbstractWebsocketClient.this, - AbstractWebsocketClient.this.ws, (JsonrpcResponse) message)); - - } else if (message instanceof JsonrpcNotification) { - AbstractWebsocketClient.this.execute(new OnNotificationHandler(AbstractWebsocketClient.this, - AbstractWebsocketClient.this.ws, (JsonrpcNotification) message)); - } - - } catch (Exception e) { - AbstractWebsocketClient.this.handleInternalErrorSync(e, - WebsocketUtils.getWsDataString(AbstractWebsocketClient.this.ws)); - } + public void onMessage(String message) { + AbstractWebsocketClient.this.execute(new OnMessageHandler(// + AbstractWebsocketClient.this.ws, message, // + AbstractWebsocketClient.this.getOnRequest(), // + AbstractWebsocketClient.this.getOnNotification(), // + AbstractWebsocketClient.this::sendMessage, // + AbstractWebsocketClient.this::handleInternalError, // + AbstractWebsocketClient.this::logWarn)); } @Override public void onError(Exception ex) { - try { - AbstractWebsocketClient.this.execute( - new OnErrorHandler(AbstractWebsocketClient.this, AbstractWebsocketClient.this.ws, ex)); - - } catch (Exception e) { - AbstractWebsocketClient.this.handleInternalErrorSync(e, - WebsocketUtils.getWsDataString(AbstractWebsocketClient.this.ws)); - } + AbstractWebsocketClient.this.execute(new OnErrorHandler(// + AbstractWebsocketClient.this.ws, ex, // + AbstractWebsocketClient.this.getOnError(), // + AbstractWebsocketClient.this::handleInternalError)); } @Override public void onClose(int code, String reason, boolean remote) { - try { - AbstractWebsocketClient.this.execute(new OnCloseHandler(AbstractWebsocketClient.this, - AbstractWebsocketClient.this.ws, code, reason, remote)); - - } catch (Exception e) { - AbstractWebsocketClient.this.handleInternalErrorSync(e, - WebsocketUtils.getWsDataString(AbstractWebsocketClient.this.ws)); - } - - this.logInfo( - "Websocket [" + serverUri.toString() + "] closed. Code [" + code + "] Reason [" + reason + "]"); + AbstractWebsocketClient.this.execute(new OnCloseHandler(// + AbstractWebsocketClient.this.ws, code, reason, remote, // + AbstractWebsocketClient.this.getOnClose(), // + AbstractWebsocketClient.this::handleInternalError)); + + this.logInfo(new StringBuilder() // + .append("Websocket [").append(serverUri.toString()) // + .append("] closed. Code [").append(code) // + .append("] Reason [").append(reason).append("]") // + .toString()); AbstractWebsocketClient.this.reconnectorWorker.triggerNextRun(); } }; @@ -144,8 +108,7 @@ public void onClose(int code, String reason, boolean remote) { this.ws.setConnectionLostTimeout(100); // initialize WsData - var wsData = AbstractWebsocketClient.this.createWsData(); - wsData.setWebsocket(this.ws); + var wsData = AbstractWebsocketClient.this.createWsData(this.ws); this.ws.setAttachment(wsData); // Initialize reconnector @@ -167,7 +130,7 @@ public void start() { } /** - * Starts the websocket client; waiting till it started. + * Starts the {@link WebSocketClient}; waiting till it started. * * @throws InterruptedException on waiting error */ @@ -189,49 +152,26 @@ public void stop() { this.ws.close(CloseFrame.NORMAL, "Closing connection [" + this.getName() + "]"); } - @Override - protected OnInternalError getOnInternalError() { - return (t, wsDataString) -> { - this.logError(this.log, - "OnInternalError for " + wsDataString + ". " + t.getClass() + ": " + t.getMessage()); - t.printStackTrace(); - }; - } - /** - * Sends a {@link JsonrpcMessage}. + * Sends a {@link JsonrpcMessage} to the {@link WebSocket}. Returns true if + * sending was successful, otherwise false. Also logs a warning in that case. * * @param message the {@link JsonrpcMessage} - * @throws OpenemsException on error, e.g. if the websocket is not connected - */ - public void sendMessageOrError(JsonrpcMessage message) throws OpenemsException { - try { - this.ws.send(message.toString()); - } catch (Exception e) { - if (e instanceof WebsocketNotConnectedException) { - AbstractWebsocketClient.this.reconnectorWorker.triggerNextRun(); - } - throw new OpenemsException("Unable to send JSON-RPC message. " + e.getClass().getSimpleName() + ": " - + StringUtils.toShortString(message.toString(), 100)); - } - } - - /** - * Sends a JSON-RPC message. Returns true if sending was successful, otherwise - * false. Also logs a warning in that case. - * - * @param message the {@link JsonrpcMessage}. * @return true if sending was successful */ public boolean sendMessage(JsonrpcMessage message) { - try { - this.sendMessageOrError(message); - return true; + return this.sendMessage(this.ws, message); + } - } catch (OpenemsException e) { - this.logWarn(this.log, e.getMessage()); - return false; - } + @Override + protected OnInternalError getOnInternalError() { + return (t, wsDataString) -> { + this.logError(this.log, new StringBuilder() // + .append("OnInternalError for ").append(wsDataString).append(". ") // + .append(t.getClass()).append(": ").append(t.getMessage()) // + .toString()); + t.printStackTrace(); + }; } /** @@ -239,9 +179,8 @@ public boolean sendMessage(JsonrpcMessage message) { * * @param request the JSON-RPC Request * @return the future JSON-RPC Response - * @throws OpenemsNamedException on error */ - public CompletableFuture sendRequest(JsonrpcRequest request) throws OpenemsNamedException { + public CompletableFuture sendRequest(JsonrpcRequest request) { WsData wsData = this.ws.getAttachment(); return wsData.send(request); } diff --git a/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketServer.java b/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketServer.java index 72880facf42..64a90b1bda4 100644 --- a/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketServer.java +++ b/io.openems.common/src/io/openems/common/websocket/AbstractWebsocketServer.java @@ -1,23 +1,19 @@ package io.openems.common.websocket; +import static io.openems.common.utils.ThreadPoolUtils.shutdownAndAwaitTermination; + import java.net.BindException; import java.net.InetSocketAddress; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Function; import org.java_websocket.WebSocket; -import org.java_websocket.drafts.Draft; -import org.java_websocket.drafts.Draft_6455; -import org.java_websocket.exceptions.WebsocketNotConnectedException; -import org.java_websocket.extensions.permessage_deflate.PerMessageDeflateExtension; import org.java_websocket.handshake.ClientHandshake; import org.java_websocket.server.WebSocketServer; import org.slf4j.Logger; @@ -25,58 +21,29 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.base.JsonrpcMessage; -import io.openems.common.jsonrpc.base.JsonrpcNotification; -import io.openems.common.jsonrpc.base.JsonrpcRequest; -import io.openems.common.jsonrpc.base.JsonrpcResponse; -import io.openems.common.utils.JsonrpcUtils; -import io.openems.common.utils.StringUtils; import io.openems.common.utils.ThreadPoolUtils; public abstract class AbstractWebsocketServer extends AbstractWebsocket { - public static enum DebugMode { - OFF, SIMPLE, DETAILED; - - /** - * Is this {@link DebugMode} at least as high as the other {@link DebugMode}?. - * - * @param other the other {@link DebugMode} - * @return true if yes - */ - public boolean isAtLeast(DebugMode other) { - return this.ordinal() >= other.ordinal(); - } - } - /** * Shared {@link ExecutorService}. */ private final ThreadPoolExecutor executor; - private final ConcurrentHashMap activeTasks = new ConcurrentHashMap<>(100); - private static final Function ATOMIC_INTEGER_PROVIDER = (key) -> { - return new AtomicInteger(0); - }; - private final Logger log = LoggerFactory.getLogger(AbstractWebsocketServer.class); private final int port; private final WebSocketServer ws; - private final DebugMode debugMode; private final Collection connections = ConcurrentHashMap.newKeySet(); - private final Draft perMessageDeflateDraft = new Draft_6455(new PerMessageDeflateExtension()); /** * Construct an {@link AbstractWebsocketServer}. * - * @param name to identify this server - * @param port to listen on - * @param poolSize number of threads dedicated to handle the tasks - * @param debugMode activate a regular debug log about the state of the tasks + * @param name to identify this server + * @param port to listen on + * @param poolSize number of threads dedicated to handle the tasks */ - protected AbstractWebsocketServer(String name, int port, int poolSize, DebugMode debugMode) { + protected AbstractWebsocketServer(String name, int port, int poolSize) { super(name); this.executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(poolSize, new ThreadFactoryBuilder().setNameFormat(name + "-%d").build()); @@ -84,7 +51,7 @@ protected AbstractWebsocketServer(String name, int port, int poolSize, DebugMode this.port = port; this.ws = new WebSocketServer(new InetSocketAddress(port), /* AVAILABLE_PROCESSORS */ Runtime.getRuntime().availableProcessors(), // - /* enable perMessageDeflate */ Collections.singletonList(this.perMessageDeflateDraft), // + /* drafts, no filter */ List.of(new MyDraft6455()), // this.connections) { @Override @@ -93,83 +60,40 @@ public void onStart() { @Override public void onOpen(WebSocket ws, ClientHandshake handshake) { - try { - T wsData = AbstractWebsocketServer.this.createWsData(); - wsData.setWebsocket(ws); - ws.setAttachment(wsData); - var jHandshake = WebsocketUtils.handshakeToJsonObject(handshake); - AbstractWebsocketServer.this - .execute(new OnOpenHandler(AbstractWebsocketServer.this, ws, jHandshake)); - - } catch (Throwable t) { - AbstractWebsocketServer.this.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(ws)); - } + T wsData = AbstractWebsocketServer.this.createWsData(ws); + ws.setAttachment(wsData); + AbstractWebsocketServer.this.execute(new OnOpenHandler(// + ws, handshake, // + AbstractWebsocketServer.this.getOnOpen(), // + AbstractWebsocketServer.this::logWarn, // + AbstractWebsocketServer.this::handleInternalError)); } @Override - public void onMessage(WebSocket ws, String stringMessage) { - try { - JsonrpcMessage message; - try { - try { - message = JsonrpcMessage.from(stringMessage); - - } catch (OpenemsNamedException e) { - // handle deprecated non-JSON-RPC messages - message = AbstractWebsocketServer.this.handleNonJsonrpcMessage(ws, stringMessage, e); - } - if (message == null) { - // silently ignore 'null' - return; - } - } catch (OpenemsNamedException e) { - AbstractWebsocketServer.this.handleInternalErrorAsync(e, WebsocketUtils.getWsDataString(ws)); - return; - } - - if (message instanceof JsonrpcRequest) { - AbstractWebsocketServer.this.execute(new OnRequestHandler(AbstractWebsocketServer.this, ws, - (JsonrpcRequest) message, response -> { - AbstractWebsocketServer.this.sendMessage(ws, response); - })); - - } else if (message instanceof JsonrpcResponse) { - AbstractWebsocketServer.this.execute( - new OnResponseHandler(AbstractWebsocketServer.this, ws, (JsonrpcResponse) message)); - - } else if (message instanceof JsonrpcNotification) { - AbstractWebsocketServer.this.execute(new OnNotificationHandler(AbstractWebsocketServer.this, ws, - (JsonrpcNotification) message)); - } - - } catch (Throwable t) { - AbstractWebsocketServer.this.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(ws)); - } + public void onMessage(WebSocket ws, String message) { + AbstractWebsocketServer.this.execute(new OnMessageHandler(// + ws, message, // + AbstractWebsocketServer.this.getOnRequest(), // + AbstractWebsocketServer.this.getOnNotification(), // + AbstractWebsocketServer.this::sendMessage, // + AbstractWebsocketServer.this::handleInternalError, // + AbstractWebsocketServer.this::logWarn)); } @Override public void onError(WebSocket ws, Exception ex) { - try { - if (ws == null) { - AbstractWebsocketServer.this.handleInternalErrorAsync(ex, WebsocketUtils.getWsDataString(ws)); - } else { - AbstractWebsocketServer.this.execute(new OnErrorHandler(AbstractWebsocketServer.this, ws, ex)); - } - - } catch (Throwable t) { - AbstractWebsocketServer.this.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(ws)); - } + AbstractWebsocketServer.this.execute(new OnErrorHandler(// + ws, ex, // + AbstractWebsocketServer.this.getOnError(), // + AbstractWebsocketServer.this::handleInternalError)); } @Override public void onClose(WebSocket ws, int code, String reason, boolean remote) { - try { - AbstractWebsocketServer.this - .execute(new OnCloseHandler(AbstractWebsocketServer.this, ws, code, reason, remote)); - - } catch (Throwable t) { - AbstractWebsocketServer.this.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(ws)); - } + AbstractWebsocketServer.this.execute(new OnCloseHandler(// + ws, code, reason, remote, // + AbstractWebsocketServer.this.getOnClose(), // + AbstractWebsocketServer.this::handleInternalError)); } @Override @@ -205,12 +129,10 @@ public Collection getConnections() { return AbstractWebsocketServer.this.connections; } }; + // Allow the port to be reused. See // https://stackoverflow.com/questions/3229860/what-is-the-meaning-of-so-reuseaddr-setsockopt-option-linux this.ws.setReuseAddr(true); - - // Debug-Mode - this.debugMode = debugMode == null ? DebugMode.OFF : debugMode; } /** @@ -219,20 +141,10 @@ public Collection getConnections() { * @return the debug log string */ public String debugLog() { - var b = new StringBuilder("[monitor] ") // - .append("Connections: ").append(this.ws.getConnections().size()).append(", ") // - .append(ThreadPoolUtils.debugLog(this.executor)); // - if (this.debugMode.isAtLeast(DebugMode.DETAILED) && this.executor.getActiveCount() > 0) { - b.append(", Tasks: "); - this.activeTasks.forEach((id, count) -> { - var cnt = count.get(); - if (cnt > 0) { - b.append(id).append(':').append(cnt).append(", "); - } - }); - } - - return b.toString(); + return new StringBuilder("[monitor] ") // + .append("Connections: ").append(this.connections.size()).append(", ") // + .append(ThreadPoolUtils.debugLog(this.executor)) // + .toString(); } /** @@ -253,8 +165,10 @@ protected OnInternalError getOnInternalError() { if (t instanceof BindException) { this.logError(this.log, "Unable to Bind to port [" + this.port + "]"); } else { - this.logError(this.log, - "OnInternalError for " + wsDataString + ". " + t.getClass() + ": " + t.getMessage()); + this.logError(this.log, new StringBuilder() // + .append("OnInternalError for ").append(wsDataString).append(". ") // + .append(t.getClass()).append(": ") // + .append(t.getMessage()).toString()); } t.printStackTrace(); }; @@ -265,35 +179,12 @@ public Collection getConnections() { } /** - * Sends a message to WebSocket. - * - * @param ws the WebSocket - * @param message the JSON-RPC Message - */ - public void sendMessage(WebSocket ws, JsonrpcMessage message) { - try { - ws.send(message.toString()); - - } catch (WebsocketNotConnectedException e) { - WsData wsData = ws.getAttachment(); - - if (wsData != null) { - this.logWarn(this.log, "Connection [" + wsData.toString() + "] is closed. Unable to send message: " - + StringUtils.toShortString(JsonrpcUtils.simplifyJsonrpcMessage(message), 100)); - } else { - this.logWarn(this.log, "Connection is closed. Unable to send message: " - + StringUtils.toShortString(JsonrpcUtils.simplifyJsonrpcMessage(message), 100)); - } - } - } - - /** - * Broadcasts a message to all connected WebSockets. + * Broadcasts a {@link JsonrpcMessage} to all connected WebSockets. * - * @param message the JSON-RPC Message + * @param message the {@link JsonrpcMessage} */ public void broadcastMessage(JsonrpcMessage message) { - for (WebSocket ws : this.getConnections()) { + for (var ws : this.getConnections()) { this.sendMessage(ws, message); } } @@ -308,7 +199,7 @@ public int getPort() { } /** - * Starts the websocket server. + * Starts the {@link WebSocketServer}. */ @Override public void start() { @@ -324,37 +215,16 @@ public void start() { */ @Override protected void execute(Runnable command) { - if (this.debugMode.isAtLeast(DebugMode.DETAILED)) { - this.executor.execute(() -> { - String id = AbstractWebsocketServer.getRunnableIdentifier(command); - try { - this.activeTasks.computeIfAbsent(id, ATOMIC_INTEGER_PROVIDER).incrementAndGet(); - command.run(); - } catch (Throwable t) { - throw t; - } finally { - this.activeTasks.get(id).decrementAndGet(); - } - }); - } else { - this.executor.execute(command); - } - } - - private static final String getRunnableIdentifier(Runnable r) { - if (r instanceof OnRequestHandler) { - return ((OnRequestHandler) r).getRequestMethod(); - } - return r.getClass().getSimpleName(); + this.executor.execute(command); } /** - * Stops the websocket server. + * Stops the {@link WebSocketServer}. */ @Override public void stop() { // Shutdown executors - ThreadPoolUtils.shutdownAndAwaitTermination(this.executor, 5); + shutdownAndAwaitTermination(this.executor, 5); var tries = 3; while (tries-- > 0) { @@ -374,19 +244,4 @@ public void stop() { this.logError(this.log, "Stopping websocket server failed too often."); super.stop(); } - - /** - * Handle Non-JSON-RPC messages. - * - * @param ws the {@link WebSocket} - * @param stringMessage the message - * @param e the parse error - * @return message converted to {@link JsonrpcMessage}; or null - * @throws OpenemsNamedException if conversion is not possible - */ - protected JsonrpcMessage handleNonJsonrpcMessage(WebSocket ws, String stringMessage, OpenemsNamedException e) - throws OpenemsNamedException { - throw new OpenemsException("Unhandled Non-JSON-RPC message", e); - } - } diff --git a/io.openems.common/src/io/openems/common/websocket/ClientReconnectorWorker.java b/io.openems.common/src/io/openems/common/websocket/ClientReconnectorWorker.java index fc6f95c41a1..23fabe595e1 100644 --- a/io.openems.common/src/io/openems/common/websocket/ClientReconnectorWorker.java +++ b/io.openems.common/src/io/openems/common/websocket/ClientReconnectorWorker.java @@ -7,8 +7,9 @@ import java.util.Random; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; +import java.util.function.Function; +import org.java_websocket.WebSocket; import org.java_websocket.WebSocketImpl; import org.java_websocket.client.WebSocketClient; import org.java_websocket.drafts.Draft; @@ -90,12 +91,12 @@ protected void forever() throws Exception { * Waiting for https://github.com/TooTallNate/Java-WebSocket/pull/1251 to be * merged. * - * @param the type of the attachment - * @param ws the {@link WebSocketClient} - * @param attachmentSupplier the supplier for the new attachment + * @param the type of the attachment + * @param ws the {@link WebSocketClient} + * @param wsData {@link Function} to provide a the new attachment * @throws Exception on error */ - protected static void resetWebSocketClient(WebSocketClient ws, Supplier attachmentSupplier) + protected static void resetWebSocketClient(WebSocketClient ws, Function wsData) throws Exception { /* * Get methods and fields via Reflection @@ -168,8 +169,7 @@ protected static void resetWebSocketClient(WebSocketClient ws closeLatchField.set(ws, new CountDownLatch(1)); // this.engine = new WebSocketImpl(this, this.draft); -> to reflection final var newEngine = new WebSocketImpl(ws, draft); - final var newAttachment = attachmentSupplier.get(); - newAttachment.setWebsocket(ws); + final var newAttachment = wsData.apply(ws); newEngine.setAttachment(newAttachment); engineField.set(ws, newEngine); } diff --git a/io.openems.common/src/io/openems/common/websocket/DummyWebsocketServer.java b/io.openems.common/src/io/openems/common/websocket/DummyWebsocketServer.java index 9c32681f1d8..b815deeb71c 100644 --- a/io.openems.common/src/io/openems/common/websocket/DummyWebsocketServer.java +++ b/io.openems.common/src/io/openems/common/websocket/DummyWebsocketServer.java @@ -1,23 +1,16 @@ package io.openems.common.websocket; +import org.java_websocket.WebSocket; import org.slf4j.Logger; -import io.openems.common.exceptions.NotImplementedException; - public class DummyWebsocketServer extends AbstractWebsocketServer implements AutoCloseable { public static class Builder { - private OnOpen onOpen = (ws, handshake) -> { - }; - private OnRequest onRequest = (ws, request) -> { - throw new NotImplementedException("On-Request handler is not implemented"); - }; - private OnNotification onNotification = (ws, notification) -> { - }; - private OnError onError = (ws, ex) -> { - }; - private OnClose onClose = (ws, code, reason, remote) -> { - }; + private OnOpen onOpen = OnOpen.NO_OP; + private OnRequest onRequest = OnRequest.NO_OP; + private OnNotification onNotification = OnNotification.NO_OP; + private OnError onError = OnError.NO_OP; + private OnClose onClose = OnClose.NO_OP; private Builder() { } @@ -94,13 +87,18 @@ public static DummyWebsocketServer.Builder create() { private final DummyWebsocketServer.Builder builder; private DummyWebsocketServer(DummyWebsocketServer.Builder builder) { - super("DummyWebsocketServer", 0 /* auto-select port */, 1 /* pool size */, DebugMode.OFF); + super("DummyWebsocketServer", 0 /* auto-select port */, 1 /* pool size */); this.builder = builder; } @Override - protected WsData createWsData() { - return new DummyWsData(); + protected WsData createWsData(WebSocket ws) { + return new WsData(ws) { + @Override + public String toString() { + return "DummyWebsocketServer.WsData []"; + } + }; } @Override @@ -144,7 +142,7 @@ protected void logError(Logger log, String message) { } @Override - public void close() throws Exception { + public void close() { this.stop(); } } diff --git a/io.openems.common/src/io/openems/common/websocket/DummyWsData.java b/io.openems.common/src/io/openems/common/websocket/DummyWsData.java deleted file mode 100644 index 755b42a79d6..00000000000 --- a/io.openems.common/src/io/openems/common/websocket/DummyWsData.java +++ /dev/null @@ -1,10 +0,0 @@ -package io.openems.common.websocket; - -public class DummyWsData extends WsData { - - @Override - public String toString() { - return "DummyWsData[]"; - } - -} \ No newline at end of file diff --git a/io.openems.common/src/io/openems/common/websocket/MyDraft6455.java b/io.openems.common/src/io/openems/common/websocket/MyDraft6455.java new file mode 100644 index 00000000000..a89e41b5d39 --- /dev/null +++ b/io.openems.common/src/io/openems/common/websocket/MyDraft6455.java @@ -0,0 +1,1221 @@ +package io.openems.common.websocket; + +import java.math.BigInteger; +import java.nio.ByteBuffer; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Objects; +import java.util.TimeZone; + +import org.java_websocket.WebSocketImpl; +import org.java_websocket.drafts.Draft; +import org.java_websocket.drafts.Draft_6455; +import org.java_websocket.enums.CloseHandshakeType; +import org.java_websocket.enums.HandshakeState; +import org.java_websocket.enums.Opcode; +import org.java_websocket.enums.ReadyState; +import org.java_websocket.enums.Role; +import org.java_websocket.exceptions.InvalidDataException; +import org.java_websocket.exceptions.InvalidFrameException; +import org.java_websocket.exceptions.InvalidHandshakeException; +import org.java_websocket.exceptions.LimitExceededException; +import org.java_websocket.exceptions.NotSendableException; +import org.java_websocket.extensions.DefaultExtension; +import org.java_websocket.extensions.IExtension; +import org.java_websocket.framing.BinaryFrame; +import org.java_websocket.framing.CloseFrame; +import org.java_websocket.framing.Framedata; +import org.java_websocket.framing.FramedataImpl1; +import org.java_websocket.framing.TextFrame; +import org.java_websocket.handshake.ClientHandshake; +import org.java_websocket.handshake.ClientHandshakeBuilder; +import org.java_websocket.handshake.HandshakeBuilder; +import org.java_websocket.handshake.Handshakedata; +import org.java_websocket.handshake.ServerHandshake; +import org.java_websocket.handshake.ServerHandshakeBuilder; +import org.java_websocket.protocols.IProtocol; +import org.java_websocket.protocols.Protocol; +import org.java_websocket.util.Base64; +import org.java_websocket.util.Charsetfunctions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.primitives.Ints; + +/** + * This class is basically a copy of the class {@link Draft_6455}. The only + * difference is that it does not throw a IncompleteException internally instead + * it returns normally in those cases and checks afterwards with an "if" if the + * result is correct. + */ +public class MyDraft6455 extends Draft { + + private static class Either { + public final LEFT left; + public final RIGHT right; + + public static Either right(RIGHT right) { + return new Either(null, Objects.requireNonNull(right)); + } + + public static Either left(LEFT left) { + return new Either(Objects.requireNonNull(left), null); + } + + private Either(LEFT left, RIGHT right) { + super(); + this.left = left; + this.right = right; + } + + } + + /** + * Handshake specific field for the key. + */ + private static final String SEC_WEB_SOCKET_KEY = "Sec-WebSocket-Key"; + + /** + * Handshake specific field for the protocol. + */ + private static final String SEC_WEB_SOCKET_PROTOCOL = "Sec-WebSocket-Protocol"; + + /** + * Handshake specific field for the extension. + */ + private static final String SEC_WEB_SOCKET_EXTENSIONS = "Sec-WebSocket-Extensions"; + + /** + * Handshake specific field for the accept. + */ + private static final String SEC_WEB_SOCKET_ACCEPT = "Sec-WebSocket-Accept"; + + /** + * Handshake specific field for the upgrade. + */ + private static final String UPGRADE = "Upgrade"; + + /** + * Handshake specific field for the connection. + */ + private static final String CONNECTION = "Connection"; + + private final Logger log = LoggerFactory.getLogger(MyDraft6455.class); + + /** + * Attribute for the used extension in this draft. + */ + private IExtension negotiatedExtension = new DefaultExtension(); + + /** + * Attribute for the default extension. + */ + private IExtension defaultExtension = new DefaultExtension(); + + /** + * Attribute for all available extension in this draft. + */ + private List knownExtensions; + + /** + * Current active extension used to decode messages. + */ + private IExtension currentDecodingExtension; + + /** + * Attribute for the used protocol in this draft. + */ + private IProtocol protocol; + + /** + * Attribute for all available protocols in this draft. + */ + private List knownProtocols; + + /** + * Attribute for the current continuous frame. + */ + private Framedata currentContinuousFrame; + + /** + * Attribute for the payload of the current continuous frame. + */ + private final List byteBufferList; + + /** + * Attribute for the current incomplete frame. + */ + private ByteBuffer incompleteframe; + + /** + * Attribute for the reusable random instance. + */ + private final SecureRandom reuseableRandom = new SecureRandom(); + + /** + * Attribute for the maximum allowed size of a frame. + * + * @since 1.4.0 + */ + private int maxFrameSize; + + /** + * Constructor for the websocket protocol specified by RFC 6455 with default + * extensions. + * + * @since 1.3.5 + */ + public MyDraft6455() { + this(Collections.emptyList()); + } + + /** + * Constructor for the websocket protocol specified by RFC 6455 with custom + * extensions. + * + * @param inputExtension the extension which should be used for this draft + * @since 1.3.5 + */ + public MyDraft6455(IExtension inputExtension) { + this(Collections.singletonList(inputExtension)); + } + + /** + * Constructor for the websocket protocol specified by RFC 6455 with custom + * extensions. + * + * @param inputExtensions the extensions which should be used for this draft + * @since 1.3.5 + */ + public MyDraft6455(List inputExtensions) { + this(inputExtensions, Collections.singletonList(new Protocol(""))); + } + + /** + * Constructor for the websocket protocol specified by RFC 6455 with custom + * extensions and protocols. + * + * @param inputExtensions the extensions which should be used for this draft + * @param inputProtocols the protocols which should be used for this draft + * @since 1.3.7 + */ + public MyDraft6455(List inputExtensions, List inputProtocols) { + this(inputExtensions, inputProtocols, Integer.MAX_VALUE); + } + + /** + * Constructor for the websocket protocol specified by RFC 6455 with custom + * extensions and protocols. + * + * @param inputExtensions the extensions which should be used for this draft + * @param inputMaxFrameSize the maximum allowed size of a frame (the real + * payload size, decoded frames can be bigger) + * @since 1.4.0 + */ + public MyDraft6455(List inputExtensions, int inputMaxFrameSize) { + this(inputExtensions, Collections.singletonList(new Protocol("")), inputMaxFrameSize); + } + + /** + * Constructor for the websocket protocol specified by RFC 6455 with custom + * extensions and protocols. + * + * @param inputExtensions the extensions which should be used for this draft + * @param inputProtocols the protocols which should be used for this draft + * @param inputMaxFrameSize the maximum allowed size of a frame (the real + * payload size, decoded frames can be bigger) + * @since 1.4.0 + */ + public MyDraft6455(List inputExtensions, List inputProtocols, int inputMaxFrameSize) { + if (inputExtensions == null || inputProtocols == null || inputMaxFrameSize < 1) { + throw new IllegalArgumentException(); + } + this.knownExtensions = new ArrayList<>(inputExtensions.size()); + this.knownProtocols = new ArrayList<>(inputProtocols.size()); + boolean hasDefault = false; + this.byteBufferList = new ArrayList<>(); + for (IExtension inputExtension : inputExtensions) { + if (inputExtension.getClass().equals(DefaultExtension.class)) { + hasDefault = true; + } + } + this.knownExtensions.addAll(inputExtensions); + // We always add the DefaultExtension to implement the normal RFC 6455 + // specification + if (!hasDefault) { + this.knownExtensions.add(this.knownExtensions.size(), this.negotiatedExtension); + } + this.knownProtocols.addAll(inputProtocols); + this.maxFrameSize = inputMaxFrameSize; + this.currentDecodingExtension = null; + } + + @Override + public HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata) throws InvalidHandshakeException { + int v = readVersionFrom(handshakedata); + if (v != 13) { + this.log.trace("acceptHandshakeAsServer - Wrong websocket version."); + return HandshakeState.NOT_MATCHED; + } + HandshakeState extensionState = HandshakeState.NOT_MATCHED; + String requestedExtension = handshakedata.getFieldValue(SEC_WEB_SOCKET_EXTENSIONS); + for (IExtension knownExtension : this.knownExtensions) { + if (knownExtension.acceptProvidedExtensionAsServer(requestedExtension)) { + this.negotiatedExtension = knownExtension; + extensionState = HandshakeState.MATCHED; + this.log.trace("acceptHandshakeAsServer - Matching extension found: {}", this.negotiatedExtension); + break; + } + } + HandshakeState protocolState = this + .containsRequestedProtocol(handshakedata.getFieldValue(SEC_WEB_SOCKET_PROTOCOL)); + if (protocolState == HandshakeState.MATCHED && extensionState == HandshakeState.MATCHED) { + return HandshakeState.MATCHED; + } + this.log.trace("acceptHandshakeAsServer - No matching extension or protocol found."); + return HandshakeState.NOT_MATCHED; + } + + private static int readVersionFrom(Handshakedata handshakedata) { + String vers = handshakedata.getFieldValue("Sec-WebSocket-Version"); + final var i = Ints.tryParse(vers); + if (i != null) { + return i; + } + return -1; + } + + /** + * Check if the requested protocol is part of this draft. + * + * @param requestedProtocol the requested protocol + * @return MATCHED if it is matched, otherwise NOT_MATCHED + */ + private HandshakeState containsRequestedProtocol(String requestedProtocol) { + for (IProtocol knownProtocol : this.knownProtocols) { + if (knownProtocol.acceptProvidedProtocol(requestedProtocol)) { + this.protocol = knownProtocol; + this.log.trace("acceptHandshake - Matching protocol found: {}", this.protocol); + return HandshakeState.MATCHED; + } + } + return HandshakeState.NOT_MATCHED; + } + + @Override + public HandshakeState acceptHandshakeAsClient(ClientHandshake request, ServerHandshake response) + throws InvalidHandshakeException { + if (!basicAccept(response)) { + this.log.trace("acceptHandshakeAsClient - Missing/wrong upgrade or connection in handshake."); + return HandshakeState.NOT_MATCHED; + } + if (!request.hasFieldValue(SEC_WEB_SOCKET_KEY) || !response.hasFieldValue(SEC_WEB_SOCKET_ACCEPT)) { + this.log.trace("acceptHandshakeAsClient - Missing Sec-WebSocket-Key or Sec-WebSocket-Accept"); + return HandshakeState.NOT_MATCHED; + } + + String seckeyAnswer = response.getFieldValue(SEC_WEB_SOCKET_ACCEPT); + String seckeyChallenge = request.getFieldValue(SEC_WEB_SOCKET_KEY); + seckeyChallenge = this.generateFinalKey(seckeyChallenge); + + if (!seckeyChallenge.equals(seckeyAnswer)) { + this.log.trace("acceptHandshakeAsClient - Wrong key for Sec-WebSocket-Key."); + return HandshakeState.NOT_MATCHED; + } + HandshakeState extensionState = HandshakeState.NOT_MATCHED; + String requestedExtension = response.getFieldValue(SEC_WEB_SOCKET_EXTENSIONS); + for (IExtension knownExtension : this.knownExtensions) { + if (knownExtension.acceptProvidedExtensionAsClient(requestedExtension)) { + this.negotiatedExtension = knownExtension; + extensionState = HandshakeState.MATCHED; + this.log.trace("acceptHandshakeAsClient - Matching extension found: {}", this.negotiatedExtension); + break; + } + } + HandshakeState protocolState = this.containsRequestedProtocol(response.getFieldValue(SEC_WEB_SOCKET_PROTOCOL)); + if (protocolState == HandshakeState.MATCHED && extensionState == HandshakeState.MATCHED) { + return HandshakeState.MATCHED; + } + this.log.trace("acceptHandshakeAsClient - No matching extension or protocol found."); + return HandshakeState.NOT_MATCHED; + } + + /** + * Getter for the extension which is used by this draft. + * + * @return the extension which is used or null, if handshake is not yet done + */ + public IExtension getExtension() { + return this.negotiatedExtension; + } + + /** + * Getter for all available extensions for this draft. + * + * @return the extensions which are enabled for this draft + */ + public List getKnownExtensions() { + return this.knownExtensions; + } + + /** + * Getter for the protocol which is used by this draft. + * + * @return the protocol which is used or null, if handshake is not yet done or + * no valid protocols + * @since 1.3.7 + */ + public IProtocol getProtocol() { + return this.protocol; + } + + /** + * Getter for the maximum allowed payload size which is used by this draft. + * + * @return the size, which is allowed for the payload + * @since 1.4.0 + */ + public int getMaxFrameSize() { + return this.maxFrameSize; + } + + /** + * Getter for all available protocols for this draft. + * + * @return the protocols which are enabled for this draft + * @since 1.3.7 + */ + public List getKnownProtocols() { + return this.knownProtocols; + } + + @Override + public ClientHandshakeBuilder postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request) { + request.put(UPGRADE, "websocket"); + request.put(CONNECTION, UPGRADE); // to respond to a Connection keep alives + byte[] random = new byte[16]; + this.reuseableRandom.nextBytes(random); + request.put(SEC_WEB_SOCKET_KEY, Base64.encodeBytes(random)); + request.put("Sec-WebSocket-Version", "13");// overwriting the previous + StringBuilder requestedExtensions = new StringBuilder(); + for (IExtension knownExtension : this.knownExtensions) { + if (knownExtension.getProvidedExtensionAsClient() != null + && knownExtension.getProvidedExtensionAsClient().length() != 0) { + if (requestedExtensions.length() > 0) { + requestedExtensions.append(", "); + } + requestedExtensions.append(knownExtension.getProvidedExtensionAsClient()); + } + } + if (requestedExtensions.length() != 0) { + request.put(SEC_WEB_SOCKET_EXTENSIONS, requestedExtensions.toString()); + } + StringBuilder requestedProtocols = new StringBuilder(); + for (IProtocol knownProtocol : this.knownProtocols) { + if (knownProtocol.getProvidedProtocol().length() != 0) { + if (requestedProtocols.length() > 0) { + requestedProtocols.append(", "); + } + requestedProtocols.append(knownProtocol.getProvidedProtocol()); + } + } + if (requestedProtocols.length() != 0) { + request.put(SEC_WEB_SOCKET_PROTOCOL, requestedProtocols.toString()); + } + return request; + } + + @Override + public HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request, + ServerHandshakeBuilder response) throws InvalidHandshakeException { + response.put(UPGRADE, "websocket"); + response.put(CONNECTION, request.getFieldValue(CONNECTION)); // to respond to a Connection keep alives + String seckey = request.getFieldValue(SEC_WEB_SOCKET_KEY); + if (seckey == null || "".equals(seckey)) { + throw new InvalidHandshakeException("missing Sec-WebSocket-Key"); + } + response.put(SEC_WEB_SOCKET_ACCEPT, this.generateFinalKey(seckey)); + if (this.getExtension().getProvidedExtensionAsServer().length() != 0) { + response.put(SEC_WEB_SOCKET_EXTENSIONS, this.getExtension().getProvidedExtensionAsServer()); + } + if (this.getProtocol() != null && this.getProtocol().getProvidedProtocol().length() != 0) { + response.put(SEC_WEB_SOCKET_PROTOCOL, this.getProtocol().getProvidedProtocol()); + } + response.setHttpStatusMessage("Web Socket Protocol Handshake"); + response.put("Server", "TooTallNate Java-WebSocket"); + response.put("Date", this.getServerTime()); + return response; + } + + @Override + public Draft copyInstance() { + ArrayList newExtensions = new ArrayList<>(); + for (IExtension knownExtension : this.getKnownExtensions()) { + newExtensions.add(knownExtension.copyInstance()); + } + ArrayList newProtocols = new ArrayList<>(); + for (IProtocol knownProtocol : this.getKnownProtocols()) { + newProtocols.add(knownProtocol.copyInstance()); + } + return new MyDraft6455(newExtensions, newProtocols, this.maxFrameSize); + } + + @Override + public ByteBuffer createBinaryFrame(Framedata framedata) { + this.getExtension().encodeFrame(framedata); + if (this.log.isTraceEnabled()) { + this.log.trace("afterEnconding({}): {}", framedata.getPayloadData().remaining(), + (framedata.getPayloadData().remaining() > 1000 ? "too big to display" + : new String(framedata.getPayloadData().array()))); + } + return this.createByteBufferFromFramedata(framedata); + } + + private ByteBuffer createByteBufferFromFramedata(Framedata framedata) { + ByteBuffer mes = framedata.getPayloadData(); + boolean mask = role == Role.CLIENT; + int sizebytes = this.getSizeBytes(mes); + final var buf = ByteBuffer + .allocate(1 + (sizebytes > 1 ? sizebytes + 1 : sizebytes) + (mask ? 4 : 0) + mes.remaining()); + byte optcode = this.fromOpcode(framedata.getOpcode()); + byte one = (byte) (framedata.isFin() ? -128 : 0); + one |= optcode; + if (framedata.isRSV1()) { + one |= this.getRsvByte(1); + } + if (framedata.isRSV2()) { + one |= this.getRsvByte(2); + } + if (framedata.isRSV3()) { + one |= this.getRsvByte(3); + } + buf.put(one); + byte[] payloadlengthbytes = this.toByteArray(mes.remaining(), sizebytes); + assert (payloadlengthbytes.length == sizebytes); + + if (sizebytes == 1) { + buf.put((byte) (payloadlengthbytes[0] | this.getMaskByte(mask))); + } else if (sizebytes == 2) { + buf.put((byte) ((byte) 126 | this.getMaskByte(mask))); + buf.put(payloadlengthbytes); + } else if (sizebytes == 8) { + buf.put((byte) ((byte) 127 | this.getMaskByte(mask))); + buf.put(payloadlengthbytes); + } else { + throw new IllegalStateException("Size representation not supported/specified"); + } + if (mask) { + ByteBuffer maskkey = ByteBuffer.allocate(4); + maskkey.putInt(this.reuseableRandom.nextInt()); + buf.put(maskkey.array()); + for (int i = 0; mes.hasRemaining(); i++) { + buf.put((byte) (mes.get() ^ maskkey.get(i % 4))); + } + } else { + buf.put(mes); + // Reset the position of the bytebuffer e.g. for additional use + mes.flip(); + } + assert (buf.remaining() == 0) : buf.remaining(); + buf.flip(); + return buf; + } + + private Either translateSingleFrame(ByteBuffer buffer) throws InvalidDataException { + if (buffer == null) { + throw new IllegalArgumentException(); + } + int maxpacketsize = buffer.remaining(); + int realpacketsize = 2; + if (!this.isFrameSizeValid(maxpacketsize, realpacketsize)) { + return Either.left(realpacketsize); + } + byte b1 = buffer.get(/* 0 */); + final var fin = b1 >> 8 != 0; + final var rsv1 = (b1 & 0x40) != 0; + final var rsv2 = (b1 & 0x20) != 0; + final var rsv3 = (b1 & 0x10) != 0; + byte b2 = buffer.get(/* 1 */); + boolean mask = (b2 & -128) != 0; + int payloadlength = (byte) (b2 & ~(byte) 128); + Opcode optcode = this.toOpcode((byte) (b1 & 15)); + + if (!(payloadlength >= 0 && payloadlength <= 125)) { + Either payloadData = this.translateSingleFramePayloadLength(buffer, + optcode, payloadlength, maxpacketsize, realpacketsize); + if (payloadData.left != null) { + return Either.left(payloadData.left); + } + payloadlength = payloadData.right.getPayloadLength(); + realpacketsize = payloadData.right.getRealPackageSize(); + } + this.translateSingleFrameCheckLengthLimit(payloadlength); + realpacketsize += (mask ? 4 : 0); + realpacketsize += payloadlength; + + if (!this.isFrameSizeValid(maxpacketsize, realpacketsize)) { + return Either.left(realpacketsize); + } + + ByteBuffer payload = ByteBuffer.allocate(checkAlloc(payloadlength)); + if (mask) { + byte[] maskskey = new byte[4]; + buffer.get(maskskey); + for (int i = 0; i < payloadlength; i++) { + payload.put((byte) (buffer.get(/* payloadstart + i */) ^ maskskey[i % 4])); + } + } else { + payload.put(buffer.array(), buffer.position(), payload.limit()); + buffer.position(buffer.position() + payload.limit()); + } + + FramedataImpl1 frame = FramedataImpl1.get(optcode); + frame.setFin(fin); + frame.setRSV1(rsv1); + frame.setRSV2(rsv2); + frame.setRSV3(rsv3); + payload.flip(); + frame.setPayload(payload); + if (frame.getOpcode() != Opcode.CONTINUOUS) { + // Prioritize the negotiated extension + if (frame.isRSV1() || frame.isRSV2() || frame.isRSV3()) { + this.currentDecodingExtension = this.getExtension(); + } else { + // No encoded message, so we can use the default one + this.currentDecodingExtension = this.defaultExtension; + } + } + if (this.currentDecodingExtension == null) { + this.currentDecodingExtension = this.defaultExtension; + } + this.currentDecodingExtension.isFrameValid(frame); + this.currentDecodingExtension.decodeFrame(frame); + if (this.log.isTraceEnabled()) { + this.log.trace("afterDecoding({}): {}", frame.getPayloadData().remaining(), + (frame.getPayloadData().remaining() > 1000 ? "too big to display" + : new String(frame.getPayloadData().array()))); + } + frame.isValid(); + return Either.right(frame); + } + + /** + * Translate the buffer depending when it has an extended payload length (126 or + * 127). + * + * @param buffer the buffer to read from + * @param optcode the decoded optcode + * @param oldPayloadlength the old payload length + * @param maxpacketsize the max packet size allowed + * @param oldRealpacketsize the real packet size + * @return the new payload data containing new payload length and new packet + * size + * @throws InvalidFrameException thrown if a control frame has an invalid + * length + * @throws IncompleteException if the maxpacketsize is smaller than the + * realpackagesize + * @throws LimitExceededException if the payload length is to big + */ + private Either translateSingleFramePayloadLength(ByteBuffer buffer, + Opcode optcode, int oldPayloadlength, int maxpacketsize, int oldRealpacketsize) + throws InvalidFrameException, LimitExceededException { + int payloadlength = oldPayloadlength; + int realpacketsize = oldRealpacketsize; + if (optcode == Opcode.PING || optcode == Opcode.PONG || optcode == Opcode.CLOSING) { + this.log.trace("Invalid frame: more than 125 octets"); + throw new InvalidFrameException("more than 125 octets"); + } + if (payloadlength == 126) { + realpacketsize += 2; // additional length bytes + + if (!this.isFrameSizeValid(maxpacketsize, realpacketsize)) { + return Either.left(realpacketsize); + } + byte[] sizebytes = new byte[3]; + sizebytes[1] = buffer.get(/* 1 + 1 */); + sizebytes[2] = buffer.get(/* 1 + 2 */); + payloadlength = new BigInteger(sizebytes).intValue(); + } else { + realpacketsize += 8; // additional length bytes + + if (!this.isFrameSizeValid(maxpacketsize, realpacketsize)) { + return Either.left(realpacketsize); + } + byte[] bytes = new byte[8]; + for (int i = 0; i < 8; i++) { + bytes[i] = buffer.get(/* 1 + i */); + } + long length = new BigInteger(bytes).longValue(); + this.translateSingleFrameCheckLengthLimit(length); + payloadlength = (int) length; + } + return Either.right(new TranslatedPayloadMetaData(payloadlength, realpacketsize)); + } + + /** + * Check if the frame size exceeds the allowed limit. + * + * @param length the current payload length + * @throws LimitExceededException if the payload length is to big + */ + private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException { + if (length > Integer.MAX_VALUE) { + this.log.trace("Limit exedeed: Payloadsize is to big..."); + throw new LimitExceededException("Payloadsize is to big..."); + } + if (length > this.maxFrameSize) { + this.log.trace("Payload limit reached. Allowed: {} Current: {}", this.maxFrameSize, length); + throw new LimitExceededException("Payload limit reached.", this.maxFrameSize); + } + if (length < 0) { + this.log.trace("Limit underflow: Payloadsize is to little..."); + throw new LimitExceededException("Payloadsize is to little..."); + } + } + + private boolean isFrameSizeValid(int maxpacketsize, int realpacketsize) { + if (maxpacketsize < realpacketsize) { + this.log.trace("TranslateSingleFrameCheckPacketSize: maxpacketsize < realpacketsize"); + return false; + } + return true; + } + + /** + * Get a byte that can set RSV bits when OR(|)'d. 0 1 2 3 4 5 6 7 + * +-+-+-+-+-------+ |F|R|R|R| opcode| |I|S|S|S| (4) | |N|V|V|V| | | |1|2|3| | + * + * @param rsv Can only be {0, 1, 2, 3} + * @return byte that represents which RSV bit is set. + */ + private byte getRsvByte(int rsv) { + switch (rsv) { + case 1: // 0100 0000 + return 0x40; + case 2: // 0010 0000 + return 0x20; + case 3: // 0001 0000 + return 0x10; + default: + return 0; + } + } + + /** + * Get the mask byte if existing. + * + * @param mask is mask active or not + * @return -128 for true, 0 for false + */ + private byte getMaskByte(boolean mask) { + return mask ? (byte) -128 : 0; + } + + /** + * Get the size bytes for the byte buffer. + * + * @param mes the current buffer + * @return the size bytes + */ + private int getSizeBytes(ByteBuffer mes) { + if (mes.remaining() <= 125) { + return 1; + } else if (mes.remaining() <= 65535) { + return 2; + } + return 8; + } + + @Override + public List translateFrame(ByteBuffer buffer) throws InvalidDataException { + while (true) { + List frames = new LinkedList<>(); + Either cur; + if (this.incompleteframe != null) { + // complete an incomplete frame + buffer.mark(); + int availableNextByteCount = buffer.remaining();// The number of bytes received + int expectedNextByteCount = this.incompleteframe.remaining();// The number of bytes to complete + // the + // incomplete frame + + if (expectedNextByteCount > availableNextByteCount) { + // did not receive enough bytes to complete the frame + this.incompleteframe.put(buffer.array(), buffer.position(), availableNextByteCount); + buffer.position(buffer.position() + availableNextByteCount); + return Collections.emptyList(); + } + this.incompleteframe.put(buffer.array(), buffer.position(), expectedNextByteCount); + buffer.position(buffer.position() + expectedNextByteCount); + cur = this.translateSingleFrame((ByteBuffer) this.incompleteframe.duplicate().position(0)); + + if (cur.left != null) { + // extending as much as suggested + ByteBuffer extendedframe = ByteBuffer.allocate(checkAlloc(cur.left)); + assert (extendedframe.limit() > this.incompleteframe.limit()); + this.incompleteframe.rewind(); + extendedframe.put(this.incompleteframe); + this.incompleteframe = extendedframe; + continue; + } + frames.add(cur.right); + this.incompleteframe = null; + } + + // Read as much as possible full frames + while (buffer.hasRemaining()) { + buffer.mark(); + cur = this.translateSingleFrame(buffer); + if (cur.left != null) { + // remember the incomplete data + buffer.reset(); + this.incompleteframe = ByteBuffer.allocate(checkAlloc(cur.left)); + this.incompleteframe.put(buffer); + break; + } + frames.add(cur.right); + } + return frames; + } + } + + @Override + public List createFrames(ByteBuffer binary, boolean mask) { + BinaryFrame curframe = new BinaryFrame(); + curframe.setPayload(binary); + curframe.setTransferemasked(mask); + try { + curframe.isValid(); + } catch (InvalidDataException e) { + throw new NotSendableException(e); + } + return Collections.singletonList((Framedata) curframe); + } + + @Override + public List createFrames(String text, boolean mask) { + TextFrame curframe = new TextFrame(); + curframe.setPayload(ByteBuffer.wrap(Charsetfunctions.utf8Bytes(text))); + curframe.setTransferemasked(mask); + try { + curframe.isValid(); + } catch (InvalidDataException e) { + throw new NotSendableException(e); + } + return Collections.singletonList((Framedata) curframe); + } + + @Override + public void reset() { + this.incompleteframe = null; + if (this.negotiatedExtension != null) { + this.negotiatedExtension.reset(); + } + this.negotiatedExtension = new DefaultExtension(); + this.protocol = null; + } + + /** + * Generate a date for for the date-header. + * + * @return the server time + */ + private String getServerTime() { + Calendar calendar = Calendar.getInstance(); + SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + return dateFormat.format(calendar.getTime()); + } + + /** + * Generate a final key from a input string. + * + * @param in the input string + * @return a final key + */ + private String generateFinalKey(String in) { + String seckey = in.trim(); + String acc = seckey + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + MessageDigest sh1; + try { + sh1 = MessageDigest.getInstance("SHA1"); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException(e); + } + return Base64.encodeBytes(sh1.digest(acc.getBytes())); + } + + private byte[] toByteArray(long val, int bytecount) { + byte[] buffer = new byte[bytecount]; + int highest = 8 * bytecount - 8; + for (int i = 0; i < bytecount; i++) { + buffer[i] = (byte) (val >>> (highest - 8 * i)); + } + return buffer; + } + + private byte fromOpcode(Opcode opcode) { + if (opcode == Opcode.CONTINUOUS) { + return 0; + } else if (opcode == Opcode.TEXT) { + return 1; + } else if (opcode == Opcode.BINARY) { + return 2; + } else if (opcode == Opcode.CLOSING) { + return 8; + } else if (opcode == Opcode.PING) { + return 9; + } else if (opcode == Opcode.PONG) { + return 10; + } + throw new IllegalArgumentException("Don't know how to handle " + opcode.toString()); + } + + private Opcode toOpcode(byte opcode) throws InvalidFrameException { + switch (opcode) { + case 0: + return Opcode.CONTINUOUS; + case 1: + return Opcode.TEXT; + case 2: + return Opcode.BINARY; + // 3-7 are not yet defined + case 8: + return Opcode.CLOSING; + case 9: + return Opcode.PING; + case 10: + return Opcode.PONG; + // 11-15 are not yet defined + default: + throw new InvalidFrameException("Unknown opcode " + (short) opcode); + } + } + + @Override + public void processFrame(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException { + Opcode curop = frame.getOpcode(); + if (curop == Opcode.CLOSING) { + this.processFrameClosing(webSocketImpl, frame); + } else if (curop == Opcode.PING) { + webSocketImpl.getWebSocketListener().onWebsocketPing(webSocketImpl, frame); + } else if (curop == Opcode.PONG) { + webSocketImpl.updateLastPong(); + webSocketImpl.getWebSocketListener().onWebsocketPong(webSocketImpl, frame); + } else if (!frame.isFin() || curop == Opcode.CONTINUOUS) { + this.processFrameContinuousAndNonFin(webSocketImpl, frame, curop); + } else if (this.currentContinuousFrame != null) { + this.log.error("Protocol error: Continuous frame sequence not completed."); + throw new InvalidDataException(CloseFrame.PROTOCOL_ERROR, "Continuous frame sequence not completed."); + } else if (curop == Opcode.TEXT) { + this.processFrameText(webSocketImpl, frame); + } else if (curop == Opcode.BINARY) { + this.processFrameBinary(webSocketImpl, frame); + } else { + this.log.error("non control or continious frame expected"); + throw new InvalidDataException(CloseFrame.PROTOCOL_ERROR, "non control or continious frame expected"); + } + } + + /** + * Process the frame if it is a continuous frame or the fin bit is not set. + * + * @param webSocketImpl the websocket implementation to use + * @param frame the current frame + * @param curop the current Opcode + * @throws InvalidDataException if there is a protocol error + */ + private void processFrameContinuousAndNonFin(WebSocketImpl webSocketImpl, Framedata frame, Opcode curop) + throws InvalidDataException { + if (curop != Opcode.CONTINUOUS) { + this.processFrameIsNotFin(frame); + } else if (frame.isFin()) { + this.processFrameIsFin(webSocketImpl, frame); + } else if (this.currentContinuousFrame == null) { + this.log.error("Protocol error: Continuous frame sequence was not started."); + throw new InvalidDataException(CloseFrame.PROTOCOL_ERROR, "Continuous frame sequence was not started."); + } + // Check if the whole payload is valid utf8, when the opcode indicates a text + if (curop == Opcode.TEXT && !Charsetfunctions.isValidUTF8(frame.getPayloadData())) { + this.log.error("Protocol error: Payload is not UTF8"); + throw new InvalidDataException(CloseFrame.NO_UTF8); + } + // Checking if the current continuous frame contains a correct payload with the + // other frames combined + if (curop == Opcode.CONTINUOUS && this.currentContinuousFrame != null) { + this.addToBufferList(frame.getPayloadData()); + } + } + + /** + * Process the frame if it is a binary frame. + * + * @param webSocketImpl the websocket impl + * @param frame the frame + */ + private void processFrameBinary(WebSocketImpl webSocketImpl, Framedata frame) { + try { + webSocketImpl.getWebSocketListener().onWebsocketMessage(webSocketImpl, frame.getPayloadData()); + } catch (RuntimeException e) { + this.logRuntimeException(webSocketImpl, e); + } + } + + /** + * Log the runtime exception to the specific WebSocketImpl. + * + * @param webSocketImpl the implementation of the websocket + * @param e the runtime exception + */ + private void logRuntimeException(WebSocketImpl webSocketImpl, RuntimeException e) { + this.log.error("Runtime exception during onWebsocketMessage", e); + webSocketImpl.getWebSocketListener().onWebsocketError(webSocketImpl, e); + } + + /** + * Process the frame if it is a text frame. + * + * @param webSocketImpl the websocket impl + * @param frame the frame + */ + private void processFrameText(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException { + try { + webSocketImpl.getWebSocketListener().onWebsocketMessage(webSocketImpl, + Charsetfunctions.stringUtf8(frame.getPayloadData())); + } catch (RuntimeException e) { + this.logRuntimeException(webSocketImpl, e); + } + } + + /** + * Process the frame if it is the last frame. + * + * @param webSocketImpl the websocket impl + * @param frame the frame + * @throws InvalidDataException if there is a protocol error + */ + private void processFrameIsFin(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException { + if (this.currentContinuousFrame == null) { + this.log.trace("Protocol error: Previous continuous frame sequence not completed."); + throw new InvalidDataException(CloseFrame.PROTOCOL_ERROR, "Continuous frame sequence was not started."); + } + this.addToBufferList(frame.getPayloadData()); + this.checkBufferLimit(); + if (this.currentContinuousFrame.getOpcode() == Opcode.TEXT) { + ((FramedataImpl1) this.currentContinuousFrame).setPayload(this.getPayloadFromByteBufferList()); + ((FramedataImpl1) this.currentContinuousFrame).isValid(); + try { + webSocketImpl.getWebSocketListener().onWebsocketMessage(webSocketImpl, + Charsetfunctions.stringUtf8(this.currentContinuousFrame.getPayloadData())); + } catch (RuntimeException e) { + this.logRuntimeException(webSocketImpl, e); + } + } else if (this.currentContinuousFrame.getOpcode() == Opcode.BINARY) { + ((FramedataImpl1) this.currentContinuousFrame).setPayload(this.getPayloadFromByteBufferList()); + ((FramedataImpl1) this.currentContinuousFrame).isValid(); + try { + webSocketImpl.getWebSocketListener().onWebsocketMessage(webSocketImpl, + this.currentContinuousFrame.getPayloadData()); + } catch (RuntimeException e) { + this.logRuntimeException(webSocketImpl, e); + } + } + this.currentContinuousFrame = null; + this.clearBufferList(); + } + + /** + * Process the frame if it is not the last frame. + * + * @param frame the frame + * @throws InvalidDataException if there is a protocol error + */ + private void processFrameIsNotFin(Framedata frame) throws InvalidDataException { + if (this.currentContinuousFrame != null) { + this.log.trace("Protocol error: Previous continuous frame sequence not completed."); + throw new InvalidDataException(CloseFrame.PROTOCOL_ERROR, + "Previous continuous frame sequence not completed."); + } + this.currentContinuousFrame = frame; + this.addToBufferList(frame.getPayloadData()); + this.checkBufferLimit(); + } + + /** + * Process the frame if it is a closing frame. + * + * @param webSocketImpl the websocket impl + * @param frame the frame + */ + private void processFrameClosing(WebSocketImpl webSocketImpl, Framedata frame) { + int code = CloseFrame.NOCODE; + String reason = ""; + if (frame instanceof CloseFrame) { + CloseFrame cf = (CloseFrame) frame; + code = cf.getCloseCode(); + reason = cf.getMessage(); + } + if (webSocketImpl.getReadyState() == ReadyState.CLOSING) { + // complete the close handshake by disconnecting + webSocketImpl.closeConnection(code, reason, true); + } else { + // echo close handshake + if (this.getCloseHandshakeType() == CloseHandshakeType.TWOWAY) { + webSocketImpl.close(code, reason, true); + } else { + webSocketImpl.flushAndClose(code, reason, false); + } + } + } + + /** + * Clear the current bytebuffer list. + */ + private void clearBufferList() { + synchronized (this.byteBufferList) { + this.byteBufferList.clear(); + } + } + + /** + * Add a payload to the current bytebuffer list. + * + * @param payloadData the new payload + */ + private void addToBufferList(ByteBuffer payloadData) { + synchronized (this.byteBufferList) { + this.byteBufferList.add(payloadData); + } + } + + /** + * Check the current size of the buffer and throw an exception if the size is + * bigger than the max allowed frame size. + * + * @throws LimitExceededException if the current size is bigger than the allowed + * size + */ + private void checkBufferLimit() throws LimitExceededException { + long totalSize = this.getByteBufferListSize(); + if (totalSize > this.maxFrameSize) { + this.clearBufferList(); + this.log.trace("Payload limit reached. Allowed: {} Current: {}", this.maxFrameSize, totalSize); + throw new LimitExceededException(this.maxFrameSize); + } + } + + @Override + public CloseHandshakeType getCloseHandshakeType() { + return CloseHandshakeType.TWOWAY; + } + + @Override + public String toString() { + String result = super.toString(); + if (this.getExtension() != null) { + result += " extension: " + this.getExtension().toString(); + } + if (this.getProtocol() != null) { + result += " protocol: " + this.getProtocol().toString(); + } + result += " max frame size: " + this.maxFrameSize; + return result; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + MyDraft6455 that = (MyDraft6455) o; + + if (this.maxFrameSize != that.getMaxFrameSize()) { + return false; + } + if (this.negotiatedExtension != null ? !this.negotiatedExtension.equals(that.getExtension()) + : that.getExtension() != null) { + return false; + } + return this.protocol != null ? this.protocol.equals(that.getProtocol()) : that.getProtocol() == null; + } + + @Override + public int hashCode() { + int result = this.negotiatedExtension != null ? this.negotiatedExtension.hashCode() : 0; + result = 31 * result + (this.protocol != null ? this.protocol.hashCode() : 0); + result = 31 * result + (this.maxFrameSize ^ (this.maxFrameSize >>> 32)); + return result; + } + + /** + * Method to generate a full bytebuffer out of all the fragmented frame payload. + * + * @return a bytebuffer containing all the data + * @throws LimitExceededException will be thrown when the totalSize is bigger + * then Integer.MAX_VALUE due to not being able + * to allocate more + */ + private ByteBuffer getPayloadFromByteBufferList() throws LimitExceededException { + long totalSize = 0; + ByteBuffer resultingByteBuffer; + synchronized (this.byteBufferList) { + for (ByteBuffer buffer : this.byteBufferList) { + totalSize += buffer.limit(); + } + this.checkBufferLimit(); + resultingByteBuffer = ByteBuffer.allocate((int) totalSize); + for (ByteBuffer buffer : this.byteBufferList) { + resultingByteBuffer.put(buffer); + } + } + resultingByteBuffer.flip(); + return resultingByteBuffer; + } + + /** + * Get the current size of the resulting bytebuffer in the bytebuffer list. + * + * @return the size as long (to not get an integer overflow) + */ + private long getByteBufferListSize() { + long totalSize = 0; + synchronized (this.byteBufferList) { + for (ByteBuffer buffer : this.byteBufferList) { + totalSize += buffer.limit(); + } + } + return totalSize; + } + + private class TranslatedPayloadMetaData { + + private int payloadLength; + private int realPackageSize; + + private int getPayloadLength() { + return this.payloadLength; + } + + private int getRealPackageSize() { + return this.realPackageSize; + } + + TranslatedPayloadMetaData(int newPayloadLength, int newRealPackageSize) { + this.payloadLength = newPayloadLength; + this.realPackageSize = newRealPackageSize; + } + } + +} diff --git a/io.openems.common/src/io/openems/common/websocket/OnClose.java b/io.openems.common/src/io/openems/common/websocket/OnClose.java index 9a2c25c395a..3ded7e8db62 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnClose.java +++ b/io.openems.common/src/io/openems/common/websocket/OnClose.java @@ -2,11 +2,12 @@ import org.java_websocket.WebSocket; -import io.openems.common.exceptions.OpenemsException; - @FunctionalInterface public interface OnClose { + public static final OnClose NO_OP = (ws, code, reason, remote) -> { + }; + /** * Called after the websocket connection has been closed. * @@ -15,8 +16,7 @@ public interface OnClose { * @param reason the close reason * @param remote Returns whether or not the closing of the connection was * initiated by the remote host - * @throws OpenemsException on error */ - public void run(WebSocket ws, int code, String reason, boolean remote) throws OpenemsException; + public void accept(WebSocket ws, int code, String reason, boolean remote); } diff --git a/io.openems.common/src/io/openems/common/websocket/OnCloseHandler.java b/io.openems.common/src/io/openems/common/websocket/OnCloseHandler.java index 9254e2794d1..fcfbb97780b 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnCloseHandler.java +++ b/io.openems.common/src/io/openems/common/websocket/OnCloseHandler.java @@ -1,36 +1,42 @@ package io.openems.common.websocket; +import static io.openems.common.websocket.WebsocketUtils.generateWsDataString; + +import java.util.function.BiConsumer; + import org.java_websocket.WebSocket; public class OnCloseHandler implements Runnable { - private final AbstractWebsocket parent; private final WebSocket ws; private final int code; private final String reason; private final boolean remote; + private final OnClose onClose; + private final BiConsumer handleInternalError; - public OnCloseHandler(AbstractWebsocket parent, WebSocket ws, int code, String reason, boolean remote) { - this.parent = parent; + public OnCloseHandler(// + WebSocket ws, int code, String reason, boolean remote, OnClose onClose, // + BiConsumer handleInternalError) { this.ws = ws; this.code = code; this.reason = reason; this.remote = remote; + this.onClose = onClose; + this.handleInternalError = handleInternalError; } @Override public final void run() { try { - this.parent.getOnClose().run(this.ws, this.code, this.reason, this.remote); + this.onClose.accept(this.ws, this.code, this.reason, this.remote); - // remove websocket from WsData + // dispose WsData WsData wsData = this.ws.getAttachment(); - if (wsData != null) { - wsData.setWebsocket(null); - } + wsData.dispose(); } catch (Throwable t) { - this.parent.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(this.ws)); + this.handleInternalError.accept(t, generateWsDataString(this.ws)); } } diff --git a/io.openems.common/src/io/openems/common/websocket/OnError.java b/io.openems.common/src/io/openems/common/websocket/OnError.java index 443fdb411bf..00ffa1bb59b 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnError.java +++ b/io.openems.common/src/io/openems/common/websocket/OnError.java @@ -3,9 +3,13 @@ import org.java_websocket.WebSocket; import io.openems.common.exceptions.OpenemsException; +import io.openems.common.function.ThrowingBiConsumer; @FunctionalInterface -public interface OnError { +public interface OnError extends ThrowingBiConsumer { + + public static final OnError NO_OP = (ws, ex) -> { + }; /** * Handles a websocket error. @@ -14,6 +18,6 @@ public interface OnError { * @param ex the {@link Exception} * @throws OpenemsException on error */ - public void run(WebSocket ws, Exception ex) throws OpenemsException; + public void accept(WebSocket ws, Exception ex) throws OpenemsException; } diff --git a/io.openems.common/src/io/openems/common/websocket/OnErrorHandler.java b/io.openems.common/src/io/openems/common/websocket/OnErrorHandler.java index 450a8640c5b..96b1bcf991e 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnErrorHandler.java +++ b/io.openems.common/src/io/openems/common/websocket/OnErrorHandler.java @@ -1,26 +1,37 @@ package io.openems.common.websocket; +import static io.openems.common.websocket.WebsocketUtils.generateWsDataString; + +import java.util.function.BiConsumer; + import org.java_websocket.WebSocket; +/** + * Handler for WebSocket OnError event. + */ public class OnErrorHandler implements Runnable { - private final AbstractWebsocket parent; private final WebSocket ws; private final Exception ex; + private final OnError onError; + private final BiConsumer handleInternalError; - public OnErrorHandler(AbstractWebsocket parent, WebSocket ws, Exception ex) { - this.parent = parent; + public OnErrorHandler(// + WebSocket ws, Exception ex, OnError onError, // + BiConsumer handleInternalError) { this.ws = ws; this.ex = ex; + this.onError = onError; + this.handleInternalError = handleInternalError; } @Override public final void run() { try { - this.parent.getOnError().run(this.ws, this.ex); + this.onError.accept(this.ws, this.ex); } catch (Throwable t) { - this.parent.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(this.ws)); + this.handleInternalError.accept(t, generateWsDataString(this.ws)); } } diff --git a/io.openems.common/src/io/openems/common/websocket/OnInternalError.java b/io.openems.common/src/io/openems/common/websocket/OnInternalError.java index 28c32e10d52..cb1da961361 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnInternalError.java +++ b/io.openems.common/src/io/openems/common/websocket/OnInternalError.java @@ -1,7 +1,9 @@ package io.openems.common.websocket; +import java.util.function.BiConsumer; + @FunctionalInterface -public interface OnInternalError { +public interface OnInternalError extends BiConsumer { /** * Handles an internal error. @@ -9,6 +11,6 @@ public interface OnInternalError { * @param t the error {@link Throwable} * @param wsDataString the content from WsData.toString() */ - public void run(Throwable t, String wsDataString); + public void accept(Throwable t, String wsDataString); } diff --git a/io.openems.common/src/io/openems/common/websocket/OnInternalErrorHandler.java b/io.openems.common/src/io/openems/common/websocket/OnInternalErrorHandler.java index 68f2bf492ae..3b692c52374 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnInternalErrorHandler.java +++ b/io.openems.common/src/io/openems/common/websocket/OnInternalErrorHandler.java @@ -14,7 +14,7 @@ public OnInternalErrorHandler(OnInternalError onInternalError, Throwable t, Stri @Override public final void run() { - this.onInternalError.run(this.t, this.wsDataString); + this.onInternalError.accept(this.t, this.wsDataString); } } diff --git a/io.openems.common/src/io/openems/common/websocket/OnMessageHandler.java b/io.openems.common/src/io/openems/common/websocket/OnMessageHandler.java new file mode 100644 index 00000000000..9efe41ba425 --- /dev/null +++ b/io.openems.common/src/io/openems/common/websocket/OnMessageHandler.java @@ -0,0 +1,182 @@ +package io.openems.common.websocket; + +import static io.openems.common.exceptions.OpenemsError.JSONRPC_UNHANDLED_METHOD; +import static io.openems.common.utils.JsonrpcUtils.simplifyJsonrpcMessage; +import static io.openems.common.utils.StringUtils.toShortString; +import static io.openems.common.websocket.WebsocketUtils.generateWsDataString; +import static java.util.concurrent.TimeUnit.SECONDS; + +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeoutException; +import java.util.function.BiConsumer; +import java.util.function.BiPredicate; + +import org.java_websocket.WebSocket; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.jsonrpc.base.JsonrpcMessage; +import io.openems.common.jsonrpc.base.JsonrpcNotification; +import io.openems.common.jsonrpc.base.JsonrpcRequest; +import io.openems.common.jsonrpc.base.JsonrpcResponse; +import io.openems.common.jsonrpc.base.JsonrpcResponseError; +import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; + +/** + * Handler for WebSocket OnMessage event. + */ +public final class OnMessageHandler implements Runnable { + + private final Logger log = LoggerFactory.getLogger(OnMessageHandler.class); + private final WebSocket ws; + private final String message; + private final OnRequest onRequest; + private final OnNotification onNotification; + private final BiPredicate sendMessage; + private final BiConsumer handleInternalError; + private final BiConsumer logWarn; + + public OnMessageHandler(// + WebSocket ws, String message, // + OnRequest onRequest, // + OnNotification onNotification, // + BiPredicate sendMessage, // + BiConsumer handleInternalError, // + BiConsumer logWarn) { + this.ws = ws; + this.message = message; + this.onRequest = onRequest; + this.onNotification = onNotification; + this.sendMessage = sendMessage; + this.handleInternalError = handleInternalError; + this.logWarn = logWarn; + } + + @Override + public final void run() { + try { + var message = JsonrpcMessage.from(this.message); + + if (message instanceof JsonrpcRequest request) { + this.handleJsonrpcRequest(this.ws, request); + + } else if (message instanceof JsonrpcResponse response) { + this.handleJsonrpcResponse(this.ws, response); + + } else if (message instanceof JsonrpcNotification notification) { + this.handleJsonrpcNotification(this.ws, notification); + } + + } catch (OpenemsNamedException e) { + this.handleInternalError.accept(e, generateWsDataString(this.ws)); + return; + } + } + + /** + * Handle a {@link JsonrpcRequest}. + * + * @param ws the {@link WebSocket} + * @param request the {@link JsonrpcRequest} + */ + protected void handleJsonrpcRequest(WebSocket ws, JsonrpcRequest request) { + CompletableFuture responseFuture; + try { + responseFuture = this.onRequest.apply(ws, request); + } catch (Throwable t) { + this.handleJsonrpcRequestException(ws, request, t); + return; + } + + var timeout = request.getTimeout(); + if (timeout.isPresent() && timeout.get() > 0) { + // Apply timeout to CompleteableFuture + responseFuture.orTimeout(timeout.get(), SECONDS); + } + + // ...without timeout + responseFuture.whenComplete((r, ex) -> { + if (ex != null) { + this.handleJsonrpcRequestException(ws, request, ex); + } else if (r != null) { + this.handleJsonrpcRequestResponse(ws, r); + } else { + this.handleJsonrpcRequestException(ws, request, + new OpenemsNamedException(JSONRPC_UNHANDLED_METHOD, request.getMethod())); + } + }); + } + + private void handleJsonrpcRequestResponse(WebSocket ws, JsonrpcResponse response) { + this.sendMessage.test(ws, response); + } + + private void handleJsonrpcRequestException(WebSocket ws, JsonrpcRequest request, Throwable t) { + // Log Error + var log = new StringBuilder() // + .append("JSON-RPC Error "); // + + if (t.getMessage() != null && !t.getMessage().isBlank()) { + log // + .append("\"") // + .append(t.getMessage()) // + .append("\" "); + } + + if (!(t instanceof OpenemsNamedException)) { + log // + .append("of type ") // + .append(t.getClass().getSimpleName()) // + .append(" "); + + if (t instanceof TimeoutException) { + log // + .append("[").append(request.getTimeout().orElse(0)).append("s] "); + } + } + + log // + .append("for Request ") // + .append(toShortString(simplifyJsonrpcMessage(request), 200)); + this.logWarn.accept(this.log, log.toString()); + + // Get JSON-RPC Response Error + if (t instanceof OpenemsNamedException one) { + this.sendMessage.test(ws, new JsonrpcResponseError(request.getId(), one)); + } else { + this.sendMessage.test(ws, new JsonrpcResponseError(request.getId(), t.getMessage())); + } + } + + /** + * Handle a {@link JsonrpcResponse}. + * + * @param ws the {@link WebSocket} + * @param response the {@link JsonrpcResponse} + */ + protected void handleJsonrpcResponse(WebSocket ws, JsonrpcResponse response) { + try { + WsData wsData = this.ws.getAttachment(); + wsData.handleJsonrpcResponse(response); + + } catch (Throwable t) { + this.handleInternalError.accept(t, generateWsDataString(this.ws)); + } + } + + /** + * Handle a {@link JsonrpcNotification}. + * + * @param ws the {@link WebSocket} + * @param notification the {@link JsonrpcNotification} + */ + protected void handleJsonrpcNotification(WebSocket ws, JsonrpcNotification notification) { + try { + this.onNotification.accept(ws, notification); + + } catch (Throwable t) { + this.handleInternalError.accept(t, generateWsDataString(this.ws)); + } + } +} diff --git a/io.openems.common/src/io/openems/common/websocket/OnNotification.java b/io.openems.common/src/io/openems/common/websocket/OnNotification.java index 8634e4cac3a..6de529fbfa4 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnNotification.java +++ b/io.openems.common/src/io/openems/common/websocket/OnNotification.java @@ -3,10 +3,14 @@ import org.java_websocket.WebSocket; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.function.ThrowingBiConsumer; import io.openems.common.jsonrpc.base.JsonrpcNotification; @FunctionalInterface -public interface OnNotification { +public interface OnNotification extends ThrowingBiConsumer { + + public static final OnNotification NO_OP = (ws, notification) -> { + }; /** * Handles a JSON-RPC notification. @@ -15,6 +19,6 @@ public interface OnNotification { * @param notification the JSON-RPC Notification * @throws OpenemsNamedException on error */ - public void run(WebSocket websocket, JsonrpcNotification notification) throws OpenemsNamedException; + public void accept(WebSocket websocket, JsonrpcNotification notification) throws OpenemsNamedException; } diff --git a/io.openems.common/src/io/openems/common/websocket/OnNotificationHandler.java b/io.openems.common/src/io/openems/common/websocket/OnNotificationHandler.java deleted file mode 100644 index ec58024ff59..00000000000 --- a/io.openems.common/src/io/openems/common/websocket/OnNotificationHandler.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.openems.common.websocket; - -import org.java_websocket.WebSocket; - -import io.openems.common.jsonrpc.base.JsonrpcNotification; - -public class OnNotificationHandler implements Runnable { - - private final AbstractWebsocket parent; - private final WebSocket ws; - private final JsonrpcNotification notification; - - public OnNotificationHandler(AbstractWebsocket parent, WebSocket ws, JsonrpcNotification notification) { - this.parent = parent; - this.ws = ws; - this.notification = notification; - } - - @Override - public final void run() { - try { - this.parent.getOnNotification().run(this.ws, this.notification); - - } catch (Throwable t) { - this.parent.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(this.ws)); - } - } - -} diff --git a/io.openems.common/src/io/openems/common/websocket/OnOpen.java b/io.openems.common/src/io/openems/common/websocket/OnOpen.java index b7e0870704d..75389b64986 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnOpen.java +++ b/io.openems.common/src/io/openems/common/websocket/OnOpen.java @@ -1,21 +1,25 @@ package io.openems.common.websocket; -import org.java_websocket.WebSocket; +import java.util.function.BiFunction; -import com.google.gson.JsonObject; +import org.java_websocket.WebSocket; +import org.java_websocket.handshake.Handshakedata; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.exceptions.OpenemsError; @FunctionalInterface -public interface OnOpen { +public interface OnOpen extends BiFunction { + + public static final OnOpen NO_OP = (ws, handshakedata) -> { + return null; + }; /** * Handles OnOpen event of WebSocket. * - * @param ws the WebSocket - * @param handshake the HTTP handshake/headers - * @throws OpenemsNamedException on error + * @param ws the {@link WebSocket} + * @param handshakedata the {@link Handshakedata} with HTTP headers + * @return {@link OpenemsError} or null */ - public void run(WebSocket ws, JsonObject handshake) throws OpenemsNamedException; - -} + public OpenemsError apply(WebSocket ws, Handshakedata handshakedata); +} \ No newline at end of file diff --git a/io.openems.common/src/io/openems/common/websocket/OnOpenHandler.java b/io.openems.common/src/io/openems/common/websocket/OnOpenHandler.java index 636281e755d..a6e6389dc77 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnOpenHandler.java +++ b/io.openems.common/src/io/openems/common/websocket/OnOpenHandler.java @@ -1,37 +1,52 @@ package io.openems.common.websocket; +import static io.openems.common.websocket.WebsocketUtils.generateWsDataString; + +import java.util.function.BiConsumer; + import org.java_websocket.WebSocket; import org.java_websocket.exceptions.WebsocketNotConnectedException; +import org.java_websocket.handshake.Handshakedata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.gson.JsonObject; - -public class OnOpenHandler implements Runnable { +/** + * Handler for WebSocket OnOpen event. + */ +public final class OnOpenHandler implements Runnable { private final Logger log = LoggerFactory.getLogger(OnOpenHandler.class); - private final AbstractWebsocket parent; private final WebSocket ws; - private final JsonObject handshake; - - public OnOpenHandler(AbstractWebsocket parent, WebSocket ws, JsonObject handshake) { - this.parent = parent; + private final Handshakedata handshake; + private final OnOpen onOpen; + private final BiConsumer logWarn; + private final BiConsumer handleInternalError; + + public OnOpenHandler(// + WebSocket ws, Handshakedata handshake, OnOpen onOpen, // + BiConsumer logWarn, // + BiConsumer handleInternalError) { this.ws = ws; this.handshake = handshake; + this.onOpen = onOpen; + this.logWarn = logWarn; + this.handleInternalError = handleInternalError; } @Override public final void run() { try { - this.parent.getOnOpen().run(this.ws, this.handshake); + var error = this.onOpen.apply(this.ws, this.handshake); + if (error != null) { + this.logWarn.accept(this.log, "Error during OnOpen of " + generateWsDataString(this.ws)); + } } catch (WebsocketNotConnectedException e) { - this.parent.logWarn(this.log, - "Websocket was closed before it has been fully opened: " + WebsocketUtils.getWsDataString(this.ws)); + this.logWarn.accept(this.log, + "Websocket was closed before it has been fully opened: " + generateWsDataString(this.ws)); } catch (Throwable t) { - this.parent.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(this.ws)); + this.handleInternalError.accept(t, generateWsDataString(this.ws)); } } - -} +} \ No newline at end of file diff --git a/io.openems.common/src/io/openems/common/websocket/OnRequest.java b/io.openems.common/src/io/openems/common/websocket/OnRequest.java index 410c9bae854..5b59cd941f4 100644 --- a/io.openems.common/src/io/openems/common/websocket/OnRequest.java +++ b/io.openems.common/src/io/openems/common/websocket/OnRequest.java @@ -1,15 +1,24 @@ package io.openems.common.websocket; +import static java.util.concurrent.CompletableFuture.completedFuture; + import java.util.concurrent.CompletableFuture; import org.java_websocket.WebSocket; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.function.ThrowingBiFunction; +import io.openems.common.jsonrpc.base.GenericJsonrpcResponseSuccess; import io.openems.common.jsonrpc.base.JsonrpcRequest; import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; @FunctionalInterface -public interface OnRequest { +public interface OnRequest extends + ThrowingBiFunction, OpenemsNamedException> { + + public static final OnRequest NO_OP = (ws, request) -> { + return completedFuture(new GenericJsonrpcResponseSuccess(request.id)); + }; /** * Handle a JSON-RPC Request, receive a JSON-RPC Response via callback. @@ -19,7 +28,7 @@ public interface OnRequest { * @return the JSON-RPC Success Response Future * @throws OpenemsNamedException on error */ - public CompletableFuture run(WebSocket ws, JsonrpcRequest request) + public CompletableFuture apply(WebSocket ws, JsonrpcRequest request) throws OpenemsNamedException; } diff --git a/io.openems.common/src/io/openems/common/websocket/OnRequestHandler.java b/io.openems.common/src/io/openems/common/websocket/OnRequestHandler.java deleted file mode 100644 index 0e4cf55c695..00000000000 --- a/io.openems.common/src/io/openems/common/websocket/OnRequestHandler.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.openems.common.websocket; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.function.Consumer; - -import org.java_websocket.WebSocket; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.common.exceptions.OpenemsError; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.jsonrpc.base.JsonrpcRequest; -import io.openems.common.jsonrpc.base.JsonrpcResponse; -import io.openems.common.jsonrpc.base.JsonrpcResponseError; -import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; -import io.openems.common.utils.JsonrpcUtils; -import io.openems.common.utils.StringUtils; - -public class OnRequestHandler implements Runnable { - - private final Logger log = LoggerFactory.getLogger(OnRequestHandler.class); - - private final AbstractWebsocket parent; - private final WebSocket ws; - private final JsonrpcRequest request; - private final Consumer responseCallback; - - public OnRequestHandler(AbstractWebsocket parent, WebSocket ws, JsonrpcRequest request, - Consumer responseCallback) { - this.parent = parent; - this.ws = ws; - this.request = request; - this.responseCallback = responseCallback; - } - - @Override - public final void run() { - CompletableFuture responseFuture; - try { - responseFuture = this.parent.getOnRequest().run(this.ws, this.request); - } catch (Throwable t) { - this.handleException(t); - return; - } - - if (this.request.getTimeout().isPresent() && this.request.getTimeout().get() > 0) { - // Apply timeout to CompleteableFuture - responseFuture.orTimeout(this.request.getTimeout().get(), TimeUnit.SECONDS); - } - - // ...without timeout - responseFuture.whenComplete((r, ex) -> { - if (ex != null) { - this.handleException(ex); - } else if (r != null) { - this.handleResponse(r); - } else { - this.handleException( - new OpenemsNamedException(OpenemsError.JSONRPC_UNHANDLED_METHOD, this.request.getMethod())); - } - }); - } - - private void handleResponse(JsonrpcResponse response) { - this.responseCallback.accept(response); - } - - private void handleException(Throwable t) { - // Log Error - var log = new StringBuilder() // - .append("JSON-RPC Error "); // - - if (t.getMessage() != null && !t.getMessage().isBlank()) { - log // - .append("\"") // - .append(t.getMessage()) // - .append("\" "); - } - - if (!(t instanceof OpenemsNamedException)) { - log // - .append("of type ") // - .append(t.getClass().getSimpleName()) // - .append(" "); - - if (t instanceof TimeoutException) { - log // - .append("[").append(this.request.getTimeout().get()).append("s] "); - } - } - - log // - .append("for Request ") // - .append(StringUtils.toShortString(JsonrpcUtils.simplifyJsonrpcMessage(this.request), 200)); // - this.parent.logWarn(this.log, log.toString()); - - // Get JSON-RPC Response Error - if (t instanceof OpenemsNamedException) { - this.responseCallback.accept(new JsonrpcResponseError(this.request.getId(), (OpenemsNamedException) t)); - } else { - this.responseCallback.accept(new JsonrpcResponseError(this.request.getId(), t.getMessage())); - } - } - - // TODO REMOVE DEBUG - public String getRequestMethod() { - return this.request.getFullyQualifiedMethod(); - } -} diff --git a/io.openems.common/src/io/openems/common/websocket/OnResponseHandler.java b/io.openems.common/src/io/openems/common/websocket/OnResponseHandler.java deleted file mode 100644 index e9938030b7b..00000000000 --- a/io.openems.common/src/io/openems/common/websocket/OnResponseHandler.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.openems.common.websocket; - -import org.java_websocket.WebSocket; - -import io.openems.common.jsonrpc.base.JsonrpcResponse; - -public class OnResponseHandler implements Runnable { - - private final AbstractWebsocket parent; - private final WebSocket ws; - private final JsonrpcResponse response; - - public OnResponseHandler(AbstractWebsocket parent, WebSocket ws, JsonrpcResponse response) { - this.parent = parent; - this.ws = ws; - this.response = response; - } - - @Override - public final void run() { - try { - WsData wsData = this.ws.getAttachment(); - wsData.handleJsonrpcResponse(this.response); - - } catch (Throwable t) { - this.parent.handleInternalErrorSync(t, WebsocketUtils.getWsDataString(this.ws)); - } - } - -} diff --git a/io.openems.common/src/io/openems/common/websocket/WebsocketUtils.java b/io.openems.common/src/io/openems/common/websocket/WebsocketUtils.java index a60902b90bc..e9f51ae5b04 100644 --- a/io.openems.common/src/io/openems/common/websocket/WebsocketUtils.java +++ b/io.openems.common/src/io/openems/common/websocket/WebsocketUtils.java @@ -3,29 +3,53 @@ import org.java_websocket.WebSocket; import org.java_websocket.handshake.Handshakedata; -import com.google.gson.JsonObject; - public class WebsocketUtils { /** - * Converts a Handshake to a JsonObject. + * Gets a String value from a {@link Handshakedata}. * *

* NOTE: Per specification - * "Field names are case-insensitive". Because of this fields are converted to - * lower-case. + * "Field names are case-insensitive". * - * @param handshake the {@link Handshakedata} - * @return the converted {@link JsonObject} + * @param handshakedata the {@link Handshakedata} + * @param fieldName the name of the field + * @return the field value; or null */ - public static JsonObject handshakeToJsonObject(Handshakedata handshake) { - var j = new JsonObject(); - for (var iter = handshake.iterateHttpFields(); iter.hasNext();) { + public static String getAsString(Handshakedata handshakedata, String fieldName) { + for (var iter = handshakedata.iterateHttpFields(); iter.hasNext();) { var field = iter.next(); - j.addProperty(field.toLowerCase(), handshake.getFieldValue(field)); + if (fieldName.equalsIgnoreCase(field)) { + return handshakedata.getFieldValue(field).trim(); + } } - return j; + return null; + } + + private static final String[] REMOTE_IDENTIFICATION_HEADERS = new String[] { // + "Forwarded", "X-Forwarded-For", "X-Real-IP" }; + + /** + * Parses a identifier for the Remote from the {@link Handshakedata}. + * + *

+ * Tries to use the headers "Forwarded", "X-Forwarded-For" or "X-Real-IP". Falls + * back to `ws.getRemoteSocketAddress()`. See https://serverfault.com/a/920060 + * + * @param ws the {@link WebSocket} + * @param handshakedata the {@link Handshakedata} + * @return an identifier String + */ + public static String parseRemoteIdentifier(WebSocket ws, Handshakedata handshakedata) { + for (var key : REMOTE_IDENTIFICATION_HEADERS) { + var value = getAsString(handshakedata, key); + if (value != null) { + return value; + } + } + // fallback + return ws.getRemoteSocketAddress().toString(); } /** @@ -35,7 +59,7 @@ public static JsonObject handshakeToJsonObject(Handshakedata handshake) { * @param ws the WebSocket * @return the {@link WsData#toString()} content */ - public static String getWsDataString(WebSocket ws) { + public static String generateWsDataString(WebSocket ws) { if (ws == null) { return ""; } @@ -45,5 +69,4 @@ public static String getWsDataString(WebSocket ws) { } return wsData.toString(); } - } diff --git a/io.openems.common/src/io/openems/common/websocket/WsData.java b/io.openems.common/src/io/openems/common/websocket/WsData.java index f7a9f595ac7..b43aedad7f7 100644 --- a/io.openems.common/src/io/openems/common/websocket/WsData.java +++ b/io.openems.common/src/io/openems/common/websocket/WsData.java @@ -24,9 +24,13 @@ public abstract class WsData { /** - * Holds the Websocket. Possibly null! + * Holds the WebSocket. */ - private WebSocket websocket = null; + private final WebSocket websocket; + + protected WsData(WebSocket ws) { + this.websocket = ws; + } /** * Holds Futures for JSON-RPC Requests. @@ -39,21 +43,12 @@ public abstract class WsData { * blocked resources. */ public void dispose() { + final var e = new OpenemsException("Websocket connection closed"); // Complete all pending requests - this.requestFutures.values() - .forEach(r -> r.completeExceptionally(new OpenemsException("Websocket connection closed."))); + this.requestFutures.values().forEach(r -> r.completeExceptionally(e)); this.requestFutures.clear(); } - /** - * Sets the WebSocket. - * - * @param ws the WebSocket instance - */ - public synchronized void setWebsocket(WebSocket ws) { - this.websocket = ws; - } - /** * Gets the WebSocket. Possibly null! * @@ -68,15 +63,16 @@ public WebSocket getWebsocket() { * * @param request the JSON-RPC Request * @return a promise for a successful JSON-RPC Response - * @throws OpenemsNamedException on error */ - public CompletableFuture send(JsonrpcRequest request) throws OpenemsNamedException { + public CompletableFuture send(JsonrpcRequest request) { var future = new CompletableFuture(); var existingFuture = this.requestFutures.putIfAbsent(request.getId(), future); if (existingFuture != null) { - throw OpenemsError.JSONRPC_ID_NOT_UNIQUE.exception(request.getId()); + return CompletableFuture.failedFuture(OpenemsError.JSONRPC_ID_NOT_UNIQUE.exception(request.getId())); + } + if (!this.sendMessage(request)) { + future.completeExceptionally(OpenemsError.JSONRPC_SEND_FAILED.exception()); } - this.sendMessage(request); return future; } @@ -84,26 +80,28 @@ public CompletableFuture send(JsonrpcRequest request) th * Sends a JSON-RPC Notification to a WebSocket. * * @param notification the JSON-RPC Notification - * @throws OpenemsException on error + * @return true if sending was successful; false otherwise */ - public void send(JsonrpcNotification notification) throws OpenemsException { - this.sendMessage(notification); + public boolean send(JsonrpcNotification notification) { + return this.sendMessage(notification); } /** * Sends the JSON-RPC message. * * @param message the JSON-RPC Message - * @throws OpenemsException on error + * @return true if sending was successful; false otherwise */ - private void sendMessage(JsonrpcMessage message) throws OpenemsException { - if (this.websocket == null) { - throw new OpenemsException("There is no Websocket defined for this WsData."); + private boolean sendMessage(JsonrpcMessage message) { + if (!this.websocket.isOpen()) { + return false; } try { this.websocket.send(message.toString()); + return true; } catch (WebsocketNotConnectedException e) { - throw new OpenemsException("Websocket is not connected: " + e.getMessage()); + // handles corner cases + return false; } } diff --git a/io.openems.common/test/io/openems/common/websocket/ClientReconnectorWorkerTest.java b/io.openems.common/test/io/openems/common/websocket/ClientReconnectorWorkerTest.java index 39697e8793e..3eb4161bd07 100644 --- a/io.openems.common/test/io/openems/common/websocket/ClientReconnectorWorkerTest.java +++ b/io.openems.common/test/io/openems/common/websocket/ClientReconnectorWorkerTest.java @@ -2,6 +2,7 @@ import java.net.URI; +import org.java_websocket.WebSocket; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; @@ -10,6 +11,10 @@ public class ClientReconnectorWorkerTest { private static class MyWsData extends WsData { + public MyWsData(WebSocket ws) { + super(ws); + } + @Override public String toString() { return ""; @@ -24,8 +29,8 @@ public MyWebsocketClient(String name, URI serverUri) { } @Override - protected MyWsData createWsData() { - return new MyWsData(); + protected MyWsData createWsData(WebSocket ws) { + return new MyWsData(ws); } @Override @@ -59,9 +64,8 @@ protected OnClose getOnClose() { } @Override - protected void execute(Runnable command) throws Exception { + protected void execute(Runnable command) { // TODO Auto-generated method stub - } @Override diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index addfe0c17f4..46f4680d966 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -78,6 +78,7 @@ bnd.identity;id='io.openems.edge.controller.ess.fixstateofcharge',\ bnd.identity;id='io.openems.edge.controller.ess.gridoptimizedcharge',\ bnd.identity;id='io.openems.edge.controller.ess.hybrid.surplusfeedtogrid',\ + bnd.identity;id='io.openems.edge.controller.ess.limiter14a',\ bnd.identity;id='io.openems.edge.controller.ess.limittotaldischarge',\ bnd.identity;id='io.openems.edge.controller.ess.linearpowerband',\ bnd.identity;id='io.openems.edge.controller.ess.mindischargeperiod',\ @@ -112,7 +113,6 @@ bnd.identity;id='io.openems.edge.ess.core',\ bnd.identity;id='io.openems.edge.ess.fenecon.commercial40',\ bnd.identity;id='io.openems.edge.ess.generic',\ - bnd.identity;id='io.openems.edge.ess.mr.gridcon',\ bnd.identity;id='io.openems.edge.ess.samsung',\ bnd.identity;id='io.openems.edge.ess.sma',\ bnd.identity;id='io.openems.edge.evcs.alpitronic.hypercharger',\ @@ -196,7 +196,7 @@ bcpkix;version='[1.70.0,1.70.1)',\ bcprov;version='[1.70.0,1.70.1)',\ bcutil;version='[1.70.0,1.70.1)',\ - com.fasterxml.aalto-xml;version='[1.3.2,1.3.3)',\ + com.fasterxml.aalto-xml;version='[1.3.3,1.3.4)',\ com.fazecast.jSerialComm;version='[2.10.4,2.10.5)',\ com.ghgande.j2mod;version='[3.2.1,3.2.2)',\ com.google.gson;version='[2.11.0,2.11.1)',\ @@ -249,6 +249,7 @@ io.openems.edge.controller.ess.fixstateofcharge;version=snapshot,\ io.openems.edge.controller.ess.gridoptimizedcharge;version=snapshot,\ io.openems.edge.controller.ess.hybrid.surplusfeedtogrid;version=snapshot,\ + io.openems.edge.controller.ess.limiter14a;version=snapshot,\ io.openems.edge.controller.ess.limittotaldischarge;version=snapshot,\ io.openems.edge.controller.ess.linearpowerband;version=snapshot,\ io.openems.edge.controller.ess.mindischargeperiod;version=snapshot,\ @@ -285,7 +286,6 @@ io.openems.edge.ess.core;version=snapshot,\ io.openems.edge.ess.fenecon.commercial40;version=snapshot,\ io.openems.edge.ess.generic;version=snapshot,\ - io.openems.edge.ess.mr.gridcon;version=snapshot,\ io.openems.edge.ess.samsung;version=snapshot,\ io.openems.edge.ess.sma;version=snapshot,\ io.openems.edge.evcs.alpitronic.hypercharger;version=snapshot,\ @@ -396,19 +396,18 @@ io.reactivex.rxjava3.rxjava;version='[3.1.8,3.1.9)',\ javax.jmdns;version='[3.4.1,3.4.2)',\ javax.xml.soap-api;version='[1.4.0,1.4.1)',\ - org.apache.commons.commons-compress;version='[1.26.1,1.26.2)',\ + org.apache.commons.commons-compress;version='[1.26.2,1.26.3)',\ org.apache.commons.commons-csv;version='[1.10.0,1.10.1)',\ - org.apache.commons.commons-io;version='[2.15.1,2.15.2)',\ org.apache.commons.math3;version='[3.6.1,3.6.2)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ org.apache.felix.eventadmin;version='[1.6.4,1.6.5)',\ org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\ - org.apache.felix.http.jetty;version='[5.1.22,5.1.23)',\ + org.apache.felix.http.jetty;version='[5.1.24,5.1.25)',\ org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\ org.apache.felix.inventory;version='[2.0.0,2.0.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ org.apache.felix.scr;version='[2.2.12,2.2.13)',\ - org.apache.felix.webconsole;version='[5.0.4,5.0.5)',\ + org.apache.felix.webconsole;version='[5.0.6,5.0.7)',\ org.apache.felix.webconsole.plugins.ds;version='[2.3.0,2.3.1)',\ org.eclipse.jetty.client;version='[9.4.28,9.4.29)',\ org.eclipse.jetty.http;version='[9.4.28,9.4.29)',\ @@ -416,7 +415,7 @@ org.eclipse.jetty.util;version='[9.4.28,9.4.29)',\ org.eclipse.paho.mqttv5.client;version='[1.2.5,1.2.6)',\ org.jetbrains.kotlin.osgi-bundle;version='[2.0.0,2.0.1)',\ - org.jsoup;version='[1.17.2,1.17.3)',\ + org.jsoup;version='[1.18.1,1.18.2)',\ org.jsr-305;version='[3.0.2,3.0.3)',\ org.openmuc.jmbus;version='[3.3.0,3.3.1)',\ org.openmuc.jrxtx;version='[1.0.1,1.0.2)',\ @@ -428,4 +427,4 @@ org.owasp.encoder;version='[1.2.3,1.2.4)',\ reactive-streams;version='[1.0.4,1.0.5)',\ rrd4j;version='[3.9.0,3.9.1)',\ - stax2-api;version='[4.2.0,4.2.1)' \ No newline at end of file + stax2-api;version='[4.2.2,4.2.3)' \ No newline at end of file diff --git a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtection.java b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtection.java index 44cf766ce8b..b4e927e862d 100644 --- a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtection.java +++ b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtection.java @@ -23,6 +23,7 @@ *

  • Voltage-to-Percent characteristics based on Min- and Max-Cell-Voltage *
  • Temperature-to-Percent characteristics based on Min- and * Max-Cell-Temperature + *
  • SoC-to-Percent characteristics *
  • Linear max increase limit (e.g. 0.5 A per second) *
  • Force Charge/Discharge mode (e.g. -1 A to enforce charge/discharge) * @@ -150,6 +151,33 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId { BP_DISCHARGE_MAX_TEMPERATURE(Doc.of(OpenemsType.INTEGER) // .unit(Unit.DEGREE_CELSIUS) // .persistencePriority(PersistencePriority.MEDIUM)), // + + /** + * Charge Maximum Current limited by the state of charge. + * + *
      + *
    • Interface: BatteryProtection + *
    • Type: Integer + *
    • Unit: Ampere + *
    + */ + BP_CHARGE_MAX_SOC(Doc.of(OpenemsType.INTEGER) // + .unit(Unit.AMPERE) // + .persistencePriority(PersistencePriority.MEDIUM)), // + + /** + * Discharge Maximum Current limited by the state of charge. + * + *
      + *
    • Interface: BatteryProtection + *
    • Type: Integer + *
    • Unit: Ampere + *
    + */ + BP_DISCHARGE_MAX_SOC(Doc.of(OpenemsType.INTEGER) // + .unit(Unit.AMPERE) // + .persistencePriority(PersistencePriority.MEDIUM)), // + /** * Charge Max-Increase Current limit. * @@ -242,6 +270,7 @@ public Builder applyBatteryProtectionDefinition(BatteryProtectionDefinition def, ChargeMaxCurrentHandler.create(clockProvider, def.getInitialBmsMaxEverChargeCurrent()) // .setVoltageToPercent(def.getChargeVoltageToPercent()) // .setTemperatureToPercent(def.getChargeTemperatureToPercent()) // + .setSocToPercent(def.getChargeSocToPercent()) // .setMaxIncreasePerSecond(def.getMaxIncreaseAmperePerSecond()) // .setForceDischarge(def.getForceDischargeParams()) // .build()) // @@ -249,6 +278,7 @@ public Builder applyBatteryProtectionDefinition(BatteryProtectionDefinition def, DischargeMaxCurrentHandler.create(clockProvider, def.getInitialBmsMaxEverDischargeCurrent()) // .setVoltageToPercent(def.getDischargeVoltageToPercent()) .setTemperatureToPercent(def.getDischargeTemperatureToPercent()) // + .setSocToPercent(def.getDischargeSocToPercent()) // .setMaxIncreasePerSecond(def.getMaxIncreaseAmperePerSecond()) // .setForceCharge(def.getForceChargeParams()) // .build()) // diff --git a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtectionDefinition.java b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtectionDefinition.java index 13f38dc6dc5..759591db1ed 100644 --- a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtectionDefinition.java +++ b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/BatteryProtectionDefinition.java @@ -70,6 +70,26 @@ public interface BatteryProtectionDefinition { */ public PolyLine getDischargeTemperatureToPercent(); + /** + * Defines the SoC-to-Percent limits for Charging. + * + *

    + * SoC values are in [%], Percentage in [0,1]. + * + * @return a {@link PolyLine} + */ + public PolyLine getChargeSocToPercent(); + + /** + * Defines the SoC-to-Percent limits for Discharging. + * + *

    + * SoC values are in [%], Percentage in [0,1]. + * + * @return a {@link PolyLine} + */ + public PolyLine getDischargeSocToPercent(); + /** * Defines the parameters for Force-Discharge mode. * diff --git a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/AbstractMaxCurrentHandler.java b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/AbstractMaxCurrentHandler.java index 83c84e4d6a1..98bd99b774d 100644 --- a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/AbstractMaxCurrentHandler.java +++ b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/AbstractMaxCurrentHandler.java @@ -22,6 +22,7 @@ public abstract static class Builder> { protected PolyLine voltageToPercent = PolyLine.empty(); protected PolyLine temperatureToPercent = PolyLine.empty(); + protected PolyLine socToPercent = PolyLine.empty(); protected Double maxIncreasePerSecond = null; /** @@ -61,6 +62,17 @@ public T setTemperatureToPercent(PolyLine temperatureToPercent) { return this.self(); } + /** + * Sets the SoC-To-Percent characteristics. + * + * @param socToPercent the {@link PolyLine} + * @return a {@link Builder} + */ + public T setSocToPercent(PolyLine socToPercent) { + this.socToPercent = socToPercent; + return this.self(); + } + /** * Sets the Max-Increase-Per-Second parameter in [A]. * @@ -78,6 +90,7 @@ public T setMaxIncreasePerSecond(double maxIncreasePerSecond) { protected final ClockProvider clockProvider; protected final PolyLine voltageToPercent; protected final PolyLine temperatureToPercent; + protected final PolyLine socToPercent; protected final AbstractForceChargeDischarge forceChargeDischarge; protected int bmsMaxEverCurrent; @@ -88,12 +101,13 @@ public T setMaxIncreasePerSecond(double maxIncreasePerSecond) { protected Double lastCurrentLimit = null; protected AbstractMaxCurrentHandler(ClockProvider clockProvider, int initialBmsMaxEverCurrent, - PolyLine voltageToPercent, PolyLine temperatureToPercent, Double maxIncreasePerSecond, - AbstractForceChargeDischarge forceChargeDischarge) { + PolyLine voltageToPercent, PolyLine temperatureToPercent, PolyLine socToPercent, + Double maxIncreasePerSecond, AbstractForceChargeDischarge forceChargeDischarge) { this.clockProvider = clockProvider; this.bmsMaxEverCurrent = initialBmsMaxEverCurrent; this.voltageToPercent = voltageToPercent; this.temperatureToPercent = temperatureToPercent; + this.socToPercent = socToPercent; this.maxIncreasePerSecond = maxIncreasePerSecond; this.forceChargeDischarge = forceChargeDischarge; } @@ -158,6 +172,18 @@ protected AbstractMaxCurrentHandler(ClockProvider clockProvider, int initialBmsM */ protected abstract ChannelId getBpMaxTemperatureChannelId(); + /** + * Gets the ChannelId for Battery-Protection Limit by state of charge. + * + *

      + *
    • {@link ChannelId#BP_CHARGE_MAX_SOC} + *
    • {@link ChannelId#BP_DISCHARGE_MAX_SOC} + *
    + * + * @return the {@link ChannelId} + */ + protected abstract ChannelId getBpMaxSocChannelId(); + /** * Gets the ChannelId for Battery-Protection Limit by Force Charge/Discharge * Mode. @@ -195,6 +221,7 @@ protected AbstractMaxCurrentHandler(ClockProvider clockProvider, int initialBmsM *
  • Voltage-to-Percent characteristics for Max-Cell-Voltage *
  • Temperature-to-Percent characteristics for Min-Cell-Temperature *
  • Temperature-to-Percent characteristics for Max-Cell-Temperature + *
  • SoC-to-Percent characteristics for SoC limitations *
  • Applied max increase limit (e.g. 0.5 A per second) *
  • Force Charge/Discharge mode (e.g. -1 A to enforce charge/discharge) * @@ -208,6 +235,7 @@ public synchronized int calculateCurrentLimit(Battery battery) { var maxCellVoltage = battery.getMaxCellVoltage().get(); var minCellTemperature = battery.getMinCellTemperature().get(); var maxCellTemperature = battery.getMaxCellTemperature().get(); + var soc = battery.getSoc().get(); IntegerReadChannel bpBmsChannel = battery.channel(this.getBpBmsChannelId()); var bpBms = bpBmsChannel.value().get(); @@ -227,6 +255,8 @@ public synchronized int calculateCurrentLimit(Battery battery) { // Calculate Ampere limit for Max-Cell-Temperature final var maxCellTemperatureLimit = this .percentToAmpere(this.temperatureToPercent.getValue(maxCellTemperature)); + // Calculate Ampere limit for State of Charge + final var maxSocLimit = this.percentToAmpere(this.socToPercent.getValue(soc)); // Calculate Max Increase Ampere Limit final var maxIncreaseAmpereLimit = this.getMaxIncreaseAmpereLimit(); // Calculate Force Current @@ -244,6 +274,8 @@ public synchronized int calculateCurrentLimit(Battery battery) { .setNextValue(TypeUtils.orElse(minCellTemperatureLimit, this.bmsMaxEverCurrent)); battery.channel(this.getBpMaxTemperatureChannelId()) .setNextValue(TypeUtils.orElse(maxCellTemperatureLimit, this.bmsMaxEverCurrent)); + battery.channel(this.getBpMaxSocChannelId()) + .setNextValue(TypeUtils.orElse(maxSocLimit, this.bmsMaxEverCurrent)); battery.channel(this.getBpMaxIncreaseAmpereChannelId()) .setNextValue(TypeUtils.orElse(maxIncreaseAmpereLimit, this.bmsMaxEverCurrent)); battery.channel(this.getBpForceCurrentChannelId()) diff --git a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/ChargeMaxCurrentHandler.java b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/ChargeMaxCurrentHandler.java index 406feec4463..f7844017f0b 100644 --- a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/ChargeMaxCurrentHandler.java +++ b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/ChargeMaxCurrentHandler.java @@ -66,7 +66,7 @@ public Builder setForceDischarge(ForceDischarge.Params forceDischargeParams) { */ public ChargeMaxCurrentHandler build() { return new ChargeMaxCurrentHandler(this.clockProvider, this.initialBmsMaxEverCurrent, this.voltageToPercent, - this.temperatureToPercent, this.maxIncreasePerSecond, this.forceDischargeParams); + this.temperatureToPercent, this.socToPercent, this.maxIncreasePerSecond, this.forceDischargeParams); } @Override @@ -92,10 +92,10 @@ public static Builder create(ClockProvider clockProvider, int initialBmsMaxEverA } protected ChargeMaxCurrentHandler(ClockProvider clockProvider, int initialBmsMaxEverAllowedChargeCurrent, - PolyLine voltageToPercent, PolyLine temperatureToPercent, Double maxIncreasePerSecond, - ForceDischarge.Params forceDischargeParams) { + PolyLine voltageToPercent, PolyLine temperatureToPercent, PolyLine socToPercent, + Double maxIncreasePerSecond, ForceDischarge.Params forceDischargeParams) { super(clockProvider, initialBmsMaxEverAllowedChargeCurrent, voltageToPercent, temperatureToPercent, - maxIncreasePerSecond, ForceDischarge.from(forceDischargeParams)); + socToPercent, maxIncreasePerSecond, ForceDischarge.from(forceDischargeParams)); } @Override @@ -123,6 +123,11 @@ protected ChannelId getBpMaxTemperatureChannelId() { return BatteryProtection.ChannelId.BP_CHARGE_MAX_TEMPERATURE; } + @Override + protected ChannelId getBpMaxSocChannelId() { + return BatteryProtection.ChannelId.BP_CHARGE_MAX_SOC; + } + @Override protected ChannelId getBpMaxIncreaseAmpereChannelId() { return BatteryProtection.ChannelId.BP_CHARGE_INCREASE; @@ -132,5 +137,4 @@ protected ChannelId getBpMaxIncreaseAmpereChannelId() { protected ChannelId getBpForceCurrentChannelId() { return BatteryProtection.ChannelId.BP_FORCE_DISCHARGE; } - } diff --git a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/DischargeMaxCurrentHandler.java b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/DischargeMaxCurrentHandler.java index d3adbb24852..997f4fd6e77 100644 --- a/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/DischargeMaxCurrentHandler.java +++ b/io.openems.edge.battery.api/src/io/openems/edge/battery/protection/currenthandler/DischargeMaxCurrentHandler.java @@ -65,7 +65,7 @@ public Builder setForceCharge(ForceCharge.Params forceChargeParams) { */ public DischargeMaxCurrentHandler build() { return new DischargeMaxCurrentHandler(this.clockProvider, this.initialBmsMaxEverCurrent, - this.voltageToPercent, this.temperatureToPercent, this.maxIncreasePerSecond, + this.voltageToPercent, this.temperatureToPercent, this.socToPercent, this.maxIncreasePerSecond, ForceCharge.from(this.forceChargeParams)); } @@ -92,9 +92,9 @@ public static Builder create(ClockProvider clockProvider, int initialBmsMaxEverD } protected DischargeMaxCurrentHandler(ClockProvider clockProvider, int initialBmsMaxEverDischargeCurrent, - PolyLine voltageToPercent, PolyLine temperatureToPercent, Double maxIncreasePerSecond, - ForceCharge forceCharge) { - super(clockProvider, initialBmsMaxEverDischargeCurrent, voltageToPercent, temperatureToPercent, + PolyLine voltageToPercent, PolyLine temperatureToPercent, PolyLine socToPercent, + Double maxIncreasePerSecond, ForceCharge forceCharge) { + super(clockProvider, initialBmsMaxEverDischargeCurrent, voltageToPercent, temperatureToPercent, socToPercent, maxIncreasePerSecond, forceCharge); } @@ -123,6 +123,11 @@ protected ChannelId getBpMaxTemperatureChannelId() { return BatteryProtection.ChannelId.BP_DISCHARGE_MAX_TEMPERATURE; } + @Override + protected ChannelId getBpMaxSocChannelId() { + return BatteryProtection.ChannelId.BP_DISCHARGE_MAX_SOC; + } + @Override protected ChannelId getBpMaxIncreaseAmpereChannelId() { return BatteryProtection.ChannelId.BP_DISCHARGE_INCREASE; @@ -132,5 +137,4 @@ protected ChannelId getBpMaxIncreaseAmpereChannelId() { protected ChannelId getBpForceCurrentChannelId() { return BatteryProtection.ChannelId.BP_FORCE_CHARGE; } - } diff --git a/io.openems.edge.battery.bydcommercial/src/io/openems/edge/battery/bydcommercial/BatteryProtectionDefinitionBydC130.java b/io.openems.edge.battery.bydcommercial/src/io/openems/edge/battery/bydcommercial/BatteryProtectionDefinitionBydC130.java index 8af87ce25bc..6baf45b8ea5 100644 --- a/io.openems.edge.battery.bydcommercial/src/io/openems/edge/battery/bydcommercial/BatteryProtectionDefinitionBydC130.java +++ b/io.openems.edge.battery.bydcommercial/src/io/openems/edge/battery/bydcommercial/BatteryProtectionDefinitionBydC130.java @@ -80,4 +80,14 @@ public ForceCharge.Params getForceChargeParams() { public Double getMaxIncreaseAmperePerSecond() { return 0.1; // [A] per second } + + @Override + public PolyLine getChargeSocToPercent() { + return PolyLine.empty(); + } + + @Override + public PolyLine getDischargeSocToPercent() { + return PolyLine.empty(); + } } \ No newline at end of file diff --git a/io.openems.edge.battery.fenecon.commercial/src/io/openems/edge/battery/fenecon/commercial/BatteryProtectionDefinition.java b/io.openems.edge.battery.fenecon.commercial/src/io/openems/edge/battery/fenecon/commercial/BatteryProtectionDefinition.java index 0f6aa0daadb..78a82bdf242 100644 --- a/io.openems.edge.battery.fenecon.commercial/src/io/openems/edge/battery/fenecon/commercial/BatteryProtectionDefinition.java +++ b/io.openems.edge.battery.fenecon.commercial/src/io/openems/edge/battery/fenecon/commercial/BatteryProtectionDefinition.java @@ -82,4 +82,14 @@ public ForceCharge.Params getForceChargeParams() { public Double getMaxIncreaseAmperePerSecond() { return 0.5; // [A] per second } + + @Override + public PolyLine getChargeSocToPercent() { + return PolyLine.empty(); + } + + @Override + public PolyLine getDischargeSocToPercent() { + return PolyLine.empty(); + } } \ No newline at end of file diff --git a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHome.java b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHome.java index 9de0fccbd03..0ea7cc798ae 100644 --- a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHome.java +++ b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHome.java @@ -125,7 +125,7 @@ public static enum ChannelId implements io.openems.edge.common.channel.ChannelId .text("Rack Under Temperature Alarm")), // RACK_PRE_ALARM_CELL_VOLTAGE_DIFFERENCE(Doc.of(OpenemsType.BOOLEAN) // .accessMode(AccessMode.READ_ONLY) // - .text("Rack Cell VOltage Difference Alarm")), // + .text("Rack Cell Voltage Difference Alarm")), // RACK_PRE_ALARM_BCU_TEMP_DIFFERENCE(Doc.of(OpenemsType.BOOLEAN) // .accessMode(AccessMode.READ_ONLY) // .text("Rack BCU Temp Difference Alarm")), // @@ -167,7 +167,7 @@ public static enum ChannelId implements io.openems.edge.common.channel.ChannelId RACK_LEVEL_1_OVER_DISCHARGING_POWER(Doc.of(OpenemsType.BOOLEAN) // .accessMode(AccessMode.READ_ONLY) // .text("Rack Over Discharging warning")), // - RACK_LEVEL_2_CELL_OVER_VOLTAGE(Doc.of(Level.WARNING) // + RACK_LEVEL_2_CELL_OVER_VOLTAGE(Doc.of(Level.INFO) // .accessMode(AccessMode.READ_ONLY) // .text("Rack Cell Over Voltage Fault")), // RACK_LEVEL_2_CELL_UNDER_VOLTAGE(Doc.of(Level.WARNING) // @@ -272,7 +272,7 @@ public static enum ChannelId implements io.openems.edge.common.channel.ChannelId .text("Warning BCU 10 Position")), // // Fault BCU Position - FAULT_POSITION_BCU_1(Doc.of(Level.WARNING) // + FAULT_POSITION_BCU_1(Doc.of(Level.INFO) // .accessMode(AccessMode.READ_ONLY) // .text("Fault BCU 1 Position")), // FAULT_POSITION_BCU_2(Doc.of(Level.WARNING) // @@ -657,7 +657,8 @@ public static enum ChannelId implements io.openems.edge.common.channel.ChannelId TOWER_0_BMS_SOFTWARE_VERSION(new IntegerDoc() // .unit(Unit.NONE) // .accessMode(AccessMode.READ_ONLY) // - .text("Bms software version of first tower")), + .text("Bms software version of first tower") // + .onChannelChange(BatteryFeneconHomeImpl::updateNumberOfTowersAndModules)), BATTERY_HARDWARE_TYPE(Doc.of(BatteryFeneconHomeHardwareType.values()) // .onChannelChange(BatteryFeneconHomeImpl::updateNumberOfTowersAndModules)), diff --git a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImpl.java b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImpl.java index 51dad2bc072..c941c32eab6 100644 --- a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImpl.java +++ b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImpl.java @@ -6,7 +6,6 @@ import java.time.Instant; import java.util.List; -import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; @@ -59,6 +58,7 @@ import io.openems.edge.common.channel.ChannelId.ChannelIdImpl; import io.openems.edge.common.channel.ChannelUtils; import io.openems.edge.common.channel.Doc; +import io.openems.edge.common.channel.IntegerReadChannel; import io.openems.edge.common.channel.internal.OpenemsTypeDoc; import io.openems.edge.common.component.ComponentManager; import io.openems.edge.common.component.OpenemsComponent; @@ -494,13 +494,22 @@ protected synchronized void updateNumberOfTowersAndModules() { BatteryFeneconHome.ChannelId.TOWER_2_BMS_SOFTWARE_VERSION, // BatteryFeneconHome.ChannelId.TOWER_3_BMS_SOFTWARE_VERSION, // BatteryFeneconHome.ChannelId.TOWER_4_BMS_SOFTWARE_VERSION// - ); + ) // + .stream() // + .map(c -> { + IntegerReadChannel channel = this.channel(c); + return channel.value().get(); + }) // + .toList(); - final var numberOfTowers = this.calculateTowerNumberFromSoftwareVersion(softwareVersionlist); + final var numberOfTowers = calculateTowerNumberFromSoftwareVersion(softwareVersionlist); // Write 'TOWER_NUMBER' Debug Channel Channel numberOfTowersChannel = this.channel(BatteryFeneconHome.ChannelId.NUMBER_OF_TOWERS); numberOfTowersChannel.setNextValue(numberOfTowers); + if (numberOfTowers == null) { + return; + } final var moduleMaxVoltage = this.getBatteryHardwareType().moduleMaxVoltage; final var moduleMinVoltage = this.getBatteryHardwareType().moduleMinVoltage; @@ -521,20 +530,19 @@ protected synchronized void updateNumberOfTowersAndModules() { } } - private int calculateTowerNumberFromSoftwareVersion(List channelIdList) { - var numberOftowers = 1; - for (var channelId : channelIdList) { - if (channelId == null) { - return numberOftowers; + protected static Integer calculateTowerNumberFromSoftwareVersion(List versionList) { + var numberOfTowers = 0; + for (var version : versionList) { + if (version == null) { + return null; } - Channel channel = this.channel(channelId); - var softwareVersion = channel.value(); - if (softwareVersion.isDefined() && !Objects.equals(softwareVersion.get(), 0) - && !Objects.equals(softwareVersion.get(), 256)) { - numberOftowers++; + if (version == 0 || version == 256) { + // Ensure number of towers is never '0' if registers are not null. + return Math.max(1, numberOfTowers); } + numberOfTowers++; } - return numberOftowers; + return numberOfTowers; } private int lastNumberOfTowers = 0; @@ -638,7 +646,7 @@ private synchronized void initializeTowerModulesChannels(int numberOfTowers, int OpenemsType.BOOLEAN))), m(new BitsWordElement(towerOffset + 5, this) .bit(0, this.generateTowerChannel(tower, "LEVEL_2_CELL_OVER_VOLTAGE", - Level.WARNING)) // + Level.INFO)) // .bit(1, this.generateTowerChannel(tower, "LEVEL_2_CELL_UNDER_VOLTAGE", Level.WARNING)) // .bit(2, this.generateTowerChannel(tower, "LEVEL_2_OVER_CHARGING_CURRENT", diff --git a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection52.java b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection52.java index 23af1a9c6f5..5e834bbe2a3 100644 --- a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection52.java +++ b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection52.java @@ -40,6 +40,25 @@ public PolyLine getDischargeTemperatureToPercent() { return PolyLine.empty(); } + @Override + public PolyLine getChargeSocToPercent() { + return PolyLine.create() // + .addPoint(0, 1) // + .addPoint(Math.nextDown(95), 1) // + .addPoint(95, 1) // + .addPoint(96, 1) // + .addPoint(97, 0.625) // + .addPoint(98, 0.4) // + .addPoint(99, 0.2) // + .addPoint(100, 0.05) // + .build(); + } + + @Override + public PolyLine getDischargeSocToPercent() { + return PolyLine.empty(); + } + @Override public ForceDischarge.Params getForceDischargeParams() { return new ForceDischarge.Params(3550, 3490, 3450); diff --git a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection64.java b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection64.java index a6bacc3659a..bbad1e67bde 100644 --- a/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection64.java +++ b/io.openems.edge.battery.fenecon.home/src/io/openems/edge/battery/fenecon/home/FeneconHomeBatteryProtection64.java @@ -50,6 +50,24 @@ public PolyLine getDischargeTemperatureToPercent() { return PolyLine.empty(); } + @Override + public PolyLine getChargeSocToPercent() { + return PolyLine.create() // + .addPoint(0, 1) // + .addPoint(Math.nextDown(96), 1) // + .addPoint(96, 0.8) // + .addPoint(97, 0.6) // + .addPoint(98, 0.4) // + .addPoint(99, 0.2) // + .addPoint(100, 0.08) // + .build(); + } + + @Override + public PolyLine getDischargeSocToPercent() { + return PolyLine.empty(); + } + @Override public ForceDischarge.Params getForceDischargeParams() { return new ForceDischarge.Params(3600, 3540, 3450); @@ -64,5 +82,4 @@ public ForceCharge.Params getForceChargeParams() { public Double getMaxIncreaseAmperePerSecond() { return 0.1; // [A] per second } - } diff --git a/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImplTest.java b/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImplTest.java index 9327aaa91cc..432eccdcb6e 100644 --- a/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImplTest.java +++ b/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/BatteryFeneconHomeImplTest.java @@ -51,6 +51,23 @@ public class BatteryFeneconHomeImplTest { private static final ChannelAddress CURRENT = new ChannelAddress(BATTERY_ID, Battery.ChannelId.CURRENT.id()); private static final ChannelAddress MIN_CELL_VOLTAGE = new ChannelAddress(BATTERY_ID, Battery.ChannelId.MIN_CELL_VOLTAGE.id()); + private static final ChannelAddress TOWER_0_BMS_SOFTWARE_VERSION = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.TOWER_0_BMS_SOFTWARE_VERSION.id()); + private static final ChannelAddress TOWER_1_BMS_SOFTWARE_VERSION = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.TOWER_1_BMS_SOFTWARE_VERSION.id()); + private static final ChannelAddress TOWER_2_BMS_SOFTWARE_VERSION = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.TOWER_2_BMS_SOFTWARE_VERSION.id()); + private static final ChannelAddress TOWER_3_BMS_SOFTWARE_VERSION = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.TOWER_3_BMS_SOFTWARE_VERSION.id()); + private static final ChannelAddress TOWER_4_BMS_SOFTWARE_VERSION = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.TOWER_4_BMS_SOFTWARE_VERSION.id()); + private static final ChannelAddress NUMBER_OF_TOWERS = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.NUMBER_OF_TOWERS.id()); + private static final ChannelAddress NUMBER_OF_MODULES_PER_TOWER = new ChannelAddress(BATTERY_ID, + BatteryFeneconHome.ChannelId.NUMBER_OF_MODULES_PER_TOWER.id()); + private static final ChannelAddress BP_CHARGE_MAX_SOC = new ChannelAddress(BATTERY_ID, + BatteryProtection.ChannelId.BP_CHARGE_MAX_SOC.id()); + private static final ChannelAddress SOC = new ChannelAddress(BATTERY_ID, Battery.ChannelId.SOC.id()); private static final ChannelAddress BATTERY_RELAY = new ChannelAddress(IO_ID, "InputOutput4"); @@ -496,4 +513,158 @@ public void testMinVoltageCharging() throws Exception { .output(LOW_MIN_VOLTAGE_FAULT_BATTERY_STOPPED, false) // ); } + + @Test + public void testNumberOfTowers() throws Exception { + final var clock = new TimeLeapClock(Instant.parse("2020-01-01T01:00:00.00Z"), ZoneOffset.UTC); + var sut = new BatteryFeneconHomeImpl(); + new ComponentTest(sut) // + .addReference("cm", new DummyConfigurationAdmin()) // + .addReference("componentManager", new DummyComponentManager(clock)) // + .addReference("setModbus", new DummyModbusBridge(MODBUS_ID)) // + .addComponent(new DummyInputOutput(IO_ID)) // + .activate(MyConfig.create() // + .setId(BATTERY_ID) // + .setModbusId(MODBUS_ID) // + .setModbusUnitId(0) // + .setStartStop(StartStopConfig.START) // + .setBatteryStartUpRelay("io0/InputOutput4")// + .build())// + + .next(new TestCase() // + .input(BATTERY_RELAY, false) // + .input(BMS_CONTROL, true) // Switched On + .output(STATE_MACHINE, StateMachine.State.UNDEFINED))// + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-Undefined")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING)) // + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-StartUpRelayOff")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING))// + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-RetryModbusCommunication")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING))// + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-WaitForBmsControl")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING)) // + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-WaitForModbusCommunication")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING)) // + .next(new TestCase() // + .output(STATE_MACHINE, StateMachine.State.RUNNING)) + .next(new TestCase() // + .output(NUMBER_OF_TOWERS, null)) + .next(new TestCase() // + .input(NUMBER_OF_MODULES_PER_TOWER, 7) // + .input(TOWER_0_BMS_SOFTWARE_VERSION, 262) // + .input(TOWER_1_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_2_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_3_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_4_BMS_SOFTWARE_VERSION, 256) // + .output(NUMBER_OF_TOWERS, 1)) // + .next(new TestCase() // + .input(TOWER_0_BMS_SOFTWARE_VERSION, 262) // + .input(TOWER_1_BMS_SOFTWARE_VERSION, null) // + .input(TOWER_2_BMS_SOFTWARE_VERSION, null) // + .input(TOWER_3_BMS_SOFTWARE_VERSION, null) // + .input(TOWER_4_BMS_SOFTWARE_VERSION, null) // + .output(NUMBER_OF_TOWERS, null)) // + .next(new TestCase() // + .input(TOWER_0_BMS_SOFTWARE_VERSION, 262) // + .input(TOWER_1_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_2_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_3_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_4_BMS_SOFTWARE_VERSION, 256) // + .output(NUMBER_OF_TOWERS, 1)) // + .next(new TestCase() // + .output(NUMBER_OF_TOWERS, 1)) // + .next(new TestCase() // + .input(NUMBER_OF_TOWERS, null) // + .input(NUMBER_OF_MODULES_PER_TOWER, 7) // + .output(NUMBER_OF_TOWERS, null)) // + .next(new TestCase() // + .input(TOWER_0_BMS_SOFTWARE_VERSION, null) // + .input(TOWER_1_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_2_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_3_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_4_BMS_SOFTWARE_VERSION, 256) // + .output(NUMBER_OF_TOWERS, null)) // + .next(new TestCase() // Number of towers changes after TOWER_0_BMS_SOFTWARE_VERSION is set + .input(TOWER_0_BMS_SOFTWARE_VERSION, 262) // + .input(TOWER_1_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_2_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_3_BMS_SOFTWARE_VERSION, 0) // + .input(TOWER_4_BMS_SOFTWARE_VERSION, 256) // + .output(NUMBER_OF_TOWERS, 1)) // + ; + } + + /** + * Battery charge power limited by the {@link FeneconHomeBatteryProtection52}. + * + * @throws Exception on error + */ + @Test + public void testBatteryProtectionSocLimitations() throws Exception { + var sut = new BatteryFeneconHomeImpl(); + new ComponentTest(sut) // + .addReference("cm", new DummyConfigurationAdmin()) // + .addReference("componentManager", new DummyComponentManager()) // + .addReference("setModbus", new DummyModbusBridge(MODBUS_ID)) // + .addComponent(new DummyInputOutput(IO_ID))// + .activate(MyConfig.create() // + .setId(BATTERY_ID) // + .setModbusId(MODBUS_ID) // + .setModbusUnitId(0) // + .setStartStop(StartStopConfig.START) // + .setBatteryStartUpRelay("io0/InputOutput4")// + .build()) // + + .next(new TestCase() // + .input(BATTERY_RELAY, false) // + .input(BMS_CONTROL, true) // Switched On + .output(STATE_MACHINE, StateMachine.State.UNDEFINED))// + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-Undefined")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING)) // + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-StartUpRelayOff")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING))// + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-RetryModbusCommunication")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING))// + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-WaitForBmsControl")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING)) // + .next(new TestCase() // + .onBeforeProcessImage(assertLog(sut, "GoRunning-WaitForModbusCommunication")) // + .output(STATE_MACHINE, StateMachine.State.GO_RUNNING)) // + .next(new TestCase() // + .output(STATE_MACHINE, StateMachine.State.RUNNING)) // + .next(new TestCase() // + .output(BP_CHARGE_MAX_SOC, 40)) // + + .next(new TestCase() // + .input(SOC, 97) // + .output(SOC, 97)) // + .next(new TestCase() // + .output(BP_CHARGE_MAX_SOC, (int) Math.round(40 * 0.625))) // + .next(new TestCase() // + .input(SOC, 98)) // + .next(new TestCase() // + .output(BP_CHARGE_MAX_SOC, (int) Math.round(40 * 0.4))) // + .next(new TestCase() // + .input(SOC, 99)) // + .next(new TestCase() // + .output(BP_CHARGE_MAX_SOC, (int) Math.round(40 * 0.2))) // + .next(new TestCase() // + .input(SOC, 100)) // + .next(new TestCase() // + .output(BP_CHARGE_MAX_SOC, (int) Math.round(40 * 0.05))) // + .next(new TestCase() // + .input(SOC, 99)) // + .next(new TestCase() // + .output(BP_CHARGE_MAX_SOC, (int) Math.round(40 * 0.2)) // + ); + } } diff --git a/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/TestStatic.java b/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/TestStatic.java index 3c8d218c3f4..820440a8a49 100644 --- a/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/TestStatic.java +++ b/io.openems.edge.battery.fenecon.home/test/io/openems/edge/battery/fenecon/home/TestStatic.java @@ -1,6 +1,10 @@ package io.openems.edge.battery.fenecon.home; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import java.util.Arrays; +import java.util.List; import org.junit.Test; @@ -21,4 +25,48 @@ public void testGetMinVoltageSubState() { BatteryFeneconHomeImpl.getMinVoltageSubState(2800, Integer.MAX_VALUE, 0)); assertEquals(MinVoltageSubState.ABOVE_LIMIT, BatteryFeneconHomeImpl.getMinVoltageSubState(2800, 2900, 1000)); } + + @Test + public void testCalculateTowerNumberFromSoftwareVersion() { + + List nullList = Arrays.asList(1, null, null, null, null); + + assertNull(BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(nullList)); + + assertNull(BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, null, null, null, null))); + + assertNull(BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(null, null, null, null, 1))); + + assertNull(BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, null, 0, null, null))); + + assertNull(BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(null, 1, 0, null, null))); + + // End-Condition met + assertEquals(1, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, 0, null, null, null))); + + assertEquals(1, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, 256, null, null, null))); + + assertEquals(1, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, 256, null, null, null))); + + assertEquals(2, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, 2, 0, 0, 1))); + + assertEquals(3, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(1, 2, 3, 0, 0))); + + assertEquals(4, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(4, 4, 4, 4, 0))); + + // Exceptionally not null + assertEquals(1, (int) BatteryFeneconHomeImpl // + .calculateTowerNumberFromSoftwareVersion(Arrays.asList(256, 0, 0, 0, 0))); + } } diff --git a/io.openems.edge.battery.soltaro/src/io/openems/edge/battery/soltaro/common/batteryprotection/AbstractBatteryProtectionDefinitionSoltaro.java b/io.openems.edge.battery.soltaro/src/io/openems/edge/battery/soltaro/common/batteryprotection/AbstractBatteryProtectionDefinitionSoltaro.java index 45ee70893a0..8d1f28b129c 100644 --- a/io.openems.edge.battery.soltaro/src/io/openems/edge/battery/soltaro/common/batteryprotection/AbstractBatteryProtectionDefinitionSoltaro.java +++ b/io.openems.edge.battery.soltaro/src/io/openems/edge/battery/soltaro/common/batteryprotection/AbstractBatteryProtectionDefinitionSoltaro.java @@ -68,4 +68,14 @@ public final ForceCharge.Params getForceChargeParams() { public final Double getMaxIncreaseAmperePerSecond() { return 0.1; // [A] per second } + + @Override + public PolyLine getChargeSocToPercent() { + return PolyLine.empty(); + } + + @Override + public PolyLine getDischargeSocToPercent() { + return PolyLine.empty(); + } } \ No newline at end of file diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsave.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsave.java index 193b3dbd1d7..d9124765b01 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsave.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsave.java @@ -45,6 +45,19 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId { .text("The 'CurrentState' is invalid")), // GRID_DISCONNECTION(Doc.of(Level.FAULT) // .text("External grid protection disconnection (17)")), // + GRID_FAILURE_LINE_TO_LINE(Doc.of(Level.FAULT) // + .text("Grid failure phase-to-phase voltage (47)")), // + LINE_FAILURE_UNDER_FREQ(Doc.of(Level.FAULT) // + .text("Line failure: Grid frequency is too low (48)")), // + LINE_FAILURE_OVER_FREQ(Doc.of(Level.FAULT) // + .text("Line failure: Grid frequency is too high (49)")), // + PROTECTION_SHUTDOWN_LINE_1(Doc.of(Level.FAULT) // + .text("Grid Failure: grid voltage L1 protection (81)")), // + PROTECTION_SHUTDOWN_LINE_2(Doc.of(Level.FAULT) // + .text("Grid Failure: grid voltage L2 protection (82)")), // + PROTECTION_SHUTDOWN_LINE_3(Doc.of(Level.FAULT) // + .text("Grid Failure: grid voltage L3 protection (83)")), // + ; private final Doc doc; @@ -214,27 +227,111 @@ public default void _setGridDisconnection(boolean value) { } /** - * Checks if the system is in a running state. This method retrieves the - * system's global state and determines whether the system is in a running - * state. + * Gets the Channel for ChannelId.GRID_FAILURE_LINE_TO_LINE. + * + * @return the Channel + */ + public default Channel getGridFailureLineToLineChannel() { + return this.channel(ChannelId.GRID_FAILURE_LINE_TO_LINE); + } + + /** + * Writes the value to the ChannelId.GRID_FAILURE_LINE_TO_LINE. + * + * @param value the next value + */ + public default void _setGridFailureLineToLine(boolean value) { + this.getGridFailureLineToLineChannel().setNextValue(value); + } + + /** + * Gets the Channel for ChannelId.LINE_FAILURE_UNDER_FREQ. + * + * @return the Channel + */ + public default Channel getLineFailureUnderFreqChannel() { + return this.channel(ChannelId.LINE_FAILURE_UNDER_FREQ); + } + + /** + * Writes the value to the ChannelId.LINE_FAILURE_UNDER_FREQ. + * + * @param value the next value + */ + public default void _setLineFailureUnderFreq(boolean value) { + this.getLineFailureUnderFreqChannel().setNextValue(value); + } + + /** + * Gets the Channel for ChannelId.LINE_FAILURE_OVER_FREQ. + * + * @return the Channel + */ + public default Channel getLineFailureOverFreqChannel() { + return this.channel(ChannelId.LINE_FAILURE_OVER_FREQ); + } + + /** + * Writes the value to the ChannelId.LINE_FAILURE_OVER_FREQ. * - * @return true if the system is in a running state, false otherwise. + * @param value the next value + */ + public default void _setLineFailureOverFreq(boolean value) { + this.getLineFailureOverFreqChannel().setNextValue(value); + } + + /** + * Gets the Channel for ChannelId.PROTECTION_SHUTDOWN_LINE_1. + * + * @return the Channel */ - public boolean isRunning(); + public default Channel getProtectionShutdownLine1Channel() { + return this.channel(ChannelId.PROTECTION_SHUTDOWN_LINE_1); + } /** - * Checks if the system is in a stop state. This method retrieves the system's - * global state and determines whether the system is in a stop state. + * Writes the value to the ChannelId.PROTECTION_SHUTDOWN_LINE_1. * - * @return true if the system is in a stop state, false otherwise. + * @param value the next value */ - public boolean isShutdown(); + public default void _setProtectionShutdownLine1(boolean value) { + this.getProtectionShutdownLine1Channel().setNextValue(value); + } /** - * Checks if the system is in a fault state. This method retrieves the system's - * global state and determines whether the system is in a fault state. + * Gets the Channel for ChannelId.PROTECTION_SHUTDOWN_LINE_2. * - * @return true if the system is in a fault state, false otherwise. + * @return the Channel */ - public boolean hasFailure(); + public default Channel getProtectionShutdownLine2Channel() { + return this.channel(ChannelId.PROTECTION_SHUTDOWN_LINE_2); + } + + /** + * Writes the value to the ChannelId.PROTECTION_SHUTDOWN_LINE_2. + * + * @param value the next value + */ + public default void _setProtectionShutdownLine2(boolean value) { + this.getProtectionShutdownLine2Channel().setNextValue(value); + } + + /** + * Gets the Channel for ChannelId.PROTECTION_SHUTDOWN_LINE_3. + * + * @return the Channel + */ + public default Channel getProtectionShutdownLine3Channel() { + return this.channel(ChannelId.PROTECTION_SHUTDOWN_LINE_3); + } + + /** + * Writes the value to the ChannelId.PROTECTION_SHUTDOWN_LINE_3. + * + * @param value the next value + */ + public default void _setProtectionShutdownLine3(boolean value) { + this.getProtectionShutdownLine3Channel().setNextValue(value); + } + } diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImpl.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImpl.java index 80774e5c800..84ec0153305 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImpl.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImpl.java @@ -7,7 +7,9 @@ import java.time.Instant; import java.util.Map; import java.util.Optional; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; +import java.util.stream.Stream; import org.osgi.service.cm.ConfigurationAdmin; import org.osgi.service.component.ComponentContext; @@ -28,10 +30,12 @@ import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.exceptions.OpenemsException; +import io.openems.common.types.OptionsEnum; import io.openems.edge.battery.api.Battery; import io.openems.edge.batteryinverter.api.BatteryInverterConstraint; import io.openems.edge.batteryinverter.api.ManagedSymmetricBatteryInverter; import io.openems.edge.batteryinverter.api.SymmetricBatteryInverter; +import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoSunSpecModel.S64201.S64201ControlMode; import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoSunSpecModel.S64201.S64201CurrentState; import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoSunSpecModel.S64201.S64201StVnd; import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoSunSpecModel.S64202.S64202EnLimit; @@ -78,8 +82,9 @@ public class BatteryInverterKacoBlueplanetGridsaveImpl extends AbstractSunSpecBa private static final int DC_MIN_VOLTAGE_LIMIT = 650; private static final int DC_MAX_VOLTAGE_LIMIT = 1315; - private final Logger log = LoggerFactory.getLogger(BatteryInverterKacoBlueplanetGridsaveImpl.class); private final StateMachine stateMachine = new StateMachine(State.UNDEFINED); + private final Logger log = LoggerFactory.getLogger(BatteryInverterKacoBlueplanetGridsaveImpl.class); + private final AtomicReference startStopTarget = new AtomicReference<>(StartStop.UNDEFINED); private final CalculateEnergyFromPower calculateChargeEnergy = new CalculateEnergyFromPower(this, SymmetricBatteryInverter.ChannelId.ACTIVE_CHARGE_ENERGY); @@ -107,7 +112,6 @@ protected void setModbus(BridgeModbus modbus) { * Kaco 92 does not have model 64203. */ private boolean hasSunSpecModel64203 = false; - private StartStop startStopTarget = StartStop.UNDEFINED; /** * Active SunSpec models for KACO blueplanet gridsave. Commented models are @@ -199,11 +203,14 @@ public void run(Battery battery, int setActivePower, int setReactivePower) throw this.setBatteryLimits(battery); // Set if there is grid disconnection failure - this.setGridDisconnectionFailure(); + this.handleGridDisconnection(); // Calculate the Energy values from ActivePower. this.calculateEnergy(); + // Enable reactive power by default + this.enableReactivePower(); + if (this.config.activateWatchdog()) { // Trigger the Watchdog this.triggerWatchdog(); @@ -226,13 +233,50 @@ public void run(Battery battery, int setActivePower, int setReactivePower) throw } } - private void setGridDisconnectionFailure() throws OpenemsException { - Channel stVndChannel = this.getSunSpecChannelOrError(KacoSunSpecModel.S64201.ST_VND); - Value stVnd = stVndChannel.value(); - if (!stVnd.isDefined()) { - return; + /** + * Enable the reactive power by default. + */ + private void enableReactivePower() { + try { + EnumWriteChannel channel = this.getSunSpecChannelOrError(KacoSunSpecModel.S64201.CONTROL_MODE); + setWriteValueIfNotRead(channel, S64201ControlMode.SUNSPEC_CTRL_MODE_QFIX); + } catch (OpenemsNamedException e) { + e.printStackTrace(); } - this._setGridDisconnection(stVnd.asEnum() == S64201StVnd.POWADORPROTECT_DISCONNECTION); + } + + private record HandleFaultChannels(// + SunSpecPoint model, // + OptionsEnum stateEnum, // + Consumer method// + ) { + + } + + private void handleGridDisconnection() { + Stream.of( + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.POWADORPROTECT_DISCONNECTION, + this::_setGridDisconnection), // + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.GRID_FAILURE_PHASETOPHASE, + this::_setGridFailureLineToLine), // + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.LINE_FAILURE_UNDERFREQ, + this::_setLineFailureUnderFreq), // + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.LINE_FAILURE_OVERFREQ, + this::_setLineFailureOverFreq), // + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.PROTECTION_SHUTDOWN_LINE_1, + this::_setProtectionShutdownLine1), // + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.PROTECTION_SHUTDOWN_LINE_2, + this::_setProtectionShutdownLine2), // + new HandleFaultChannels(KacoSunSpecModel.S64201.ST_VND, S64201StVnd.PROTECTION_SHUTDOWN_LINE_3, + this::_setProtectionShutdownLine3))// + .forEach(t -> { + try { + var channel = this.getSunSpecChannelOrError(t.model); + t.method.accept(Objects.equal(channel.value().get(), t.stateEnum)); + } catch (OpenemsException e) { + this.logWarn(this.log, e.getMessage()); + } + }); } @Override @@ -390,13 +434,15 @@ public String debugLog() { @Override public void setStartStop(StartStop value) { - this.startStopTarget = value; + if (this.startStopTarget.getAndSet(value) != value) { + this.stateMachine.forceNextState(State.UNDEFINED); + } } @Override public StartStop getStartStopTarget() { return switch (this.config.startStop()) { - case AUTO -> this.startStopTarget; + case AUTO -> this.startStopTarget.get(); case START -> StartStop.START; case STOP -> StartStop.STOP; }; @@ -461,13 +507,24 @@ protected void addBlock(int startAddress, SunSpecModel model, Priority priority) } } - @Override + /** + * Checks if the system is in a running state. This method retrieves the + * system's global state and determines whether the system is in a running + * state. + * + * @return true if the system is in a running state, false otherwise. + */ public boolean isRunning() { return this.getCurrentState() == S64201CurrentState.GRID_CONNECTED// || this.getCurrentState() == S64201CurrentState.THROTTLED; } - @Override + /** + * Checks if the system is in a stop state. This method retrieves the system's + * global state and determines whether the system is in a stop state. + * + * @return true if the system is in a stop state, false otherwise. + */ public boolean isShutdown() { return this.getCurrentState() == S64201CurrentState.OFF // || this.getCurrentState() == S64201CurrentState.STANDBY // @@ -475,8 +532,14 @@ public boolean isShutdown() { || this.getCurrentState() == S64201CurrentState.SHUTTING_DOWN; } - @Override + /** + * Checks if the system is in a fault state. This method retrieves the system's + * global state and determines whether the system is in a fault state. + * + * @return true if the system is in a fault state, false otherwise. + */ public boolean hasFailure() { return this.hasFaults() || this.getCurrentState() == S64201CurrentState.FAULT; } + } diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/Context.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/Context.java index 9620e98ffba..adc1d2145de 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/Context.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/Context.java @@ -4,10 +4,10 @@ import java.time.Instant; import io.openems.edge.battery.api.Battery; -import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.BatteryInverterKacoBlueplanetGridsave; +import io.openems.edge.batteryinverter.kaco.blueplanetgridsave.BatteryInverterKacoBlueplanetGridsaveImpl; import io.openems.edge.common.statemachine.AbstractContext; -public class Context extends AbstractContext { +public class Context extends AbstractContext { protected final Battery battery; protected final int setActivePower; @@ -16,7 +16,7 @@ public class Context extends AbstractContext { @@ -30,10 +29,6 @@ public State runAndGetNextState(Context context) throws OpenemsNamedException { return State.ERROR; } - if (inverter.getStartStopTarget() == StartStop.STOP) { - return State.GO_STOPPED; - } - if (inverter.isRunning()) { return State.RUNNING; } diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/RunningHandler.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/RunningHandler.java index 986127e902e..810afcbc4ba 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/RunningHandler.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/RunningHandler.java @@ -19,10 +19,6 @@ public State runAndGetNextState(Context context) throws OpenemsNamedException { return State.ERROR; } - if (inverter.getStartStopTarget() == StartStop.STOP) { - return State.GO_STOPPED; - } - this.applyPower(context); inverter._setStartStop(StartStop.START); return State.RUNNING; diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/StoppedHandler.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/StoppedHandler.java index c2a6b23cca2..4aaa423b5e4 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/StoppedHandler.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/StoppedHandler.java @@ -14,10 +14,6 @@ public State runAndGetNextState(Context context) { return State.ERROR; } - if (inverter.getStartStopTarget() == StartStop.START) { - return State.GO_RUNNING; - } - inverter._setStartStop(StartStop.STOP); return State.STOPPED; } diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/UndefinedHandler.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/UndefinedHandler.java index c177bd4538a..6dfb345b6b1 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/UndefinedHandler.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/src/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/statemachine/UndefinedHandler.java @@ -8,23 +8,16 @@ public class UndefinedHandler extends StateHandler { @Override public State runAndGetNextState(Context context) { final var inverter = context.getParent(); - - if (inverter.getCurrentState().isUndefined()) { - return State.UNDEFINED; - } - - if (inverter.hasFailure()) { - return State.ERROR; - } - - if (inverter.isRunning()) { - return State.RUNNING; + return switch (inverter.getStartStopTarget()) { + case UNDEFINED -> State.UNDEFINED; + case START -> { + if (inverter.hasFailure()) { + yield State.ERROR; + } + yield State.GO_RUNNING; } - - if (inverter.isShutdown()) { - return State.STOPPED; - } - - return State.GO_STOPPED; + case STOP -> State.GO_STOPPED; + }; } + } diff --git a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/test/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImplTest.java b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/test/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImplTest.java index d4d2c215065..4bc316e97c5 100644 --- a/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/test/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImplTest.java +++ b/io.openems.edge.batteryinverter.kaco.blueplanetgridsave/test/io/openems/edge/batteryinverter/kaco/blueplanetgridsave/BatteryInverterKacoBlueplanetGridsaveImplTest.java @@ -109,7 +109,7 @@ public void testStart() throws Exception { .output(STATE_MACHINE, State.UNDEFINED)) // .next(new TestCase() // .timeleap(clock, 4, ChronoUnit.SECONDS) // - .output(STATE_MACHINE, State.STOPPED)) // + .output(STATE_MACHINE, State.GO_RUNNING)) // .next(new TestCase() // .timeleap(clock, 1, ChronoUnit.SECONDS) // .input(CURRENT_STATE, S64201CurrentState.GRID_CONNECTED) // diff --git a/io.openems.edge.common/src/io/openems/edge/common/sum/Sum.java b/io.openems.edge.common/src/io/openems/edge/common/sum/Sum.java index 28d5b71e4bb..c6a903df67c 100644 --- a/io.openems.edge.common/src/io/openems/edge/common/sum/Sum.java +++ b/io.openems.edge.common/src/io/openems/edge/common/sum/Sum.java @@ -486,7 +486,18 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId { */ GRID_MODE(Doc.of(GridMode.values()) // .persistencePriority(PersistencePriority.VERY_HIGH)), // - + /** + * Cumulated Off-Grid time. + * + *
      + *
    • Interface: Sum + *
    • Type: Cumulated Seconds + *
    + */ + GRID_MODE_OFF_GRID_TIME(Doc.of(OpenemsType.LONG) // + .unit(Unit.CUMULATED_SECONDS) // + .persistencePriority(PersistencePriority.VERY_HIGH) // + .text("Total Off-Grid time")), // /** * Ess: Max Apparent Power. * @@ -704,6 +715,7 @@ public static ModbusSlaveNatureTable getModbusSlaveNatureTable(AccessMode access .channel(111, ChannelId.CONSUMPTION_ACTIVE_POWER_L3, ModbusType.FLOAT32) // .channel(113, ChannelId.ESS_DISCHARGE_POWER, ModbusType.FLOAT32) // .channel(115, ChannelId.GRID_MODE, ModbusType.ENUM16) // + .channel(116, ChannelId.GRID_MODE_OFF_GRID_TIME, ModbusType.FLOAT32) // .build(); } @@ -1878,6 +1890,35 @@ public default void _setGridMode(GridMode value) { this.getGridModeChannel().setNextValue(value); } + /** + * Internal method to set the 'nextValue' on + * {@link ChannelId#GRID_MODE_OFF_GRID_TIME} Channel. + * + * @param value the next value + */ + public default void _setGridModeOffGridTime(int value) { + this.getGridModeOffGridTimeChannel().setNextValue(value); + } + + /** + * Gets the Channel for {@link ChannelId#GRID_MODE_OFF_GRID_TIME}. + * + * @return the Channel + */ + public default LongReadChannel getGridModeOffGridTimeChannel() { + return this.channel(ChannelId.GRID_MODE_OFF_GRID_TIME); + } + + /** + * Gets the Overall GridMode of all Energy Storage Systems. See + * {@link ChannelId#GRID_MODE_OFF_GRID_TIME}. + * + * @return the Channel {@link Value} + */ + public default Value getGridModeOffGridTimeValue() { + return this.getGridModeOffGridTimeChannel().value(); + } + /** * Gets the Channel for {@link ChannelId#ESS_ACTIVE_CHARGE_ENERGY}. * diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/BackendOnRequest.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/BackendOnRequest.java index c3d38665a53..30a9194c27a 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/BackendOnRequest.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/BackendOnRequest.java @@ -66,7 +66,7 @@ public BackendOnRequest(@Reference RootRequestHandler handler) { } @Override - public CompletableFuture run(// + public CompletableFuture apply(// final WebSocket ws, // final JsonrpcRequest request // ) throws OpenemsNamedException { diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/ControllerApiBackendImpl.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/ControllerApiBackendImpl.java index 50f6109cba7..561e464af4c 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/ControllerApiBackendImpl.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/ControllerApiBackendImpl.java @@ -263,8 +263,7 @@ public ScheduledFuture scheduleWithFixedDelay(Runnable command, long initialD } @Override - public CompletableFuture sendRequest(User user, JsonrpcRequest request) - throws OpenemsNamedException { + public CompletableFuture sendRequest(User user, JsonrpcRequest request) { return this.websocket.sendRequest(request); } diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnError.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnError.java index 4aef7fd29d5..28a652a62ed 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnError.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnError.java @@ -16,7 +16,7 @@ public OnError(ControllerApiBackendImpl parent) { } @Override - public void run(WebSocket ws, Exception ex) throws OpenemsException { + public void accept(WebSocket ws, Exception ex) throws OpenemsException { this.parent.logWarn(this.log, "Error: " + ex.getMessage()); } diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnNotification.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnNotification.java index e3437e3b337..895c1c1c6ce 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnNotification.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnNotification.java @@ -17,7 +17,7 @@ public OnNotification(ControllerApiBackendImpl parent) { } @Override - public void run(WebSocket ws, JsonrpcNotification notification) throws OpenemsException { + public void accept(WebSocket ws, JsonrpcNotification notification) throws OpenemsException { this.parent.logWarn(this.log, "Unhandled Notification: " + notification); } diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnOpen.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnOpen.java index 58bea7049ac..815439fa166 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnOpen.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/OnOpen.java @@ -1,11 +1,11 @@ package io.openems.edge.controller.api.backend; import org.java_websocket.WebSocket; +import org.java_websocket.handshake.Handshakedata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.gson.JsonObject; - +import io.openems.common.exceptions.OpenemsError; import io.openems.common.jsonrpc.notification.EdgeConfigNotification; public class OnOpen implements io.openems.common.websocket.OnOpen { @@ -18,7 +18,7 @@ public OnOpen(ControllerApiBackendImpl parent) { } @Override - public void run(WebSocket ws, JsonObject handshake) { + public OpenemsError apply(WebSocket ws, Handshakedata handshakedata) { this.parent.logInfo(this.log, "Connected to OpenEMS Backend"); // Immediately send Config @@ -31,6 +31,8 @@ public void run(WebSocket ws, JsonObject handshake) { // Trigger resending data this.parent.resendHistoricDataWorker.triggerNextRun(); + + return null; // No error } } diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WebsocketClient.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WebsocketClient.java index 9730473734e..aeb2e73a5ba 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WebsocketClient.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WebsocketClient.java @@ -7,6 +7,7 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import org.java_websocket.WebSocket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,8 +64,8 @@ public OnClose getOnClose() { } @Override - protected WsData createWsData() { - return new WsData(); + protected WsData createWsData(WebSocket es) { + return new WsData(ws); } @Override diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WsData.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WsData.java index 4e762bdc03c..2dfdd355c5b 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WsData.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/WsData.java @@ -1,7 +1,13 @@ package io.openems.edge.controller.api.backend; +import org.java_websocket.WebSocket; + public class WsData extends io.openems.common.websocket.WsData { + public WsData(WebSocket ws) { + super(ws); + } + @Override public String toString() { return "BackendApi.WsData []"; diff --git a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/api/ControllerApiBackend.java b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/api/ControllerApiBackend.java index 90023b35f81..ad3a5694556 100644 --- a/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/api/ControllerApiBackend.java +++ b/io.openems.edge.controller.api.backend/src/io/openems/edge/controller/api/backend/api/ControllerApiBackend.java @@ -7,7 +7,6 @@ import io.openems.common.channel.Level; import io.openems.common.channel.PersistencePriority; import io.openems.common.channel.Unit; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; import io.openems.common.jsonrpc.base.JsonrpcRequest; import io.openems.common.jsonrpc.base.JsonrpcResponseSuccess; import io.openems.common.types.OpenemsType; @@ -86,9 +85,7 @@ public default LongReadChannel getLastSuccessFulResendChannel() { * @param user the user * @param request the request to send * @return the result future - * @throws OpenemsNamedException on error */ - public CompletableFuture sendRequest(User user, JsonrpcRequest request) - throws OpenemsNamedException; + public CompletableFuture sendRequest(User user, JsonrpcRequest request); } diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/ControllerApiWebsocketImpl.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/ControllerApiWebsocketImpl.java index f352756454f..1b5b3a23629 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/ControllerApiWebsocketImpl.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/ControllerApiWebsocketImpl.java @@ -22,7 +22,6 @@ import io.openems.common.jsonrpc.notification.EdgeRpcNotification; import io.openems.common.types.EdgeConfig; import io.openems.common.utils.ThreadPoolUtils; -import io.openems.common.websocket.AbstractWebsocketServer.DebugMode; import io.openems.edge.common.component.AbstractOpenemsComponent; import io.openems.edge.common.component.ComponentManager; import io.openems.edge.common.component.OpenemsComponent; @@ -91,7 +90,7 @@ private void activate(ComponentContext context, Config config) { call.put(ComponentConfigRequestHandler.API_WORKER_KEY, this.apiWorker); }); this.onRequest.setDebug(config.debugMode()); - this.startServer(config.port(), POOL_SIZE, DebugMode.OFF); + this.startServer(config.port(), POOL_SIZE); } @@ -107,12 +106,11 @@ protected void deactivate() { /** * Create and start new server. * - * @param port the port - * @param poolSize number of threads dedicated to handle the tasks - * @param debugMode activate a regular debug log about the state of the tasks + * @param port the port + * @param poolSize number of threads dedicated to handle the tasks */ - private synchronized void startServer(int port, int poolSize, DebugMode debugMode) { - this.server = new WebsocketServer(this, "Websocket Api", port, poolSize, debugMode); + private synchronized void startServer(int port, int poolSize) { + this.server = new WebsocketServer(this, "Websocket Api", port, poolSize); this.server.start(); } diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnClose.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnClose.java index 55be08f5c87..20a3e707600 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnClose.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnClose.java @@ -4,8 +4,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.openems.common.exceptions.OpenemsException; - public class OnClose implements io.openems.common.websocket.OnClose { private final Logger log = LoggerFactory.getLogger(OnClose.class); @@ -16,7 +14,7 @@ public OnClose(ControllerApiWebsocketImpl parent) { } @Override - public void run(WebSocket ws, int code, String reason, boolean remote) throws OpenemsException { + public void accept(WebSocket ws, int code, String reason, boolean remote) { // get websocket attachment WsData wsData = ws.getAttachment(); var user = wsData.getUser(); diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnError.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnError.java index 45e43281920..05655fff44c 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnError.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnError.java @@ -16,7 +16,7 @@ public OnError(ControllerApiWebsocketImpl parent) { } @Override - public void run(WebSocket ws, Exception ex) throws OpenemsException { + public void accept(WebSocket ws, Exception ex) throws OpenemsException { // get websocket attachment WsData wsData = ws.getAttachment(); var user = wsData.getUser(); diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnNotification.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnNotification.java index 63936d150e0..335d2054a4b 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnNotification.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnNotification.java @@ -17,7 +17,7 @@ public OnNotification(ControllerApiWebsocketImpl parent) { } @Override - public void run(WebSocket ws, JsonrpcNotification notification) throws OpenemsException { + public void accept(WebSocket ws, JsonrpcNotification notification) throws OpenemsException { this.parent.logWarn(this.log, "Unhandled Notification: " + notification); } diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnOpen.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnOpen.java deleted file mode 100644 index 6b6dafee1b7..00000000000 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnOpen.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.openems.edge.controller.api.websocket; - -import org.java_websocket.WebSocket; - -import com.google.gson.JsonObject; - -public class OnOpen implements io.openems.common.websocket.OnOpen { - - public OnOpen(ControllerApiWebsocket parent) { - } - - @Override - public void run(WebSocket ws, JsonObject handshake) { - } -} diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnRequest.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnRequest.java index 66f4cd88d34..de44f4eb261 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnRequest.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnRequest.java @@ -77,7 +77,7 @@ protected void unbindRootHandler(RootRequestHandler rootHandler) { } @Override - public CompletableFuture run(WebSocket ws, JsonrpcRequest request) + public CompletableFuture apply(WebSocket ws, JsonrpcRequest request) throws OpenemsNamedException { return this.apiBinder.handleRequest(request, call -> { WsData wsData = ws.getAttachment(); diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WebsocketServer.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WebsocketServer.java index cc0c451279e..708c85e8ea4 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WebsocketServer.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WebsocketServer.java @@ -2,36 +2,36 @@ import java.util.concurrent.RejectedExecutionException; +import org.java_websocket.WebSocket; import org.slf4j.Logger; import io.openems.common.websocket.AbstractWebsocketServer; +import io.openems.common.websocket.OnOpen; +import io.openems.common.websocket.OnRequest; public class WebsocketServer extends AbstractWebsocketServer { private final ControllerApiWebsocketImpl parent; - private final OnOpen onOpen; private final OnNotification onNotification; private final OnError onError; private final OnClose onClose; - public WebsocketServer(ControllerApiWebsocketImpl parent, String name, int port, int poolSize, - DebugMode debugMode) { - super(name, port, poolSize, debugMode); + public WebsocketServer(ControllerApiWebsocketImpl parent, String name, int port, int poolSize) { + super(name, port, poolSize); this.parent = parent; - this.onOpen = new OnOpen(parent); this.onNotification = new OnNotification(parent); this.onError = new OnError(parent); this.onClose = new OnClose(parent); } @Override - protected WsData createWsData() { - return new WsData(this.parent); + protected WsData createWsData(WebSocket ws) { + return new WsData(ws, this.parent); } @Override protected OnOpen getOnOpen() { - return this.onOpen; + return OnOpen.NO_OP; } @Override diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WsData.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WsData.java index 6a455a86972..a92eca5bba8 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WsData.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/WsData.java @@ -7,6 +7,7 @@ import java.util.SortedSet; import java.util.TreeSet; +import org.java_websocket.WebSocket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -14,7 +15,6 @@ import com.google.gson.JsonNull; import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.notification.CurrentDataNotification; import io.openems.common.jsonrpc.notification.EdgeRpcNotification; import io.openems.common.jsonrpc.request.SubscribeChannelsRequest; @@ -74,7 +74,6 @@ protected void dispose() { } } - private final Logger log = LoggerFactory.getLogger(WsData.class); private final ControllerApiWebsocketImpl parent; private final SubscribedChannels subscribedChannels = new SubscribedChannels(); @@ -86,7 +85,8 @@ protected void dispose() { private Optional user = Optional.empty(); - public WsData(ControllerApiWebsocketImpl parent) { + public WsData(WebSocket ws, ControllerApiWebsocketImpl parent) { + super(ws); this.parent = parent; } @@ -172,14 +172,9 @@ public void sendSubscribedChannels() { return; } this.parent.server.execute(() -> { - try { - this.send(// - new EdgeRpcNotification(ControllerApiWebsocket.EDGE_ID, // - new CurrentDataNotification(values))); - - } catch (OpenemsException e) { - this.parent.logWarn(this.log, "Unable to send CurrentDataNotification: " + e.getMessage()); - } + this.send(// + new EdgeRpcNotification(ControllerApiWebsocket.EDGE_ID, // + new CurrentDataNotification(values))); }); } diff --git a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/handler/SubscribeSystemLogRequestHandler.java b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/handler/SubscribeSystemLogRequestHandler.java index 172251df193..5b8a75f4d25 100644 --- a/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/handler/SubscribeSystemLogRequestHandler.java +++ b/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/handler/SubscribeSystemLogRequestHandler.java @@ -6,10 +6,7 @@ import org.ops4j.pax.logging.spi.PaxAppender; import org.ops4j.pax.logging.spi.PaxLoggingEvent; import org.osgi.service.component.annotations.Component; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.base.GenericJsonrpcResponseSuccess; import io.openems.common.jsonrpc.notification.EdgeRpcNotification; import io.openems.common.jsonrpc.notification.SystemLogNotification; @@ -26,8 +23,6 @@ }) public class SubscribeSystemLogRequestHandler implements JsonApi, PaxAppender { - private final Logger log = LoggerFactory.getLogger(SubscribeSystemLogRequestHandler.class); - private final Set subscribers = ConcurrentHashMap.newKeySet(); @Override @@ -63,12 +58,7 @@ public void doAppend(PaxLoggingEvent event) { iter.remove(); continue; } - try { - wsData.send(notification); - } catch (OpenemsException e) { - this.log.warn("Unable to handle PaxLoggingEvent", e); - iter.remove(); - } + wsData.send(notification); } } diff --git a/io.openems.edge.ess.mr.gridcon/.classpath b/io.openems.edge.controller.ess.limiter14a/.classpath similarity index 100% rename from io.openems.edge.ess.mr.gridcon/.classpath rename to io.openems.edge.controller.ess.limiter14a/.classpath diff --git a/io.openems.edge.ess.mr.gridcon/.gitignore b/io.openems.edge.controller.ess.limiter14a/.gitignore similarity index 100% rename from io.openems.edge.ess.mr.gridcon/.gitignore rename to io.openems.edge.controller.ess.limiter14a/.gitignore index 36573722b7e..c2b941a96de 100644 --- a/io.openems.edge.ess.mr.gridcon/.gitignore +++ b/io.openems.edge.controller.ess.limiter14a/.gitignore @@ -1,2 +1,2 @@ -/generated/ /bin_test/ +/generated/ diff --git a/io.openems.edge.ess.mr.gridcon/.project b/io.openems.edge.controller.ess.limiter14a/.project similarity index 89% rename from io.openems.edge.ess.mr.gridcon/.project rename to io.openems.edge.controller.ess.limiter14a/.project index 013d1ddbe42..31715aabf64 100644 --- a/io.openems.edge.ess.mr.gridcon/.project +++ b/io.openems.edge.controller.ess.limiter14a/.project @@ -1,6 +1,6 @@ - io.openems.edge.ess.mr.gridcon + io.openems.edge.controller.ess.limiter14a diff --git a/io.openems.edge.ess.mr.gridcon/.settings/org.eclipse.core.resources.prefs b/io.openems.edge.controller.ess.limiter14a/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from io.openems.edge.ess.mr.gridcon/.settings/org.eclipse.core.resources.prefs rename to io.openems.edge.controller.ess.limiter14a/.settings/org.eclipse.core.resources.prefs diff --git a/io.openems.edge.ess.mr.gridcon/bnd.bnd b/io.openems.edge.controller.ess.limiter14a/bnd.bnd similarity index 64% rename from io.openems.edge.ess.mr.gridcon/bnd.bnd rename to io.openems.edge.controller.ess.limiter14a/bnd.bnd index 4ebae0cb9b6..dd10c2715b1 100644 --- a/io.openems.edge.ess.mr.gridcon/bnd.bnd +++ b/io.openems.edge.controller.ess.limiter14a/bnd.bnd @@ -1,19 +1,16 @@ -Bundle-Name: OpenEMS Edge ESS MR Gridcon +Bundle-Name: OpenEMS Edge Controller for §14a EnWG Bundle-Vendor: FENECON GmbH Bundle-License: https://opensource.org/licenses/EPL-2.0 Bundle-Version: 1.0.0.${tstamp} -buildpath: \ ${buildpath},\ - com.ghgande.j2mod,\ io.openems.common,\ - io.openems.edge.battery.api,\ - io.openems.edge.bridge.modbus,\ io.openems.edge.common,\ io.openems.edge.controller.api,\ io.openems.edge.ess.api,\ - io.openems.edge.io.api,\ - io.openems.edge.meter.api + io.openems.edge.timedata.api,\ -testpath: \ - ${testpath} \ No newline at end of file + ${testpath},\ + io.openems.edge.io.api,\ diff --git a/io.openems.edge.controller.ess.limiter14a/readme.adoc b/io.openems.edge.controller.ess.limiter14a/readme.adoc new file mode 100644 index 00000000000..d6723012d8c --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/readme.adoc @@ -0,0 +1,8 @@ += ESS §14a EnWG Controller + +Established by law (for Germany), this controller lowers active power to `-4200 W` in response to grid operator limitations, aiming to alleviate load on transformers. + +Link to legislative text: +https://www.gesetze-im-internet.de/enwg_2005/__14a.html + +https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.controller.ess.limiter14a[Source Code icon:github[]] \ No newline at end of file diff --git a/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/Config.java b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/Config.java new file mode 100644 index 00000000000..6a7c1da734c --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/Config.java @@ -0,0 +1,28 @@ +package io.openems.edge.controller.ess.limiter14a; + +import org.osgi.service.metatype.annotations.AttributeDefinition; +import org.osgi.service.metatype.annotations.ObjectClassDefinition; + +@ObjectClassDefinition(// + name = "Controller Ess Limiter §14a", // + description = "Established by law (for Germany), this controller lowers active power to -4200W in response to grid operator limitations, aiming to alleviate load on transformers.") +@interface Config { + + @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") + String id() default "ctrlEssLimiter14a0"; + + @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 = "Ess-ID", description = "ID of Ess.") + String ess_id() default "ess0"; + + @AttributeDefinition(name = "Input Channel", description = "When receiveing a signal, this channel triggers the execution of the limitation.") + String inputChannelAddress(); + + String webconsole_configurationFactory_nameHint() default "Controller Ess Limiter §14a [{id}]"; + +} \ No newline at end of file diff --git a/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14a.java b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14a.java new file mode 100644 index 00000000000..1a517ebf33c --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14a.java @@ -0,0 +1,64 @@ +package io.openems.edge.controller.ess.limiter14a; + +import io.openems.common.channel.PersistencePriority; +import io.openems.common.channel.Unit; +import io.openems.common.types.OpenemsType; +import io.openems.edge.common.channel.Channel; +import io.openems.edge.common.channel.Doc; +import io.openems.edge.common.channel.value.Value; +import io.openems.edge.common.component.OpenemsComponent; +import io.openems.edge.controller.api.Controller; + +public interface ControllerEssLimiter14a extends Controller, OpenemsComponent { + + public enum ChannelId implements io.openems.edge.common.channel.ChannelId { + + RESTRICTION_MODE(Doc.of(RestrictionMode.values()) // + .persistencePriority(PersistencePriority.HIGH)), // + + CUMULATED_RESTRICTION_TIME(Doc.of(OpenemsType.LONG) // + .unit(Unit.CUMULATED_SECONDS) // + .persistencePriority(PersistencePriority.HIGH)); // + + private final Doc doc; + + private ChannelId(Doc doc) { + this.doc = doc; + } + + @Override + public Doc doc() { + return this.doc; + } + + } + + /** + * Gets the Channel for {@link ChannelId#RESTRICTION_MODE}. + * + * @return the Channel + */ + public default Channel getRestrictionModeChannel() { + return this.channel(ChannelId.RESTRICTION_MODE); + } + + /** + * Gets the Status. See {@link ChannelId#RESTRICTION_MODE}. + * + * @return the Channel {@link Value} + */ + public default Boolean getRestrictionMode() { + return this.getRestrictionModeChannel().value().get(); + } + + /** + * Internal method to set the 'nextValue' on {@link ChannelId#RESTRICTION_MODE} + * Channel. + * + * @param value the next value + */ + public default void _setRestrictionMode(boolean value) { + this.getRestrictionModeChannel().setNextValue(value); + } + +} diff --git a/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14aImpl.java b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14aImpl.java new file mode 100644 index 00000000000..a9c1082637f --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14aImpl.java @@ -0,0 +1,98 @@ +package io.openems.edge.controller.ess.limiter14a; + +import org.osgi.service.cm.ConfigurationAdmin; +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.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; +import org.osgi.service.component.annotations.ReferencePolicyOption; +import org.osgi.service.metatype.annotations.Designate; +import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; +import io.openems.common.types.ChannelAddress; +import io.openems.edge.common.channel.BooleanReadChannel; +import io.openems.edge.common.component.AbstractOpenemsComponent; +import io.openems.edge.common.component.ComponentManager; +import io.openems.edge.common.component.OpenemsComponent; +import io.openems.edge.common.sum.GridMode; +import io.openems.edge.common.sum.Sum; +import io.openems.edge.controller.api.Controller; +import io.openems.edge.ess.api.ManagedSymmetricEss; +import io.openems.edge.timedata.api.Timedata; +import io.openems.edge.timedata.api.TimedataProvider; +import io.openems.edge.timedata.api.utils.CalculateActiveTime; + +@Designate(ocd = Config.class, factory = true) +@Component(// + name = "Controller.Ess.Limiter14a", // + immediate = true, // + configurationPolicy = ConfigurationPolicy.REQUIRE // +) +public class ControllerEssLimiter14aImpl extends AbstractOpenemsComponent implements // + ControllerEssLimiter14a, Controller, OpenemsComponent, TimedataProvider { + + @Reference + private Sum sum; + + @Reference(policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY, cardinality = ReferenceCardinality.OPTIONAL) + private volatile Timedata timedata = null; + + @Reference + private ConfigurationAdmin cm; + + @Reference + private ComponentManager componentManager; + + @Reference(policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY, cardinality = ReferenceCardinality.MANDATORY) + private ManagedSymmetricEss ess; + + private ChannelAddress inputChannelAddress; + + private final CalculateActiveTime cumulatedRestrictionTime = new CalculateActiveTime(this, + ControllerEssLimiter14a.ChannelId.CUMULATED_RESTRICTION_TIME); + + public ControllerEssLimiter14aImpl() { + super(// + OpenemsComponent.ChannelId.values(), // + Controller.ChannelId.values(), // + ControllerEssLimiter14a.ChannelId.values() // + ); + } + + @Activate + private void activate(ComponentContext context, Config config) throws OpenemsNamedException { + super.activate(context, config.id(), config.alias(), config.enabled()); + this.inputChannelAddress = ChannelAddress.fromString(config.inputChannelAddress()); + + if (OpenemsComponent.updateReferenceFilter(this.cm, this.servicePid(), "ess", config.ess_id())) { + return; + } + } + + @Deactivate + protected void deactivate() { + super.deactivate(); + } + + @Override + public void run() throws OpenemsNamedException { + BooleanReadChannel inputChannel = this.componentManager.getChannel(this.inputChannelAddress); + var onGrid = this.sum.channel(Sum.ChannelId.GRID_MODE).value().asEnum() != GridMode.OFF_GRID; + // 0/1 is reversed on relays board + var isActive = onGrid && !inputChannel.value().orElse(true); + if (isActive) { + this.ess.setActivePowerGreaterOrEquals(-4200); + } + + this.channel(ControllerEssLimiter14a.ChannelId.RESTRICTION_MODE).setNextValue(isActive); + this.cumulatedRestrictionTime.update(isActive); + } + + @Override + public Timedata getTimedata() { + return this.timedata; + } +} \ No newline at end of file diff --git a/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/RestrictionMode.java b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/RestrictionMode.java new file mode 100644 index 00000000000..99858973ea1 --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/src/io/openems/edge/controller/ess/limiter14a/RestrictionMode.java @@ -0,0 +1,32 @@ +package io.openems.edge.controller.ess.limiter14a; + +import io.openems.common.types.OptionsEnum; + +public enum RestrictionMode implements OptionsEnum { + UNDEFINED(-1, "Undefined"), // + ON(1, "On"), // + OFF(0, "Off"); + + private int value; + private String name; + + private RestrictionMode(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; + } +} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/test/.gitignore b/io.openems.edge.controller.ess.limiter14a/test/.gitignore similarity index 100% rename from io.openems.edge.ess.mr.gridcon/test/.gitignore rename to io.openems.edge.controller.ess.limiter14a/test/.gitignore diff --git a/io.openems.edge.controller.ess.limiter14a/test/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14aTest.java b/io.openems.edge.controller.ess.limiter14a/test/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14aTest.java new file mode 100644 index 00000000000..22405060dc7 --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/test/io/openems/edge/controller/ess/limiter14a/ControllerEssLimiter14aTest.java @@ -0,0 +1,61 @@ +package io.openems.edge.controller.ess.limiter14a; + +import org.junit.Test; + +import io.openems.common.exceptions.OpenemsException; +import io.openems.common.types.ChannelAddress; +import io.openems.edge.common.sum.DummySum; +import io.openems.edge.common.sum.GridMode; +import io.openems.edge.common.test.DummyComponentManager; +import io.openems.edge.common.test.DummyConfigurationAdmin; +import io.openems.edge.common.test.AbstractComponentTest.TestCase; +import io.openems.edge.controller.test.ControllerTest; +import io.openems.edge.ess.test.DummyManagedSymmetricEss; +import io.openems.edge.timedata.test.DummyTimedata; +import io.openems.edge.io.test.DummyInputOutput; + +public class ControllerEssLimiter14aTest { + + private static final String ESS_ID = "ess0"; + private static final String CTRL_ID = "ctrlEssLimiter14a0"; + + private static final ChannelAddress RESTRICTION_MODE = new ChannelAddress(CTRL_ID, "RestrictionMode"); + private static final ChannelAddress GPIO = new ChannelAddress("io0", "InputOutput0"); + private static final ChannelAddress LIMITATION = new ChannelAddress(ESS_ID, "SetActivePowerGreaterOrEquals"); + private static final ChannelAddress GRID_MODE = new ChannelAddress("_sum", "GridMode"); + + @Test + public void testController() throws OpenemsException, Exception { + new ControllerTest(new ControllerEssLimiter14aImpl()) // + .addReference("cm", new DummyConfigurationAdmin()) // + .addReference("componentManager", new DummyComponentManager()) // + .addReference("timedata", new DummyTimedata("timedata0")) // + .addReference("ess", new DummyManagedSymmetricEss(ESS_ID)) // + .addReference("sum", new DummySum()) // + .addComponent(new DummyInputOutput("io0")) // + .activate(MyConfig.create() // + .setId(CTRL_ID) // + .setEssId(ESS_ID)// + .setInputChannelAddress("io0/InputOutput0")// + .build()) + .next(new TestCase() // + // Since logic is reversed + .input(GPIO, false) // + .input(GRID_MODE, GridMode.ON_GRID) + .output(LIMITATION, -4200) + .output(RESTRICTION_MODE, RestrictionMode.ON)) // + .next(new TestCase() // + .input(GPIO, null) // + .output(LIMITATION, null)) // + .next(new TestCase() // + .input(GPIO, 1) // + .input(GRID_MODE, GridMode.OFF_GRID) // + .output(RESTRICTION_MODE, RestrictionMode.OFF)) // + .next(new TestCase() // + .input(GPIO, false) // + .input(GRID_MODE, GridMode.OFF_GRID) // + .output(LIMITATION, null)) // + ; + } + +} diff --git a/io.openems.edge.controller.ess.limiter14a/test/io/openems/edge/controller/ess/limiter14a/MyConfig.java b/io.openems.edge.controller.ess.limiter14a/test/io/openems/edge/controller/ess/limiter14a/MyConfig.java new file mode 100644 index 00000000000..c0c2a3ddab8 --- /dev/null +++ b/io.openems.edge.controller.ess.limiter14a/test/io/openems/edge/controller/ess/limiter14a/MyConfig.java @@ -0,0 +1,61 @@ +package io.openems.edge.controller.ess.limiter14a; + +import io.openems.common.test.AbstractComponentConfig; + +@SuppressWarnings("all") +public class MyConfig extends AbstractComponentConfig implements Config { + + protected static class Builder { + private String id; + private String inputChannelAddress; + private String essId; + + private Builder() { + } + + public Builder setInputChannelAddress(String inputChannelAddress) { + this.inputChannelAddress = inputChannelAddress; + return this; + } + + public Builder setId(String id) { + this.id = id; + return this; + } + + public Builder setEssId(String id) { + this.essId = id; + 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 inputChannelAddress() { + return this.builder.inputChannelAddress; + } + + @Override + public String ess_id() { + return this.builder.essId; + } +} \ No newline at end of file diff --git a/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_de.properties b/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_de.properties index fb814f5c16c..78905f75ed7 100644 --- a/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_de.properties +++ b/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_de.properties @@ -11,6 +11,8 @@ meter = Erzeugungs- und Verbrauchszähler peakShaving = Lastspitzenkappung und atypische Netznutzung api = Schnittstellen ess = Speichersystemsteuerung +timedata = Timedata +test = Test # Global alias = Alias @@ -95,7 +97,7 @@ App.Api.RestJson.ReadWrite.Name = REST/JSON Schreibzugriff App.Api.RestJson.ReadWrite.Name.short = REST/JSON Schreibzugriff App.Timedata.InfluxDb.Name = Influx Db Timedata -App.Timedata.InfluxDb.Name.short = Timedata +App.Timedata.InfluxDb.Name.short = Influx Db App.Timedata.InfluxDb.queryLanguage.label = Abfragesprache App.Timedata.InfluxDb.url.label = URL App.Timedata.InfluxDb.url.description = Die InfluxDB-URL, z. B.: http://localhost:8086 diff --git a/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_en.properties b/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_en.properties index bbec3469d64..3e1bbf49ec2 100644 --- a/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_en.properties +++ b/io.openems.edge.core/src/io/openems/edge/core/appmanager/translation_en.properties @@ -11,6 +11,8 @@ meter = Production and consumption meter peakShaving = Peak shaving and atypical grid usage api = Interfaces ess = Energy Storage controller +timedata = Timedata +test = Test # Global alias = Alias @@ -95,7 +97,7 @@ App.Api.RestJson.ReadWrite.Name = REST/JSON write access App.Api.RestJson.ReadWrite.Name.short = REST/JSON write access App.Timedata.InfluxDb.Name = Influx Db Timedata -App.Timedata.InfluxDb.Name.short = Timedata +App.Timedata.InfluxDb.Name.short = Influx Db App.Timedata.InfluxDb.queryLanguage.label = Query language App.Timedata.InfluxDb.url.label = URL App.Timedata.InfluxDb.url.description = The InfluxDB URL, e.g.: http://localhost:8086 diff --git a/io.openems.edge.core/src/io/openems/edge/core/predictormanager/PredictorManagerImpl.java b/io.openems.edge.core/src/io/openems/edge/core/predictormanager/PredictorManagerImpl.java index 5e820a73686..934c788a24f 100644 --- a/io.openems.edge.core/src/io/openems/edge/core/predictormanager/PredictorManagerImpl.java +++ b/io.openems.edge.core/src/io/openems/edge/core/predictormanager/PredictorManagerImpl.java @@ -129,7 +129,7 @@ private Prediction getPredictionSum(Sum.ChannelId channelId) { GRID_ACTIVE_POWER, GRID_ACTIVE_POWER_L1, GRID_ACTIVE_POWER_L2, GRID_ACTIVE_POWER_L3, GRID_BUY_PRICE, GRID_BUY_ACTIVE_ENERGY, GRID_MAX_ACTIVE_POWER, GRID_MIN_ACTIVE_POWER, GRID_MODE, - GRID_SELL_ACTIVE_ENERGY, // + GRID_MODE_OFF_GRID_TIME, GRID_SELL_ACTIVE_ENERGY, // PRODUCTION_ACTIVE_ENERGY, PRODUCTION_AC_ACTIVE_ENERGY, PRODUCTION_AC_ACTIVE_POWER_L1, PRODUCTION_AC_ACTIVE_POWER_L2, PRODUCTION_AC_ACTIVE_POWER_L3, PRODUCTION_DC_ACTIVE_ENERGY, diff --git a/io.openems.edge.core/src/io/openems/edge/core/sum/SumImpl.java b/io.openems.edge.core/src/io/openems/edge/core/sum/SumImpl.java index c7aca7017cc..6bf8c875d46 100644 --- a/io.openems.edge.core/src/io/openems/edge/core/sum/SumImpl.java +++ b/io.openems.edge.core/src/io/openems/edge/core/sum/SumImpl.java @@ -29,6 +29,7 @@ import io.openems.edge.common.component.OpenemsComponent; import io.openems.edge.common.modbusslave.ModbusSlave; import io.openems.edge.common.modbusslave.ModbusSlaveTable; +import io.openems.edge.common.sum.GridMode; import io.openems.edge.common.sum.Sum; import io.openems.edge.common.type.TypeUtils; import io.openems.edge.ess.api.AsymmetricEss; @@ -43,6 +44,8 @@ import io.openems.edge.meter.api.ElectricityMeter; import io.openems.edge.meter.api.VirtualMeter; import io.openems.edge.timedata.api.Timedata; +import io.openems.edge.timedata.api.TimedataProvider; +import io.openems.edge.timedata.api.utils.CalculateActiveTime; import io.openems.edge.timeofusetariff.api.TimeOfUseTariff; @Designate(ocd = Config.class, factory = false) @@ -52,7 +55,7 @@ property = { // "enabled=true" // }) -public class SumImpl extends AbstractOpenemsComponent implements Sum, OpenemsComponent, ModbusSlave { +public class SumImpl extends AbstractOpenemsComponent implements Sum, OpenemsComponent, ModbusSlave, TimedataProvider { @Reference private ConfigurationAdmin cm; @@ -66,6 +69,9 @@ public class SumImpl extends AbstractOpenemsComponent implements Sum, OpenemsCom private final EnergyValuesHandler energyValuesHandler; private final Set ignoreStateComponents = new HashSet<>(); + private final CalculateActiveTime calculateOffGridTime = new CalculateActiveTime(this, + Sum.ChannelId.GRID_MODE_OFF_GRID_TIME); + private final ExtremeEverValues extremeEverValues = ExtremeEverValues.create(SINGLETON_SERVICE_PID) // .add(Sum.ChannelId.GRID_MIN_ACTIVE_POWER, "gridMinActivePower", // NEGATIVE, Sum.ChannelId.GRID_ACTIVE_POWER) // @@ -145,6 +151,11 @@ public void updateChannelsBeforeProcessImage() { this.calculateState(); } + @Override + public Timedata getTimedata() { + return this.timedata; + } + /** * Calculates the sum-value for each Channel. */ @@ -333,7 +344,9 @@ private void calculateChannelValues() { var essMaxApparentPowerSum = essMaxApparentPower.calculate(); this._setEssMaxApparentPower(essMaxApparentPowerSum); - this._setGridMode(essGridMode.calculate()); + var gridMode = essGridMode.calculate(); + this._setGridMode(gridMode); + this.calculateOffGridTime.update(gridMode == GridMode.OFF_GRID); var essActiveChargeEnergySum = essActiveChargeEnergy.calculate(); essActiveChargeEnergySum = this.energyValuesHandler.setValue(Sum.ChannelId.ESS_ACTIVE_CHARGE_ENERGY, diff --git a/io.openems.edge.core/test/io/openems/edge/core/appmanager/OpenemsAppCategoryTest.java b/io.openems.edge.core/test/io/openems/edge/core/appmanager/OpenemsAppCategoryTest.java new file mode 100644 index 00000000000..ac2472e6254 --- /dev/null +++ b/io.openems.edge.core/test/io/openems/edge/core/appmanager/OpenemsAppCategoryTest.java @@ -0,0 +1,33 @@ +package io.openems.edge.core.appmanager; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +import io.openems.common.session.Language; + +public class OpenemsAppCategoryTest { + + @Test + public void testEnglishTranslations() { + this.testTranslations(Language.EN); + } + + @Test + public void testGermanTranslations() { + this.testTranslations(Language.DE); + } + + private void testTranslations(Language l) { + final var debugTranslator = TranslationUtil.enableDebugMode(); + + for (var entry : OpenemsAppCategory.values()) { + entry.getReadableName(l); + } + + assertTrue( + "Missing Translation Keys for Language " + l + " [" + + String.join(", ", debugTranslator.getMissingKeys()) + "]", + debugTranslator.getMissingKeys().isEmpty()); + } +} diff --git a/io.openems.edge.ess.api/src/io/openems/edge/ess/api/ManagedSymmetricEss.java b/io.openems.edge.ess.api/src/io/openems/edge/ess/api/ManagedSymmetricEss.java index e41fe990d1b..159f8c054ca 100644 --- a/io.openems.edge.ess.api/src/io/openems/edge/ess/api/ManagedSymmetricEss.java +++ b/io.openems.edge.ess.api/src/io/openems/edge/ess/api/ManagedSymmetricEss.java @@ -291,7 +291,7 @@ public default IntegerReadChannel getAllowedChargePowerChannel() { } /** - * Gets the Allowed Charge Power in [W], range "<= 0". See + * Gets the Allowed Charge Power in [W], range "<= 0". See * {@link ChannelId#ALLOWED_CHARGE_POWER}. * * @return the Channel {@link Value} @@ -330,7 +330,7 @@ public default IntegerReadChannel getAllowedDischargePowerChannel() { } /** - * Gets the Allowed Discharge Power in [W], range "<= 0". See + * Gets the Allowed Discharge Power in [W], range ">= 0". See * {@link ChannelId#ALLOWED_DISCHARGE_POWER}. * * @return the Channel {@link Value} diff --git "a/io.openems.edge.ess.mr.gridcon/doc/Entscheidungstabelle_Zust\303\244nde_OnOffGrid_konsolidiert.xlsx" "b/io.openems.edge.ess.mr.gridcon/doc/Entscheidungstabelle_Zust\303\244nde_OnOffGrid_konsolidiert.xlsx" deleted file mode 100644 index 1698a8f42a4..00000000000 Binary files "a/io.openems.edge.ess.mr.gridcon/doc/Entscheidungstabelle_Zust\303\244nde_OnOffGrid_konsolidiert.xlsx" and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/Fehlerliste.csv b/io.openems.edge.ess.mr.gridcon/doc/Fehlerliste.csv deleted file mode 100644 index 47599d084cc..00000000000 --- a/io.openems.edge.ess.mr.gridcon/doc/Fehlerliste.csv +++ /dev/null @@ -1,1165 +0,0 @@ -Level;Device;;Trigger;;;Identification;;;;;;;Parameters;;;;;;;;;;Kommentar -;;;;;;;;;;;;;Condition;;;;;;Reaction;;;; -;Model / Manufacturer;Type;Source;Register / Module;Bit;Code;;;;Namespace;Enumerator;Text;Scope;Type;Trigger;;Acknowledge;;Dera-ting;Auto Ack. / Restart;Level;Target; -;;;;;;Main;M;B;Full;;;;;;Level;Delay;Level;Delay;;;;; -;;;;;;;;;;;;;;;;;;;;;;; -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x20;X;2;0x20X200;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_3;Temp Trip IGBT 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x20;X;2;0x20X201;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_2;Temp Trip IGBT 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x20;X;2;0x20X202;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_1;Temp Trip IGBT 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x20;X;2;0x20X203;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_4;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x20;X;2;0x20X204;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_3;Temp Trip Grid Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x20;X;2;0x20X205;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_2;Temp Trip Heatsink Sensor;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x20;X;2;0x20X206;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_1;Temp Trip Module Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x20;X;2;0x20X207;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_1;IGBT 1 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x20;X;2;0x20X208;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_2;IGBT 2 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x20;X;2;0x20X209;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_3;IGBT 3 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x20;X;2;0x20X20A;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_1;Invalid Dutycycles Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x20;X;2;0x20X20B;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_2;Invalid Dutycycles Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x20;X;2;0x20X20C;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_3;Invalid Dutycycles Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x20;X;2;0x20X20D;ERROR_CODES::IPU::v3LV1::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x20;X;2;0x20X20E;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_1;Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x20;X;2;0x20X20F;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_2;Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x20;X;2;0x20X210;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_3;Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x20;X;2;0x20X211;ERROR_CODES::IPU::v3LV1::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x20;X;2;0x20X212;ERROR_CODES::IPU::v3LV1::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x20;X;2;0x20X213;ERROR_CODES::IPU::v3LV1::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x20;X;2;0x20X214;ERROR_CODES::IPU::v3LV1::MCU;V1_TRIP;Grid Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x20;X;2;0x20X215;ERROR_CODES::IPU::v3LV1::MCU;V2_TRIP;Grid Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x20;X;2;0x20X216;ERROR_CODES::IPU::v3LV1::MCU;V3_TRIP;Grid Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x20;X;2;0x20X217;ERROR_CODES::IPU::v3LV1::MCU;V4_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x20;X;2;0x20X218;ERROR_CODES::IPU::v3LV1::MCU;V5_TRIP;Module Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x20;X;2;0x20X219;ERROR_CODES::IPU::v3LV1::MCU;V6_TRIP;Module Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x20;X;2;0x20X21A;ERROR_CODES::IPU::v3LV1::MCU;V7_TRIP;Module Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x20;X;2;0x20X21B;ERROR_CODES::IPU::v3LV1::MCU;UDC_P_TRIP;DC-Link Positive Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x20;X;2;0x20X21C;ERROR_CODES::IPU::v3LV1::MCU;UDC_N_TRIP;DC-Link Negative Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x20;X;2;0x20X21D;ERROR_CODES::IPU::v3LV1::MCU;UDC_DIFF_TRIP;DC-Link Voltage Imbalance;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x20;X;2;0x20X21E;ERROR_CODES::IPU::v3LV1::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x20;X;1;0x20X100;ERROR_CODES::IPU::v3LV1::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x20;X;1;0x20X101;ERROR_CODES::IPU::v3LV1::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -DSC;AixControl;CCU Slave;Sharc;COMInspector;02;0x20;X;1;0x20X102;ERROR_CODES::IPU::v3LV1::COM;SLAVE_UNREACHABLE;Slave unreachable;SHARC;BOOL;;1;;0;;AUTOACK;WARNING;SYSTEM; -DSC;AixControl;CCU Slave;Sharc;ErrorHandler;03;0x20;X;1;0x20X103;ERROR_CODES::IPU::v3LV1::COM;SLAVE_ERROR;Slave error;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x40;X;2;0x40X200;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_3;Bit 0;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x40;X;2;0x40X201;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_2;Bit 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x40;X;2;0x40X202;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT;Temp Trip IGBT;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x40;X;2;0x40X203;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_MCU;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x40;X;2;0x40X204;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C1;Temp Trip Choke 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x40;X;2;0x40X205;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C2;Temp Trip Choke 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x40;X;2;0x40X206;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C3;Temp Trip Choke 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x40;X;2;0x40X207;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_1;IGBT A Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x40;X;2;0x40X208;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_2;IGBT B Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x40;X;2;0x40X209;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_3;IGBT C Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x40;X;2;0x40X20A;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_1;Modulation Error P1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x40;X;2;0x40X20B;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_2;Modulation Error P2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x40;X;2;0x40X20C;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_3;Modulation Error P3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x40;X;2;0x40X20D;ERROR_CODES::IPU::vDCDC::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x40;X;2;0x40X20E;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_1;Overcurrent Protection Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x40;X;2;0x40X20F;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_2;Overcurrent Protection Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x40;X;2;0x40X210;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_3;Overcurrent Protection Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x40;X;2;0x40X211;ERROR_CODES::IPU::vDCDC::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x40;X;2;0x40X212;ERROR_CODES::IPU::vDCDC::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x40;X;2;0x40X213;ERROR_CODES::IPU::vDCDC::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x40;X;2;0x40X214;ERROR_CODES::IPU::vDCDC::MCU;V1_TRIP;Bit 20;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x40;X;2;0x40X215;ERROR_CODES::IPU::vDCDC::MCU;V2_TRIP;Bit 21;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x40;X;2;0x40X216;ERROR_CODES::IPU::vDCDC::MCU;V3_TRIP;Bit 22;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x40;X;2;0x40X217;ERROR_CODES::IPU::vDCDC::MCU;V24_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x40;X;2;0x40X218;ERROR_CODES::IPU::vDCDC::MCU;OCA_TRIP;Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x40;X;2;0x40X219;ERROR_CODES::IPU::vDCDC::MCU;OCB_TRIP;Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x40;X;2;0x40X21A;ERROR_CODES::IPU::vDCDC::MCU;OCC_TRIP;Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x40;X;2;0x40X21B;ERROR_CODES::IPU::vDCDC::MCU;UB1_TRIP;DC String 1 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x40;X;2;0x40X21C;ERROR_CODES::IPU::vDCDC::MCU;UB2_TRIP;DC String 2 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x40;X;2;0x40X21D;ERROR_CODES::IPU::vDCDC::MCU;UB3_TRIP;DC String 3 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x40;X;2;0x40X21E;ERROR_CODES::IPU::vDCDC::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;31;0x40;X;2;0x40X21F;ERROR_CODES::IPU::vDCDC::MCU;UZK_TRIP;DC-Link Overvoltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x40;X;1;0x40X100;ERROR_CODES::IPU::vDCDC::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;FORCED;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x40;X;1;0x40X101;ERROR_CODES::IPU::vDCDC::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPU690V;HIGH;160;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPU690V;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPU690V;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPU690V;HIGH;100;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPUCompact4L;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPUCompact4L;HIGH;60;0;;;;RESTART;FORCED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPULab;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPULab;HIGH;3;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;8;0x20X809;ERROR_CODES::IPU::v3LV1::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;8;0x20X80A;ERROR_CODES::IPU::v3LV1::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;8;0x20X80B;ERROR_CODES::IPU::v3LV1::EXT2;STATE_TRIP;(XT) State Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Software;MR;Control;Sharc;IPU3LInspector;12;0x20;X;8;0x20X80C;ERROR_CODES::IPU::v3LV1::EXT2;TRH_ERROR;(XT) Transient Handling Error;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;CCU Master;Sharc;IPU3LInspector;13;0x20;X;8;0x20X80D;ERROR_CODES::IPU::v3LV1::EXT2;M_TIMEOUT;(XT) Communication Timeout @ Master;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;14;0x20;X;8;0x20X80E;ERROR_CODES::IPU::v3LV1::EXT2;S_COMMUNICATION;(XT) Communication Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;15;0x20;X;8;0x20X80F;ERROR_CODES::IPU::v3LV1::EXT2;S_SOFTWARE;(XT) SW Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;16;0x20;X;8;0x20X810;ERROR_CODES::IPU::v3LV1::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;8;0x20X811;ERROR_CODES::IPU::v3LV1::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;8;0x20X812;ERROR_CODES::IPU::v3LV1::EXT2;WRONGFWVERSION;(XT) IPU Firmware incompatible;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;19;0x20;X;8;0x20X813;ERROR_CODES::IPU::v3LV1::EXT2;INDIV_SM_IGNORED_SYSLOCK;(XT) individual SM ignored Syslock;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -;;;Sharc;IPU3LInspector;20;0x20;X;8;0x20X814;ERROR_CODES::IPU::v3LV1::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;4;0x40X400;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_TRIP_IGBT;(XT) Temp Trip IGBT;IPUDCDC;HIGH;105;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;4;0x40X401;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_C;(XT) Temp Trip Choke C;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;4;0x40X402;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_B;(XT) Temp Trip Choke B;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;4;0x40X403;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_A;(XT) Temp Trip Choke A;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;4;0x40X404;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_A;(XT) String Current Peak Trip Phase A;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;4;0x40X405;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_B;(XT) String Current Peak Trip Phase B;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;4;0x40X406;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_C;(XT) String Current Peak Trip Phase C;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;4;0x40X407;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_A;(XT) String High Voltage Trip Phase A;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x40;X;4;0x40X408;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_B;(XT) String High Voltage Trip Phase B;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x40;X;4;0x40X409;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_C;(XT) String High Voltage Trip Phase C;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x40;X;4;0x40X40A;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_A;(XT) String Low Voltage Trip Phase A;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x40;X;4;0x40X40B;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_B;(XT) String Low Voltage Trip Phase B;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x40;X;4;0x40X40C;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_C;(XT) String Low Voltage Trip Phase C;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x40;X;4;0x40X40D;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_1;(XT) String Current RMS Trip Phase 1;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x40;X;4;0x40X40E;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_2;(XT) String Current RMS Trip Phase 2;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x40;X;4;0x40X40F;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_3;(XT) String Current RMS Trip Phase 3;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;8;0x40X800;ERROR_CODES::IPU::vDCDC::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUDCDC;HIGH;900;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;8;0x40X801;ERROR_CODES::IPU::vDCDC::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;8;0x40X802;ERROR_CODES::IPU::vDCDC::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;8;0x40X803;ERROR_CODES::IPU::vDCDC::EXT2;STATE_TRIP;(XT) State Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;8;0x40X804;ERROR_CODES::IPU::vDCDC::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;8;0x40X805;ERROR_CODES::IPU::vDCDC::EXT2;LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC;(XT) Ulink is not valid for connecting DCDC;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;8;0x40X806;ERROR_CODES::IPU::vDCDC::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;8;0x40X807;ERROR_CODES::IPU::vDCDC::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;1;0x30X100;ERROR_CODES::IPU::VBE::COM;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;09;0x30;X;1;0x30X109;ERROR_CODES::IPU::VBE::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;10;0x30;X;1;0x30X10A;ERROR_CODES::IPU::VBE::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;4;0x30X400;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_FAST;(XT) PLC Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM;Fault levels of VBE::EXT1 is WARNING because CCU TRIP dig. output should not be set. Reaction implemented in VBEFacade -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;01;0x30;X;4;0x30X401;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_SEQUENCED;(XT) PLC Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;02;0x30;X;4;0x30X402;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_FAST;(XT) VBE Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;03;0x30;X;4;0x30X403;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_SEQUENCED;(XT) VBE Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;04;0x30;X;4;0x30X404;ERROR_CODES::IPU::VBE::EXT1;KZ04_TRIP_FAST;(XT) KZ04 Trip Fast ;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;00;0x10;X;1;0x10X100;ERROR_CODES::MIO::v3V4C::AIXC;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;09;0x10;X;1;0x10X109;ERROR_CODES::MIO::v3V4C::AIXC;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;10;0x10;X;1;0x10X10A;ERROR_CODES::MIO::v3V4C::AIXC;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;00;0x10;X;4;0x10X400;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_LOW;(XT) Warning: Internal Temperature Low;SHARC;LOW;0;1;5;;;AUTOACK;WARNING;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;01;0x10;X;4;0x10X401;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_HIGH;(XT) Warning: Internal Temperature High;SHARC;HIGH;45;1;35;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;02;0x10;X;4;0x10X402;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_WARNING;(XT) Warning: Voltage Low Phase 1;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;03;0x10;X;4;0x10X403;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_WARNING;(XT) Warning: Voltage Low Phase 2;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;04;0x10;X;4;0x10X404;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_WARNING;(XT) Warning: Voltage Low Phase 3;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;05;0x10;X;4;0x10X405;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_WARNING;(XT) Warning: Voltage High Phase 1;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;06;0x10;X;4;0x10X406;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_WARNING;(XT) Warning: Voltage High Phase 2;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;07;0x10;X;4;0x10X407;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_WARNING;(XT) Warning: Voltage High Phase 3;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;08;0x10;X;4;0x10X408;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_WARNING;(XT) Warning: Voltage THD High Phase 1;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;09;0x10;X;4;0x10X409;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_WARNING;(XT) Warning: Voltage THD High Phase 2;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;10;0x10;X;4;0x10X40A;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_WARNING;(XT) Warning: Voltage THD High Phase 3;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;11;0x10;X;4;0x10X40B;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_TRIP;(XT) Voltage Low Trip Phase 1;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;12;0x10;X;4;0x10X40C;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_TRIP;(XT) Voltage Low Trip Phase 2;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;13;0x10;X;4;0x10X40D;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_TRIP;(XT) Voltage Low Trip Phase 3;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;14;0x10;X;4;0x10X40E;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_TRIP;(XT) Voltage High Trip Phase 1;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;15;0x10;X;4;0x10X40F;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_TRIP;(XT) Voltage High Trip Phase 2;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;16;0x10;X;4;0x10X410;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_TRIP;(XT) Voltage High Trip Phase 3;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;17;0x10;X;4;0x10X411;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_TRIP;(XT) Voltage THD Trip Phase 1;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;18;0x10;X;4;0x10X412;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_TRIP;(XT) Voltage THD Trip Phase 2;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;19;0x10;X;4;0x10X413;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_TRIP;(XT) Voltage THD Trip Phase 3;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;20;0x10;X;4;0x10X414;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_LOW_TRIP;(XT) Frequency Low Trip;SHARC;LOW;FREQ-5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;21;0x10;X;4;0x10X415;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_HIGH_TRIP;(XT) Frequency High Trip;SHARC;HIGH;FREQ+5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;22;0x10;X;4;0x10X416;ERROR_CODES::MIO::v3V4C::EXT1;PHASE_ORDER_TRIP;(XT) Invalid Phase Order Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;23;0x10;X;4;0x10X417;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 1;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;24;0x10;X;4;0x10X418;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 2;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;25;0x10;X;4;0x10X419;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 3;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;26;0x10;X;4;0x10X41A;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_DFDT_TRIP;(XT) Frequency Change Rate Trip;SHARC;HIGH;4;0;;;;;SHUTDOWN;SYSTEM;PQAA-5225 - Frequency Change-rate Lakeland - -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x20;X;2;0x20X200;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_3;Temp Trip IGBT 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x20;X;2;0x20X201;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_2;Temp Trip IGBT 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x20;X;2;0x20X202;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_1;Temp Trip IGBT 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x20;X;2;0x20X203;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_4;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x20;X;2;0x20X204;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_3;Temp Trip Grid Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x20;X;2;0x20X205;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_2;Temp Trip Heatsink Sensor;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x20;X;2;0x20X206;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_1;Temp Trip Module Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x20;X;2;0x20X207;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_1;IGBT 1 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x20;X;2;0x20X208;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_2;IGBT 2 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x20;X;2;0x20X209;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_3;IGBT 3 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x20;X;2;0x20X20A;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_1;Invalid Dutycycles Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x20;X;2;0x20X20B;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_2;Invalid Dutycycles Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x20;X;2;0x20X20C;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_3;Invalid Dutycycles Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x20;X;2;0x20X20D;ERROR_CODES::IPU::v3LV1::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x20;X;2;0x20X20E;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_1;Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x20;X;2;0x20X20F;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_2;Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x20;X;2;0x20X210;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_3;Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x20;X;2;0x20X211;ERROR_CODES::IPU::v3LV1::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x20;X;2;0x20X212;ERROR_CODES::IPU::v3LV1::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x20;X;2;0x20X213;ERROR_CODES::IPU::v3LV1::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x20;X;2;0x20X214;ERROR_CODES::IPU::v3LV1::MCU;V1_TRIP;Grid Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x20;X;2;0x20X215;ERROR_CODES::IPU::v3LV1::MCU;V2_TRIP;Grid Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x20;X;2;0x20X216;ERROR_CODES::IPU::v3LV1::MCU;V3_TRIP;Grid Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x20;X;2;0x20X217;ERROR_CODES::IPU::v3LV1::MCU;V4_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x20;X;2;0x20X218;ERROR_CODES::IPU::v3LV1::MCU;V5_TRIP;Module Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x20;X;2;0x20X219;ERROR_CODES::IPU::v3LV1::MCU;V6_TRIP;Module Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x20;X;2;0x20X21A;ERROR_CODES::IPU::v3LV1::MCU;V7_TRIP;Module Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x20;X;2;0x20X21B;ERROR_CODES::IPU::v3LV1::MCU;UDC_P_TRIP;DC-Link Positive Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x20;X;2;0x20X21C;ERROR_CODES::IPU::v3LV1::MCU;UDC_N_TRIP;DC-Link Negative Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x20;X;2;0x20X21D;ERROR_CODES::IPU::v3LV1::MCU;UDC_DIFF_TRIP;DC-Link Voltage Imbalance;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x20;X;2;0x20X21E;ERROR_CODES::IPU::v3LV1::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x20;X;1;0x20X100;ERROR_CODES::IPU::v3LV1::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x20;X;1;0x20X101;ERROR_CODES::IPU::v3LV1::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -DSC;AixControl;CCU Slave;Sharc;COMInspector;02;0x20;X;1;0x20X102;ERROR_CODES::IPU::v3LV1::COM;SLAVE_UNREACHABLE;Slave unreachable;SHARC;BOOL;;1;;0;;AUTOACK;WARNING;SYSTEM; -DSC;AixControl;CCU Slave;Sharc;ErrorHandler;03;0x20;X;1;0x20X103;ERROR_CODES::IPU::v3LV1::COM;SLAVE_ERROR;Slave error;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x40;X;2;0x40X200;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_3;Bit 0;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x40;X;2;0x40X201;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_2;Bit 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x40;X;2;0x40X202;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT;Temp Trip IGBT;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x40;X;2;0x40X203;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_MCU;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x40;X;2;0x40X204;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C1;Temp Trip Choke 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x40;X;2;0x40X205;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C2;Temp Trip Choke 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x40;X;2;0x40X206;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C3;Temp Trip Choke 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x40;X;2;0x40X207;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_1;IGBT A Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x40;X;2;0x40X208;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_2;IGBT B Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x40;X;2;0x40X209;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_3;IGBT C Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x40;X;2;0x40X20A;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_1;Modulation Error P1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x40;X;2;0x40X20B;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_2;Modulation Error P2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x40;X;2;0x40X20C;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_3;Modulation Error P3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x40;X;2;0x40X20D;ERROR_CODES::IPU::vDCDC::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x40;X;2;0x40X20E;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_1;Overcurrent Protection Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x40;X;2;0x40X20F;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_2;Overcurrent Protection Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x40;X;2;0x40X210;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_3;Overcurrent Protection Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x40;X;2;0x40X211;ERROR_CODES::IPU::vDCDC::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x40;X;2;0x40X212;ERROR_CODES::IPU::vDCDC::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x40;X;2;0x40X213;ERROR_CODES::IPU::vDCDC::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x40;X;2;0x40X214;ERROR_CODES::IPU::vDCDC::MCU;V1_TRIP;Bit 20;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x40;X;2;0x40X215;ERROR_CODES::IPU::vDCDC::MCU;V2_TRIP;Bit 21;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x40;X;2;0x40X216;ERROR_CODES::IPU::vDCDC::MCU;V3_TRIP;Bit 22;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x40;X;2;0x40X217;ERROR_CODES::IPU::vDCDC::MCU;V24_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x40;X;2;0x40X218;ERROR_CODES::IPU::vDCDC::MCU;OCA_TRIP;Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x40;X;2;0x40X219;ERROR_CODES::IPU::vDCDC::MCU;OCB_TRIP;Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x40;X;2;0x40X21A;ERROR_CODES::IPU::vDCDC::MCU;OCC_TRIP;Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x40;X;2;0x40X21B;ERROR_CODES::IPU::vDCDC::MCU;UB1_TRIP;DC String 1 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x40;X;2;0x40X21C;ERROR_CODES::IPU::vDCDC::MCU;UB2_TRIP;DC String 2 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x40;X;2;0x40X21D;ERROR_CODES::IPU::vDCDC::MCU;UB3_TRIP;DC String 3 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x40;X;2;0x40X21E;ERROR_CODES::IPU::vDCDC::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;31;0x40;X;2;0x40X21F;ERROR_CODES::IPU::vDCDC::MCU;UZK_TRIP;DC-Link Overvoltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x40;X;1;0x40X100;ERROR_CODES::IPU::vDCDC::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;FORCED;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x40;X;1;0x40X101;ERROR_CODES::IPU::vDCDC::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPU690V;HIGH;160;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPU690V;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPU690V;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPU690V;HIGH;100;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPUCompact4L;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPUCompact4L;HIGH;60;0;;;;RESTART;FORCED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPULab;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPULab;HIGH;3;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;8;0x20X809;ERROR_CODES::IPU::v3LV1::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;8;0x20X80A;ERROR_CODES::IPU::v3LV1::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;8;0x20X80B;ERROR_CODES::IPU::v3LV1::EXT2;STATE_TRIP;(XT) State Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Software;MR;Control;Sharc;IPU3LInspector;12;0x20;X;8;0x20X80C;ERROR_CODES::IPU::v3LV1::EXT2;TRH_ERROR;(XT) Transient Handling Error;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;CCU Master;Sharc;IPU3LInspector;13;0x20;X;8;0x20X80D;ERROR_CODES::IPU::v3LV1::EXT2;M_TIMEOUT;(XT) Communication Timeout @ Master;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;14;0x20;X;8;0x20X80E;ERROR_CODES::IPU::v3LV1::EXT2;S_COMMUNICATION;(XT) Communication Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;15;0x20;X;8;0x20X80F;ERROR_CODES::IPU::v3LV1::EXT2;S_SOFTWARE;(XT) SW Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;16;0x20;X;8;0x20X810;ERROR_CODES::IPU::v3LV1::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;8;0x20X811;ERROR_CODES::IPU::v3LV1::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;8;0x20X812;ERROR_CODES::IPU::v3LV1::EXT2;WRONGFWVERSION;(XT) IPU Firmware incompatible;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;19;0x20;X;8;0x20X813;ERROR_CODES::IPU::v3LV1::EXT2;INDIV_SM_IGNORED_SYSLOCK;(XT) individual SM ignored Syslock;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -;;;Sharc;IPU3LInspector;20;0x20;X;8;0x20X814;ERROR_CODES::IPU::v3LV1::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;4;0x40X400;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_TRIP_IGBT;(XT) Temp Trip IGBT;IPUDCDC;HIGH;105;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;4;0x40X401;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_C;(XT) Temp Trip Choke C;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;4;0x40X402;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_B;(XT) Temp Trip Choke B;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;4;0x40X403;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_A;(XT) Temp Trip Choke A;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;4;0x40X404;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_A;(XT) String Current Peak Trip Phase A;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;4;0x40X405;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_B;(XT) String Current Peak Trip Phase B;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;4;0x40X406;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_C;(XT) String Current Peak Trip Phase C;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;4;0x40X407;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_A;(XT) String High Voltage Trip Phase A;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x40;X;4;0x40X408;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_B;(XT) String High Voltage Trip Phase B;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x40;X;4;0x40X409;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_C;(XT) String High Voltage Trip Phase C;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x40;X;4;0x40X40A;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_A;(XT) String Low Voltage Trip Phase A;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x40;X;4;0x40X40B;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_B;(XT) String Low Voltage Trip Phase B;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x40;X;4;0x40X40C;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_C;(XT) String Low Voltage Trip Phase C;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x40;X;4;0x40X40D;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_1;(XT) String Current RMS Trip Phase 1;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x40;X;4;0x40X40E;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_2;(XT) String Current RMS Trip Phase 2;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x40;X;4;0x40X40F;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_3;(XT) String Current RMS Trip Phase 3;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;8;0x40X800;ERROR_CODES::IPU::vDCDC::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUDCDC;HIGH;900;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;8;0x40X801;ERROR_CODES::IPU::vDCDC::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;8;0x40X802;ERROR_CODES::IPU::vDCDC::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;8;0x40X803;ERROR_CODES::IPU::vDCDC::EXT2;STATE_TRIP;(XT) State Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;8;0x40X804;ERROR_CODES::IPU::vDCDC::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;8;0x40X805;ERROR_CODES::IPU::vDCDC::EXT2;LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC;(XT) Ulink is not valid for connecting DCDC;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;8;0x40X806;ERROR_CODES::IPU::vDCDC::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;8;0x40X807;ERROR_CODES::IPU::vDCDC::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;1;0x30X100;ERROR_CODES::IPU::VBE::COM;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;09;0x30;X;1;0x30X109;ERROR_CODES::IPU::VBE::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;10;0x30;X;1;0x30X10A;ERROR_CODES::IPU::VBE::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;4;0x30X400;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_FAST;(XT) PLC Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM;Fault levels of VBE::EXT1 is WARNING because CCU TRIP dig. output should not be set. Reaction implemented in VBEFacade -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;01;0x30;X;4;0x30X401;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_SEQUENCED;(XT) PLC Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;02;0x30;X;4;0x30X402;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_FAST;(XT) VBE Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;03;0x30;X;4;0x30X403;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_SEQUENCED;(XT) VBE Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;04;0x30;X;4;0x30X404;ERROR_CODES::IPU::VBE::EXT1;KZ04_TRIP_FAST;(XT) KZ04 Trip Fast ;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;00;0x10;X;1;0x10X100;ERROR_CODES::MIO::v3V4C::AIXC;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;09;0x10;X;1;0x10X109;ERROR_CODES::MIO::v3V4C::AIXC;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;10;0x10;X;1;0x10X10A;ERROR_CODES::MIO::v3V4C::AIXC;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;00;0x10;X;4;0x10X400;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_LOW;(XT) Warning: Internal Temperature Low;SHARC;LOW;0;1;5;;;AUTOACK;WARNING;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;01;0x10;X;4;0x10X401;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_HIGH;(XT) Warning: Internal Temperature High;SHARC;HIGH;45;1;35;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;02;0x10;X;4;0x10X402;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_WARNING;(XT) Warning: Voltage Low Phase 1;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;03;0x10;X;4;0x10X403;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_WARNING;(XT) Warning: Voltage Low Phase 2;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;04;0x10;X;4;0x10X404;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_WARNING;(XT) Warning: Voltage Low Phase 3;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;05;0x10;X;4;0x10X405;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_WARNING;(XT) Warning: Voltage High Phase 1;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;06;0x10;X;4;0x10X406;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_WARNING;(XT) Warning: Voltage High Phase 2;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;07;0x10;X;4;0x10X407;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_WARNING;(XT) Warning: Voltage High Phase 3;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;08;0x10;X;4;0x10X408;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_WARNING;(XT) Warning: Voltage THD High Phase 1;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;09;0x10;X;4;0x10X409;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_WARNING;(XT) Warning: Voltage THD High Phase 2;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;10;0x10;X;4;0x10X40A;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_WARNING;(XT) Warning: Voltage THD High Phase 3;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;11;0x10;X;4;0x10X40B;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_TRIP;(XT) Voltage Low Trip Phase 1;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;12;0x10;X;4;0x10X40C;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_TRIP;(XT) Voltage Low Trip Phase 2;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;13;0x10;X;4;0x10X40D;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_TRIP;(XT) Voltage Low Trip Phase 3;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;14;0x10;X;4;0x10X40E;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_TRIP;(XT) Voltage High Trip Phase 1;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;15;0x10;X;4;0x10X40F;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_TRIP;(XT) Voltage High Trip Phase 2;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;16;0x10;X;4;0x10X410;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_TRIP;(XT) Voltage High Trip Phase 3;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;17;0x10;X;4;0x10X411;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_TRIP;(XT) Voltage THD Trip Phase 1;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;18;0x10;X;4;0x10X412;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_TRIP;(XT) Voltage THD Trip Phase 2;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;19;0x10;X;4;0x10X413;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_TRIP;(XT) Voltage THD Trip Phase 3;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;20;0x10;X;4;0x10X414;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_LOW_TRIP;(XT) Frequency Low Trip;SHARC;LOW;FREQ-5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;21;0x10;X;4;0x10X415;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_HIGH_TRIP;(XT) Frequency High Trip;SHARC;HIGH;FREQ+5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;22;0x10;X;4;0x10X416;ERROR_CODES::MIO::v3V4C::EXT1;PHASE_ORDER_TRIP;(XT) Invalid Phase Order Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;23;0x10;X;4;0x10X417;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 1;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;24;0x10;X;4;0x10X418;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 2;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;25;0x10;X;4;0x10X419;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 3;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;26;0x10;X;4;0x10X41A;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_DFDT_TRIP;(XT) Frequency Change Rate Trip;SHARC;HIGH;4;0;;;;;SHUTDOWN;SYSTEM;PQAA-5225 - Frequency Change-rate Lakeland - -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x20;X;2;0x20X200;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_3;Temp Trip IGBT 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x20;X;2;0x20X201;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_2;Temp Trip IGBT 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x20;X;2;0x20X202;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_1;Temp Trip IGBT 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x20;X;2;0x20X203;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_4;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x20;X;2;0x20X204;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_3;Temp Trip Grid Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x20;X;2;0x20X205;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_2;Temp Trip Heatsink Sensor;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x20;X;2;0x20X206;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_1;Temp Trip Module Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x20;X;2;0x20X207;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_1;IGBT 1 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x20;X;2;0x20X208;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_2;IGBT 2 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x20;X;2;0x20X209;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_3;IGBT 3 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x20;X;2;0x20X20A;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_1;Invalid Dutycycles Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x20;X;2;0x20X20B;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_2;Invalid Dutycycles Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x20;X;2;0x20X20C;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_3;Invalid Dutycycles Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x20;X;2;0x20X20D;ERROR_CODES::IPU::v3LV1::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x20;X;2;0x20X20E;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_1;Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x20;X;2;0x20X20F;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_2;Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x20;X;2;0x20X210;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_3;Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x20;X;2;0x20X211;ERROR_CODES::IPU::v3LV1::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x20;X;2;0x20X212;ERROR_CODES::IPU::v3LV1::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x20;X;2;0x20X213;ERROR_CODES::IPU::v3LV1::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x20;X;2;0x20X214;ERROR_CODES::IPU::v3LV1::MCU;V1_TRIP;Grid Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x20;X;2;0x20X215;ERROR_CODES::IPU::v3LV1::MCU;V2_TRIP;Grid Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x20;X;2;0x20X216;ERROR_CODES::IPU::v3LV1::MCU;V3_TRIP;Grid Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x20;X;2;0x20X217;ERROR_CODES::IPU::v3LV1::MCU;V4_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x20;X;2;0x20X218;ERROR_CODES::IPU::v3LV1::MCU;V5_TRIP;Module Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x20;X;2;0x20X219;ERROR_CODES::IPU::v3LV1::MCU;V6_TRIP;Module Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x20;X;2;0x20X21A;ERROR_CODES::IPU::v3LV1::MCU;V7_TRIP;Module Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x20;X;2;0x20X21B;ERROR_CODES::IPU::v3LV1::MCU;UDC_P_TRIP;DC-Link Positive Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x20;X;2;0x20X21C;ERROR_CODES::IPU::v3LV1::MCU;UDC_N_TRIP;DC-Link Negative Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x20;X;2;0x20X21D;ERROR_CODES::IPU::v3LV1::MCU;UDC_DIFF_TRIP;DC-Link Voltage Imbalance;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x20;X;2;0x20X21E;ERROR_CODES::IPU::v3LV1::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x20;X;1;0x20X100;ERROR_CODES::IPU::v3LV1::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x20;X;1;0x20X101;ERROR_CODES::IPU::v3LV1::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -DSC;AixControl;CCU Slave;Sharc;COMInspector;02;0x20;X;1;0x20X102;ERROR_CODES::IPU::v3LV1::COM;SLAVE_UNREACHABLE;Slave unreachable;SHARC;BOOL;;1;;0;;AUTOACK;WARNING;SYSTEM; -DSC;AixControl;CCU Slave;Sharc;ErrorHandler;03;0x20;X;1;0x20X103;ERROR_CODES::IPU::v3LV1::COM;SLAVE_ERROR;Slave error;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x40;X;2;0x40X200;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_3;Bit 0;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x40;X;2;0x40X201;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_2;Bit 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x40;X;2;0x40X202;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT;Temp Trip IGBT;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x40;X;2;0x40X203;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_MCU;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x40;X;2;0x40X204;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C1;Temp Trip Choke 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x40;X;2;0x40X205;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C2;Temp Trip Choke 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x40;X;2;0x40X206;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C3;Temp Trip Choke 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x40;X;2;0x40X207;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_1;IGBT A Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x40;X;2;0x40X208;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_2;IGBT B Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x40;X;2;0x40X209;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_3;IGBT C Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x40;X;2;0x40X20A;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_1;Modulation Error P1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x40;X;2;0x40X20B;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_2;Modulation Error P2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x40;X;2;0x40X20C;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_3;Modulation Error P3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x40;X;2;0x40X20D;ERROR_CODES::IPU::vDCDC::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x40;X;2;0x40X20E;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_1;Overcurrent Protection Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x40;X;2;0x40X20F;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_2;Overcurrent Protection Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x40;X;2;0x40X210;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_3;Overcurrent Protection Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x40;X;2;0x40X211;ERROR_CODES::IPU::vDCDC::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x40;X;2;0x40X212;ERROR_CODES::IPU::vDCDC::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x40;X;2;0x40X213;ERROR_CODES::IPU::vDCDC::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x40;X;2;0x40X214;ERROR_CODES::IPU::vDCDC::MCU;V1_TRIP;Bit 20;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x40;X;2;0x40X215;ERROR_CODES::IPU::vDCDC::MCU;V2_TRIP;Bit 21;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x40;X;2;0x40X216;ERROR_CODES::IPU::vDCDC::MCU;V3_TRIP;Bit 22;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x40;X;2;0x40X217;ERROR_CODES::IPU::vDCDC::MCU;V24_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x40;X;2;0x40X218;ERROR_CODES::IPU::vDCDC::MCU;OCA_TRIP;Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x40;X;2;0x40X219;ERROR_CODES::IPU::vDCDC::MCU;OCB_TRIP;Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x40;X;2;0x40X21A;ERROR_CODES::IPU::vDCDC::MCU;OCC_TRIP;Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x40;X;2;0x40X21B;ERROR_CODES::IPU::vDCDC::MCU;UB1_TRIP;DC String 1 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x40;X;2;0x40X21C;ERROR_CODES::IPU::vDCDC::MCU;UB2_TRIP;DC String 2 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x40;X;2;0x40X21D;ERROR_CODES::IPU::vDCDC::MCU;UB3_TRIP;DC String 3 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x40;X;2;0x40X21E;ERROR_CODES::IPU::vDCDC::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;31;0x40;X;2;0x40X21F;ERROR_CODES::IPU::vDCDC::MCU;UZK_TRIP;DC-Link Overvoltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x40;X;1;0x40X100;ERROR_CODES::IPU::vDCDC::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;FORCED;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x40;X;1;0x40X101;ERROR_CODES::IPU::vDCDC::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPU690V;HIGH;160;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPU690V;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPU690V;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPU690V;HIGH;100;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPUCompact4L;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPUCompact4L;HIGH;60;0;;;;RESTART;FORCED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPULab;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPULab;HIGH;3;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;8;0x20X809;ERROR_CODES::IPU::v3LV1::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;8;0x20X80A;ERROR_CODES::IPU::v3LV1::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;8;0x20X80B;ERROR_CODES::IPU::v3LV1::EXT2;STATE_TRIP;(XT) State Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Software;MR;Control;Sharc;IPU3LInspector;12;0x20;X;8;0x20X80C;ERROR_CODES::IPU::v3LV1::EXT2;TRH_ERROR;(XT) Transient Handling Error;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;CCU Master;Sharc;IPU3LInspector;13;0x20;X;8;0x20X80D;ERROR_CODES::IPU::v3LV1::EXT2;M_TIMEOUT;(XT) Communication Timeout @ Master;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;14;0x20;X;8;0x20X80E;ERROR_CODES::IPU::v3LV1::EXT2;S_COMMUNICATION;(XT) Communication Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;15;0x20;X;8;0x20X80F;ERROR_CODES::IPU::v3LV1::EXT2;S_SOFTWARE;(XT) SW Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;16;0x20;X;8;0x20X810;ERROR_CODES::IPU::v3LV1::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;8;0x20X811;ERROR_CODES::IPU::v3LV1::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;8;0x20X812;ERROR_CODES::IPU::v3LV1::EXT2;WRONGFWVERSION;(XT) IPU Firmware incompatible;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;19;0x20;X;8;0x20X813;ERROR_CODES::IPU::v3LV1::EXT2;INDIV_SM_IGNORED_SYSLOCK;(XT) individual SM ignored Syslock;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -;;;Sharc;IPU3LInspector;20;0x20;X;8;0x20X814;ERROR_CODES::IPU::v3LV1::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;4;0x40X400;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_TRIP_IGBT;(XT) Temp Trip IGBT;IPUDCDC;HIGH;105;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;4;0x40X401;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_C;(XT) Temp Trip Choke C;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;4;0x40X402;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_B;(XT) Temp Trip Choke B;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;4;0x40X403;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_A;(XT) Temp Trip Choke A;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;4;0x40X404;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_A;(XT) String Current Peak Trip Phase A;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;4;0x40X405;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_B;(XT) String Current Peak Trip Phase B;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;4;0x40X406;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_C;(XT) String Current Peak Trip Phase C;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;4;0x40X407;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_A;(XT) String High Voltage Trip Phase A;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x40;X;4;0x40X408;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_B;(XT) String High Voltage Trip Phase B;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x40;X;4;0x40X409;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_C;(XT) String High Voltage Trip Phase C;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x40;X;4;0x40X40A;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_A;(XT) String Low Voltage Trip Phase A;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x40;X;4;0x40X40B;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_B;(XT) String Low Voltage Trip Phase B;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x40;X;4;0x40X40C;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_C;(XT) String Low Voltage Trip Phase C;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x40;X;4;0x40X40D;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_1;(XT) String Current RMS Trip Phase 1;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x40;X;4;0x40X40E;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_2;(XT) String Current RMS Trip Phase 2;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x40;X;4;0x40X40F;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_3;(XT) String Current RMS Trip Phase 3;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;8;0x40X800;ERROR_CODES::IPU::vDCDC::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUDCDC;HIGH;900;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;8;0x40X801;ERROR_CODES::IPU::vDCDC::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;8;0x40X802;ERROR_CODES::IPU::vDCDC::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;8;0x40X803;ERROR_CODES::IPU::vDCDC::EXT2;STATE_TRIP;(XT) State Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;8;0x40X804;ERROR_CODES::IPU::vDCDC::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;8;0x40X805;ERROR_CODES::IPU::vDCDC::EXT2;LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC;(XT) Ulink is not valid for connecting DCDC;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;8;0x40X806;ERROR_CODES::IPU::vDCDC::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;8;0x40X807;ERROR_CODES::IPU::vDCDC::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;1;0x30X100;ERROR_CODES::IPU::VBE::COM;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;09;0x30;X;1;0x30X109;ERROR_CODES::IPU::VBE::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;10;0x30;X;1;0x30X10A;ERROR_CODES::IPU::VBE::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;4;0x30X400;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_FAST;(XT) PLC Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM;Fault levels of VBE::EXT1 is WARNING because CCU TRIP dig. output should not be set. Reaction implemented in VBEFacade -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;01;0x30;X;4;0x30X401;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_SEQUENCED;(XT) PLC Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;02;0x30;X;4;0x30X402;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_FAST;(XT) VBE Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;03;0x30;X;4;0x30X403;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_SEQUENCED;(XT) VBE Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;04;0x30;X;4;0x30X404;ERROR_CODES::IPU::VBE::EXT1;KZ04_TRIP_FAST;(XT) KZ04 Trip Fast ;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;00;0x10;X;1;0x10X100;ERROR_CODES::MIO::v3V4C::AIXC;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;09;0x10;X;1;0x10X109;ERROR_CODES::MIO::v3V4C::AIXC;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;10;0x10;X;1;0x10X10A;ERROR_CODES::MIO::v3V4C::AIXC;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;00;0x10;X;4;0x10X400;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_LOW;(XT) Warning: Internal Temperature Low;SHARC;LOW;0;1;5;;;AUTOACK;WARNING;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;01;0x10;X;4;0x10X401;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_HIGH;(XT) Warning: Internal Temperature High;SHARC;HIGH;45;1;35;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;02;0x10;X;4;0x10X402;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_WARNING;(XT) Warning: Voltage Low Phase 1;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;03;0x10;X;4;0x10X403;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_WARNING;(XT) Warning: Voltage Low Phase 2;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;04;0x10;X;4;0x10X404;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_WARNING;(XT) Warning: Voltage Low Phase 3;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;05;0x10;X;4;0x10X405;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_WARNING;(XT) Warning: Voltage High Phase 1;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;06;0x10;X;4;0x10X406;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_WARNING;(XT) Warning: Voltage High Phase 2;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;07;0x10;X;4;0x10X407;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_WARNING;(XT) Warning: Voltage High Phase 3;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;08;0x10;X;4;0x10X408;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_WARNING;(XT) Warning: Voltage THD High Phase 1;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;09;0x10;X;4;0x10X409;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_WARNING;(XT) Warning: Voltage THD High Phase 2;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;10;0x10;X;4;0x10X40A;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_WARNING;(XT) Warning: Voltage THD High Phase 3;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;11;0x10;X;4;0x10X40B;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_TRIP;(XT) Voltage Low Trip Phase 1;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;12;0x10;X;4;0x10X40C;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_TRIP;(XT) Voltage Low Trip Phase 2;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;13;0x10;X;4;0x10X40D;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_TRIP;(XT) Voltage Low Trip Phase 3;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;14;0x10;X;4;0x10X40E;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_TRIP;(XT) Voltage High Trip Phase 1;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;15;0x10;X;4;0x10X40F;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_TRIP;(XT) Voltage High Trip Phase 2;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;16;0x10;X;4;0x10X410;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_TRIP;(XT) Voltage High Trip Phase 3;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;17;0x10;X;4;0x10X411;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_TRIP;(XT) Voltage THD Trip Phase 1;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;18;0x10;X;4;0x10X412;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_TRIP;(XT) Voltage THD Trip Phase 2;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;19;0x10;X;4;0x10X413;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_TRIP;(XT) Voltage THD Trip Phase 3;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;20;0x10;X;4;0x10X414;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_LOW_TRIP;(XT) Frequency Low Trip;SHARC;LOW;FREQ-5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;21;0x10;X;4;0x10X415;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_HIGH_TRIP;(XT) Frequency High Trip;SHARC;HIGH;FREQ+5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;22;0x10;X;4;0x10X416;ERROR_CODES::MIO::v3V4C::EXT1;PHASE_ORDER_TRIP;(XT) Invalid Phase Order Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;23;0x10;X;4;0x10X417;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 1;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;24;0x10;X;4;0x10X418;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 2;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;25;0x10;X;4;0x10X419;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 3;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;26;0x10;X;4;0x10X41A;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_DFDT_TRIP;(XT) Frequency Change Rate Trip;SHARC;HIGH;4;0;;;;;SHUTDOWN;SYSTEM;PQAA-5225 - Frequency Change-rate Lakeland - -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x20;X;2;0x20X200;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_3;Temp Trip IGBT 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x20;X;2;0x20X201;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_2;Temp Trip IGBT 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x20;X;2;0x20X202;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_IGBT_1;Temp Trip IGBT 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x20;X;2;0x20X203;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_4;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x20;X;2;0x20X204;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_3;Temp Trip Grid Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x20;X;2;0x20X205;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_2;Temp Trip Heatsink Sensor;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x20;X;2;0x20X206;ERROR_CODES::IPU::v3LV1::MCU;TEMP_TRIP_1;Temp Trip Module Choke;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x20;X;2;0x20X207;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_1;IGBT 1 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x20;X;2;0x20X208;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_2;IGBT 2 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x20;X;2;0x20X209;ERROR_CODES::IPU::v3LV1::MCU;DESAT_TRIP_3;IGBT 3 Saturation;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x20;X;2;0x20X20A;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_1;Invalid Dutycycles Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x20;X;2;0x20X20B;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_2;Invalid Dutycycles Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x20;X;2;0x20X20C;ERROR_CODES::IPU::v3LV1::MCU;INTERN_TRIP_3;Invalid Dutycycles Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x20;X;2;0x20X20D;ERROR_CODES::IPU::v3LV1::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x20;X;2;0x20X20E;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_1;Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x20;X;2;0x20X20F;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_2;Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x20;X;2;0x20X210;ERROR_CODES::IPU::v3LV1::MCU;OC_TRIP_3;Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x20;X;2;0x20X211;ERROR_CODES::IPU::v3LV1::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x20;X;2;0x20X212;ERROR_CODES::IPU::v3LV1::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x20;X;2;0x20X213;ERROR_CODES::IPU::v3LV1::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x20;X;2;0x20X214;ERROR_CODES::IPU::v3LV1::MCU;V1_TRIP;Grid Overcurrent Phase 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x20;X;2;0x20X215;ERROR_CODES::IPU::v3LV1::MCU;V2_TRIP;Grid Overcurrent Phase 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x20;X;2;0x20X216;ERROR_CODES::IPU::v3LV1::MCU;V3_TRIP;Grid Overcurrent Phase 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x20;X;2;0x20X217;ERROR_CODES::IPU::v3LV1::MCU;V4_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x20;X;2;0x20X218;ERROR_CODES::IPU::v3LV1::MCU;V5_TRIP;Module Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x20;X;2;0x20X219;ERROR_CODES::IPU::v3LV1::MCU;V6_TRIP;Module Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x20;X;2;0x20X21A;ERROR_CODES::IPU::v3LV1::MCU;V7_TRIP;Module Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x20;X;2;0x20X21B;ERROR_CODES::IPU::v3LV1::MCU;UDC_P_TRIP;DC-Link Positive Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x20;X;2;0x20X21C;ERROR_CODES::IPU::v3LV1::MCU;UDC_N_TRIP;DC-Link Negative Voltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x20;X;2;0x20X21D;ERROR_CODES::IPU::v3LV1::MCU;UDC_DIFF_TRIP;DC-Link Voltage Imbalance;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x20;X;2;0x20X21E;ERROR_CODES::IPU::v3LV1::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x20;X;1;0x20X100;ERROR_CODES::IPU::v3LV1::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x20;X;1;0x20X101;ERROR_CODES::IPU::v3LV1::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -DSC;AixControl;CCU Slave;Sharc;COMInspector;02;0x20;X;1;0x20X102;ERROR_CODES::IPU::v3LV1::COM;SLAVE_UNREACHABLE;Slave unreachable;SHARC;BOOL;;1;;0;;AUTOACK;WARNING;SYSTEM; -DSC;AixControl;CCU Slave;Sharc;ErrorHandler;03;0x20;X;1;0x20X103;ERROR_CODES::IPU::v3LV1::COM;SLAVE_ERROR;Slave error;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;00;0x40;X;2;0x40X200;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_3;Bit 0;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;01;0x40;X;2;0x40X201;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT_2;Bit 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;02;0x40;X;2;0x40X202;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_IGBT;Temp Trip IGBT;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;03;0x40;X;2;0x40X203;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_MCU;Temp Trip Board;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;04;0x40;X;2;0x40X204;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C1;Temp Trip Choke 1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;05;0x40;X;2;0x40X205;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C2;Temp Trip Choke 2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;06;0x40;X;2;0x40X206;ERROR_CODES::IPU::vDCDC::MCU;TEMP_TRIP_C3;Temp Trip Choke 3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;07;0x40;X;2;0x40X207;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_1;IGBT A Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;08;0x40;X;2;0x40X208;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_2;IGBT B Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;09;0x40;X;2;0x40X209;ERROR_CODES::IPU::vDCDC::MCU;DESAT_TRIP_3;IGBT C Error;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;10;0x40;X;2;0x40X20A;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_1;Modulation Error P1;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;11;0x40;X;2;0x40X20B;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_2;Modulation Error P2;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;12;0x40;X;2;0x40X20C;ERROR_CODES::IPU::vDCDC::MCU;INTERN_TRIP_3;Modulation Error P3;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;13;0x40;X;2;0x40X20D;ERROR_CODES::IPU::vDCDC::MCU;POWER_TRIP;Power Trip;SHARC;Extern;;;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;14;0x40;X;2;0x40X20E;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_1;Overcurrent Protection Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;15;0x40;X;2;0x40X20F;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_2;Overcurrent Protection Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;16;0x40;X;2;0x40X210;ERROR_CODES::IPU::vDCDC::MCU;OC_TRIP_3;Overcurrent Protection Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Comparator@+-140Apk -Hardware;Enasys;IPU;MCU;ErrorIRQ;17;0x40;X;2;0x40X211;ERROR_CODES::IPU::vDCDC::MCU;SWFREQ_TRIP;Switching Frequency Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;18;0x40;X;2;0x40X212;ERROR_CODES::IPU::vDCDC::MCU;RMS_TRIP;RMS Current Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;19;0x40;X;2;0x40X213;ERROR_CODES::IPU::vDCDC::MCU;SOFTWARE_TRIP;Software Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;20;0x40;X;2;0x40X214;ERROR_CODES::IPU::vDCDC::MCU;V1_TRIP;Bit 20;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;21;0x40;X;2;0x40X215;ERROR_CODES::IPU::vDCDC::MCU;V2_TRIP;Bit 21;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;22;0x40;X;2;0x40X216;ERROR_CODES::IPU::vDCDC::MCU;V3_TRIP;Bit 22;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;23;0x40;X;2;0x40X217;ERROR_CODES::IPU::vDCDC::MCU;V24_TRIP;24 V Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;24;0x40;X;2;0x40X218;ERROR_CODES::IPU::vDCDC::MCU;OCA_TRIP;Overcurrent Phase A;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;25;0x40;X;2;0x40X219;ERROR_CODES::IPU::vDCDC::MCU;OCB_TRIP;Overcurrent Phase B;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;26;0x40;X;2;0x40X21A;ERROR_CODES::IPU::vDCDC::MCU;OCC_TRIP;Overcurrent Phase C;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;27;0x40;X;2;0x40X21B;ERROR_CODES::IPU::vDCDC::MCU;UB1_TRIP;DC String 1 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;MCU;ErrorIRQ;28;0x40;X;2;0x40X21C;ERROR_CODES::IPU::vDCDC::MCU;UB2_TRIP;DC String 2 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;29;0x40;X;2;0x40X21D;ERROR_CODES::IPU::vDCDC::MCU;UB3_TRIP;DC String 3 Overvoltage;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;30;0x40;X;2;0x40X21E;ERROR_CODES::IPU::vDCDC::MCU;TACHO_TRIP;Fan Error;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;Todo 170831 Heo FW -Hardware;Enasys;IPU;MCU;ErrorIRQ;31;0x40;X;2;0x40X21F;ERROR_CODES::IPU::vDCDC::MCU;UZK_TRIP;DC-Link Overvoltage Fault;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;00;0x40;X;1;0x40X100;ERROR_CODES::IPU::vDCDC::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;RESTART;FORCED;CFG_REDUNDANT; -DSC;Enasys;IPU;FPGA;ErrorIRQ;01;0x40;X;1;0x40X101;ERROR_CODES::IPU::vDCDC::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPU690V;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPU690V;HIGH;160;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPU690V;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPU690V;HIGH;600;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPU690V;HIGH;420;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPU690V;HIGH;42;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPU690V;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPU690V;HIGH;145;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPU690V;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPU690V;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPU690V;HIGH;740;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPU690V;HIGH;100;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPU690V;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPU690V;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPU690V;HIGH;650;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPUCompact4L;HIGH;103;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPUCompact4L;HIGH;150;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPUCompact4L;HIGH;180;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPUCompact4L;HIGH;28;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPUCompact4L;HIGH;20;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPUCompact4L;HIGH;75;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPUCompact4L;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPUCompact4L;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPUCompact4L;HIGH;435;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPUCompact4L;HIGH;60;0;;;;RESTART;FORCED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPUCompact4L;LOW;180;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPUCompact4L;LOW;165;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPUCompact4L;HIGH;430;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;4;0x20X400;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_1;(XT) Temp Trip IGBT 1;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;4;0x20X401;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_2;(XT) Temp Trip IGBT 2;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;4;0x20X402;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_IGBT_3;(XT) Temp Trip IGBT 3;IPULab;HIGH;109;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;4;0x20X403;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_FILTERCHOKE;(XT) Temp Trip Filter Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;4;0x20X404;ERROR_CODES::IPU::v3LV1::EXT1;TEMP_TRIP_GRIDCHOKE;(XT) Temp Trip Grid Choke;IPULab;HIGH;170;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in while Loop -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;4;0x20X405;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_1;(XT) Output Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;4;0x20X406;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_2;(XT) Output Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;4;0x20X407;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_PEAK_TRIP_3;(XT) Output Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;4;0x20X408;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_1;(XT) Module Current Peak Trip Phase 1;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;4;0x20X409;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_2;(XT) Module Current Peak Trip Phase 2;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;4;0x20X40A;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_PEAK_TRIP_3;(XT) Module Current Peak Trip Phase 3;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;4;0x20X40B;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_1;(XT) Filter Current RMS Trip Phase 1;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x20;X;4;0x20X40C;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_2;(XT) Filter Current RMS Trip Phase 2;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x20;X;4;0x20X40D;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_RMS_TRIP_3;(XT) Filter Current RMS Trip Phase 3;IPULab;HIGH;8.5;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x20;X;4;0x20X40E;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_1;(XT) Filter Current Slow RMS Trip Phase 1;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x20;X;4;0x20X40F;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_2;(XT) Filter Current Slow RMS Trip Phase 2;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;16;0x20;X;4;0x20X410;ERROR_CODES::IPU::v3LV1::EXT1;FILTER_SLOWRMS_TRIP_3;(XT) Filter Current Slow RMS Trip Phase 3;IPULab;HIGH;8.0;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;4;0x20X411;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_1;(XT) Output Current RMS Trip Phase 1;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;4;0x20X412;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_2;(XT) Output Current RMS Trip Phase 2;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Hardware;Enasys;IPU;Sharc;IPU3LInspector;19;0x20;X;4;0x20X413;ERROR_CODES::IPU::v3LV1::EXT1;OUTPUT_RMS_TRIP_3;(XT) Output Current RMS Trip Phase 3;IPULab;HIGH;16;7;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;in checkMeasurements() [200 ms] -Grid;Enasys;IPU;Sharc;IPU3LInspector;20;0x20;X;4;0x20X414;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_FILTER_C;(XT) Fast Resonance Detection (FRD-F);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Grid;Enasys;IPU;Sharc;IPU3LInspector;21;0x20;X;4;0x20X415;ERROR_CODES::IPU::v3LV1::EXT1;MODULE_FRD_OUTPUTPEAK;(XT) Fast Resonance Detection (FRD-P);IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;22;0x20;X;4;0x20X416;ERROR_CODES::IPU::v3LV1::EXT1;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;23;0x20;X;4;0x20X417;ERROR_CODES::IPU::v3LV1::EXT1;SIA_WARNING;(XT) SIA Warning;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;24;0x20;X;4;0x20X418;ERROR_CODES::IPU::v3LV1::EXT1;NEUTRAL_RMS_TRIP;(XT) Neutral Current RMS Trip;IPULab;HIGH;I_NEUTRAL;5;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -;;;;;25;0x20;X;4;0x20X419;ERROR_CODES::IPU::v3LV1::EXT1;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -;;;;;26;0x20;X;4;0x20X41A;ERROR_CODES::IPU::v3LV1::EXT1;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;IPULab;BOOL;;0;;;;AUTOACK;WARNING;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x20;X;8;0x20X800;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x20;X;8;0x20X801;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_TRIP;(XT) DC-Link Negative Voltage Fault;IPULab;HIGH;30;0;;;;RESTART;FORCED;CFG_REDUNDANT;in DataIRQ (type & timeout hardcoded) -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x20;X;8;0x20X802;ERROR_CODES::IPU::v3LV1::EXT2;UDC_DIFF_TRIP;(XT) DC-Link Voltage Imbalance;IPULab;HIGH;3;0;;;;RESTART;FORCED;CFG_GROUP;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x20;X;8;0x20X803;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_TRIP;(XT) DC-Link Precharge Positive Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x20;X;8;0x20X804;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_TRIP;(XT) DC-Link Precharge Negative Voltage Trip;IPULab;LOW;6;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x20;X;8;0x20X805;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_5_TRIP;(XT) DC-Link Precharge Positive Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x20;X;8;0x20X806;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_5_TRIP;(XT) DC-Link Precharge Negative Undervoltage Trip;IPULab;LOW;5.5;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x20;X;8;0x20X807;ERROR_CODES::IPU::v3LV1::EXT2;UDC_P_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Positive Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x20;X;8;0x20X808;ERROR_CODES::IPU::v3LV1::EXT2;UDC_N_PRECHG_MAX_TRIP;(XT) DC-Link Precharge Negative Overvoltage Trip;IPULab;HIGH;23;0;;;;;DISABLED;SINGLE;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x20;X;8;0x20X809;ERROR_CODES::IPU::v3LV1::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x20;X;8;0x20X80A;ERROR_CODES::IPU::v3LV1::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x20;X;8;0x20X80B;ERROR_CODES::IPU::v3LV1::EXT2;STATE_TRIP;(XT) State Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Software;MR;Control;Sharc;IPU3LInspector;12;0x20;X;8;0x20X80C;ERROR_CODES::IPU::v3LV1::EXT2;TRH_ERROR;(XT) Transient Handling Error;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;CCU Master;Sharc;IPU3LInspector;13;0x20;X;8;0x20X80D;ERROR_CODES::IPU::v3LV1::EXT2;M_TIMEOUT;(XT) Communication Timeout @ Master;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;14;0x20;X;8;0x20X80E;ERROR_CODES::IPU::v3LV1::EXT2;S_COMMUNICATION;(XT) Communication Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;CCU Slave;Sharc;IPU3LInspector;15;0x20;X;8;0x20X80F;ERROR_CODES::IPU::v3LV1::EXT2;S_SOFTWARE;(XT) SW Error @ Slave;SHARC;BOOL;;0;;;;;DISABLED;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;16;0x20;X;8;0x20X810;ERROR_CODES::IPU::v3LV1::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;17;0x20;X;8;0x20X811;ERROR_CODES::IPU::v3LV1::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;18;0x20;X;8;0x20X812;ERROR_CODES::IPU::v3LV1::EXT2;WRONGFWVERSION;(XT) IPU Firmware incompatible;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;StateMachine;Sharc;IPU3LInspector;19;0x20;X;8;0x20X813;ERROR_CODES::IPU::v3LV1::EXT2;INDIV_SM_IGNORED_SYSLOCK;(XT) individual SM ignored Syslock;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -;;;Sharc;IPU3LInspector;20;0x20;X;8;0x20X814;ERROR_CODES::IPU::v3LV1::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;4;0x40X400;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_TRIP_IGBT;(XT) Temp Trip IGBT;IPUDCDC;HIGH;105;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;4;0x40X401;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_C;(XT) Temp Trip Choke C;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;4;0x40X402;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_B;(XT) Temp Trip Choke B;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;4;0x40X403;ERROR_CODES::IPU::vDCDC::EXT1;TEMP_CHOKE_TRIP_A;(XT) Temp Trip Choke A;IPUDCDC;HIGH;130;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;4;0x40X404;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_A;(XT) String Current Peak Trip Phase A;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;4;0x40X405;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_B;(XT) String Current Peak Trip Phase B;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;4;0x40X406;ERROR_CODES::IPU::vDCDC::EXT1;PEAK_CURRENT_TRIP_C;(XT) String Current Peak Trip Phase C;IPUDCDC;HIGH;130;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;4;0x40X407;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_A;(XT) String High Voltage Trip Phase A;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;08;0x40;X;4;0x40X408;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_B;(XT) String High Voltage Trip Phase B;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;09;0x40;X;4;0x40X409;ERROR_CODES::IPU::vDCDC::EXT1;STRING_HIGH_VOLTAGE_TRIP_C;(XT) String High Voltage Trip Phase C;IPUDCDC;HIGH;850;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;10;0x40;X;4;0x40X40A;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_A;(XT) String Low Voltage Trip Phase A;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;11;0x40;X;4;0x40X40B;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_B;(XT) String Low Voltage Trip Phase B;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;12;0x40;X;4;0x40X40C;ERROR_CODES::IPU::vDCDC::EXT1;STRING_LOW_VOLTAGE_TRIP_C;(XT) String Low Voltage Trip Phase C;IPUDCDC;LOW;200;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;13;0x40;X;4;0x40X40D;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_1;(XT) String Current RMS Trip Phase 1;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;14;0x40;X;4;0x40X40E;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_2;(XT) String Current RMS Trip Phase 2;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;15;0x40;X;4;0x40X40F;ERROR_CODES::IPU::vDCDC::EXT1;STRING_CURRENT_TRIP_3;(XT) String Current RMS Trip Phase 3;IPUDCDC;HIGH;85;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT;not implemented -Hardware;Enasys;IPU;Sharc;IPU3LInspector;00;0x40;X;8;0x40X800;ERROR_CODES::IPU::vDCDC::EXT2;UDC_P_TRIP;(XT) DC-Link Positive Voltage Fault;IPUDCDC;HIGH;900;0;;;;RESTART;FORCED;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;01;0x40;X;8;0x40X801;ERROR_CODES::IPU::vDCDC::EXT2;HARDWARE_TRIP;(XT) Hardware Trip;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT;kein Acknowlege möglich laut Enasys -Hardware;Enasys;IPU;Sharc;IPU3LInspector;02;0x40;X;8;0x40X802;ERROR_CODES::IPU::vDCDC::EXT2;PRECHARGE_TRIP;(XT) Precharge Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;03;0x40;X;8;0x40X803;ERROR_CODES::IPU::vDCDC::EXT2;STATE_TRIP;(XT) State Trip;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;04;0x40;X;8;0x40X804;ERROR_CODES::IPU::vDCDC::EXT2;ENABLE24_OFF;(XT) ENABLE 24V OFF;IPUDCDC;BOOL;;0;;;;RESTART;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;05;0x40;X;8;0x40X805;ERROR_CODES::IPU::vDCDC::EXT2;LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC;(XT) Ulink is not valid for connecting DCDC;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;06;0x40;X;8;0x40X806;ERROR_CODES::IPU::vDCDC::EXT2;INDIVIDUAL_SM_TIMEOUT;(XT) IPU Statemachine timeout;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;Enasys;IPU;Sharc;IPU3LInspector;07;0x40;X;8;0x40X807;ERROR_CODES::IPU::vDCDC::EXT2;WRONGIPUTYPE;(XT) Incorrect IPU type detected;IPUDCDC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;1;0x30X100;ERROR_CODES::IPU::VBE::COM;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;09;0x30;X;1;0x30X109;ERROR_CODES::IPU::VBE::COM;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;10;0x30;X;1;0x30X10A;ERROR_CODES::IPU::VBE::COM;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;FORCED;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;00;0x30;X;4;0x30X400;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_FAST;(XT) PLC Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM;Fault levels of VBE::EXT1 is WARNING because CCU TRIP dig. output should not be set. Reaction implemented in VBEFacade -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;01;0x30;X;4;0x30X401;ERROR_CODES::IPU::VBE::EXT1;PLC_TRIP_SEQUENCED;(XT) PLC Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;02;0x30;X;4;0x30X402;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_FAST;(XT) VBE Trip Fast;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;03;0x30;X;4;0x30X403;ERROR_CODES::IPU::VBE::EXT1;VBE_TRIP_SEQUENCED;(XT) VBE Trip Sequenced;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO30D;FPGA;ErrorIRQ;04;0x30;X;4;0x30X404;ERROR_CODES::IPU::VBE::EXT1;KZ04_TRIP_FAST;(XT) KZ04 Trip Fast ;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;00;0x10;X;1;0x10X100;ERROR_CODES::MIO::v3V4C::AIXC;VOLTAGE_TRIP;AC Supply Trip;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;09;0x10;X;1;0x10X109;ERROR_CODES::MIO::v3V4C::AIXC;WATCHDOG_TRIP;Watchdog Timeout;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;FPGA;ErrorIRQ;10;0x10;X;1;0x10X10A;ERROR_CODES::MIO::v3V4C::AIXC;CURRENT_LOOP_TRIP;CurrentLoop Open;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;00;0x10;X;4;0x10X400;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_LOW;(XT) Warning: Internal Temperature Low;SHARC;LOW;0;1;5;;;AUTOACK;WARNING;SYSTEM; -Hardware;AixControl;MIO;Sharc;MIO3V4CInspector;01;0x10;X;4;0x10X401;ERROR_CODES::MIO::v3V4C::EXT1;INTERN_TEMP_HIGH;(XT) Warning: Internal Temperature High;SHARC;HIGH;45;1;35;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;02;0x10;X;4;0x10X402;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_WARNING;(XT) Warning: Voltage Low Phase 1;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;03;0x10;X;4;0x10X403;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_WARNING;(XT) Warning: Voltage Low Phase 2;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;04;0x10;X;4;0x10X404;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_WARNING;(XT) Warning: Voltage Low Phase 3;SHARC;LOW;UNET*0.90;3;UNET*0.91;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;05;0x10;X;4;0x10X405;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_WARNING;(XT) Warning: Voltage High Phase 1;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;06;0x10;X;4;0x10X406;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_WARNING;(XT) Warning: Voltage High Phase 2;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;07;0x10;X;4;0x10X407;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_WARNING;(XT) Warning: Voltage High Phase 3;SHARC;HIGH;UNET*1.10;3;UNET*1.09;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;08;0x10;X;4;0x10X408;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_WARNING;(XT) Warning: Voltage THD High Phase 1;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;09;0x10;X;4;0x10X409;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_WARNING;(XT) Warning: Voltage THD High Phase 2;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;10;0x10;X;4;0x10X40A;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_WARNING;(XT) Warning: Voltage THD High Phase 3;SHARC;HIGH;THD_WARN;3;;;;AUTOACK;WARNING;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;11;0x10;X;4;0x10X40B;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_LOW_TRIP;(XT) Voltage Low Trip Phase 1;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;12;0x10;X;4;0x10X40C;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_LOW_TRIP;(XT) Voltage Low Trip Phase 2;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;13;0x10;X;4;0x10X40D;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_LOW_TRIP;(XT) Voltage Low Trip Phase 3;SHARC;LOW;UNET*0.85;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;14;0x10;X;4;0x10X40E;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_HIGH_TRIP;(XT) Voltage High Trip Phase 1;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;15;0x10;X;4;0x10X40F;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_HIGH_TRIP;(XT) Voltage High Trip Phase 2;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;16;0x10;X;4;0x10X410;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_HIGH_TRIP;(XT) Voltage High Trip Phase 3;SHARC;HIGH;UNET*1.15;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;17;0x10;X;4;0x10X411;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_THD_TRIP;(XT) Voltage THD Trip Phase 1;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;18;0x10;X;4;0x10X412;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_THD_TRIP;(XT) Voltage THD Trip Phase 2;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;19;0x10;X;4;0x10X413;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_THD_TRIP;(XT) Voltage THD Trip Phase 3;SHARC;HIGH;THD_LIM;0;;;;;FORCED;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;20;0x10;X;4;0x10X414;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_LOW_TRIP;(XT) Frequency Low Trip;SHARC;LOW;FREQ-5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;21;0x10;X;4;0x10X415;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_HIGH_TRIP;(XT) Frequency High Trip;SHARC;HIGH;FREQ+5.f;5;;;;;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;22;0x10;X;4;0x10X416;ERROR_CODES::MIO::v3V4C::EXT1;PHASE_ORDER_TRIP;(XT) Invalid Phase Order Trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;SYSTEM; -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;23;0x10;X;4;0x10X417;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_1_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 1;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;24;0x10;X;4;0x10X418;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_2_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 2;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;25;0x10;X;4;0x10X419;ERROR_CODES::MIO::v3V4C::EXT1;VOLT_3_SRD_WARNING;(XT) Selective Resonance Detection (SRD) Phase 3;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM;not implemented -Grid;AixControl;MIO;Sharc;MIO3V4CInspector;26;0x10;X;4;0x10X41A;ERROR_CODES::MIO::v3V4C::EXT1;FREQUENCY_DFDT_TRIP;(XT) Frequency Change Rate Trip;SHARC;HIGH;4;0;;;;;SHUTDOWN;SYSTEM;PQAA-5225 - Frequency Change-rate Lakeland - -DSC;AixControl;DSC;Sharc;COMInspector;00;0x06;0;0;0x060000;ERROR_CODES::COM;MERKUR_PORT0;DSC 10 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;01;0x06;0;0;0x060001;ERROR_CODES::COM;MERKUR_PORT1;DSC 9 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;02;0x06;0;0;0x060002;ERROR_CODES::COM;MERKUR_PORT2;DSC 8 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;03;0x06;0;0;0x060003;ERROR_CODES::COM;MERKUR_PORT3;DSC 7 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;04;0x06;0;0;0x060004;ERROR_CODES::COM;MERKUR_PORT4;DSC 6 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;05;0x06;0;0;0x060005;ERROR_CODES::COM;MERKUR_PORT5;DSC 5 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;06;0x06;0;0;0x060006;ERROR_CODES::COM;MERKUR_PORT6;DSC 4 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;07;0x06;0;0;0x060007;ERROR_CODES::COM;MERKUR_PORT7;DSC 3 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;08;0x06;0;0;0x060008;ERROR_CODES::COM;MERKUR_PORT8;DSC 2 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;09;0x06;0;0;0x060009;ERROR_CODES::COM;MERKUR_PORT9;DSC 1 removed !Restart! ;SHARC;BOOL;;0;;;;NOACK;SHUTDOWN;SYSTEM; -Software;AixControl;Blackfin;Sharc;COMInspector;10;0x06;0;0;0x06000A;ERROR_CODES::COM;INPUT_SLOT;InputSlot Timeout;SHARC;BOOL;;15;;;;;SHUTDOWN;SYSTEM; -Software;AixControl;Sharc;Blackfin;ReceiveTask;11;0x06;0;0;0x06000B;ERROR_CODES::COM;COM_SLOT;CommunicationSlot Timeout;Blackfin;BOOL;;10;;;;;SHUTDOWN;SYSTEM; -Software;AixControl;Sharc;Blackfin;ReceiveTask;12;0x06;0;0;0x06000C;ERROR_CODES::COM;STATUS_SLOT;StatusSlot Timeout;Blackfin;BOOL;;20;;;;;WARNING;SYSTEM; -Software;AixControl;Sharc;Sharc;COMInspector;13;0x06;0;0;0x06000D;ERROR_CODES::COM;WHILE_LOOP;While Loop Timeout;SHARC;BOOL;;3;;;;;SHUTDOWN;SYSTEM; -DSC;AixControl;DSC;Sharc;COMInspector;14;0x06;0;0;0x06000E;ERROR_CODES::COM;IRQ_TIMEOUT;Interrupt Request Timeout;SHARC;BOOL;;0;;;;;SHUTDOWN;SYSTEM; -Software;AixControl;SPORT;Sharc;COMInspector;15;0x06;0;0;0x06000F;ERROR_CODES::COM;SH_BUFFER;Sharc Buffer Overflow;SHARC;HIGH;94;0;;;;;SHUTDOWN;SYSTEM; -Software;AixControl;SPORT;Blackfin;COMInspector;15;0x06;0;0;0x06000F;ERROR_CODES::COM;SH_BUFFER;Sharc Buffer Overflow;Blackfin;HIGH;94;0;;;;;WARNING;SYSTEM; -Software;AixControl;SPORT;Blackfin;COMInspector;16;0x06;0;0;0x060010;ERROR_CODES::COM;BF_BUFFER;Blackfin Buffer Overflow;Blackfin;HIGH;150;0;100;5;;AUTOACK;WARNING;SYSTEM; -DSC;AixControl;CCU Master;Sharc;COMInspector;17;0x06;0;0;0x060011;ERROR_CODES::COM;S_INACTIVE;Master Inactive @ Slave;SHARC;BOOL;;0;;;;;FORCED;SYSTEM;Communication to master is inactive -DSC;AixControl;CCU Master;Sharc;COMInspector;18;0x06;0;0;0x060012;ERROR_CODES::COM;S_INVALID;Master Packet Invalid @ Slave;SHARC;BOOL;;0;;;;;FORCED;SYSTEM;Too much invalid data from master -Software;MR;StateMachine;Sharc;COMInspector;19;0x06;0;0;0x060013;ERROR_CODES::COM;AUTOSTART_ENABLED;Autostart enabled;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Hardware;;Fan;Sharc;COMInspector;20;0x06;0;0;0x060014;ERROR_CODES::COM;LCU_PRESSURE_LOSS;LCU pressure loss trip;SHARC;BOOL;;0;;;;RESTART;SHUTDOWN;SYSTEM; -Hardware;;Fan;Sharc;COMInspector;21;0x06;0;0;0x060015;ERROR_CODES::COM;LCU_TEMPERTURE_HIGH;LCU temperature high;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Hardware;AixControl;MIO;Sharc;COMInspector;22;0x06;0;0;0x060016;ERROR_CODES::COM;DIGITAL_SYSTEMLOCK;Digital Input : System Locked;SHARC;BOOL;;0;;15;;AUTOACK;WARNING;SYSTEM; -Peripherals;EPCOS;Pro-CX;Modbus;80;00;0x06;0;0;0x060017;ERROR_CODES::COM;PROCX_EXTERN;Pro-CX: External error;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;01;0x06;0;0;0x060018;ERROR_CODES::COM;PROCX_OVERVOLTAGE;Pro-CX: Overvoltage;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;02;0x06;0;0;0x060019;ERROR_CODES::COM;PROCX_OVERCOMPENSATED;Pro-CX: Overcompensated;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;03;0x06;0;0;0x06001A;ERROR_CODES::COM;PROCX_UNDERCOMPENSATED;Pro-CX: Undercompensated;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;04;0x06;0;0;0x06001B;ERROR_CODES::COM;PROCX_HARMONICS;Pro-CX: Harmonics;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;05;0x06;0;0;0x06001C;ERROR_CODES::COM;PROCX_TEMPERATURE;Pro-CX: Temperature high;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;06;0x06;0;0;0x06001D;ERROR_CODES::COM;PROCX_UNDERCURRENT;Pro-CX: Undercurrent;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Modbus;80;07;0x06;0;0;0x06001E;ERROR_CODES::COM;PROCX_UNDERVOLTAGE;Pro-CX: Undervoltage;Blackfin;Extern;;;;;;;WARNING;SINGLE; -Peripherals;EPCOS;Pro-CX;Blackfin;CPFCProCX;31;0x06;0;0;0x06001F;ERROR_CODES::COM;PROCX_COMMUNICATION;Pro-CX Communication Error;Blackfin;BOOL;;10;;;;;WARNING;SINGLE; -Software;MR;Control;Sharc;COMInspector;00;0x06;0;0;0x060020;ERROR_CODES::COM2;DERATING_RMS_CURRENT;Derating: RMS current;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;01;0x06;0;0;0x060021;ERROR_CODES::COM2;DERATING_PEAK_GRIDCURRENT;Derating: Output peak current;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;02;0x06;0;0;0x060022;ERROR_CODES::COM2;DERATING_PEAK_MODULECURRENT;Derating: IGBT peak current;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;03;0x06;0;0;0x060023;ERROR_CODES::COM2;DERATING_MODULATIONSINDEX;Derating: Modulation limit;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;04;0x06;0;0;0x060024;ERROR_CODES::COM2;DERATING_DC_VOLTAGE_UNBALANCE;Derating: DC voltage unbalance;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;05;0x06;0;0;0x060025;ERROR_CODES::COM2;DERATING_DC_VOLTAGE_MAXIMUM;Derating: DC voltage limit;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;06;0x06;0;0;0x060026;ERROR_CODES::COM2;DERATING_CHOKE_TEMPERATURE;Derating: Choke temperature;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;07;0x06;0;0;0x060027;ERROR_CODES::COM2;DERATING_IGBT_TEMPERATURE;Derating: IGBT temperature;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;08;0x06;0;0;0x060028;ERROR_CODES::COM2;DERATING_MCU_TEMPERATURE;Derating: MCU temperature;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;09;0x06;0;0;0x060029;ERROR_CODES::COM2;DERATING_GRID_VOLTAGE;Derating: GridVoltage;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;10;0x06;0;0;0x06002A;ERROR_CODES::COM2;DERATING_NEUTRAL_CURRENT;Derating: RMS current neutral;SHARC;BOOL;;1;;15;;AUTOACK;CFG_DERATING;SYSTEM; -Software;MR;StateMachine;Sharc;COMInspector;11;0x06;0;0;0x06002B;ERROR_CODES::COM2;STARTSTOP_MODE;Auto start-stop active;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Software;MR;CCU;Sharc;COMInspector;12;0x06;0;0;0x06002C;ERROR_CODES::COM2;WARMSTART;CCU warm restart triggered;;;;;;;;;INFO;; -Software;MR;Control;Sharc;COMInspector;13;0x06;0;0;0x06002D;ERROR_CODES::COM2;SIA_RUNNING;(XT) System Identification Algorithm (SIA) running...;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;14;0x06;0;0;0x06002E;ERROR_CODES::COM2;SIA_WARNING;(XT) SIA Warning;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;15;0x06;0;0;0x06002F;ERROR_CODES::COM2;SUSPECT_HARMONICS_DETECTED;(XT) Suspect Harmonics marked;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;16;0x06;0;0;0x060030;ERROR_CODES::COM2;CRITICAL_HARMONICS_DETECTED;(XT) Compensation of critical harmonics blocked;SHARC;BOOL;;0;;;;AUTOACK;WARNING;SYSTEM; -Software;MR;Control;Sharc;COMInspector;17;0x06;0;0;0x060031;ERROR_CODES::COM2;VOLTAGE_NOT_VALID_FOR_START_ACDCs;(XT) VOLT NOT VALID START ACDC;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;Control;Sharc;COMInspector;18;0x06;0;0;0x060032;ERROR_CODES::COM2;FREQUENZ_NOT_VALID_FOR_START_ACDCs;(XT) FREQ NOT VALID START ACDC;SHARC;BOOL;;0;;;;;SHUTDOWN;CFG_REDUNDANT; -Software;MR;Software;Sharc / Blackfin;ErrorParameters;00;0x01;0;0;0x010000;ERROR_CODES::SW;PARAM_UNDEFINED;Undefined fault parameter;Common;Extern;;;;;;;SHUTDOWN;SYSTEM;Acknowledge not possible -Software;MR;Software;Sharc / Blackfin;ErrorParameters;01;0x01;0;0;0x010001;ERROR_CODES::SW;PARAM_NULL_POINTER;Null pointer to fault parameter;Common;Extern;;;;;;;SHUTDOWN;SYSTEM;Acknowledge not possible -Software;MR;Software;Sharc / Blackfin;ErrorParameters;02;0x01;0;0;0x010002;ERROR_CODES::SW;INVALID_PARAMETER;Invalid fault parameter;Common;Extern;;;;;;;SHUTDOWN;SYSTEM;Acknowledge not possible -Software;MR;Software;Sharc / Blackfin;Cinspector;03;0x01;0;0;0x010003;ERROR_CODES::SW;GROUP_INSPECTOR_NULL;Undefined group inspector;Common;Extern;;;;;;;SHUTDOWN;SYSTEM;Acknowledge not possible -Software;MR;Software;Sharc;MerkurInspector;04;0x01;0;0;0x010004;ERROR_CODES::SW;INVALID_CLIENT_ID;Invalid Merkur client ID;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;ErrorParameters;05;0x01;0;0;0x010005;ERROR_CODES::SW;INVALID_HIERARCHY;Invalid fault hierarchy;Common;Extern;;;;;;;SHUTDOWN;SYSTEM;Acknowledge not possible -Software;MR;DSC;Blackfin;MerkurFacade;06;0x01;0;0;0x010006;ERROR_CODES::SW;MERKUR_INIT_FAIL;Merkur module initialization failed;SHARC;Extern;;;;;;;WARNING;SYSTEM; -Software;MR;DSC;Blackfin;MerkurFacade;07;0x01;0;0;0x010007;ERROR_CODES::SW;INVALID_MIO_ORDER;Invalid MIO ports sequence;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;Measurements;08;0x01;0;0;0x010008;ERROR_CODES::SW;PQM_INVALID_CONFIG;Invalid measurement configuration;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;Measurements;09;0x01;0;0;0x010009;ERROR_CODES::SW;PQM_CHANNELS_OVERFLOW;Measurement channels limit reached;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Configuration;Blackfin;ConfigHMI;10;0x01;0;0;0x01000A;ERROR_CODES::SW;PQM_INVALID_FORMAT;Invalid current sum configuration format;Blackfin;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;Measurements;11;0x01;0;0;0x01000B;ERROR_CODES::SW;PQM_CALCULATIONS_TIMEOUT;Measurements calculation timeout;SHARC;BOOL;;0;;;;;WARNING;SYSTEM; -Software;MR;;;;12;0x01;0;0;0x01000C;ERROR_CODES::SW;PQM_PACKET_MISSING;Measurement packet missing;Blackfin;Extern;;;;;;;WARNING;SYSTEM;not implemented -Software;MR;;;;13;0x01;0;0;0x01000D;ERROR_CODES::SW;PQM_INVALID_DATA;Invalid measurement data;Blackfin;Extern;;;;;;;WARNING;SYSTEM;not implemented -Software;MR;Software;Sharc;Userinterface;14;0x01;0;0;0x01000E;ERROR_CODES::SW;RTDS_SOFTWARE;Warning: RTDS Version - Do not use on real hardware;SHARC;Extern;;;;;;;INFO;SYSTEM; -Software;MR;Software;Sharc / Blackfin;;15;0x01;0;0;0x01000F;ERROR_CODES::SW;ARRAY_OVERFLOW;Array overflow;Common;Extern;;;;;;;SHUTDOWN;SYSTEM;Acknowledge not possible -Software;MR;Software;Sharc;;16;0x01;0;0;0x010010;ERROR_CODES::SW;AUTONOM_TEST_SW;Warning: AUTONOM TEST SW ( Autostart );SHARC;Extern;;;;;;;INFO;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;17;0x01;0;0;0x010011;ERROR_CODES::SW;NO_BLACKSTART_OR_SYNC_ENABLED;no Blackstart or SyncV enabled;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;18;0x01;0;0;0x010012;ERROR_CODES::SW;SYNC_V_AND_BLACKSTART_ENABLED;sycnV and Blackstart enabled;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;19;0x01;0;0;0x010013;ERROR_CODES::SW;VOLTAGE_NOT_ZERO_FOR_BLACKSTART;voltage not zero for Blackstart;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;20;0x01;0;0;0x010014;ERROR_CODES::SW;VOLTAGE_SYNC_NOT_SUCCEEDED;voltage sync not succeeded;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;21;0x01;0;0;0x010015;ERROR_CODES::SW;VOLTAGE_NOT_OK_FOR_SYNC_V;voltage not ok for sync V;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;22;0x01;0;0;0x010016;ERROR_CODES::SW;GENERATOR_CONNECTED_WRONG_PHASE;generator connected wrong phase;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;23;0x01;0;0;0x010017;ERROR_CODES::SW;FRT_FAULT;FRT Error occurred;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc;AutarsysFacade;24;0x01;0;0;0x010018;ERROR_CODES::SW;IDC_OVERCURRENT;DC-Link Overcurrent;Blackfin;HIGH;140;0;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;00;0x03;0;0;0x030000;ERROR_CODES::PQM::CFG;SUMMANDS_OVERFLOW;Summands overflow;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;01;0x03;0;0;0x030001;ERROR_CODES::PQM::CFG;CYCLIC_CONFIG;Cyclic current sum configuration;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;02;0x03;0;0;0x030002;ERROR_CODES::PQM::CFG;INVALID_PHASE;Summand set to nonexistent phase;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;03;0x03;0;0;0x030003;ERROR_CODES::PQM::CFG;INVALID_MIO_VOLTAGE;Nonexistent MIO voltage channel;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;04;0x03;0;0;0x030004;ERROR_CODES::PQM::CFG;INVALID_MIO_CURRENT;Nonexistent MIO current channel;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;05;0x03;0;0;0x030005;ERROR_CODES::PQM::CFG;INVALID_MIO_CURRENT_GROUPS;Inconsistent MIO current channels grouping;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;06;0x03;0;0;0x030006;ERROR_CODES::PQM::CFG;INVALID_DEVICE_CHANNEL;Nonexistent device phase current;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;07;0x03;0;0;0x030007;ERROR_CODES::PQM::CFG;CHANNEL_NULL;Measurement channel not initialized;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;08;0x03;0;0;0x030008;ERROR_CODES::PQM::CFG;PHASE_MISSING;Device current configuration missing;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Software;MR;Software;Sharc / Blackfin;Measurements;09;0x03;0;0;0x030009;ERROR_CODES::PQM::CFG;DEVICE_DISABLED;Initializing disabled device current;SHARC;Extern;;;;;;;SHUTDOWN;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;00;0x07;0;0;0x070000;ERROR_CODES::ANY_ERR;ABCC_ERR_INVALID_PROC_WRITE_DATA_SIZE;Invalid write process data size;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;01;0x07;0;0;0x070001;ERROR_CODES::ANY_ERR;ABCC_ERR_INVALID_PROC_READ_DATA_SIZE;Invalid read process data size;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;02;0x07;0;0;0x070002;ERROR_CODES::ANY_ERR;ABCC_ERR_MODULE_MISSING;Module missing;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;03;0x07;0;0;0x070003;ERROR_CODES::ANY_ERR;ABCC_ERR_NODEID_NOT_SETABLE;Cannot set node ID;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;04;0x07;0;0;0x070004;ERROR_CODES::ANY_ERR;ABCC_ERR_ATTR_WRITE_ERROR;Cannot set attribute;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;05;0x07;0;0;0x070005;ERROR_CODES::ANY_ERR;ABCC_ERR_INIT_ATTR_READ_ERROR;Error reading attributes during initialization;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;06;0x07;0;0;0x070006;ERROR_CODES::ANY_ERR;ABCC_ERR_MODULE_WATCHDOG_TIMEOUT;Module watchdog timeout;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;07;0x07;0;0;0x070007;ERROR_CODES::ANY_ERR;ABCC_ERR_READING_EXCEPTION_CODE;Error reading exception code;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;08;0x07;0;0;0x070008;ERROR_CODES::ANY_ERR;ABCC_ERR_READING_NW_SPEC_EXCEPTION_CODE;Error reading network specific exception code;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;09;0x07;0;0;0x070009;ERROR_CODES::ANY_ERR;ABCC_ERR_NON_RECOVERABLE_EXCEPTION;Non-recoverable exception;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;10;0x07;0;0;0x07000A;ERROR_CODES::ANY_ERR;ABCC_ERR_CONNECTION_TERMINATED;Connection terminated;Blackfin;BOOL;;0;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;11;0x07;0;0;0x07000B;ERROR_CODES::ANY_ERR;ABCC_ERR_NETWORK_ERROR;Network error;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;12;0x07;0;0;0x07000C;ERROR_CODES::ANY_ERR;ABCC_ERR_DRIVER_STATE_CHANGE_DENIED;Driver handler state change denied;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;13;0x07;0;0;0x07000D;ERROR_CODES::ANY_ERR;ABCC_ERR_MAX_RESTART_COUNT;Module restart count limit reached;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;14;0x07;0;0;0x07000E;ERROR_CODES::ANY_ERR;ABCC_ERR_MODULE_RESTART;Module restarted;Blackfin;Extern;;;;;;;WARNING;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;15;0x07;0;0;0x07000F;ERROR_CODES::ANY_ERR;ABCC_ERR_DRIVER_TERMINATED;Driver terminated;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;00;0x07;0;0;0x070010;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_APP_TO;Application timeout;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;01;0x07;0;0;0x070011;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_INV_DEV_ADDR;Invalid device address;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;02;0x07;0;0;0x070012;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_INV_COM_SETTINGS;Invalid communication settings;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;03;0x07;0;0;0x070013;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_MAJ_UNREC_APP_EVNT;Major unrecoverable application event;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;04;0x07;0;0;0x070014;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_WAIT_APP_RESET;Waiting for application reset;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;05;0x07;0;0;0x070015;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_INV_PRD_CFG;Invalid process data configuration;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;06;0x07;0;0;0x070016;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_INV_APP_RESPONSE;Invalid application response;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;07;0x07;0;0;0x070017;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NVS_CHECKSUM_ERROR;Non-volatile memory checksum error;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;08;0x07;0;0;0x070018;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_1;Network specific exception code: 0x01;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;09;0x07;0;0;0x070019;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_2;Network specific exception code: 0x02;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;10;0x07;0;0;0x07001A;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_3;Network specific exception code: 0x03;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;11;0x07;0;0;0x07001B;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_4;Network specific exception code: 0x04;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;12;0x07;0;0;0x07001C;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_5;Network specific exception code: 0x05;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;13;0x07;0;0;0x07001D;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_6;Network specific exception code: 0x06;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -Peripherals;HMS;Anybus;Blackfin;ABCC_DriverHandler;14;0x07;0;0;0x07001E;ERROR_CODES::ANY_EXCPT;ABCC_EXCPT_NETWORK_SPECIFIC_7;Network specific exception code: 0x07;Blackfin;Extern;;;;;;;CFG_ANYBUS;SYSTEM; -ESS;Samsung Mega 3.3;Rack Group;Modbus;30012;0;0x05;0;3;0x050300;ERROR_CODES::ESS::SAMSUNG::MEGA_33::SYSTEM;COMMUNICATION_FAULT;Communication Fault;Blackfin;BOOL;;10;;;;;SHUTDOWN;SINGLE; -ESS;Samsung Mega 3.3;Rack Group;Modbus;30012;10;0x05;0;3;0x05030A;ERROR_CODES::ESS::SAMSUNG::MEGA_33::SYSTEM;IMBALANCE_ALARM;Imbalance alarm;Blackfin;Extern;;;;;;;WARNING;SINGLE; -ESS;Samsung Mega 3.3;Rack Group;Modbus;30012;11;0x05;0;3;0x05030B;ERROR_CODES::ESS::SAMSUNG::MEGA_33::SYSTEM;IMBALANCE_STOP;Imbalance error;Blackfin;Extern;;;;;;;WARNING;SINGLE; -ESS;Samsung Mega 3.3;Rack Group;Modbus;30012;12;0x05;0;3;0x05030C;ERROR_CODES::ESS::SAMSUNG::MEGA_33::SYSTEM;VOLTAGE_DIFF;DC voltage not synchronized;Blackfin;Extern;;;;;;;WARNING;SINGLE;|Target Voltage - System Voltage|<= Setting Voltage-> Valid (DC contactor ON) |Target Voltage - System Voltage|> Setting Voltage -> Invalid (DC contactor OFF) -ESS;Samsung Mega 3.3;Rack Group;Modbus;30012;13;0x05;0;3;0x05030D;ERROR_CODES::ESS::SAMSUNG::MEGA_33::SYSTEM;NO_CONTACTOR_ON_COMMAND;Close contactor command timeout;Blackfin;Extern;;;;;;;WARNING;SINGLE;"|Target Voltage - System Voltage|<= Setting Voltage -> Valid (DC contactor ON) Not receive ""Command On"" within a Setting Time -> Invalid (DC contactor OFF)" -ESS;Samsung Mega 3.3;Rack;Blackfin;CSamsungMega33Rack;0;0x04;0;2;0x040200;ERROR_CODES::ESS::GROUP::RACK;CLOSE_BLOCKED;Contactor closing blocked;Blackfin;HIGH;3;0;;;;;WARNING;SINGLE;Max Cell T >= 65*C, 5sec -ESS;Samsung Mega 3.3;Rack;Blackfin;CSamsungMega33Rack;1;0x04;0;2;0x040201;ERROR_CODES::ESS::GROUP::RACK;OPEN_BLOCKED;Contactor opening blocked;Blackfin;HIGH;0.1;0;;;;;WARNING;SINGLE;Max Cell T >= 65*C, 5sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;1;0x04;0;3;0x040301;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;CELL_OVERTEMPERATURE;Cell Overtemperature Trip;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Max Cell T >= 65*C, 5sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;2;0x04;0;3;0x040302;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;CELL_UNDERVOLTAGE;Cell Undervoltage Trip;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Min Cell V <= 2.50V, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;3;0x04;0;3;0x040303;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;CELL_OVERVOLTAGE;Cell Overvoltage Trip;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Max Cell V >= 4.20V, 5sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;7;0x04;0;3;0x040307;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;RACK_UNDERVOLTAGE;Rack Undervoltage Trip;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Rack V <= *Reference level, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;8;0x04;0;3;0x040308;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;RACK_OVERVOLTAGE;Rack Overvoltage Trip;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Rack V >= *Reference level, 5sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;9;0x04;0;3;0x040309;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;RACK_COMM_FAULT;Rack Communication Fault;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;No response from Rack, 30sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;10;0x04;0;3;0x04030A;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;TRAY_COMM_FAULT;Tray Communication Fault;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;No response from Tray, 30sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;11;0x04;0;3;0x04030B;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;OVERCURRENT;Overcurrent Trip;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Charge : Current >= 205A, 1sec // Discharge : Current >= 335A, 1sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;13;0x04;0;3;0x04030D;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;ADDITIONAL_PROTECTION;Additional Protection Tray;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Rack OVP or OCP fault by 2nd MCU -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;14;0x04;0;3;0x04030E;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;DC_CONTACTOR_FAULT;DC Contactor Fault;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Current >= 300mA even if the contactor is opened, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30061+(#r-1)*26;15;0x04;0;3;0x04030F;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::TRIP;DC_CONTACTOR_SENSOR_FAULT;DC Contactor Sensor Fault;Blackfin;Extern;;;;;;;SHUTDOWN;SINGLE;Feedback Status of contactor ≠ Contactor command, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;0;0x04;0;3;0x040310;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CELL_UNDERTEMPERATURE;Warning: Cell Undertemperature;Blackfin;Extern;;;;;x;;WARNING;SINGLE;Min Cell T <= -21*C, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;1;0x04;0;3;0x040311;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CELL_OVERTEMPERATURE;Warning: Cell Overtemperature;Blackfin;Extern;;;;;;;WARNING;SINGLE;Max Cell T >= 60*C, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;2;0x04;0;3;0x040312;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CELL_UNDERVOLTAGE;Warning: Cell Undervoltage;Blackfin;Extern;;;;;;;WARNING;SINGLE;Min Cell V <= 2.70V, 1sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;3;0x04;0;3;0x040313;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CELL_OVERVOLTAGE;Warning: Cell Overvoltage;Blackfin;Extern;;;;;;;WARNING;SINGLE;Max Cell V >= 4.18V, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;4;0x04;0;3;0x040314;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;RACK_VOLTAGE_ERROR;Warning: Rack voltage deviates from sum;Blackfin;Extern;;;;;;;WARNING;SINGLE;(Rack Voltage - Sum of cell voltage) >= 77V, 3 sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;5;0x04;0;3;0x040315;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CELL_VOLTAGE_IMBALANCE;Warning: Cell Voltage Imbalance;Blackfin;Extern;;;;;x;;WARNING;SINGLE;Max Cell >= 3.5V & d cell V >= 300mV, 5sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;6;0x04;0;3;0x040316;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CELL_TEMPERATURE_IMBALANCE;Warning: Cell Temperature Imbalance;Blackfin;Extern;;;;;;;WARNING;SINGLE;dCell T >= 20*C, 30sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;7;0x04;0;3;0x040317;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;RACK_UNDERVOLTAGE;Warning: Rack Undervoltage;Blackfin;Extern;;;;;;;WARNING;SINGLE;Rack V <= *Reference level, 1sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;8;0x04;0;3;0x040318;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;RACK_OVERVOLTAGE;Warning: Rack Overvoltage;Blackfin;Extern;;;;;;;WARNING;SINGLE;Rack V >= *Reference level, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;9;0x04;0;3;0x040319;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;RACK_COMM_FAULT;Warning: Rack Communication Fault;Blackfin;Extern;;;;;;;WARNING;SINGLE;No response from Rack, 10sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;10;0x04;0;3;0x04031A;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;TRAY_COMM_FAULT;Warning: Tray Communication Fault;Blackfin;Extern;;;;;;;WARNING;SINGLE;No response from Tray, 10sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;11;0x04;0;3;0x04031B;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;OVERCURRENT;Warning: Rack Overcurrent;Blackfin;Extern;;;;;;;WARNING;SINGLE;Charge : Current >= 200A, 3sec // Discharge : Current >= 315A, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;12;0x04;0;3;0x04031C;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;SOC_FULL;Rack Charge Completed;Blackfin;Extern;;;;;;;INFO;SINGLE;Just before SOC 100% -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;13;0x04;0;3;0x04031D;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;SENSOR_COMMUNICATION_FAULT;Warning: Current Sensor Communication Fault;Blackfin;Extern;;;;;;;WARNING;SINGLE;Sensor Communication Pending, 3sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;14;0x04;0;3;0x04031E;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;CHARGE_OVERCURRENT;Warning: Charge Current Limit Exceeded;Blackfin;Extern;;;;;;;WARNING;SINGLE;Exceed Permissive Current Value, 5sec -ESS;Samsung Mega 3.3;Rack;Modbus;30062+(#r-1)*26;15;0x04;0;3;0x04031F;ERROR_CODES::ESS::SAMSUNG::MEGA_33::RACK::WARNING;FAN_FAULT;Warning: Fan Fault;Blackfin;Extern;;;;;;;WARNING;SINGLE;One more fan not operated under active circumstance, 5sec diff --git a/io.openems.edge.ess.mr.gridcon/doc/Fehlerliste.xlsx b/io.openems.edge.ess.mr.gridcon/doc/Fehlerliste.xlsx deleted file mode 100644 index d4e9c3d72c0..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/Fehlerliste.xlsx and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-05-BA_Software-Manual-Anybus-GRIDCON-ACF_PCS_DE.pdf b/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-05-BA_Software-Manual-Anybus-GRIDCON-ACF_PCS_DE.pdf deleted file mode 100644 index e779bfc0c5b..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-05-BA_Software-Manual-Anybus-GRIDCON-ACF_PCS_DE.pdf and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-21-BA_Beriebsanleitung-Hardware-GRIDCON-ACF-Building_DE.pdf b/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-21-BA_Beriebsanleitung-Hardware-GRIDCON-ACF-Building_DE.pdf deleted file mode 100644 index c14840ccccc..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-21-BA_Beriebsanleitung-Hardware-GRIDCON-ACF-Building_DE.pdf and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-24-BA_Software-Manual-GRIDCON-PCS_DE.pdf b/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-24-BA_Software-Manual-GRIDCON-PCS_DE.pdf deleted file mode 100644 index 2ce90ff0696..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-12-24-BA_Software-Manual-GRIDCON-PCS_DE.pdf and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-13-00-PD_GRIDCON_PCS_3W_DE.pdf b/io.openems.edge.ess.mr.gridcon/doc/PQ-01-13-00-PD_GRIDCON_PCS_3W_DE.pdf deleted file mode 100644 index 9df5c55c4a9..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-13-00-PD_GRIDCON_PCS_3W_DE.pdf and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-13-00-PD_PCS-4W_DE.pdf b/io.openems.edge.ess.mr.gridcon/doc/PQ-01-13-00-PD_PCS-4W_DE.pdf deleted file mode 100644 index b17c93a127d..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/PQ-01-13-00-PD_PCS-4W_DE.pdf and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/errordesc.txt b/io.openems.edge.ess.mr.gridcon/doc/errordesc.txt deleted file mode 100644 index d69f8e4c82d..00000000000 --- a/io.openems.edge.ess.mr.gridcon/doc/errordesc.txt +++ /dev/null @@ -1,24 +0,0 @@ -X2 enable 1x produziert: (Kabel "X2 Enable am IPU abziehen und wieder reinstecken) --> zieht einen Modulationsfehler Phase 1 nach sich - - 10 0000 0010 0010 0000 1010 0000 0001 - - x10 x22 xA x1 - - 2 0 2 2 0 A 0 1 - - bei einigen Fehlern steht das 3. Halbbyte (hier die "2") für die IPU - (im Excel mit "X" gekennzeichnet) - -NO ACKNOWLEDGE POSSIBLE: - - -0x20 X8 09 -0x40 X8 01 - -0x01 00 00 -0x01 00 01 -0x01 00 02 -0x01 00 03 -0x01 00 05 -0x01 00 0F \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/doc/handling_off_grid.xlsx b/io.openems.edge.ess.mr.gridcon/doc/handling_off_grid.xlsx deleted file mode 100644 index e21698f0789..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/handling_off_grid.xlsx and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/mr_schematic_setup.jpg b/io.openems.edge.ess.mr.gridcon/doc/mr_schematic_setup.jpg deleted file mode 100644 index 253697f1a40..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/mr_schematic_setup.jpg and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/start0.png b/io.openems.edge.ess.mr.gridcon/doc/start0.png deleted file mode 100644 index 9f74e8bb518..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/start0.png and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/start1.png b/io.openems.edge.ess.mr.gridcon/doc/start1.png deleted file mode 100644 index dd89b84501f..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/start1.png and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/doc/start2.png b/io.openems.edge.ess.mr.gridcon/doc/start2.png deleted file mode 100644 index 15897bb3098..00000000000 Binary files a/io.openems.edge.ess.mr.gridcon/doc/start2.png and /dev/null differ diff --git a/io.openems.edge.ess.mr.gridcon/readme.adoc b/io.openems.edge.ess.mr.gridcon/readme.adoc deleted file mode 100644 index f2291161a10..00000000000 --- a/io.openems.edge.ess.mr.gridcon/readme.adoc +++ /dev/null @@ -1,9 +0,0 @@ -= Maschinenfabrik Rheinhausen (MR) Gridcon - -Implemented Natures -- SymmetricEss -- ManagedSymmetricEss - -Good Settings for PID: 0.3 0.15 0 - -https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.ess.mr.gridcon[Source Code icon:github[]] diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/Config.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/Config.java deleted file mode 100644 index 9fc90f2bc43..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/Config.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import org.osgi.service.metatype.annotations.AttributeDefinition; -import org.osgi.service.metatype.annotations.ObjectClassDefinition; - -import io.openems.edge.ess.mr.gridcon.enums.BalancingMode; -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; -import io.openems.edge.ess.mr.gridcon.enums.HarmonicCompensationMode; -import io.openems.edge.ess.mr.gridcon.enums.InverterCount; - -@ObjectClassDefinition(// - name = "MR Gridcon PCS", // - description = "Implements the MR Gridcon PCS system") -@interface Config { - String id() default "gridcon0"; - - @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 = "Invertercount?", description = "number of inverters") - InverterCount inverterCount() default InverterCount.ONE; - - @AttributeDefinition(name = "Modbus-ID", description = "ID of Modbus bridge.") - String modbus_id() default "modbus0"; - - @AttributeDefinition(name = "Modbus-Unit-ID", description = "Unit ID of Modbus bridge.") - int unit_id() default 0; - - @AttributeDefinition(name = "Efficiency Factor Discharge", description = "Allowed Power at inverter is decreased with this factor") - double efficiencyLossDischargeFactor() default GridconPcsImpl.EFFICIENCY_LOSS_DISCHARGE_FACTOR; - - @AttributeDefinition(name = "Efficiency Factor Charge", description = "Allowed Power at inverter is increased with this factor") - double efficiencyLossChargeFactor() default GridconPcsImpl.EFFICIENCY_LOSS_CHARGE_FACTOR; - - @AttributeDefinition(name = "Balancing Mode", description = "Balancing Mode") - BalancingMode balancing_mode() default BalancingMode.DISABLED; - - @AttributeDefinition(name = "Fundamental Frequency Mode", description = "Fundamental Frequency Mode") - FundamentalFrequencyMode fundamental_frequency_mode() default FundamentalFrequencyMode.DISABLED; - - @AttributeDefinition(name = "Harmonic CompensationMode Mode", description = "Harmonic CompensationMode Mode") - HarmonicCompensationMode harmonic_compensation_mode() default HarmonicCompensationMode.DISABLED; - - @AttributeDefinition(name = "Cos Phi Set point 1", description = "Cos Phi Set point 1") - float cos_phi_setpoint_1() default 0.9f; - - @AttributeDefinition(name = "Cos Phi Set point 2", description = "Cos Phi Set point 2") - float cos_phi_setpoint_2() default 0.95f; - - @AttributeDefinition(name = "Modbus target filter", description = "This is auto-generated by 'Modbus-ID'.") - String Modbus_target() default "(enabled=true)"; - - String webconsole_configurationFactory_nameHint() default "MR Gridcon PCS [{id}]"; -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/EssGridcon.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/EssGridcon.java deleted file mode 100644 index 61765e123d7..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/EssGridcon.java +++ /dev/null @@ -1,365 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Optional; - -import org.osgi.service.component.ComponentContext; -import org.osgi.service.component.annotations.Activate; -import org.osgi.service.component.annotations.Deactivate; -import org.osgi.service.event.Event; -import org.osgi.service.event.EventHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.common.channel.AccessMode; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; -import io.openems.edge.battery.api.Battery; -import io.openems.edge.common.component.AbstractOpenemsComponent; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.event.EdgeEventConstants; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.common.modbusslave.ModbusSlaveNatureTable; -import io.openems.edge.common.modbusslave.ModbusSlaveTable; -import io.openems.edge.controller.api.Controller; -import io.openems.edge.ess.api.ManagedSymmetricEss; -import io.openems.edge.ess.api.SymmetricEss; -import io.openems.edge.ess.mr.gridcon.enums.ErrorCodeChannelId0; -import io.openems.edge.ess.mr.gridcon.enums.ErrorCodeChannelId1; -import io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState; -import io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconStateObject; -import io.openems.edge.ess.power.api.Constraint; -import io.openems.edge.ess.power.api.Phase; -import io.openems.edge.ess.power.api.Power; -import io.openems.edge.ess.power.api.Pwr; -import io.openems.edge.ess.power.api.Relationship; - -public abstract class EssGridcon extends AbstractOpenemsComponent - implements OpenemsComponent, ManagedSymmetricEss, SymmetricEss, ModbusSlave, EventHandler { - - public static final int MAX_CURRENT_PER_STRING = 80; - - private String gridconId; - private String bmsAId; - private String bmsBId; - private String bmsCId; - private float offsetCurrent; - - protected io.openems.edge.ess.mr.gridcon.StateObject mainStateObject = null; - protected io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconStateObject gridconStateObject = null; - - protected abstract ComponentManager getComponentManager(); - - private final Logger log = LoggerFactory.getLogger(EssGridcon.class); - - protected final StateController stateController = new StateController(); - - public EssGridcon(io.openems.edge.common.channel.ChannelId[] otherChannelIds) { - super(// - OpenemsComponent.ChannelId.values(), // - SymmetricEss.ChannelId.values(), // - ManagedSymmetricEss.ChannelId.values(), // - Controller.ChannelId.values(), // - ErrorCodeChannelId0.values(), // - ErrorCodeChannelId1.values(), // - otherChannelIds // - ); - } - - @Activate - protected void activate(ComponentContext context, String id, String alias, boolean enabled, String gridconId, - String bmsA, String bmsB, String bmsC, float offsetCurrent) throws OpenemsNamedException { - - super.activate(context, id, alias, enabled); - - this.gridconId = gridconId; - this.bmsAId = bmsA; - this.bmsBId = bmsB; - this.bmsCId = bmsC; - this.offsetCurrent = offsetCurrent; - - this.initializeStateController(gridconId, bmsA, bmsB, bmsC); - this.mainStateObject = this.getFirstGeneralStateObjectUndefined(); - this.gridconStateObject = this.getFirstGridconStateObjectUndefined(); - } - - private GridconStateObject getFirstGridconStateObjectUndefined() { - return this.stateController.getGridconStateObject(GridconState.UNDEFINED); - } - - protected abstract StateObject getFirstGeneralStateObjectUndefined(); - - protected abstract void initializeStateController(String gridconPcs, String b1, String b2, String b3); - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public void handleEvent(Event event) { - if (!isEnabled()) { - return; - } - - if (this.getGridconPcs() == null) { - this.log.error("Gridcon Component with ID [" + this.gridconId + "] is not found!"); - return; - } - - switch (event.getTopic()) { - case EdgeEventConstants.TOPIC_CYCLE_BEFORE_PROCESS_IMAGE: - this.calculateActiveAndReactivePower(); - this.calculateMaxApparentPower(); - break; - case EdgeEventConstants.TOPIC_CYCLE_AFTER_PROCESS_IMAGE: - try { - // prepare calculated Channels - this.calculateSoc(); - this.calculateCapacity(); - this.calculateGridMode(); - this.calculateAllowedPower(); - this.calculateBatteryValues(); - - // Execute state machine for general handling - IState nextMainState = this.mainStateObject.getNextState(); - StateObject nextMainStateObject = this.stateController.getGeneralStateObject(nextMainState); - - System.out.println(" ----- CURRENT STATE:" + this.mainStateObject.getState().getName()); - System.out.println(" ----- NEXT STATE:" + nextMainStateObject.getState().getName()); - System.out.println("Conditional: "); - this.stateController.printCondition(); - - this.mainStateObject = nextMainStateObject; - - this.mainStateObject.act(); - - // Execute state machine for gridcon handling, parameters for the grid settings - // coming from the state machine object - GridconSettings gridconSettings = this.mainStateObject.getGridconSettings(); - - IState nextGridconState = this.gridconStateObject.getNextState(); - GridconStateObject nextGridconStateObject = this.stateController - .getGridconStateObject(nextGridconState); - this.gridconStateObject = nextGridconStateObject; - this.gridconStateObject.act(gridconSettings); - - this.writeStateMachineToChannel(); - - } catch (IllegalArgumentException | OpenemsNamedException e) { - this.logError(this.log, "Error: " + e.getMessage()); - } - break; - } - } - - protected abstract void writeStateMachineToChannel(); - - /** - * calculates min/max cell voltage and temperature. - */ - private void calculateBatteryValues() { - - float minCellVoltage = Float.MAX_VALUE; - float maxCellVoltage = Float.MIN_VALUE; - - float minCellTemperature = Float.MAX_VALUE; - float maxCellTemperature = Float.MIN_VALUE; - - if (this.getBattery1() != null && !Helper.isUndefined(this.getBattery1())) { - minCellVoltage = Math.min(minCellVoltage, this.getBattery1().getMinCellVoltage().get()); - maxCellVoltage = Math.max(maxCellVoltage, this.getBattery1().getMaxCellVoltage().get()); - minCellTemperature = Math.min(minCellTemperature, this.getBattery1().getMinCellTemperature().get()); - maxCellTemperature = Math.max(maxCellTemperature, this.getBattery1().getMaxCellTemperature().get()); - } - - if (this.getBattery2() != null && !Helper.isUndefined(this.getBattery2())) { - minCellVoltage = Math.min(minCellVoltage, this.getBattery2().getMinCellVoltage().get()); - maxCellVoltage = Math.max(maxCellVoltage, this.getBattery2().getMaxCellVoltage().get()); - minCellTemperature = Math.min(minCellTemperature, this.getBattery2().getMinCellTemperature().get()); - maxCellTemperature = Math.max(maxCellTemperature, this.getBattery2().getMaxCellTemperature().get()); - } - - if (this.getBattery3() != null && !Helper.isUndefined(this.getBattery3())) { - minCellVoltage = Math.min(minCellVoltage, this.getBattery3().getMinCellVoltage().get()); - maxCellVoltage = Math.max(maxCellVoltage, this.getBattery3().getMaxCellVoltage().get()); - minCellTemperature = Math.min(minCellTemperature, this.getBattery3().getMinCellTemperature().get()); - maxCellTemperature = Math.max(maxCellTemperature, this.getBattery3().getMaxCellTemperature().get()); - } - - int minCellVoltageMilliVolt = (int) (minCellVoltage * 1000); - int maxCellVoltageMilliVolt = (int) (maxCellVoltage * 1000); - - _setMinCellVoltage(minCellVoltageMilliVolt); - _setMaxCellVoltage(maxCellVoltageMilliVolt); - _setMinCellTemperature((int) minCellTemperature); - _setMaxCellTemperature((int) maxCellTemperature); - - } - - private void calculateMaxApparentPower() { - int maxPower = (int) this.getGridconPcs().getMaxApparentPower(); - _setMaxApparentPower(maxPower); - } - - protected void calculateActiveAndReactivePower() { - float activePower = this.getGridconPcs().getActivePower(); - _setActivePower((int) activePower); - - float reactivePower = this.getGridconPcs().getReactivePower(); - _setReactivePower((int) reactivePower); - } - - @Override - public Constraint[] getStaticConstraints() throws OpenemsException { - if (this.getGridconPcs() == null || !this.getGridconPcs().isRunning()) { - return new Constraint[] { - createPowerConstraint("Inverter not ready", Phase.ALL, Pwr.ACTIVE, Relationship.EQUALS, 0), - createPowerConstraint("Inverter not ready", Phase.ALL, Pwr.REACTIVE, Relationship.EQUALS, 0) }; - } - return Power.NO_CONSTRAINTS; - } - - @Override - public void applyPower(int activePower, int reactivePower) throws OpenemsNamedException { - this.getGridconPcs().setPower(activePower, reactivePower); - } - - @Override - public int getPowerPrecision() { - return GridconPcs.POWER_PRECISION_WATT; - } - - @Override - public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode) { - return new ModbusSlaveTable(// - OpenemsComponent.getModbusSlaveNatureTable(accessMode), // - SymmetricEss.getModbusSlaveNatureTable(accessMode), // - ManagedSymmetricEss.getModbusSlaveNatureTable(accessMode), // - ModbusSlaveNatureTable.of(GridconPcsImpl.class, accessMode, 300) // - .build()); - } - - /** - * Handles Battery data, i.e. setting allowed charge/discharge power. - */ - protected void calculateAllowedPower() { - double allowedCharge = 0; - double allowedDischarge = 0; - - int offset = (int) Math.ceil(Math.abs(this.offsetCurrent)); - - for (Battery battery : this.getBatteries()) { - Integer maxChargeCurrent = Math.min(MAX_CURRENT_PER_STRING, battery.getChargeMaxCurrent().get()); - maxChargeCurrent = maxChargeCurrent - offset; // Reduce the max power by the value for the offset current - maxChargeCurrent = Math.max(maxChargeCurrent, 0); - allowedCharge += battery.getVoltage().get() * maxChargeCurrent * -1; - - Integer maxDischargeCurrent = Math.min(MAX_CURRENT_PER_STRING, battery.getDischargeMaxCurrent().get()); - maxDischargeCurrent = maxDischargeCurrent - offset; - // Reduce the max power by the value for the offset current - maxDischargeCurrent = Math.max(maxDischargeCurrent, 0); - allowedDischarge += battery.getVoltage().get() * maxDischargeCurrent; - } - - allowedCharge = (allowedCharge * (1 + this.getGridconPcs().getEfficiencyLossChargeFactor())); - allowedDischarge = (allowedDischarge * (1 - this.getGridconPcs().getEfficiencyLossDischargeFactor())); - - _setAllowedChargePower((int) allowedCharge); - _setAllowedDischargePower((int) allowedDischarge); - } - - protected abstract void calculateGridMode() throws IllegalArgumentException, OpenemsNamedException; - - /** - * Calculates the StateObject-of-charge of all Batteries; if all batteries are - * available. Otherwise sets UNDEFINED. - */ - protected void calculateSoc() { - float sumTotalCapacity = 0; - float sumCurrentCapacity = 0; - for (Battery b : this.getBatteries()) { - Optional totalCapacityOpt = b.getCapacity().asOptional(); - Optional socOpt = b.getSoc().asOptional(); - if (!totalCapacityOpt.isPresent() || !socOpt.isPresent()) { - // if at least one Battery has no valid value -> set UNDEFINED - _setSoc(null); - return; - } - float totalCapacity = totalCapacityOpt.get(); - float soc = socOpt.get(); - sumTotalCapacity += totalCapacity; - sumCurrentCapacity += totalCapacity * soc / 100.0; - } - int soc = Math.round(sumCurrentCapacity * 100 / sumTotalCapacity); - - _setSoc(soc); - } - - protected void calculateCapacity() { - float sumTotalCapacity = 0; - - for (Battery b : this.getBatteries()) { - Optional totalCapacityOpt = b.getCapacity().asOptional(); - float totalCapacity = totalCapacityOpt.orElse(0); - sumTotalCapacity += totalCapacity; - } - - _setCapacity((int) sumTotalCapacity); - } - - @Override - public String debugLog() { - return "StateObject: " + this.mainStateObject.getState().getName() + "| Next StateObject: " - + this.mainStateObject.getNextState().getName(); - } - - /** - * Gets all Batteries. - * - * @return a collection of Batteries; guaranteed to be not-null. - */ - protected Collection getBatteries() { - Collection batteries = new ArrayList<>(); - if (this.getBattery1() != null && !Helper.isUndefined(this.getBattery1())) { - batteries.add(this.getBattery1()); - } - - if (this.getBattery2() != null && !Helper.isUndefined(this.getBattery2())) { - batteries.add(this.getBattery2()); - } - - if (this.getBattery3() != null && !Helper.isUndefined(this.getBattery3())) { - batteries.add(this.getBattery3()); - } - return batteries; - } - - GridconPcs getGridconPcs() { - return this.getComponent(this.gridconId); - } - - Battery getBattery1() { - return this.getComponent(this.bmsAId); - } - - Battery getBattery2() { - return this.getComponent(this.bmsBId); - } - - Battery getBattery3() { - return this.getComponent(this.bmsCId); - } - - T getComponent(String id) { - T component = null; - try { - component = this.getComponentManager().getComponent(id); - } catch (OpenemsNamedException e) { - System.out.println(e); - } - return component; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconPcs.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconPcs.java deleted file mode 100644 index 3ddaac32ec5..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconPcs.java +++ /dev/null @@ -1,169 +0,0 @@ -// CHECKSTYLE:OFF -package io.openems.edge.ess.mr.gridcon; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.ess.mr.gridcon.enums.BalancingMode; -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; -import io.openems.edge.ess.mr.gridcon.enums.HarmonicCompensationMode; -import io.openems.edge.ess.mr.gridcon.enums.Mode; -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; - -/** - * Describes functions of the gridcon pcs system. - * - */ -public interface GridconPcs { - - public static final int MAX_POWER_PER_INVERTER = 42_000; - public static final float DC_LINK_VOLTAGE_SETPOINT = 800f; - public static final float Q_LIMIT = 1f; - public static final int POWER_PRECISION_WATT = 420; // Estimated value, 1% of max; - public static final float DEFAULT_GRID_FREQUENCY = 50; - public static final float DEFAULT_GRID_VOLTAGE = 230; - - public static final Float NOMINAL_CURRENT_PER_UNIT = 60f; - public static final Float NOMINAL_POWER_PER_UNIT = (float) MAX_POWER_PER_INVERTER; - - float getMaxApparentPower(); - - boolean isRunning(); - - boolean isStopped(); - - boolean isError(); - - void setPower(int activePower, int reactivePower); - - void setStop(boolean stop); - - void setPlay(boolean play); - - void setAcknowledge(boolean acknowledge); - - void setErrorCodeFeedback(int errorCodeFeedback); - - int getErrorCode(); - - float getActivePower(); - - float getReactivePower(); - - float getDcLinkPositiveVoltage(); - - boolean isCommunicationBroken(); - - void setEnableIpu1(boolean enabled); - - void setEnableIpu2(boolean enabled); - - void setEnableIpu3(boolean enabled); - - void enableDcDc(); - - void disableDcDc(); - - void setBalancingMode(BalancingMode balancingMode); - - void setFundamentalFrequencyMode(FundamentalFrequencyMode fundamentalFrequencyMode); - - void setHarmonicCompensationMode(HarmonicCompensationMode harmonicCompensationMode); - - // ------ Methods that are important for 'grid situation' - void setMode(Mode mode); // the mode indicates blackstart or sync approval - - void setU0(float voltageFactor); - - void setF0(float frequencyFactor); - // ---------------------------------------------- - - void setPControlMode(PControlMode activePowerControl); - - void setQLimit(float f); - - void setPMaxChargeIpu1(float maxPower); - - void setPMaxDischargeIpu1(float maxPower); - - void setPMaxChargeIpu2(float maxPower); - - void setPMaxDischargeIpu2(float maxPower); - - void setPMaxChargeIpu3(float maxPower); - - void setPMaxDischargeIpu3(float maxPower); - - void setDcLinkVoltage(float dcLinkVoltageSetpoint); - - void setWeightStringA(Float weight); - - void setWeightStringB(Float weight); - - void setWeightStringC(Float weight); - - void setIRefStringA(Float current); - - void setIRefStringB(Float current); - - void setIRefStringC(Float current); - - void setStringControlMode(int stringControlMode); - - int getErrorCount(); - - void setSyncDate(int date); - - void setSyncTime(int time); - - boolean isDcDcStarted(); - - boolean isIpusStarted(boolean enableIpu1, boolean enableIpu2, boolean enableIpu3); - - void doWriteTasks() throws OpenemsNamedException; - - float getActivePowerPreset(); - - double getEfficiencyLossChargeFactor(); - - double getEfficiencyLossDischargeFactor(); - - // Grid Measurement Values - float getCurrentL1Grid(); - - float getCurrentL2Grid(); - - float getCurrentL3Grid(); - - float getCurrentLNGrid(); - - float getActivePowerL1Grid(); - - float getActivePowerL2Grid(); - - float getActivePowerL3Grid(); - - float getActivePowerSumGrid(); - - float getReactivePowerL1Grid(); - - float getReactivePowerL2Grid(); - - float getReactivePowerL3Grid(); - - float getReactivePowerSumGrid(); - - float getApparentPowerL1Grid(); - - float getApparentPowerL2Grid(); - - float getApparentPowerL3Grid(); - - float getApparentPowerSumGrid(); - - // Gridcon is undefined if not all relevant gridcon values are set - boolean isUndefined(); - - void setCosPhiSetPoint1(float cosPhiSetPoint1); - - void setCosPhiSetPoint2(float cosPhiSetPoint2); -} -// CHECKSTYLE:ON \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconPcsImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconPcsImpl.java deleted file mode 100644 index 22a1f17994b..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconPcsImpl.java +++ /dev/null @@ -1,1601 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import static io.openems.edge.bridge.modbus.api.ElementToChannelConverter.INVERT; - -import java.nio.ByteOrder; - -import org.osgi.service.cm.ConfigurationAdmin; -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.component.annotations.ReferenceCardinality; -import org.osgi.service.component.annotations.ReferencePolicy; -import org.osgi.service.component.annotations.ReferencePolicyOption; -import org.osgi.service.event.Event; -import org.osgi.service.event.EventHandler; -import org.osgi.service.event.propertytypes.EventTopics; -import org.osgi.service.metatype.annotations.Designate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent; -import io.openems.edge.bridge.modbus.api.BridgeModbus; -import io.openems.edge.bridge.modbus.api.ModbusComponent; -import io.openems.edge.bridge.modbus.api.ModbusProtocol; -import io.openems.edge.bridge.modbus.api.element.BitsWordElement; -import io.openems.edge.bridge.modbus.api.element.FloatDoublewordElement; -import io.openems.edge.bridge.modbus.api.element.UnsignedDoublewordElement; -import io.openems.edge.bridge.modbus.api.element.UnsignedWordElement; -import io.openems.edge.bridge.modbus.api.element.WordOrder; -import io.openems.edge.bridge.modbus.api.task.FC16WriteRegistersTask; -import io.openems.edge.bridge.modbus.api.task.FC3ReadRegistersTask; -import io.openems.edge.common.channel.Channel; -import io.openems.edge.common.channel.EnumReadChannel; -import io.openems.edge.common.channel.FloatReadChannel; -import io.openems.edge.common.channel.IntegerReadChannel; -import io.openems.edge.common.channel.WriteChannel; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.event.EdgeEventConstants; -import io.openems.edge.common.taskmanager.Priority; -import io.openems.edge.ess.mr.gridcon.enums.BalancingMode; -import io.openems.edge.ess.mr.gridcon.enums.CcuState; -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; -import io.openems.edge.ess.mr.gridcon.enums.GridConChannelId; -import io.openems.edge.ess.mr.gridcon.enums.HarmonicCompensationMode; -import io.openems.edge.ess.mr.gridcon.enums.InverterCount; -import io.openems.edge.ess.mr.gridcon.enums.Mode; -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; -import io.openems.edge.ess.mr.gridcon.enums.StatusIpuStateMachine; -import io.openems.edge.ess.mr.gridcon.writewords.CcuParameters1; -import io.openems.edge.ess.mr.gridcon.writewords.CcuParameters2; -import io.openems.edge.ess.mr.gridcon.writewords.Commands; -import io.openems.edge.ess.mr.gridcon.writewords.CosPhiParameters; -import io.openems.edge.ess.mr.gridcon.writewords.DcDcParameter; -import io.openems.edge.ess.mr.gridcon.writewords.IpuParameter; - -@Designate(ocd = Config.class, factory = true) -@Component(// - name = "MR.Gridcon", // - immediate = true, // - configurationPolicy = ConfigurationPolicy.REQUIRE // -) -@EventTopics({ // - EdgeEventConstants.TOPIC_CYCLE_BEFORE_WRITE // -}) -public class GridconPcsImpl extends AbstractOpenemsModbusComponent - implements ModbusComponent, OpenemsComponent, GridconPcs, EventHandler { - - private static final int START_ADDRESS_GRID_MEASUREMENTS = 33456; - - private static final int START_ADDRESS_DCDC_MEASUREMENTS = 33488; - - private static final int START_ADDRESS_DCDC_STATE_WITH_TWO_IPUS = 33232; - private static final int START_ADDRESS_DCDC_STATE_WITH_ONE_IPU = 33200; - private static final int START_ADDRESS_DCDC_STATE_WITH_THREE_IPUS = 33264; - - private static final String NAME_PART_INVERTER_2 = "INVERTER2"; - - private static final String NAME_PART_INVERTER_3 = "INVERTER3"; - - public static final float DC_LINK_VOLTAGE_TOLERANCE_VOLT = 20; - - public static final double EFFICIENCY_LOSS_FACTOR = 0.07; - public static final double EFFICIENCY_LOSS_DISCHARGE_FACTOR = EFFICIENCY_LOSS_FACTOR; - public static final double EFFICIENCY_LOSS_CHARGE_FACTOR = EFFICIENCY_LOSS_FACTOR; - - private final Logger log = LoggerFactory.getLogger(GridconPcsImpl.class); - private final Commands commands; - private final CcuParameters1 ccuParameters1; - private final CcuParameters2 ccuParameters2; - private final IpuParameter ipu1Parameter; - private final IpuParameter ipu2Parameter; - private final IpuParameter ipu3Parameter; - private final DcDcParameter dcDcParameter; - private final CosPhiParameters cosPhiParameters; - - @Reference - private ConfigurationAdmin cm; - - @Reference - private ComponentManager componentManager; - - private InverterCount inverterCount; - - private int activePowerPreset; - - private double efficiencyLossDischargeFactor; - private double efficiencyLossChargeFactor; - - public GridconPcsImpl() { - super(// - OpenemsComponent.ChannelId.values(), // - ModbusComponent.ChannelId.values(), // - GridConChannelId.values() // - ); - this.commands = new Commands(); - this.ccuParameters1 = new CcuParameters1(); - this.ccuParameters2 = new CcuParameters2(); - this.ipu1Parameter = new IpuParameter(); - this.ipu2Parameter = new IpuParameter(); - this.ipu3Parameter = new IpuParameter(); - this.dcDcParameter = new DcDcParameter(); - this.cosPhiParameters = new CosPhiParameters(); - } - - @Reference(policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY, cardinality = ReferenceCardinality.MANDATORY) - protected void setModbus(BridgeModbus modbus) { - super.setModbus(modbus); - } - - @Activate - private void activate(ComponentContext context, Config config) throws OpenemsNamedException { - this.inverterCount = config.inverterCount(); - this.efficiencyLossChargeFactor = config.efficiencyLossChargeFactor(); - this.efficiencyLossDischargeFactor = config.efficiencyLossDischargeFactor(); - - if (super.activate(context, config.id(), config.alias(), config.enabled(), config.unit_id(), this.cm, "Modbus", - config.modbus_id())) { - return; - } - - this.setBalancingMode(config.balancing_mode()); - this.setFundamentalFrequencyMode(config.fundamental_frequency_mode()); - this.setHarmonicCompensationMode(config.harmonic_compensation_mode()); - this.cosPhiParameters.setCosPhiSetPoint1(config.cos_phi_setpoint_1()); - this.cosPhiParameters.setCosPhiSetPoint2(config.cos_phi_setpoint_2()); - } - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public float getMaxApparentPower() { - return this.inverterCount.getMaxApparentPower(); - } - - @Override - public void doWriteTasks() throws OpenemsNamedException { - this.writeCommands(); - this.writeCcuParameters1(); - this.writeCcuParameters2(); - this.writeCosPhiParameters(); - this.writeDcDcControlCommandWord(); - this.writeIpuInverter1ControlCommand(); - this.writeIpuInverter2ControlCommand(); - this.writeIpuInverter3ControlCommand(); - } - - @Override - public void handleEvent(Event event) { - - if (!isEnabled()) { - return; - } - switch (event.getTopic()) { - case EdgeEventConstants.TOPIC_CYCLE_BEFORE_WRITE: - try { - // Ensure that all values are set before writing is executed - this.doWriteTasks(); - } catch (OpenemsNamedException e) { - this.log.error("Error in doWriteTasks()", e); - } - break; - } - } - - @Override - public String debugLog() { - CcuState state = ((EnumReadChannel) this.channel(GridConChannelId.CCU_STATE)).value().asEnum(); - IntegerReadChannel errorCountChannel = this.channel(GridConChannelId.CCU_ERROR_COUNT); - int errorCount = errorCountChannel.value().orElse(-1); - return "Gridcon CCU state: " + state + "; Error count: " + errorCount + "; Active Power: " - + this.getActivePower(); - - } - - @Override - public void setPower(int activePower, int reactivePower) { - float maxApparentPower = this.getMaxApparentPower(); - /* - * !! signum, MR calculates negative values as discharge, positive as charge. - * Gridcon sets the (dis)charge according to a percentage of the - * MAX_APPARENT_POWER. So 0.1 => 10% of max power. Values should never take - * values lower than -1 or higher than 1. - */ - - this.activePowerPreset = activePower; - - float activePowerFactor = (-1) * activePower / maxApparentPower; - float reactivePowerFactor = (-1) * reactivePower / maxApparentPower; - - this.commands.setParameterPref(activePowerFactor); - this.commands.setParameterQref(reactivePowerFactor); - } - - protected void writeCommands() throws IllegalArgumentException, OpenemsNamedException { - - Commands c = this.commands; - - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_PLAY, c.getPlayBit()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_READY, c.getReadyAndStopBit2nd()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_ACKNOWLEDGE, c.getAcknowledgeBit()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_STOP, c.getStopBit1st()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_BLACKSTART_APPROVAL, c.isBlackstartApproval()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_SYNC_APPROVAL, c.isSyncApproval()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_ACTIVATE_SHORT_CIRCUIT_HANDLING, - c.isShortCircuitHandling()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_MODE_SELECTION, c.getMode().value); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_TRIGGER_SIA, c.isTriggerSia()); - - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_1, - c.getFundamentalFrequencyMode().isBit1()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_2, - c.getFundamentalFrequencyMode().isBit2()); - - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_1, - c.getBalancingMode().isBit1()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_2, - c.getBalancingMode().isBit2()); - - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_1, - c.getHarmonicCompensationMode().isBit1()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_2, - c.getHarmonicCompensationMode().isBit2()); - - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_1, c.isEnableIpu1()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_2, c.isEnableIpu2()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_3, c.isEnableIpu3()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_4, c.isEnableIpu4()); - - this.writeValueToChannel(GridConChannelId.COMMAND_ERROR_CODE_FEEDBACK, c.getErrorCodeFeedback()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_U0, c.getParameterU0()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_F0, c.getParameterF0()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_Q_REF, c.getParameterQref()); - this.writeValueToChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_P_REF, c.getParameterPref()); - - this.writeValueToChannel(GridConChannelId.COMMAND_TIME_SYNC_DATE, c.getSyncDate()); - this.writeValueToChannel(GridConChannelId.COMMAND_TIME_SYNC_TIME, c.getSyncTime()); - } - - protected void writeCcuParameters1() throws IllegalArgumentException, OpenemsNamedException { - CcuParameters1 ccpw = this.ccuParameters1; - - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN_LOWER, ccpw.getuByQDroopMainLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN_UPPER, ccpw.getuByQDroopMainUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_T1_MAIN, ccpw.getuByQDroopT1Main()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_MAIN_LOWER, ccpw.getfByPDroopMainLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_MAIN_UPPER, ccpw.getfByPDroopMainUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_T1_MAIN, ccpw.getfByPDroopT1Main()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN_LOWER, ccpw.getqByUDroopMainLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN_UPPER, ccpw.getqByUDroopMainUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND_LOWER, ccpw.getqByUDeadBandLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND_UPPER, ccpw.getqByUDeadBandUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_Q_LIMIT, ccpw.getqLimit()); - } - - protected void writeCcuParameters2() throws IllegalArgumentException, OpenemsNamedException { - CcuParameters2 ccpw = this.ccuParameters2; - - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN_LOWER, ccpw.getpByFDroopMainLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN_UPPER, ccpw.getpByFDroopMainUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND_LOWER, ccpw.getpByFDeadBandLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND_UPPER, ccpw.getpByFDeadBandUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP_LOWER, ccpw.getpByUDroopLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP_UPPER, ccpw.getpByUDroopUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DEAD_BAND_LOWER, ccpw.getpByUDeadBandLower()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DEAD_BAND_UPPER, ccpw.getpByUDeadBandUpper()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_U_MAX_CHARGE, ccpw.getpByUMaxCharge()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_U_MAX_DISCHARGE, ccpw.getpByUMaxDischarge()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_MODE, ccpw.getpControlMode().getValue()); // - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_LIM_TWO, ccpw.getpControlLimTwo()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_LIM_ONE, ccpw.getpControlLimOne()); - } - - protected void writeCosPhiParameters() throws IllegalArgumentException, OpenemsNamedException { - CosPhiParameters cpp = this.cosPhiParameters; - - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_COS_PHI_SETPOINT_1, cpp.getCosPhiSetPoint1()); - this.writeValueToChannel(GridConChannelId.CONTROL_PARAMETER_COS_PHI_SETPOINT_2, cpp.getCosPhiSetPoint2()); - } - - protected void writeIpuInverter1ControlCommand() throws IllegalArgumentException, OpenemsNamedException { - IpuParameter iicw = this.ipu1Parameter; - - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_DC_VOLTAGE_SETPOINT, iicw.getDcVoltageSetpoint()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_DC_CURRENT_SETPOINT, iicw.getDcCurrentSetpoint()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_U0_OFFSET_TO_CCU_VALUE, iicw.getU0OffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_F0_OFFSET_TO_CCU_VALUE, iicw.getF0OffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - iicw.getqRefOffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - iicw.getpRefOffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_P_MAX_DISCHARGE, iicw.getpMaxDischarge()); - this.writeValueToChannel(GridConChannelId.INVERTER_1_CONTROL_P_MAX_CHARGE, iicw.getpMaxCharge()); - } - - protected void writeIpuInverter2ControlCommand() throws IllegalArgumentException, OpenemsNamedException { - IpuParameter iicw = this.ipu2Parameter; - - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_DC_VOLTAGE_SETPOINT, iicw.getDcVoltageSetpoint()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_DC_CURRENT_SETPOINT, iicw.getDcCurrentSetpoint()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_U0_OFFSET_TO_CCU_VALUE, iicw.getU0OffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_F0_OFFSET_TO_CCU_VALUE, iicw.getF0OffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - iicw.getqRefOffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - iicw.getpRefOffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_P_MAX_DISCHARGE, iicw.getpMaxDischarge()); - this.writeValueToChannel(GridConChannelId.INVERTER_2_CONTROL_P_MAX_CHARGE, iicw.getpMaxCharge()); - } - - protected void writeIpuInverter3ControlCommand() throws IllegalArgumentException, OpenemsNamedException { - IpuParameter iicw = this.ipu3Parameter; - - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_DC_VOLTAGE_SETPOINT, iicw.getDcVoltageSetpoint()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_DC_CURRENT_SETPOINT, iicw.getDcCurrentSetpoint()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_U0_OFFSET_TO_CCU_VALUE, iicw.getU0OffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_F0_OFFSET_TO_CCU_VALUE, iicw.getF0OffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - iicw.getqRefOffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - iicw.getpRefOffsetToCcu()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_P_MAX_DISCHARGE, iicw.getpMaxDischarge()); - this.writeValueToChannel(GridConChannelId.INVERTER_3_CONTROL_P_MAX_CHARGE, iicw.getpMaxCharge()); - } - - protected void writeDcDcControlCommandWord() throws IllegalArgumentException, OpenemsNamedException { - DcDcParameter dcc = this.dcDcParameter; - - System.out.println("DC DC control command:\n" + dcc.toString()); - - if (dcc.getStringControlMode() == 0) { - // weighting is never allowed to be '0', but it's working according to the tool - // throw new OpenemsException("Calculated weight of '0' -> not allowed!"); - this.log.error("Calculated weight of '0' -> not allowed!"); - } - - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_DC_VOLTAGE_SETPOINT, dcc.getDcVoltageSetpoint()); // - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_A, dcc.getWeightStringA()); // - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_B, dcc.getWeightStringB()); // - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_C, dcc.getWeightStringC()); // - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_A, dcc.getiRefStringA()); // - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_B, dcc.getiRefStringB()); // - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_C, dcc.getiRefStringC()); // - - // Write values into mirror debug values for monitoring them - GridconPcsImpl.this.channel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_A_DEBUG) - .setNextValue((int) (dcc.getiRefStringA() * 1000)); - GridconPcsImpl.this.channel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_B_DEBUG) - .setNextValue((int) (dcc.getiRefStringB() * 1000)); - GridconPcsImpl.this.channel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_C_DEBUG) - .setNextValue((int) (dcc.getiRefStringC() * 1000)); - - this.writeValueToChannel(GridConChannelId.DCDC_CONTROL_STRING_CONTROL_MODE, dcc.getStringControlMode()); // - } - - @Override - protected ModbusProtocol defineModbusProtocol() { - int inverterCount = this.inverterCount.getCount(); - - ModbusProtocol result = new ModbusProtocol(this, // - new FC3ReadRegistersTask(32528, Priority.HIGH, // - m(GridConChannelId.CCU_STATE, new UnsignedWordElement(32528)), // - m(GridConChannelId.CCU_ERROR_COUNT, - new UnsignedWordElement(32529).byteOrder(ByteOrder.LITTLE_ENDIAN)), // - m(GridConChannelId.CCU_ERROR_CODE, - new UnsignedDoublewordElement(32530).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_VOLTAGE_U12, - new FloatDoublewordElement(32532).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_VOLTAGE_U23, - new FloatDoublewordElement(32534).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_VOLTAGE_U31, - new FloatDoublewordElement(32536).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_CURRENT_IL1, - new FloatDoublewordElement(32538).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_CURRENT_IL2, - new FloatDoublewordElement(32540).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_CURRENT_IL3, - new FloatDoublewordElement(32542).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_POWER_P, new FloatDoublewordElement(32544).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_POWER_Q, new FloatDoublewordElement(32546).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CCU_FREQUENCY, new FloatDoublewordElement(32548).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * Commands - */ - new FC16WriteRegistersTask(Commands.COMMANDS_ADRESS, // - m(new BitsWordElement(Commands.COMMANDS_ADRESS, this) // - .bit(0, GridConChannelId.COMMAND_CONTROL_WORD_STOP) // - .bit(1, GridConChannelId.COMMAND_CONTROL_WORD_PLAY) // - .bit(2, GridConChannelId.COMMAND_CONTROL_WORD_READY) // - .bit(3, GridConChannelId.COMMAND_CONTROL_WORD_ACKNOWLEDGE) // - - .bit(4, GridConChannelId.COMMAND_CONTROL_WORD_BLACKSTART_APPROVAL) // - .bit(5, GridConChannelId.COMMAND_CONTROL_WORD_SYNC_APPROVAL) // - .bit(6, GridConChannelId.COMMAND_CONTROL_WORD_ACTIVATE_SHORT_CIRCUIT_HANDLING) // - .bit(7, GridConChannelId.COMMAND_CONTROL_WORD_MODE_SELECTION) // - - .bit(8, GridConChannelId.COMMAND_CONTROL_WORD_TRIGGER_SIA) // - .bit(9, GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_1) // - .bit(10, GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_2) // - .bit(11, GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_1) // - .bit(12, GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_2) // - .bit(13, GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_1) // - .bit(14, GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_2) // - ), // - m(new BitsWordElement(Commands.COMMANDS_ADRESS + 1, this) // - .bit(12, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_4) // - .bit(13, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_3) // - .bit(14, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_2) // - .bit(15, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_1) // - ), // - m(GridConChannelId.COMMAND_ERROR_CODE_FEEDBACK, - new UnsignedDoublewordElement(Commands.COMMANDS_ADRESS + 2) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_U0, - new FloatDoublewordElement(Commands.COMMANDS_ADRESS + 4).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_F0, - new FloatDoublewordElement(Commands.COMMANDS_ADRESS + 6).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_Q_REF, - new FloatDoublewordElement(Commands.COMMANDS_ADRESS + 8).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_P_REF, - new FloatDoublewordElement(Commands.COMMANDS_ADRESS + 10).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_TIME_SYNC_DATE, - new UnsignedDoublewordElement(Commands.COMMANDS_ADRESS + 12) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_TIME_SYNC_TIME, - new UnsignedDoublewordElement(Commands.COMMANDS_ADRESS + 14) - .wordOrder(WordOrder.LSWMSW)) // - ), - /* - * Commands Mirror - */ - new FC3ReadRegistersTask(32880, Priority.LOW, // - m(new BitsWordElement(32880, this) // - .bit(12, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_4) // - .bit(13, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_3) // - .bit(14, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_2) // - .bit(15, GridConChannelId.COMMAND_CONTROL_WORD_ENABLE_IPU_1) // - ), // - m(new BitsWordElement(32881, this) // - .bit(0, GridConChannelId.COMMAND_CONTROL_WORD_STOP) // - .bit(1, GridConChannelId.COMMAND_CONTROL_WORD_PLAY) // - .bit(2, GridConChannelId.COMMAND_CONTROL_WORD_READY) // - .bit(3, GridConChannelId.COMMAND_CONTROL_WORD_ACKNOWLEDGE) // - .bit(4, GridConChannelId.COMMAND_CONTROL_WORD_BLACKSTART_APPROVAL) // - .bit(5, GridConChannelId.COMMAND_CONTROL_WORD_SYNC_APPROVAL) // - .bit(6, GridConChannelId.COMMAND_CONTROL_WORD_ACTIVATE_SHORT_CIRCUIT_HANDLING) // - .bit(7, GridConChannelId.COMMAND_CONTROL_WORD_MODE_SELECTION) // - .bit(8, GridConChannelId.COMMAND_CONTROL_WORD_TRIGGER_SIA) // - .bit(9, GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_1) // - .bit(10, GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_2) // - .bit(11, GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_1) // - .bit(12, GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_2) // - .bit(13, GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_1) // - .bit(14, GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_2) // - - ), // - m(GridConChannelId.COMMAND_ERROR_CODE_FEEDBACK, - new UnsignedDoublewordElement(32882).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_U0, - new FloatDoublewordElement(32884).wordOrder(WordOrder.LSWMSW)), - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_F0, - new FloatDoublewordElement(32886).wordOrder(WordOrder.LSWMSW)), - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_Q_REF, - new FloatDoublewordElement(32888).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.COMMAND_CONTROL_PARAMETER_P_REF, - new FloatDoublewordElement(32890).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * CCU Control Parameters 1 - */ - new FC16WriteRegistersTask(CcuParameters1.CCU_PARAMETERS_1_ADRESS, // - m(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN_LOWER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 0) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN_UPPER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 2) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_T1_MAIN, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 4) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_MAIN_LOWER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 6) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_MAIN_UPPER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 8) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_T1_MAIN, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 10) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN_LOWER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 12) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN_UPPER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 14) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND_LOWER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 16) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND_UPPER, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 18) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_Q_LIMIT, - new FloatDoublewordElement(CcuParameters1.CCU_PARAMETERS_1_ADRESS + 20) - .wordOrder(WordOrder.LSWMSW)) // - ), - /* - * CCU Control Parameters 2 - */ - new FC16WriteRegistersTask(CcuParameters2.CCU_PARAMETERS_2_ADRESS, // - m(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN_LOWER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 0) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN_UPPER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 2) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND_LOWER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 4) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND_UPPER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 6) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP_LOWER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 8) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP_UPPER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 10) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_U_DEAD_BAND_LOWER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 12) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_U_DEAD_BAND_UPPER, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 14) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_U_MAX_CHARGE, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 16) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_U_MAX_DISCHARGE, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 18) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_MODE, - new UnsignedDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 20) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_LIM_TWO, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 22) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_LIM_ONE, - new FloatDoublewordElement(CcuParameters2.CCU_PARAMETERS_2_ADRESS + 24) - .wordOrder(WordOrder.LSWMSW)) // - ), - - /* - * Cos Phi Parameters - */ - new FC16WriteRegistersTask(CosPhiParameters.COS_PHI_ADDRESS, // - m(GridConChannelId.CONTROL_PARAMETER_COS_PHI_SETPOINT_1, - new FloatDoublewordElement(CosPhiParameters.COS_PHI_ADDRESS + 0) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.CONTROL_PARAMETER_COS_PHI_SETPOINT_2, - new FloatDoublewordElement(CosPhiParameters.COS_PHI_ADDRESS + 2) - .wordOrder(WordOrder.LSWMSW)) // - ) - // , /* - // * Control Parameters Mirror - // */ - // new FC3ReadRegistersTask(32912, Priority.LOW, - // m(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN, - // new FloatDoublewordElement(32912).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_T1_MAIN, - // new FloatDoublewordElement(32914).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_MAIN, - // new FloatDoublewordElement(32916).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_T1_MAIN, - // new FloatDoublewordElement(32918).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN, - // new FloatDoublewordElement(32920).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND, - // new FloatDoublewordElement(32922).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_Q_LIMIT, - // new FloatDoublewordElement(32924).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN, - // new FloatDoublewordElement(32926).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND, - // new FloatDoublewordElement(32928).wordOrder(WordOrder.LSWMSW)), // - // m(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP, - // new FloatDoublewordElement(32930).wordOrder(WordOrder.LSWMSW)) // - // ) - ); - - if (inverterCount > 0) { - /* - * At least 1 Inverter -> Add IPU 1 - */ - result.addTasks(// - /* - * IPU 1 StateObject - */ - new FC3ReadRegistersTask(33168, Priority.LOW, // - m(GridConChannelId.INVERTER_1_STATUS_STATE_MACHINE, new UnsignedWordElement(33168)), // - m(GridConChannelId.INVERTER_1_STATUS_MCU, new UnsignedWordElement(33169)), // - m(GridConChannelId.INVERTER_1_STATUS_FILTER_CURRENT, - new FloatDoublewordElement(33170).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_DC_LINK_POSITIVE_VOLTAGE, - new FloatDoublewordElement(33172).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_DC_LINK_NEGATIVE_VOLTAGE, - new FloatDoublewordElement(33174).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_DC_LINK_CURRENT, - new FloatDoublewordElement(33176).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_DC_LINK_ACTIVE_POWER, - new FloatDoublewordElement(33178).wordOrder(WordOrder.LSWMSW), INVERT), // - m(GridConChannelId.INVERTER_1_STATUS_DC_LINK_UTILIZATION, - new FloatDoublewordElement(33180).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_FAN_SPEED_MAX, - new UnsignedDoublewordElement(33182).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_FAN_SPEED_MIN, - new UnsignedDoublewordElement(33184).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_TEMPERATURE_IGBT_MAX, - new FloatDoublewordElement(33186).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_TEMPERATURE_MCU_BOARD, - new FloatDoublewordElement(33188).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_TEMPERATURE_GRID_CHOKE, - new FloatDoublewordElement(33190).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_TEMPERATURE_INVERTER_CHOKE, - new FloatDoublewordElement(33192).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_RESERVE_1, - new FloatDoublewordElement(33194).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_RESERVE_2, - new FloatDoublewordElement(33196).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_STATUS_RESERVE_3, - new FloatDoublewordElement(33198).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * IPU 1 Control Parameters - */ - new FC16WriteRegistersTask(32624, // - m(GridConChannelId.INVERTER_1_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(32624).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_DC_CURRENT_SETPOINT, - new FloatDoublewordElement(32626).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_U0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32628).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_F0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32630).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32632).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32634).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_P_MAX_DISCHARGE, - new FloatDoublewordElement(32636).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_P_MAX_CHARGE, - new FloatDoublewordElement(32638).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * IPU 1 Mirror Control - */ - new FC3ReadRegistersTask(32944, Priority.LOW, - m(GridConChannelId.INVERTER_1_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(32944).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_DC_CURRENT_SETPOINT, - new FloatDoublewordElement(32946).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_U0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32948).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_F0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32950).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32952).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_1_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32954).wordOrder(WordOrder.LSWMSW)) // - )); - } - - if (inverterCount > 1) { - /* - * At least 2 Inverters -> Add IPU 2 - */ - result.addTasks(// - /* - * IPU 2 StateObject - */ - new FC3ReadRegistersTask(33200, Priority.LOW, // - m(GridConChannelId.INVERTER_2_STATUS_STATE_MACHINE, new UnsignedWordElement(33200)), // - m(GridConChannelId.INVERTER_2_STATUS_MCU, new UnsignedWordElement(33201)), // - m(GridConChannelId.INVERTER_2_STATUS_FILTER_CURRENT, - new FloatDoublewordElement(33202).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_DC_LINK_POSITIVE_VOLTAGE, - new FloatDoublewordElement(33204).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_DC_LINK_NEGATIVE_VOLTAGE, - new FloatDoublewordElement(33206).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_DC_LINK_CURRENT, - new FloatDoublewordElement(33208).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_DC_LINK_ACTIVE_POWER, - new FloatDoublewordElement(33210).wordOrder(WordOrder.LSWMSW), INVERT), // - m(GridConChannelId.INVERTER_2_STATUS_DC_LINK_UTILIZATION, - new FloatDoublewordElement(33212).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_FAN_SPEED_MAX, - new UnsignedDoublewordElement(33214).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_FAN_SPEED_MIN, - new UnsignedDoublewordElement(33216).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_TEMPERATURE_IGBT_MAX, - new FloatDoublewordElement(33218).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_TEMPERATURE_MCU_BOARD, - new FloatDoublewordElement(33220).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_TEMPERATURE_GRID_CHOKE, - new FloatDoublewordElement(33222).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_TEMPERATURE_INVERTER_CHOKE, - new FloatDoublewordElement(33224).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_RESERVE_1, - new FloatDoublewordElement(33226).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_RESERVE_2, - new FloatDoublewordElement(33228).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_STATUS_RESERVE_3, - new FloatDoublewordElement(33230).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * IPU 2 Control Parameters - */ - new FC16WriteRegistersTask(32656, // - m(GridConChannelId.INVERTER_2_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(32656).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_DC_CURRENT_SETPOINT, - new FloatDoublewordElement(32658).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_U0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32660).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_F0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32662).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32664).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32666).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_P_MAX_DISCHARGE, - new FloatDoublewordElement(32668).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_P_MAX_CHARGE, - new FloatDoublewordElement(32670).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * IPU 2 Mirror Control - */ - new FC3ReadRegistersTask(32976, Priority.LOW, - m(GridConChannelId.INVERTER_2_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(32976).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_DC_CURRENT_SETPOINT, - new FloatDoublewordElement(32978).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_U0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32980).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_F0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32982).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32984).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_2_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32986).wordOrder(WordOrder.LSWMSW)) // - )); - } - if (inverterCount > 2) { - /* - * 3 Inverters -> Add IPU 3 - */ - result.addTasks(// - /* - * IPU 3 StateObject - */ - new FC3ReadRegistersTask(33232, Priority.LOW, // - m(GridConChannelId.INVERTER_3_STATUS_STATE_MACHINE, new UnsignedWordElement(33232)), // - m(GridConChannelId.INVERTER_3_STATUS_MCU, new UnsignedWordElement(33233)), // - m(GridConChannelId.INVERTER_3_STATUS_FILTER_CURRENT, - new FloatDoublewordElement(33234).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_DC_LINK_POSITIVE_VOLTAGE, - new FloatDoublewordElement(33236).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_DC_LINK_NEGATIVE_VOLTAGE, - new FloatDoublewordElement(33238).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_DC_LINK_CURRENT, - new FloatDoublewordElement(33240).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_DC_LINK_ACTIVE_POWER, - new FloatDoublewordElement(33242).wordOrder(WordOrder.LSWMSW), INVERT), // - m(GridConChannelId.INVERTER_3_STATUS_DC_LINK_UTILIZATION, - new FloatDoublewordElement(33244).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_FAN_SPEED_MAX, - new UnsignedDoublewordElement(33246).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_FAN_SPEED_MIN, - new UnsignedDoublewordElement(33248).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_TEMPERATURE_IGBT_MAX, - new FloatDoublewordElement(33250).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_TEMPERATURE_MCU_BOARD, - new FloatDoublewordElement(33252).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_TEMPERATURE_GRID_CHOKE, - new FloatDoublewordElement(33254).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_TEMPERATURE_INVERTER_CHOKE, - new FloatDoublewordElement(33256).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_RESERVE_1, - new FloatDoublewordElement(33258).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_RESERVE_2, - new FloatDoublewordElement(33260).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_STATUS_RESERVE_3, - new FloatDoublewordElement(33262).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * IPU 3 Control Parameters - */ - new FC16WriteRegistersTask(32688, // - m(GridConChannelId.INVERTER_3_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(32688).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_DC_CURRENT_SETPOINT, - new FloatDoublewordElement(32690).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_U0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32692).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_F0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32694).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32696).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(32698).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_P_MAX_DISCHARGE, - new FloatDoublewordElement(32700).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_P_MAX_CHARGE, - new FloatDoublewordElement(32702).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * IPU 3 Mirror Control - */ - new FC3ReadRegistersTask(33008, Priority.LOW, - m(GridConChannelId.INVERTER_3_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(33008).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_DC_CURRENT_SETPOINT, - new FloatDoublewordElement(33010).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_U0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(33012).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_F0_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(33014).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(33016).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.INVERTER_3_CONTROL_P_REF_OFFSET_TO_CCU_VALUE, - new FloatDoublewordElement(33018).wordOrder(WordOrder.LSWMSW)) // - )); - } - - { - /* - * DCDC - * - * if one inverter is used, dc dc converter is ipu2 ... - */ - int startAddressIpuControl = DcDcParameter.DC_DC_ADRESS; - - int startAddressDcDcState = START_ADDRESS_DCDC_STATE_WITH_THREE_IPUS; - int startAddressDcdcMeasurements = START_ADDRESS_DCDC_MEASUREMENTS; - int startAddressGridMeasurements = START_ADDRESS_GRID_MEASUREMENTS; - switch (this.inverterCount) { - case ONE: - startAddressDcDcState = START_ADDRESS_DCDC_STATE_WITH_ONE_IPU; - break; - case TWO: - startAddressDcDcState = START_ADDRESS_DCDC_STATE_WITH_TWO_IPUS; - break; - case THREE: - // default - break; - } - - result.addTasks(new FC3ReadRegistersTask(startAddressGridMeasurements, Priority.HIGH, - m(GridConChannelId.GRID_MEASUREMENT_I_L1, - new FloatDoublewordElement(startAddressGridMeasurements).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_I_L2, - new FloatDoublewordElement(startAddressGridMeasurements + 2).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_I_L3, - new FloatDoublewordElement(startAddressGridMeasurements + 4).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_I_LN, - new FloatDoublewordElement(startAddressGridMeasurements + 6).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_P_L1, - new FloatDoublewordElement(startAddressGridMeasurements + 8).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_P_L2, - new FloatDoublewordElement(startAddressGridMeasurements + 10).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_P_L3, - new FloatDoublewordElement(startAddressGridMeasurements + 12).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_P_SUM, - new FloatDoublewordElement(startAddressGridMeasurements + 14).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_Q_L1, - new FloatDoublewordElement(startAddressGridMeasurements + 16).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_Q_L2, - new FloatDoublewordElement(startAddressGridMeasurements + 18).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_Q_L3, - new FloatDoublewordElement(startAddressGridMeasurements + 20).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.GRID_MEASUREMENT_Q_SUM, - new FloatDoublewordElement(startAddressGridMeasurements + 22).wordOrder(WordOrder.LSWMSW)) // - )); - - result.addTasks(// - /* - * set - */ - new FC16WriteRegistersTask(startAddressIpuControl, // - m(GridConChannelId.DCDC_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(startAddressIpuControl).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_A, - new FloatDoublewordElement(startAddressIpuControl + 2).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_B, - new FloatDoublewordElement(startAddressIpuControl + 4).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_C, - new FloatDoublewordElement(startAddressIpuControl + 6).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_I_REF_STRING_A, - new FloatDoublewordElement(startAddressIpuControl + 8).wordOrder(WordOrder.LSWMSW). // - onUpdateCallback(val -> { - if (val == null) { - return; - } - GridconPcsImpl.this - .channel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_A_DEBUG) - .setNextValue((int) (val * 1000)); - })), // - m(GridConChannelId.DCDC_CONTROL_I_REF_STRING_B, - new FloatDoublewordElement(startAddressIpuControl + 10).wordOrder(WordOrder.LSWMSW). // - onUpdateCallback(val -> { - if (val == null) { - return; - } - GridconPcsImpl.this - .channel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_B_DEBUG) - .setNextValue((int) (val * 1000)); - })), // - m(GridConChannelId.DCDC_CONTROL_I_REF_STRING_C, - new FloatDoublewordElement(startAddressIpuControl + 12).wordOrder(WordOrder.LSWMSW). // - onUpdateCallback(val -> { - if (val == null) { - return; - } - GridconPcsImpl.this - .channel(GridConChannelId.DCDC_CONTROL_I_REF_STRING_C_DEBUG) - .setNextValue((int) (val * 1000)); - })), // - m(GridConChannelId.DCDC_CONTROL_STRING_CONTROL_MODE, - new UnsignedDoublewordElement(startAddressIpuControl + 14) - .wordOrder(WordOrder.LSWMSW)) // - ), - /* - * DCDC Control Mirror - */ - new FC3ReadRegistersTask(startAddressIpuControl, Priority.LOW, - m(GridConChannelId.DCDC_CONTROL_DC_VOLTAGE_SETPOINT, - new FloatDoublewordElement(startAddressIpuControl).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_A, - new FloatDoublewordElement(startAddressIpuControl + 2).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_B, - new FloatDoublewordElement(startAddressIpuControl + 4).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_C, - new FloatDoublewordElement(startAddressIpuControl + 6).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_I_REF_STRING_A, - new FloatDoublewordElement(startAddressIpuControl + 8).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_I_REF_STRING_B, - new FloatDoublewordElement(startAddressIpuControl + 10) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_I_REF_STRING_C, - new FloatDoublewordElement(startAddressIpuControl + 12) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_CONTROL_STRING_CONTROL_MODE, - new UnsignedDoublewordElement(startAddressIpuControl + 14) - .wordOrder(WordOrder.LSWMSW)) // - ), - /* - * DCDC StateObject - */ - new FC3ReadRegistersTask(startAddressDcDcState, Priority.LOW, // // IPU 4 state - m(GridConChannelId.DCDC_STATUS_STATE_MACHINE, - new UnsignedWordElement(startAddressDcDcState)), // - m(GridConChannelId.DCDC_STATUS_MCU, new UnsignedWordElement(startAddressDcDcState + 1)), // - m(GridConChannelId.DCDC_STATUS_FILTER_CURRENT, - new FloatDoublewordElement(startAddressDcDcState + 2).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_DC_LINK_POSITIVE_VOLTAGE, - new FloatDoublewordElement(startAddressDcDcState + 4).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_DC_LINK_NEGATIVE_VOLTAGE, - new FloatDoublewordElement(startAddressDcDcState + 6).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_DC_LINK_CURRENT, - new FloatDoublewordElement(startAddressDcDcState + 8).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_DC_LINK_ACTIVE_POWER, - new FloatDoublewordElement(startAddressDcDcState + 10).wordOrder(WordOrder.LSWMSW), - INVERT), // - m(GridConChannelId.DCDC_STATUS_DC_LINK_UTILIZATION, - new FloatDoublewordElement(startAddressDcDcState + 12).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_FAN_SPEED_MAX, - new UnsignedDoublewordElement(startAddressDcDcState + 14) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_FAN_SPEED_MIN, - new UnsignedDoublewordElement(startAddressDcDcState + 16) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_TEMPERATURE_IGBT_MAX, - new FloatDoublewordElement(startAddressDcDcState + 18).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_TEMPERATURE_MCU_BOARD, - new FloatDoublewordElement(startAddressDcDcState + 20).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_TEMPERATURE_GRID_CHOKE, - new FloatDoublewordElement(startAddressDcDcState + 22).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_TEMPERATURE_INVERTER_CHOKE, - new FloatDoublewordElement(startAddressDcDcState + 24).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_RESERVE_1, - new FloatDoublewordElement(startAddressDcDcState + 26).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_RESERVE_2, - new FloatDoublewordElement(startAddressDcDcState + 28).wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_STATUS_RESERVE_3, - new FloatDoublewordElement(startAddressDcDcState + 30).wordOrder(WordOrder.LSWMSW)) // - ), - /* - * DCDC Measurements - */ - new FC3ReadRegistersTask(startAddressDcdcMeasurements, Priority.LOW, // IPU 4 measurements - m(GridConChannelId.DCDC_MEASUREMENTS_VOLTAGE_STRING_A, - new FloatDoublewordElement(startAddressDcdcMeasurements) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_VOLTAGE_STRING_B, - new FloatDoublewordElement(startAddressDcdcMeasurements + 2) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_VOLTAGE_STRING_C, - new FloatDoublewordElement(startAddressDcdcMeasurements + 4) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_CURRENT_STRING_A, - new FloatDoublewordElement(startAddressDcdcMeasurements + 6) - .wordOrder(WordOrder.LSWMSW). // - onUpdateCallback(val -> { - if (val == null) { - return; - } - GridconPcsImpl.this.channel( - GridConChannelId.DCDC_MEASUREMENTS_CURRENT_STRING_A_DEBUG) - .setNextValue((int) (val * 1000)); - })), // - m(GridConChannelId.DCDC_MEASUREMENTS_CURRENT_STRING_B, - new FloatDoublewordElement(startAddressDcdcMeasurements + 8) - .wordOrder(WordOrder.LSWMSW). // - onUpdateCallback(val -> { - if (val == null) { - return; - } - GridconPcsImpl.this.channel( - GridConChannelId.DCDC_MEASUREMENTS_CURRENT_STRING_B_DEBUG) - .setNextValue((int) (val * 1000)); - })), // - m(GridConChannelId.DCDC_MEASUREMENTS_CURRENT_STRING_C, - new FloatDoublewordElement(startAddressDcdcMeasurements + 10) - .wordOrder(WordOrder.LSWMSW). // - onUpdateCallback(val -> { - if (val == null) { - return; - } - GridconPcsImpl.this.channel( - GridConChannelId.DCDC_MEASUREMENTS_CURRENT_STRING_C_DEBUG) - .setNextValue((int) (val * 1000)); - })), // - m(GridConChannelId.DCDC_MEASUREMENTS_POWER_STRING_A, - new FloatDoublewordElement(startAddressDcdcMeasurements + 12) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_POWER_STRING_B, - new FloatDoublewordElement(startAddressDcdcMeasurements + 14) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_POWER_STRING_C, - new FloatDoublewordElement(startAddressDcdcMeasurements + 16) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_UTILIZATION_STRING_A, - new FloatDoublewordElement(startAddressDcdcMeasurements + 18) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_UTILIZATION_STRING_B, - new FloatDoublewordElement(startAddressDcdcMeasurements + 20) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_UTILIZATION_STRING_C, - new FloatDoublewordElement(startAddressDcdcMeasurements + 22) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_ACCUMULATED_SUM_DC_CURRENT, - new FloatDoublewordElement(startAddressDcdcMeasurements + 24) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_ACCUMULATED_DC_UTILIZATION, - new FloatDoublewordElement(startAddressDcdcMeasurements + 26) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_RESERVE_1, - new FloatDoublewordElement(startAddressDcdcMeasurements + 28) - .wordOrder(WordOrder.LSWMSW)), // - m(GridConChannelId.DCDC_MEASUREMENTS_RESERVE_2, - new FloatDoublewordElement(startAddressDcdcMeasurements + 30) - .wordOrder(WordOrder.LSWMSW)) // - )); - } - return result; - } - - @Override - public void setErrorCodeFeedback(int errorCodeFeedback) { - this.commands.setErrorCodeFeedback(errorCodeFeedback); - } - - @Override - public int getErrorCode() { - return this.getInteger(GridConChannelId.CCU_ERROR_CODE); - } - - private float getActivePowerInverter1() { - FloatReadChannel c = this.channel(GridConChannelId.INVERTER_1_STATUS_DC_LINK_ACTIVE_POWER); - return c.getNextValue().orElse(0f); - } - - private float getActivePowerInverter2() { - FloatReadChannel c = this.channel(GridConChannelId.INVERTER_2_STATUS_DC_LINK_ACTIVE_POWER); - return c.getNextValue().orElse(0f); - } - - private float getActivePowerInverter3() { - FloatReadChannel c = this.channel(GridConChannelId.INVERTER_3_STATUS_DC_LINK_ACTIVE_POWER); - return c.getNextValue().orElse(0f); - } - - // TODO Check sign, round!? - // TODO OR get CCU-Power * Max Power?! - @Override - public float getActivePower() { - return this.getActivePowerInverter1() + this.getActivePowerInverter2() + this.getActivePowerInverter3(); - } - - @Override - public float getReactivePower() { // TODO check if this is correct - FloatReadChannel c = this.channel(GridConChannelId.CCU_POWER_Q); - return c.getNextValue().orElse(0f) * this.getMaxApparentPower(); - } - - @Override - public float getDcLinkPositiveVoltage() { - FloatReadChannel c = this.channel(GridConChannelId.DCDC_STATUS_DC_LINK_POSITIVE_VOLTAGE); - return c.value().orElse(0f); - } - - @Override - public boolean isCommunicationBroken() { - return this.getModbusCommunicationFailed(); - } - - @Override - public void setEnableIpu1(boolean enabled) { - switch (this.inverterCount) { - case ONE: - this.commands.setEnableIpu1(enabled); - break; - case TWO: - this.commands.setEnableIpu1(enabled); - break; - case THREE: - this.commands.setEnableIpu1(enabled); - break; - } - } - - @Override - public void setEnableIpu2(boolean enabled) { - switch (this.inverterCount) { - case ONE: - System.out.println("Not allowed, there is only one inverters!"); - break; - case TWO: - this.commands.setEnableIpu2(enabled); - break; - case THREE: - this.commands.setEnableIpu2(enabled); - break; - } - } - - @Override - public void setEnableIpu3(boolean enabled) { - switch (this.inverterCount) { - case ONE: - System.out.println("Not allowed, there are only two inverters!"); - break; - case TWO: - System.out.println("Not allowed, there are only two inverters!"); - break; - case THREE: - this.commands.setEnableIpu3(enabled); - break; - } - } - - @Override - public void setBalancingMode(BalancingMode balancingMode) { - this.commands.setBalancingMode(balancingMode); - } - - @Override - public void setMode(Mode mode) { - this.commands.setMode(mode); - } - - @Override - public void setU0(float onGridVoltageFactor) { - this.commands.setParameterU0(onGridVoltageFactor); - } - - @Override - public void setF0(float onGridFrequencyFactor) { - this.commands.setParameterF0(onGridFrequencyFactor); - } - - @Override - public void setPControlMode(PControlMode pControlMode) { - this.ccuParameters2.setpControlMode(pControlMode); - } - - @Override - public void setQLimit(float qLimit) { - this.ccuParameters1.setqLimit(qLimit); - } - - @Override - public void setPMaxChargeIpu1(float maxPower) { - this.ipu1Parameter.setpMaxCharge(maxPower); - } - - @Override - public void setPMaxDischargeIpu1(float maxPower) { - this.ipu1Parameter.setpMaxDischarge(maxPower); - } - - @Override - public void setPMaxChargeIpu2(float maxPower) { - this.ipu2Parameter.setpMaxCharge(maxPower); - } - - @Override - public void setPMaxDischargeIpu2(float maxPower) { - this.ipu2Parameter.setpMaxDischarge(maxPower); - } - - @Override - public void setPMaxChargeIpu3(float maxPower) { - this.ipu3Parameter.setpMaxCharge(maxPower); - } - - @Override - public void setPMaxDischargeIpu3(float maxPower) { - this.ipu3Parameter.setpMaxDischarge(maxPower); - } - - @Override - public void setDcLinkVoltage(float dcLinkVoltageSetpoint) { - this.dcDcParameter.setDcVoltageSetpoint(dcLinkVoltageSetpoint); - } - - @Override - public void setWeightStringA(Float weight) { - this.dcDcParameter.setWeightStringA(weight); - } - - @Override - public void setWeightStringB(Float weight) { - this.dcDcParameter.setWeightStringB(weight); - } - - @Override - public void setWeightStringC(Float weight) { - this.dcDcParameter.setWeightStringC(weight); - } - - @Override - public void setStringControlMode(int stringControlMode) { - this.dcDcParameter.setStringControlMode(stringControlMode); - } - - @Override - public void setIRefStringA(Float current) { - this.dcDcParameter.setiRefStringA(current); - } - - @Override - public void setIRefStringB(Float current) { - this.dcDcParameter.setiRefStringB(current); - } - - @Override - public void setIRefStringC(Float current) { - this.dcDcParameter.setiRefStringC(current); - } - - @Override - public void enableDcDc() { - switch (this.inverterCount) { - case ONE: - this.commands.setEnableIpu2(true); - break; - case TWO: - this.commands.setEnableIpu3(true); - break; - case THREE: - this.commands.setEnableIpu4(true); - break; - } - } - - @Override - public void disableDcDc() { - switch (this.inverterCount) { - case ONE: - this.commands.setEnableIpu2(false); - break; - case TWO: - this.commands.setEnableIpu3(false); - break; - case THREE: - this.commands.setEnableIpu4(false); - break; - } - } - - @Override - public int getErrorCount() { - return this.getInteger(GridConChannelId.CCU_ERROR_COUNT); - } - - @Override - public void setSyncDate(int date) { - this.commands.setSyncDate(date); - } - - @Override - public void setSyncTime(int time) { - this.commands.setSyncTime(time); - } - - private void writeValueToChannel(GridConChannelId channelId, T value) - throws IllegalArgumentException, OpenemsNamedException { - ((WriteChannel) channel(channelId)).setNextWriteValueFromObject(value); - } - - private int getInteger(GridConChannelId id) { - IntegerReadChannel c = this.channel(id); - return c.value().orElse(Integer.MIN_VALUE); - } - - @Override - public boolean isStopped() { - return this.getCcuState() == CcuState.SYNC_TO_V || this.getCcuState() == CcuState.IDLE_CURRENTLY_NOT_WORKING; - } - - @Override - public boolean isRunning() { - return this.getCcuState() == CcuState.RUN || this.getCcuState() == CcuState.COMPENSATOR; - } - - @Override - public boolean isError() { - return this.getCcuState() == CcuState.ERROR || this.isCommunicationBroken(); - } - - private CcuState getCcuState() { - CcuState state = ((EnumReadChannel) this.channel(GridConChannelId.CCU_STATE)).value().asEnum(); - return state; - } - - @Override - public void setStop(boolean stop) { - this.commands.setStopBit1st(stop); - this.commands.setReadyAndStopBit2nd(stop); - if (stop) { // only one command should be executed! - System.out.println("only one command should be executed!"); - this.setPlay(false); - this.setAcknowledge(false); - } - } - - @Override - public void setAcknowledge(boolean acknowledge) { - this.commands.setAcknowledgeBit(acknowledge); - if (acknowledge) { // only one command should be executed! - System.out.println("only one command should be executed!"); - this.setStop(false); - this.setPlay(false); - } - } - - @Override - public void setPlay(boolean play) { - this.commands.setPlayBit(play); - if (play) { // only one command should be executed! - System.out.println("only one command should be executed!"); - this.setStop(false); - this.setAcknowledge(false); - } - } - - @Override - public boolean isDcDcStarted() { - StatusIpuStateMachine state = ((EnumReadChannel) this.channel(GridConChannelId.DCDC_STATUS_STATE_MACHINE)) - .value().asEnum(); - return state == StatusIpuStateMachine.RUN; - } - - @Override - public boolean isIpusStarted(boolean enableIpu1, boolean enableIpu2, boolean enableIpu3) { - boolean ret = true; - - if (enableIpu1) { - ret = ret && this.isIpuRunning(GridConChannelId.INVERTER_1_STATUS_STATE_MACHINE); - } - - if (enableIpu2) { - ret = ret && this.isIpuRunning(GridConChannelId.INVERTER_2_STATUS_STATE_MACHINE); - } - - if (enableIpu3) { - ret = ret && this.isIpuRunning(GridConChannelId.INVERTER_3_STATUS_STATE_MACHINE); - } - - return ret; - } - - private boolean isIpuRunning(GridConChannelId id) { - StatusIpuStateMachine state = ((EnumReadChannel) this.channel(id)).value().asEnum(); - return (state == StatusIpuStateMachine.RUN); - } - - @Override - public float getActivePowerPreset() { - return this.activePowerPreset; - } - - @Override - public double getEfficiencyLossChargeFactor() { - return this.efficiencyLossChargeFactor; - } - - @Override - public double getEfficiencyLossDischargeFactor() { - return this.efficiencyLossDischargeFactor; - } - - @Override - public boolean isUndefined() { - // TODO Check all relevant channels - // Discussion -> What channels should be defined! All? - // currently every used read only channel is checked - boolean undefined = false; - - GridConChannelId[] ids = GridConChannelId.values(); - - for (io.openems.edge.common.channel.ChannelId id : ids) { - Channel c = channel(id); - - if (c == null || c instanceof WriteChannel) { - break; - } - - if (this.inverterCount.getCount() < 3 - && id.id().toUpperCase().contains(GridconPcsImpl.NAME_PART_INVERTER_3)) { // skip inverter_3 - break; - } - - if (this.inverterCount.getCount() < 2 - && id.id().toUpperCase().contains(GridconPcsImpl.NAME_PART_INVERTER_2)) { // skip inverter_2 - break; - } - - if (!c.value().isDefined()) { - System.out.println("Value in Channel " + id.id() + " is not defined!"); - undefined = true; - break; - } - } - return undefined; - } - - @Override - public void setFundamentalFrequencyMode(FundamentalFrequencyMode fundamentalFrequencyMode) { - this.commands.setFundamentalFrequencyMode(fundamentalFrequencyMode); - } - - @Override - public void setHarmonicCompensationMode(HarmonicCompensationMode harmonicCompensationMode) { - this.commands.setHarmonicCompensationMode(harmonicCompensationMode); - } - - @Override - public float getCurrentL1Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_I_L1); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_CURRENT_PER_UNIT; - } - - @Override - public float getCurrentL2Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_I_L2); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_CURRENT_PER_UNIT; - } - - @Override - public float getCurrentL3Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_I_L3); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_CURRENT_PER_UNIT; - } - - @Override - public float getCurrentLNGrid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_I_LN); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_CURRENT_PER_UNIT; - } - - @Override - public float getActivePowerL1Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_P_L1); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getActivePowerL2Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_P_L2); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getActivePowerL3Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_P_L3); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getActivePowerSumGrid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_P_SUM); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getReactivePowerL1Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_Q_L1); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getReactivePowerL2Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_Q_L2); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getReactivePowerL3Grid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_Q_L3); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getReactivePowerSumGrid() { - FloatReadChannel c = this.channel(GridConChannelId.GRID_MEASUREMENT_Q_SUM); - return c.getNextValue().orElse(0f) * this.inverterCount.getCount() * NOMINAL_POWER_PER_UNIT; - } - - @Override - public float getApparentPowerL1Grid() { - return (float) Math.sqrt(this.getActivePowerL1Grid() * this.getActivePowerL1Grid() - + this.getReactivePowerL1Grid() * this.getReactivePowerL1Grid()); - } - - @Override - public float getApparentPowerL2Grid() { - return (float) Math.sqrt(this.getActivePowerL2Grid() * this.getActivePowerL2Grid() - + this.getReactivePowerL2Grid() * this.getReactivePowerL2Grid()); - } - - @Override - public float getApparentPowerL3Grid() { - return (float) Math.sqrt(this.getActivePowerL3Grid() * this.getActivePowerL3Grid() - + this.getReactivePowerL3Grid() * this.getReactivePowerL3Grid()); - } - - @Override - public float getApparentPowerSumGrid() { - return (float) Math.sqrt(this.getActivePowerSumGrid() * this.getActivePowerSumGrid() - + this.getReactivePowerSumGrid() * this.getReactivePowerSumGrid()); - } - - @Override - public void setCosPhiSetPoint1(float cosPhiSetPoint1) { - this.cosPhiParameters.setCosPhiSetPoint1(cosPhiSetPoint1); - } - - @Override - public void setCosPhiSetPoint2(float cosPhiSetPoint2) { - this.cosPhiParameters.setCosPhiSetPoint2(cosPhiSetPoint2); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconSettings.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconSettings.java deleted file mode 100644 index b45ab31a31f..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/GridconSettings.java +++ /dev/null @@ -1,79 +0,0 @@ -// CHECKSTYLE:OFF -package io.openems.edge.ess.mr.gridcon; - -import io.openems.edge.ess.mr.gridcon.enums.Mode; - -public class GridconSettings { - - boolean switchOffIpus; - float u0; - float f0; - Mode mode; - - private GridconSettings(boolean switchOffIpus, float u0, float f0, Mode mode) { - this.switchOffIpus = switchOffIpus; - this.u0 = u0; - this.f0 = f0; - this.mode = mode; - } - - public static GridconSettings createRunningSettings(float u0, float f0, Mode mode) { - return new GridconSettings(false, u0, f0, mode); - } - - public static GridconSettings createStopSettings(Mode mode) { - return new GridconSettings(true, 0, 0, mode); - } - - public boolean isSwitchOffIpus() { - return this.switchOffIpus; - } - - public float getU0() { - return this.u0; - } - - public float getF0() { - return this.f0; - } - - public Mode getMode() { - return this.mode; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + Float.floatToIntBits(this.f0); - result = prime * result + ((this.mode == null) ? 0 : this.mode.hashCode()); - result = prime * result + (this.switchOffIpus ? 1231 : 1237); - result = prime * result + Float.floatToIntBits(this.u0); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } else if (obj == null) { - return false; - } else if (getClass() != obj.getClass()) { - return false; - } - GridconSettings other = (GridconSettings) obj; - if (Float.floatToIntBits(this.f0) != Float.floatToIntBits(other.f0)) { - return false; - } else if (this.mode != other.mode) { - return false; - } else if (this.switchOffIpus != other.switchOffIpus) { - return false; - } else if (Float.floatToIntBits(this.u0) != Float.floatToIntBits(other.u0)) { - return false; - } else { - return true; - } - } - -} -// CHECKSTYLE:ON diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/Helper.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/Helper.java deleted file mode 100644 index 6aa36f00301..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/Helper.java +++ /dev/null @@ -1,38 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import io.openems.edge.battery.api.Battery; -import io.openems.edge.common.channel.Channel; -import io.openems.edge.common.channel.WriteChannel; -import io.openems.edge.common.channel.internal.AbstractReadChannel; - -public class Helper { - - /** - * Checks if all API values of a battery are set. - * - * @param battery the {@link Battery} - * @return true if all API values are filled - */ - public static boolean isUndefined(Battery battery) { - for (Channel c : battery.channels()) { - if (isBatteryApiChannel(c)) { - if (c instanceof AbstractReadChannel && !(c instanceof WriteChannel)) { - if (!c.value().isDefined()) { - System.out.println("Channel " + c + " is not defined!"); - return true; - } - } - } - } - return false; - } - - private static boolean isBatteryApiChannel(Channel c) { - for (io.openems.edge.common.channel.ChannelId id : Battery.ChannelId.values()) { - if (id.equals(c.channelId())) { - return true; - } - } - return false; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/IState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/IState.java deleted file mode 100644 index 80d253ce6ab..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/IState.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import io.openems.common.types.OptionsEnum; - -public interface IState extends OptionsEnum { - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/StateController.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/StateController.java deleted file mode 100644 index 7b3051d2099..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/StateController.java +++ /dev/null @@ -1,88 +0,0 @@ -// CHECKSTYLE:OFF -package io.openems.edge.ess.mr.gridcon; - -import java.util.HashMap; -import java.util.Map; - -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.enums.ParameterSet; -import io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState; -import io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconStateObject; -import io.openems.edge.ess.mr.gridcon.state.ongrid.OnGridState; -import io.openems.edge.ess.mr.gridcon.state.onoffgrid.DecisionTableCondition; - -public class StateController { - - private Map generalStateObjects; - private Map gridconStateObjects; - - private DecisionTableCondition condition; - - public StateController() { - - } - - public void initOnGrid(// - ComponentManager manager, // - String gridconPcs, // - String b1, // - String b2, // - String b3, // - boolean enableI1, // - boolean enableI2, // - boolean enableI3, // - // ParameterSet parameterSet, // - String hardRestartRelayAdress, // - float offsetCurrent) { - - this.generalStateObjects = new HashMap(); - this.gridconStateObjects = new HashMap(); - - this.gridconStateObjects.put(GridconState.STOPPED, - new io.openems.edge.ess.mr.gridcon.state.gridconstate.Stopped(manager, gridconPcs, b1, b2, b3, enableI1, - enableI2, enableI3, /* parameterSet, */ hardRestartRelayAdress)); - this.gridconStateObjects.put(GridconState.RUN, - new io.openems.edge.ess.mr.gridcon.state.gridconstate.Run(manager, gridconPcs, b1, b2, b3, enableI1, - enableI2, enableI3, /* parameterSet, */ hardRestartRelayAdress, offsetCurrent)); - this.gridconStateObjects.put(GridconState.UNDEFINED, - new io.openems.edge.ess.mr.gridcon.state.gridconstate.Undefined(manager, gridconPcs, b1, b2, b3, - hardRestartRelayAdress)); - this.gridconStateObjects.put(GridconState.ERROR, - new io.openems.edge.ess.mr.gridcon.state.gridconstate.Error(manager, gridconPcs, b1, b2, b3, enableI1, - enableI2, enableI3, /* parameterSet, */ hardRestartRelayAdress)); - - this.generalStateObjects.put(OnGridState.UNDEFINED, - new io.openems.edge.ess.mr.gridcon.state.ongrid.Undefined()); - this.generalStateObjects.put(OnGridState.ERROR, new io.openems.edge.ess.mr.gridcon.state.ongrid.Error()); - this.generalStateObjects.put(OnGridState.ONGRID, new io.openems.edge.ess.mr.gridcon.state.ongrid.OnGrid()); - } - - public StateObject getGeneralStateObject(IState state) { - return this.generalStateObjects.get(state); - } - - public GridconStateObject getGridconStateObject(IState state) { - return this.gridconStateObjects.get(state); - } - - public void initDecisionTableCondition(DecisionTableCondition tableCondition) { - this.condition = tableCondition; - } - - public void initOnOffGrid(ComponentManager manager, String gridconPcs, String b1, String b2, String b3, - boolean enableIpu1, boolean enableIpu2, boolean enableIpu3, ParameterSet parameterSet, - String inputNaProtection1, boolean na1Inverted, String inputNaProtection2, boolean na2Inverted, - String inputSyncDeviceBridge, boolean inputSyncDeviceBridgeInverted, String outputSyncDeviceBridge, - boolean outputSyncDeviceBridgeInverted, String outputHardReset, boolean outputHardResetInverted, - float targetFrequencyOnGrid, float targetFrequencyOffGrid, String meterId, float deltaFrequency, - float deltaVoltage, // - float offsetCurrent) { - - } - - public void printCondition() { - System.out.println("condition: \n" + this.condition); - } - -} -// CHECKSTYLE:ON diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/StateObject.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/StateObject.java deleted file mode 100644 index a65f6cc7c97..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/StateObject.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; - -public interface StateObject { - /** - * Returns the corresponding state. - * - * @return the state - */ - IState getState(); - - /** - * Depending on the circumstances the next state according to the state machine - * is returned. - * - * @return the next state - */ - IState getNextState(); - - /** - * in this method everything should be executed what there is to do in this - * state. - * - * @throws OpenemsNamedException on error - */ - void act() throws OpenemsNamedException; - - /** - * Getter for GridconSettings. - * - * @return the relevant settings for the gridcon - */ - GridconSettings getGridconSettings(); -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/WeightingHelper.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/WeightingHelper.java deleted file mode 100644 index 400c436333e..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/WeightingHelper.java +++ /dev/null @@ -1,105 +0,0 @@ -// CHECKSTYLE:OFF -package io.openems.edge.ess.mr.gridcon; - -import io.openems.edge.battery.api.Battery; - -public class WeightingHelper { - - /** - * Calculates the weighting for Gridcon depending on connected batteries and - * given active power. - * - * @param activePower - * @param b1 - * @param b2 - * @param b3 - * @return - */ - public static Float[] getWeighting(float activePower, Battery b1, Battery b2, Battery b3) { - - Float[] ret = { 0f, 0f, 0f }; - - // Discharge - if (activePower > 0) { - ret[0] = getWeightingForDischarge(b1); - ret[1] = getWeightingForDischarge(b2); - ret[2] = getWeightingForDischarge(b3); - // Charge - } else if (activePower < 0) { - ret[0] = getWeightingForCharge(b1); - ret[1] = getWeightingForCharge(b2); - ret[2] = getWeightingForCharge(b3); - // active power is zero - } else { - ret = getWeightingForNoPower(b1, b2, b3); - } - - return ret; - } - - static Float[] getWeightingForNoPower(Battery b1, Battery b2, Battery b3) { - - float weightA = 0; - if (isBatteryReady(b1)) { - weightA = 1; - } - float weightB = 0; - if (isBatteryReady(b2)) { - weightB = 1; - } - - float weightC = 0; - if (isBatteryReady(b3)) { - weightC = 1; - } - - return new Float[] { weightA, weightB, weightC }; - } - - static float getWeightingForCharge(Battery b) { - float weight = 0; - if (b != null && isBatteryReady(b)) { - float current = Math.min(EssGridcon.MAX_CURRENT_PER_STRING, b.getChargeMaxCurrent().get()); - float voltage = b.getVoltage().get(); - weight = current * voltage; - } - return weight; - } - - static float getWeightingForDischarge(Battery b) { - float weight = 0; - if (b != null && isBatteryReady(b)) { - float current = Math.min(EssGridcon.MAX_CURRENT_PER_STRING, b.getDischargeMaxCurrent().get()); - float voltage = b.getVoltage().get(); - weight = current * voltage; - } - return weight; - } - - static boolean isBatteryReady(Battery battery) { - if (battery == null) { - return false; - } - return !Helper.isUndefined(battery) && battery.isStarted(); - } - - public static int getStringControlMode(Battery battery1, Battery battery2, Battery battery3) { - int weightingMode = 0; - - boolean useBatteryStringA = (battery1 != null && battery1.isStarted()); - if (useBatteryStringA) { - weightingMode = weightingMode + 1; // battA = 1 (2^0) - } - boolean useBatteryStringB = (battery2 != null && battery2.isStarted()); - if (useBatteryStringB) { - weightingMode = weightingMode + 8; // battB = 8 (2^3) - } - boolean useBatteryStringC = (battery3 != null && battery3.isStarted()); - if (useBatteryStringC) { - weightingMode = weightingMode + 64; // battC = 64 (2^6) - } - - return weightingMode; - } -} -// CHECKSTYLE:ON diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/Config.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/Config.java deleted file mode 100644 index a3b27960248..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/Config.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.controller.balancing; - -import org.osgi.service.metatype.annotations.AttributeDefinition; -import org.osgi.service.metatype.annotations.ObjectClassDefinition; - -import io.openems.edge.ess.mr.gridcon.enums.BalancingMode; - -@ObjectClassDefinition(// - name = "MR Gridcon Controller Set Balancing Mode", // - description = "Sets the balancing mode for the gridcon.") -@interface Config { - - @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") - String id() default "ctrlSetBalancingMode0"; - - @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 = "Gridcon-ID", description = "ID of gridcon device.") - String gridcon_id() default "gridcon0"; - - @AttributeDefinition(name = "Balancing mode", description = "Balancing Mode for Gridon") - BalancingMode balancingMode() default BalancingMode.DISABLED; - - String webconsole_configurationFactory_nameHint() default "MR Gridcon Controller Set Balancing Mode [{id}]"; -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/ControllerMrSetBalancing.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/ControllerMrSetBalancing.java deleted file mode 100644 index f55a1e902e7..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/ControllerMrSetBalancing.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.controller.balancing; - -import io.openems.edge.common.channel.Doc; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.controller.api.Controller; - -public interface ControllerMrSetBalancing extends Controller, OpenemsComponent { - - public enum ChannelId implements io.openems.edge.common.channel.ChannelId { - ; - private final Doc doc; - - private ChannelId(Doc doc) { - this.doc = doc; - } - - @Override - public Doc doc() { - return this.doc; - } - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/ControllerMrSetBalancingImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/ControllerMrSetBalancingImpl.java deleted file mode 100644 index 5614281be7c..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/balancing/ControllerMrSetBalancingImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.controller.balancing; - -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 io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.AbstractOpenemsComponent; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.controller.api.Controller; -import io.openems.edge.ess.mr.gridcon.GridconPcs; - -@Designate(ocd = Config.class, factory = true) -@Component(// - name = "Controller.MR.SetBalancing", // - immediate = true, // - configurationPolicy = ConfigurationPolicy.REQUIRE // -) -public class ControllerMrSetBalancingImpl extends AbstractOpenemsComponent - implements ControllerMrSetBalancing, Controller, OpenemsComponent { - - @Reference - private ComponentManager componentManager; - - private Config config; - - public ControllerMrSetBalancingImpl() { - super(// - OpenemsComponent.ChannelId.values(), // - Controller.ChannelId.values(), // - ControllerMrSetBalancing.ChannelId.values() // - ); - } - - @Activate - private void activate(ComponentContext context, Config config) { - super.activate(context, config.id(), config.alias(), config.enabled()); - this.config = config; - } - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public void run() throws OpenemsNamedException { - GridconPcs gridcon = this.componentManager.getComponent(this.config.gridcon_id()); - - gridcon.setBalancingMode(this.config.balancingMode()); - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/Config.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/Config.java deleted file mode 100644 index da8a37c24ee..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/Config.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.controller.fundamentalfrequency; - -import org.osgi.service.metatype.annotations.AttributeDefinition; -import org.osgi.service.metatype.annotations.ObjectClassDefinition; - -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; - -@ObjectClassDefinition(// - name = "MR Gridcon Controller Set Fundamental Frequency Mode", // - description = "MR Gridcon PCS: Sets the fundamental frequency mode for the gridcon.") -@interface Config { - - @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") - String id() default "ctrlSetFundamentalFrequencyMode0"; - - @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 = "Gridcon-ID", description = "ID of gridcon device.") - String gridcon_id() default "gridcon0"; - - @AttributeDefinition(name = "Fundamental Frequency mode", description = "Fundamental Frequency Mode for Gridon") - FundamentalFrequencyMode fundamentalFrequencyMode() default FundamentalFrequencyMode.DISABLED; - - @AttributeDefinition(name = "Cos Phi Set Point 1, positive=inductive, negative=capacitive", description = "Cos Phi Set Point 1, positive=inductive, negative=capacitive", max = "1", min = "-1") - float cosPhiSetPoint1() default 0.9f; - - @AttributeDefinition(name = "Cos Phi Set Point 2, positive=inductive, negative=capacitive", description = "Cos Phi Set Point 2, positive=inductive, negative=capacitive", max = "1", min = "-1") - float cosPhiSetPoint2() default 0.95f; - - String webconsole_configurationFactory_nameHint() default "MR Gridcon Controller Set Fundamental Frequency Mode [{id}]"; -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/ControllerMrFundamentalFrequency.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/ControllerMrFundamentalFrequency.java deleted file mode 100644 index ac7062a50b5..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/ControllerMrFundamentalFrequency.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.controller.fundamentalfrequency; - -import io.openems.edge.common.channel.Doc; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.controller.api.Controller; - -public interface ControllerMrFundamentalFrequency extends Controller, OpenemsComponent { - - public enum ChannelId implements io.openems.edge.common.channel.ChannelId { - ; - private final Doc doc; - - private ChannelId(Doc doc) { - this.doc = doc; - } - - @Override - public Doc doc() { - return this.doc; - } - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/ControllerMrFundamentalFrequencyImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/ControllerMrFundamentalFrequencyImpl.java deleted file mode 100644 index 65fde79008f..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/controller/fundamentalfrequency/ControllerMrFundamentalFrequencyImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.controller.fundamentalfrequency; - -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 io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.AbstractOpenemsComponent; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.controller.api.Controller; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; - -@Designate(ocd = Config.class, factory = true) -@Component(// - name = "Controller.MR.FundamentalFrequency", // - immediate = true, // - configurationPolicy = ConfigurationPolicy.REQUIRE // -) -public class ControllerMrFundamentalFrequencyImpl extends AbstractOpenemsComponent - implements ControllerMrFundamentalFrequency, Controller, OpenemsComponent { - - @Reference - private ComponentManager componentManager; - - private Config config; - - public ControllerMrFundamentalFrequencyImpl() { - super(// - OpenemsComponent.ChannelId.values(), // - Controller.ChannelId.values(), // - ControllerMrFundamentalFrequency.ChannelId.values() // - ); - } - - @Activate - private void activate(ComponentContext context, Config config) { - super.activate(context, config.id(), config.alias(), config.enabled()); - this.config = config; - } - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public void run() throws OpenemsNamedException { - GridconPcs gridcon = this.componentManager.getComponent(this.config.gridcon_id()); - - gridcon.setFundamentalFrequencyMode(this.config.fundamentalFrequencyMode()); - - if (this.config.fundamentalFrequencyMode() == FundamentalFrequencyMode.PFC_COS_PHI) { - gridcon.setCosPhiSetPoint1(this.config.cosPhiSetPoint1()); - gridcon.setCosPhiSetPoint2(this.config.cosPhiSetPoint2()); - } - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/BalancingMode.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/BalancingMode.java deleted file mode 100644 index 41de6996b62..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/BalancingMode.java +++ /dev/null @@ -1,26 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -public enum BalancingMode { - - DISABLED(false, false), // = 0 - NEGATIVE_SEQUENCE_COMPENSATION(true, false), // = 1 - ZERO_SEQUENCE_COMPENSATION(false, true), // = 2 - NEGATIVE_AND_ZERO_SEQUENCE_COMPENSATION(true, true) // = 3 - ; - - private boolean bit1; - private boolean bit2; - - private BalancingMode(boolean bit1, boolean bit2) { - this.bit1 = bit1; - this.bit2 = bit2; - } - - public boolean isBit1() { - return this.bit1; - } - - public boolean isBit2() { - return this.bit2; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/CcuState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/CcuState.java deleted file mode 100644 index 7089805faca..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/CcuState.java +++ /dev/null @@ -1,47 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.types.OptionsEnum; - -/** - * This enum describes the overall total state of a gridcon. - */ -public enum CcuState implements OptionsEnum { - INIT(1, "INIT"), // = 1, // Initialisierung / Booting in Progress - IDLE_CURRENTLY_NOT_WORKING(2, "IDLE"), // = 2, - // System waiting for Instructions, MainContactor open, IGBT are not working - PRECHARGE_CURRENTLY_NOT_WORKING(3, "PRECHARGE"), // = 3, // IPU StateObject - GO_IDLE_CURRENTLY_NOT_WORKING(4, "GO_IDLE"), // = 4, // System changes STATE_IDLE - CHARGED_CURRENTLY_NOT_WORKING(5, "CHARGED"), // = 5, // IPU StateObject - READY_CURRENTLY_NOT_WORKING(6, "READY"), // = 6, // IPU StateObject - RUN(7, "RUN"), // = 7, // IPU StateObject - ERROR(8, "ERROR"), // = 8, // System in ErrorState - PAUSE_CURRENTLY_NOT_WORKING(9, "PAUSE"), // = 9, // System Pause, Maincontactor closed, IGBTs are switching" - SYNC_TO_V(10, "SYNC_TO_V"), // = 10, System synchronized to net - BLACKSTART_CURRENTLY_NOT_WORKING(11, "BLACKSTART"), // = 11, // System is blackstarting - COMPENSATOR(12, "COMPENSATOR"), // = 12, // System in netparallel mode - ISLANDING(13, "ISLANDING"), // = 13, System in island mode - UNDEFINED(-1, "UNDEFINED"),; - - private final int value; - private final String name; - - private CcuState(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; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorCodeChannelId0.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorCodeChannelId0.java deleted file mode 100644 index f7ee6b3b099..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorCodeChannelId0.java +++ /dev/null @@ -1,5688 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.channel.Level; -import io.openems.edge.common.channel.ChannelId; -import io.openems.edge.common.channel.Doc; -import io.openems.edge.ess.mr.gridcon.enums.ErrorDoc.Acknowledge; -import io.openems.edge.ess.mr.gridcon.enums.ErrorDoc.ReactionLevel; - -/** - * This enum holds every possible error channel id for a gridcon. - */ -public enum ErrorCodeChannelId0 implements ChannelId { - - STATE_TEMP_TRIP_IGBT_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201200) // - .text("Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202200) // - .text("Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203200) // - .text("Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204200) // - .text("Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201201) // - .text("Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202201) // - .text("Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203201) // - .text("Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204201) // - .text("Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201202) // - .text("Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202202) // - .text("Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203202) // - .text("Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204202) // - .text("Temp Trip IGBT 1")), - STATE_TEMP_TRIP_4_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_4_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_4_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_4_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_3_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201204) // - .text("Temp Trip Grid Choke")), - STATE_TEMP_TRIP_3_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202204) // - .text("Temp Trip Grid Choke")), - STATE_TEMP_TRIP_3_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203204) // - .text("Temp Trip Grid Choke")), - STATE_TEMP_TRIP_3_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204204) // - .text("Temp Trip Grid Choke")), - STATE_TEMP_TRIP_2_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201205) // - .text("Temp Trip Heatsink Sensor")), - STATE_TEMP_TRIP_2_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202205) // - .text("Temp Trip Heatsink Sensor")), - STATE_TEMP_TRIP_2_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203205) // - .text("Temp Trip Heatsink Sensor")), - STATE_TEMP_TRIP_2_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204205) // - .text("Temp Trip Heatsink Sensor")), - STATE_TEMP_TRIP_1_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201206) // - .text("Temp Trip Module Choke")), - STATE_TEMP_TRIP_1_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202206) // - .text("Temp Trip Module Choke")), - STATE_TEMP_TRIP_1_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203206) // - .text("Temp Trip Module Choke")), - STATE_TEMP_TRIP_1_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204206) // - .text("Temp Trip Module Choke")), - STATE_DESAT_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201207) // - .text("IGBT 1 Saturation")), - STATE_DESAT_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202207) // - .text("IGBT 1 Saturation")), - STATE_DESAT_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203207) // - .text("IGBT 1 Saturation")), - STATE_DESAT_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204207) // - .text("IGBT 1 Saturation")), - STATE_DESAT_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201208) // - .text("IGBT 2 Saturation")), - STATE_DESAT_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202208) // - .text("IGBT 2 Saturation")), - STATE_DESAT_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203208) // - .text("IGBT 2 Saturation")), - STATE_DESAT_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204208) // - .text("IGBT 2 Saturation")), - STATE_DESAT_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201209) // - .text("IGBT 3 Saturation")), - STATE_DESAT_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202209) // - .text("IGBT 3 Saturation")), - STATE_DESAT_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203209) // - .text("IGBT 3 Saturation")), - STATE_DESAT_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204209) // - .text("IGBT 3 Saturation")), - STATE_INTERN_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20120A) // - .text("Invalid Dutycycles Phase 1")), - STATE_INTERN_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20220A) // - .text("Invalid Dutycycles Phase 1")), - STATE_INTERN_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20320A) // - .text("Invalid Dutycycles Phase 1")), - STATE_INTERN_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20420A) // - .text("Invalid Dutycycles Phase 1")), - STATE_INTERN_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20120B) // - .text("Invalid Dutycycles Phase 2")), - STATE_INTERN_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20220B) // - .text("Invalid Dutycycles Phase 2")), - STATE_INTERN_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20320B) // - .text("Invalid Dutycycles Phase 2")), - STATE_INTERN_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20420B) // - .text("Invalid Dutycycles Phase 2")), - STATE_INTERN_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20120C) // - .text("Invalid Dutycycles Phase 3")), - STATE_INTERN_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20220C) // - .text("Invalid Dutycycles Phase 3")), - STATE_INTERN_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20320C) // - .text("Invalid Dutycycles Phase 3")), - STATE_INTERN_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20420C) // - .text("Invalid Dutycycles Phase 3")), - STATE_POWER_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20120D) // - .text("Power Trip")), - STATE_POWER_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20220D) // - .text("Power Trip")), - STATE_POWER_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20320D) // - .text("Power Trip")), - STATE_POWER_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20420D) // - .text("Power Trip")), - STATE_OC_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20120E) // - .text("Overcurrent Phase 1")), - STATE_OC_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20220E) // - .text("Overcurrent Phase 1")), - STATE_OC_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20320E) // - .text("Overcurrent Phase 1")), - STATE_OC_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20420E) // - .text("Overcurrent Phase 1")), - STATE_OC_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20120F) // - .text("Overcurrent Phase 2")), - STATE_OC_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20220F) // - .text("Overcurrent Phase 2")), - STATE_OC_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20320F) // - .text("Overcurrent Phase 2")), - STATE_OC_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20420F) // - .text("Overcurrent Phase 2")), - STATE_OC_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201210) // - .text("Overcurrent Phase 3")), - STATE_OC_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202210) // - .text("Overcurrent Phase 3")), - STATE_OC_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203210) // - .text("Overcurrent Phase 3")), - STATE_OC_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204210) // - .text("Overcurrent Phase 3")), - STATE_SWFREQ_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201211) // - .text("Switching Frequency Error")), - STATE_SWFREQ_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202211) // - .text("Switching Frequency Error")), - STATE_SWFREQ_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203211) // - .text("Switching Frequency Error")), - STATE_SWFREQ_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204211) // - .text("Switching Frequency Error")), - STATE_RMS_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201212) // - .text("RMS Current Error")), - STATE_RMS_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202212) // - .text("RMS Current Error")), - STATE_RMS_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203212) // - .text("RMS Current Error")), - STATE_RMS_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204212) // - .text("RMS Current Error")), - STATE_SOFTWARE_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201213) // - .text("Software Error")), - STATE_SOFTWARE_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202213) // - .text("Software Error")), - STATE_SOFTWARE_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203213) // - .text("Software Error")), - STATE_SOFTWARE_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204213) // - .text("Software Error")), - STATE_V1_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201214) // - .text("Grid Overcurrent Phase 3")), - STATE_V1_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202214) // - .text("Grid Overcurrent Phase 3")), - STATE_V1_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203214) // - .text("Grid Overcurrent Phase 3")), - STATE_V1_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204214) // - .text("Grid Overcurrent Phase 3")), - STATE_V2_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201215) // - .text("Grid Overcurrent Phase 2")), - STATE_V2_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202215) // - .text("Grid Overcurrent Phase 2")), - STATE_V2_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203215) // - .text("Grid Overcurrent Phase 2")), - STATE_V2_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204215) // - .text("Grid Overcurrent Phase 2")), - STATE_V3_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201216) // - .text("Grid Overcurrent Phase 1")), - STATE_V3_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202216) // - .text("Grid Overcurrent Phase 1")), - STATE_V3_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203216) // - .text("Grid Overcurrent Phase 1")), - STATE_V3_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204216) // - .text("Grid Overcurrent Phase 1")), - STATE_V4_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201217) // - .text("24 V Fault")), - STATE_V4_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202217) // - .text("24 V Fault")), - STATE_V4_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203217) // - .text("24 V Fault")), - STATE_V4_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204217) // - .text("24 V Fault")), - STATE_V5_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201218) // - .text("Module Overcurrent Phase A")), - STATE_V5_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202218) // - .text("Module Overcurrent Phase A")), - STATE_V5_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203218) // - .text("Module Overcurrent Phase A")), - STATE_V5_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204218) // - .text("Module Overcurrent Phase A")), - STATE_V6_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201219) // - .text("Module Overcurrent Phase B")), - STATE_V6_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202219) // - .text("Module Overcurrent Phase B")), - STATE_V6_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203219) // - .text("Module Overcurrent Phase B")), - STATE_V6_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204219) // - .text("Module Overcurrent Phase B")), - STATE_V7_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20121A) // - .text("Module Overcurrent Phase C")), - STATE_V7_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20221A) // - .text("Module Overcurrent Phase C")), - STATE_V7_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20321A) // - .text("Module Overcurrent Phase C")), - STATE_V7_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20421A) // - .text("Module Overcurrent Phase C")), - STATE_UDC_P_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20121B) // - .text("DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20221B) // - .text("DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20321B) // - .text("DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20421B) // - .text("DC-Link Positive Voltage Fault")), - STATE_UDC_N_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20121C) // - .text("DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20221C) // - .text("DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20321C) // - .text("DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20421C) // - .text("DC-Link Negative Voltage Fault")), - STATE_UDC_DIFF_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20121D) // - .text("DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20221D) // - .text("DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20321D) // - .text("DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20421D) // - .text("DC-Link Voltage Imbalance")), - STATE_TACHO_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20121E) // - .text("Fan Error")), - STATE_TACHO_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20221E) // - .text("Fan Error")), - STATE_TACHO_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20321E) // - .text("Fan Error")), - STATE_TACHO_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20421E) // - .text("Fan Error")), - STATE_CURRENT_LOOP_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201100) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202100) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203100) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204100) // - .text("CurrentLoop Open")), - STATE_WATCHDOG_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201101) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202101) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203101) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204101) // - .text("Watchdog Timeout")), - STATE_SLAVE_UNREACHABLE_CCU_SLAVE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201102) // - .text("Slave unreachable")), - STATE_SLAVE_UNREACHABLE_CCU_SLAVE_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202102) // - .text("Slave unreachable")), - STATE_SLAVE_UNREACHABLE_CCU_SLAVE_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203102) // - .text("Slave unreachable")), - STATE_SLAVE_UNREACHABLE_CCU_SLAVE_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204102) // - .text("Slave unreachable")), - STATE_SLAVE_ERROR_CCU_SLAVE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201103) // - .text("Slave error")), - STATE_SLAVE_ERROR_CCU_SLAVE_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202103) // - .text("Slave error")), - STATE_SLAVE_ERROR_CCU_SLAVE_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203103) // - .text("Slave error")), - STATE_SLAVE_ERROR_CCU_SLAVE_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204103) // - .text("Slave error")), - STATE_TEMP_TRIP_IGBT_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401200) // - .text("Bit 0")), - STATE_TEMP_TRIP_IGBT_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402200) // - .text("Bit 0")), - STATE_TEMP_TRIP_IGBT_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403200) // - .text("Bit 0")), - STATE_TEMP_TRIP_IGBT_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404200) // - .text("Bit 0")), - STATE_TEMP_TRIP_IGBT_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401201) // - .text("Bit 1")), - STATE_TEMP_TRIP_IGBT_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402201) // - .text("Bit 1")), - STATE_TEMP_TRIP_IGBT_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403201) // - .text("Bit 1")), - STATE_TEMP_TRIP_IGBT_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404201) // - .text("Bit 1")), - STATE_TEMP_TRIP_IGBT_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401202) // - .text("Temp Trip IGBT")), - STATE_TEMP_TRIP_IGBT_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402202) // - .text("Temp Trip IGBT")), - STATE_TEMP_TRIP_IGBT_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403202) // - .text("Temp Trip IGBT")), - STATE_TEMP_TRIP_IGBT_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404202) // - .text("Temp Trip IGBT")), - STATE_TEMP_TRIP_MCU_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_MCU_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_MCU_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_MCU_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404203) // - .text("Temp Trip Board")), - STATE_TEMP_TRIP_C1_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401204) // - .text("Temp Trip Choke 1")), - STATE_TEMP_TRIP_C1_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402204) // - .text("Temp Trip Choke 1")), - STATE_TEMP_TRIP_C1_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403204) // - .text("Temp Trip Choke 1")), - STATE_TEMP_TRIP_C1_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404204) // - .text("Temp Trip Choke 1")), - STATE_TEMP_TRIP_C2_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401205) // - .text("Temp Trip Choke 2")), - STATE_TEMP_TRIP_C2_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402205) // - .text("Temp Trip Choke 2")), - STATE_TEMP_TRIP_C2_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403205) // - .text("Temp Trip Choke 2")), - STATE_TEMP_TRIP_C2_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404205) // - .text("Temp Trip Choke 2")), - STATE_TEMP_TRIP_C3_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401206) // - .text("Temp Trip Choke 3")), - STATE_TEMP_TRIP_C3_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402206) // - .text("Temp Trip Choke 3")), - STATE_TEMP_TRIP_C3_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403206) // - .text("Temp Trip Choke 3")), - STATE_TEMP_TRIP_C3_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404206) // - .text("Temp Trip Choke 3")), - STATE_DESAT_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401207) // - .text("IGBT A Error")), - STATE_DESAT_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402207) // - .text("IGBT A Error")), - STATE_DESAT_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403207) // - .text("IGBT A Error")), - STATE_DESAT_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404207) // - .text("IGBT A Error")), - STATE_DESAT_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401208) // - .text("IGBT B Error")), - STATE_DESAT_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402208) // - .text("IGBT B Error")), - STATE_DESAT_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403208) // - .text("IGBT B Error")), - STATE_DESAT_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404208) // - .text("IGBT B Error")), - STATE_DESAT_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401209) // - .text("IGBT C Error")), - STATE_DESAT_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402209) // - .text("IGBT C Error")), - STATE_DESAT_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403209) // - .text("IGBT C Error")), - STATE_DESAT_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404209) // - .text("IGBT C Error")), - STATE_INTERN_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40120A) // - .text("Modulation Error P1")), - STATE_INTERN_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40220A) // - .text("Modulation Error P1")), - STATE_INTERN_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40320A) // - .text("Modulation Error P1")), - STATE_INTERN_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40420A) // - .text("Modulation Error P1")), - STATE_INTERN_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40120B) // - .text("Modulation Error P2")), - STATE_INTERN_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40220B) // - .text("Modulation Error P2")), - STATE_INTERN_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40320B) // - .text("Modulation Error P2")), - STATE_INTERN_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40420B) // - .text("Modulation Error P2")), - STATE_INTERN_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40120C) // - .text("Modulation Error P3")), - STATE_INTERN_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40220C) // - .text("Modulation Error P3")), - STATE_INTERN_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40320C) // - .text("Modulation Error P3")), - STATE_INTERN_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40420C) // - .text("Modulation Error P3")), - STATE_POWER_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40120D) // - .text("Power Trip")), - STATE_POWER_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40220D) // - .text("Power Trip")), - STATE_POWER_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40320D) // - .text("Power Trip")), - STATE_POWER_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40420D) // - .text("Power Trip")), - STATE_OC_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40120E) // - .text("Overcurrent Protection Phase A")), - STATE_OC_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40220E) // - .text("Overcurrent Protection Phase A")), - STATE_OC_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40320E) // - .text("Overcurrent Protection Phase A")), - STATE_OC_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40420E) // - .text("Overcurrent Protection Phase A")), - STATE_OC_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40120F) // - .text("Overcurrent Protection Phase B")), - STATE_OC_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40220F) // - .text("Overcurrent Protection Phase B")), - STATE_OC_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40320F) // - .text("Overcurrent Protection Phase B")), - STATE_OC_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40420F) // - .text("Overcurrent Protection Phase B")), - STATE_OC_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401210) // - .text("Overcurrent Protection Phase C")), - STATE_OC_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402210) // - .text("Overcurrent Protection Phase C")), - STATE_OC_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403210) // - .text("Overcurrent Protection Phase C")), - STATE_OC_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404210) // - .text("Overcurrent Protection Phase C")), - STATE_SWFREQ_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401211) // - .text("Switching Frequency Error")), - STATE_SWFREQ_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402211) // - .text("Switching Frequency Error")), - STATE_SWFREQ_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403211) // - .text("Switching Frequency Error")), - STATE_SWFREQ_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404211) // - .text("Switching Frequency Error")), - STATE_RMS_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401212) // - .text("RMS Current Error")), - STATE_RMS_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402212) // - .text("RMS Current Error")), - STATE_RMS_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403212) // - .text("RMS Current Error")), - STATE_RMS_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404212) // - .text("RMS Current Error")), - STATE_SOFTWARE_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401213) // - .text("Software Error")), - STATE_SOFTWARE_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402213) // - .text("Software Error")), - STATE_SOFTWARE_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403213) // - .text("Software Error")), - STATE_SOFTWARE_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404213) // - .text("Software Error")), - STATE_V1_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401214) // - .text("Bit 20")), - STATE_V1_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402214) // - .text("Bit 20")), - STATE_V1_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403214) // - .text("Bit 20")), - STATE_V1_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404214) // - .text("Bit 20")), - STATE_V2_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401215) // - .text("Bit 21")), - STATE_V2_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402215) // - .text("Bit 21")), - STATE_V2_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403215) // - .text("Bit 21")), - STATE_V2_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404215) // - .text("Bit 21")), - STATE_V3_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401216) // - .text("Bit 22")), - STATE_V3_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402216) // - .text("Bit 22")), - STATE_V3_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403216) // - .text("Bit 22")), - STATE_V3_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404216) // - .text("Bit 22")), - STATE_V24_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401217) // - .text("24 V Fault")), - STATE_V24_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402217) // - .text("24 V Fault")), - STATE_V24_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403217) // - .text("24 V Fault")), - STATE_V24_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404217) // - .text("24 V Fault")), - STATE_OCA_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401218) // - .text("Overcurrent Phase A")), - STATE_OCA_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402218) // - .text("Overcurrent Phase A")), - STATE_OCA_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403218) // - .text("Overcurrent Phase A")), - STATE_OCA_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404218) // - .text("Overcurrent Phase A")), - STATE_OCB_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401219) // - .text("Overcurrent Phase B")), - STATE_OCB_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402219) // - .text("Overcurrent Phase B")), - STATE_OCB_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403219) // - .text("Overcurrent Phase B")), - STATE_OCB_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404219) // - .text("Overcurrent Phase B")), - STATE_OCC_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40121A) // - .text("Overcurrent Phase C")), - STATE_OCC_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40221A) // - .text("Overcurrent Phase C")), - STATE_OCC_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40321A) // - .text("Overcurrent Phase C")), - STATE_OCC_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40421A) // - .text("Overcurrent Phase C")), - STATE_UB1_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40121B) // - .text("DC String 1 Overvoltage")), - STATE_UB1_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40221B) // - .text("DC String 1 Overvoltage")), - STATE_UB1_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40321B) // - .text("DC String 1 Overvoltage")), - STATE_UB1_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40421B) // - .text("DC String 1 Overvoltage")), - STATE_UB2_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40121C) // - .text("DC String 2 Overvoltage")), - STATE_UB2_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40221C) // - .text("DC String 2 Overvoltage")), - STATE_UB2_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40321C) // - .text("DC String 2 Overvoltage")), - STATE_UB2_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40421C) // - .text("DC String 2 Overvoltage")), - STATE_UB3_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40121D) // - .text("DC String 3 Overvoltage")), - STATE_UB3_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40221D) // - .text("DC String 3 Overvoltage")), - STATE_UB3_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40321D) // - .text("DC String 3 Overvoltage")), - STATE_UB3_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40421D) // - .text("DC String 3 Overvoltage")), - STATE_TACHO_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40121E) // - .text("Fan Error")), - STATE_TACHO_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40221E) // - .text("Fan Error")), - STATE_TACHO_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40321E) // - .text("Fan Error")), - STATE_TACHO_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40421E) // - .text("Fan Error")), - STATE_UZK_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40121F) // - .text("DC-Link Overvoltage Fault")), - STATE_UZK_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40221F) // - .text("DC-Link Overvoltage Fault")), - STATE_UZK_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40321F) // - .text("DC-Link Overvoltage Fault")), - STATE_UZK_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x40421F) // - .text("DC-Link Overvoltage Fault")), - STATE_CURRENT_LOOP_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x401100) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x402100) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x403100) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x404100) // - .text("CurrentLoop Open")), - STATE_WATCHDOG_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401101) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402101) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403101) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404101) // - .text("Watchdog Timeout")), - STATE_TEMP_TRIP_IGBT_1_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_2_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_3_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20140A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20240A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20340A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20440A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_FILTER_RMS_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_1_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_2_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_3_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_MODULE_FRD_FILTER_C_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_SIA_RUNNING_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_WARNING_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204417) // - .text("(XT) SIA Warning")), - STATE_NEUTRAL_RMS_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_SUSPECT_HARMONICS_DETECTED_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204419) // - .text("(XT) Suspect Harmonics marked")), - STATE_CRITICAL_HARMONICS_DETECTED_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20141A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20241A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20341A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20441A).text("(XT) Compensation of critical harmonics blocked")), - STATE_UDC_P_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_N_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_DIFF_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_P_PRECHG_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_TEMP_TRIP_IGBT_1_IPU_1_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_2_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_3_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_4_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_2_IPU_1_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_2_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_3_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_4_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_3_IPU_1_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_2_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_3_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_4_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20140A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20240A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20340A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20440A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_FILTER_RMS_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_1_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_2_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_3_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_MODULE_FRD_FILTER_C_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_SIA_RUNNING_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_WARNING_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204417) // - .text("(XT) SIA Warning")), - STATE_NEUTRAL_RMS_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_SUSPECT_HARMONICS_DETECTED_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204419) // - .text("(XT) Suspect Harmonics marked")), - STATE_CRITICAL_HARMONICS_DETECTED_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20141A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20241A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20341A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20441A).text("(XT) Compensation of critical harmonics blocked")), - STATE_UDC_P_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_N_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_DIFF_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_P_PRECHG_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_TEMP_TRIP_IGBT_1_IPU_1_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_2_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_3_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_1_IPU_4_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204400) // - .text("(XT) Temp Trip IGBT 1")), - STATE_TEMP_TRIP_IGBT_2_IPU_1_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_2_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_3_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_2_IPU_4_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204401) // - .text("(XT) Temp Trip IGBT 2")), - STATE_TEMP_TRIP_IGBT_3_IPU_1_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_2_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_3_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_IGBT_3_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204402) // - .text("(XT) Temp Trip IGBT 3")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_FILTERCHOKE_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204403) // - .text("(XT) Temp Trip Filter Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_TEMP_TRIP_GRIDCHOKE_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204404) // - .text("(XT) Temp Trip Grid Choke")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_1_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204405) // - .text("(XT) Output Current Peak Trip Phase 1")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_2_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204406) // - .text("(XT) Output Current Peak Trip Phase 2")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_OUTPUT_PEAK_TRIP_3_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204407) // - .text("(XT) Output Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_1_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_1_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204408) // - .text("(XT) Module Current Peak Trip Phase 1")), - STATE_MODULE_PEAK_TRIP_2_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_2_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204409) // - .text("(XT) Module Current Peak Trip Phase 2")), - STATE_MODULE_PEAK_TRIP_3_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20140A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20240A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20340A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_MODULE_PEAK_TRIP_3_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x20440A) // - .text("(XT) Module Current Peak Trip Phase 3")), - STATE_FILTER_RMS_TRIP_1_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_1_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440B) // - .text("(XT) Filter Current RMS Trip Phase 1")), - STATE_FILTER_RMS_TRIP_2_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_2_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440C) // - .text("(XT) Filter Current RMS Trip Phase 2")), - STATE_FILTER_RMS_TRIP_3_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_RMS_TRIP_3_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440D) // - .text("(XT) Filter Current RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_1_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440E) // - .text("(XT) Filter Current Slow RMS Trip Phase 1")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20140F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20240F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20340F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_2_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x20440F) // - .text("(XT) Filter Current Slow RMS Trip Phase 2")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_FILTER_SLOWRMS_TRIP_3_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204410) // - .text("(XT) Filter Current Slow RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_1_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_1_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204411) // - .text("(XT) Output Current RMS Trip Phase 1")), - STATE_OUTPUT_RMS_TRIP_2_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_2_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204412) // - .text("(XT) Output Current RMS Trip Phase 2")), - STATE_OUTPUT_RMS_TRIP_3_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x201413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x202413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x203413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_OUTPUT_RMS_TRIP_3_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x204413) // - .text("(XT) Output Current RMS Trip Phase 3")), - STATE_MODULE_FRD_FILTER_C_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_FILTER_C_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204414).text("(XT) Fast Resonance Detection (FRD-F)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_MODULE_FRD_OUTPUTPEAK_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204415).text("(XT) Fast Resonance Detection (FRD-P)")), - STATE_SIA_RUNNING_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_RUNNING_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204416) // - .text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_WARNING_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203417) // - .text("(XT) SIA Warning")), - STATE_SIA_WARNING_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204417) // - .text("(XT) SIA Warning")), - STATE_NEUTRAL_RMS_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_NEUTRAL_RMS_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204418) // - .text("(XT) Neutral Current RMS Trip")), - STATE_SUSPECT_HARMONICS_DETECTED_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x201419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x202419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x203419) // - .text("(XT) Suspect Harmonics marked")), - STATE_SUSPECT_HARMONICS_DETECTED_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x204419) // - .text("(XT) Suspect Harmonics marked")), - STATE_CRITICAL_HARMONICS_DETECTED_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20141A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20241A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20341A).text("(XT) Compensation of critical harmonics blocked")), - STATE_CRITICAL_HARMONICS_DETECTED_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x20441A).text("(XT) Compensation of critical harmonics blocked")), - STATE_UDC_P_TRIP_IPU_1_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_2_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_3_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_4_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_N_TRIP_IPU_1_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_2_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_3_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_N_TRIP_IPU_4_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204801) // - .text("(XT) DC-Link Negative Voltage Fault")), - STATE_UDC_DIFF_TRIP_IPU_1_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x201802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_2_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x202802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_3_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x203802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_DIFF_TRIP_IPU_4_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x204802) // - .text("(XT) DC-Link Voltage Imbalance")), - STATE_UDC_P_PRECHG_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_P_PRECHG_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204803).text("(XT) DC-Link Precharge Positive Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_N_PRECHG_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204804).text("(XT) DC-Link Precharge Negative Voltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_P_PRECHG_5_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204805).text("(XT) DC-Link Precharge Positive Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_N_PRECHG_5_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204806).text("(XT) DC-Link Precharge Negative Undervoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_P_PRECHG_MAX_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204807).text("(XT) DC-Link Precharge Positive Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_1_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x201808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_2_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x202808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_3_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x203808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_UDC_N_PRECHG_MAX_TRIP_IPU_4_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x204808).text("(XT) DC-Link Precharge Negative Overvoltage Trip")), - STATE_HARDWARE_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x201809) // - .text("(XT) Hardware Trip")), - STATE_HARDWARE_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x202809) // - .text("(XT) Hardware Trip")), - STATE_HARDWARE_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x203809) // - .text("(XT) Hardware Trip")), - STATE_HARDWARE_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x204809) // - .text("(XT) Hardware Trip")), - STATE_PRECHARGE_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20180A) // - .text("(XT) Precharge Trip")), - STATE_PRECHARGE_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20280A) // - .text("(XT) Precharge Trip")), - STATE_PRECHARGE_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20380A) // - .text("(XT) Precharge Trip")), - STATE_PRECHARGE_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20480A) // - .text("(XT) Precharge Trip")), - STATE_STATE_TRIP_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20180B) // - .text("(XT) StateObject Trip")), - STATE_STATE_TRIP_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20280B) // - .text("(XT) StateObject Trip")), - STATE_STATE_TRIP_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20380B) // - .text("(XT) StateObject Trip")), - STATE_STATE_TRIP_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20480B) // - .text("(XT) StateObject Trip")), - STATE_TRH_ERROR_Control_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20180C) // - .text("(XT) Transient Handling Error")), - STATE_TRH_ERROR_Control_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20280C) // - .text("(XT) Transient Handling Error")), - STATE_TRH_ERROR_Control_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20380C) // - .text("(XT) Transient Handling Error")), - STATE_TRH_ERROR_Control_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x20480C) // - .text("(XT) Transient Handling Error")), - STATE_M_TIMEOUT_CCU_MASTER_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20180D) // - .text("(XT) Communication Timeout @ Master")), - STATE_M_TIMEOUT_CCU_MASTER_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20280D) // - .text("(XT) Communication Timeout @ Master")), - STATE_M_TIMEOUT_CCU_MASTER_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20380D) // - .text("(XT) Communication Timeout @ Master")), - STATE_M_TIMEOUT_CCU_MASTER_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20480D) // - .text("(XT) Communication Timeout @ Master")), - STATE_S_COMMUNICATION_CCU_SLAVE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20180E).text("(XT) Communication Error @ Slave")), - STATE_S_COMMUNICATION_CCU_SLAVE_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20280E).text("(XT) Communication Error @ Slave")), - STATE_S_COMMUNICATION_CCU_SLAVE_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20380E).text("(XT) Communication Error @ Slave")), - STATE_S_COMMUNICATION_CCU_SLAVE_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20480E).text("(XT) Communication Error @ Slave")), - STATE_S_SOFTWARE_CCU_SLAVE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20180F) // - .text("(XT) SW Error @ Slave")), - STATE_S_SOFTWARE_CCU_SLAVE_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20280F) // - .text("(XT) SW Error @ Slave")), - STATE_S_SOFTWARE_CCU_SLAVE_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20380F) // - .text("(XT) SW Error @ Slave")), - STATE_S_SOFTWARE_CCU_SLAVE_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.DISABLED) // - .needsHardReset(false) // - .code(0x20480F) // - .text("(XT) SW Error @ Slave")), - STATE_INDIVIDUAL_SM_TIMEOUT_STATE_MACHINE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201810) // - .text("(XT) IPU Statemachine timeout")), - STATE_INDIVIDUAL_SM_TIMEOUT_STATE_MACHINE_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202810) // - .text("(XT) IPU Statemachine timeout")), - STATE_INDIVIDUAL_SM_TIMEOUT_STATE_MACHINE_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203810) // - .text("(XT) IPU Statemachine timeout")), - STATE_INDIVIDUAL_SM_TIMEOUT_STATE_MACHINE_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204810) // - .text("(XT) IPU Statemachine timeout")), - STATE_WRONGIPUTYPE_IPU_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201811) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGIPUTYPE_IPU_2_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202811) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGIPUTYPE_IPU_3_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203811) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGIPUTYPE_IPU_4_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204811) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGFWVERSION_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201812) // - .text("(XT) IPU Firmware incompatible")), - STATE_WRONGFWVERSION_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202812) // - .text("(XT) IPU Firmware incompatible")), - STATE_WRONGFWVERSION_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203812) // - .text("(XT) IPU Firmware incompatible")), - STATE_WRONGFWVERSION_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204812) // - .text("(XT) IPU Firmware incompatible")), - STATE_INDIV_SM_IGNORED_SYSLOCK_STATE_MACHINE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201813).text("(XT) individual SM ignored Syslock")), - STATE_INDIV_SM_IGNORED_SYSLOCK_STATE_MACHINE_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202813).text("(XT) individual SM ignored Syslock")), - STATE_INDIV_SM_IGNORED_SYSLOCK_STATE_MACHINE_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203813).text("(XT) individual SM ignored Syslock")), - STATE_INDIV_SM_IGNORED_SYSLOCK_STATE_MACHINE_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204813).text("(XT) individual SM ignored Syslock")), - STATE_ENABLE24_OFF__1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x201814) // - .text("(XT) ENABLE 24V OFF")), - STATE_ENABLE24_OFF__2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x202814) // - .text("(XT) ENABLE 24V OFF")), - STATE_ENABLE24_OFF__3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x203814) // - .text("(XT) ENABLE 24V OFF")), - STATE_ENABLE24_OFF__4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x204814) // - .text("(XT) ENABLE 24V OFF")), - STATE_TEMP_TRIP_IGBT_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401400) // - .text("(XT) Temp Trip IGBT")), - STATE_TEMP_TRIP_IGBT_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402400) // - .text("(XT) Temp Trip IGBT")), - STATE_TEMP_TRIP_IGBT_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403400) // - .text("(XT) Temp Trip IGBT")), - STATE_TEMP_TRIP_IGBT_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404400) // - .text("(XT) Temp Trip IGBT")), - STATE_TEMP_CHOKE_TRIP_C_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401401) // - .text("(XT) Temp Trip Choke C")), - STATE_TEMP_CHOKE_TRIP_C_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402401) // - .text("(XT) Temp Trip Choke C")), - STATE_TEMP_CHOKE_TRIP_C_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403401) // - .text("(XT) Temp Trip Choke C")), - STATE_TEMP_CHOKE_TRIP_C_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404401) // - .text("(XT) Temp Trip Choke C")), - STATE_TEMP_CHOKE_TRIP_B_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401402) // - .text("(XT) Temp Trip Choke B")), - STATE_TEMP_CHOKE_TRIP_B_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402402) // - .text("(XT) Temp Trip Choke B")), - STATE_TEMP_CHOKE_TRIP_B_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403402) // - .text("(XT) Temp Trip Choke B")), - STATE_TEMP_CHOKE_TRIP_B_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404402) // - .text("(XT) Temp Trip Choke B")), - STATE_TEMP_CHOKE_TRIP_A_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401403) // - .text("(XT) Temp Trip Choke A")), - STATE_TEMP_CHOKE_TRIP_A_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402403) // - .text("(XT) Temp Trip Choke A")), - STATE_TEMP_CHOKE_TRIP_A_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403403) // - .text("(XT) Temp Trip Choke A")), - STATE_TEMP_CHOKE_TRIP_A_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404403) // - .text("(XT) Temp Trip Choke A")), - STATE_PEAK_CURRENT_TRIP_A_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x401404) // - .text("(XT) String Current Peak Trip Phase A")), - STATE_PEAK_CURRENT_TRIP_A_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x402404) // - .text("(XT) String Current Peak Trip Phase A")), - STATE_PEAK_CURRENT_TRIP_A_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x403404) // - .text("(XT) String Current Peak Trip Phase A")), - STATE_PEAK_CURRENT_TRIP_A_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x404404) // - .text("(XT) String Current Peak Trip Phase A")), - STATE_PEAK_CURRENT_TRIP_B_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x401405) // - .text("(XT) String Current Peak Trip Phase B")), - STATE_PEAK_CURRENT_TRIP_B_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x402405) // - .text("(XT) String Current Peak Trip Phase B")), - STATE_PEAK_CURRENT_TRIP_B_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x403405) // - .text("(XT) String Current Peak Trip Phase B")), - STATE_PEAK_CURRENT_TRIP_B_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x404405) // - .text("(XT) String Current Peak Trip Phase B")), - STATE_PEAK_CURRENT_TRIP_C_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x401406) // - .text("(XT) String Current Peak Trip Phase C")), - STATE_PEAK_CURRENT_TRIP_C_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x402406) // - .text("(XT) String Current Peak Trip Phase C")), - STATE_PEAK_CURRENT_TRIP_C_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x403406) // - .text("(XT) String Current Peak Trip Phase C")), - STATE_PEAK_CURRENT_TRIP_C_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x404406) // - .text("(XT) String Current Peak Trip Phase C")), - STATE_STRING_HIGH_VOLTAGE_TRIP_A_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x401407) // - .text("(XT) String High Voltage Trip Phase A")), - STATE_STRING_HIGH_VOLTAGE_TRIP_A_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x402407) // - .text("(XT) String High Voltage Trip Phase A")), - STATE_STRING_HIGH_VOLTAGE_TRIP_A_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x403407) // - .text("(XT) String High Voltage Trip Phase A")), - STATE_STRING_HIGH_VOLTAGE_TRIP_A_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x404407) // - .text("(XT) String High Voltage Trip Phase A")), - STATE_STRING_HIGH_VOLTAGE_TRIP_B_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x401408) // - .text("(XT) String High Voltage Trip Phase B")), - STATE_STRING_HIGH_VOLTAGE_TRIP_B_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x402408) // - .text("(XT) String High Voltage Trip Phase B")), - STATE_STRING_HIGH_VOLTAGE_TRIP_B_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x403408) // - .text("(XT) String High Voltage Trip Phase B")), - STATE_STRING_HIGH_VOLTAGE_TRIP_B_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x404408) // - .text("(XT) String High Voltage Trip Phase B")), - STATE_STRING_HIGH_VOLTAGE_TRIP_C_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x401409) // - .text("(XT) String High Voltage Trip Phase C")), - STATE_STRING_HIGH_VOLTAGE_TRIP_C_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x402409) // - .text("(XT) String High Voltage Trip Phase C")), - STATE_STRING_HIGH_VOLTAGE_TRIP_C_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x403409) // - .text("(XT) String High Voltage Trip Phase C")), - STATE_STRING_HIGH_VOLTAGE_TRIP_C_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x404409) // - .text("(XT) String High Voltage Trip Phase C")), - STATE_STRING_LOW_VOLTAGE_TRIP_A_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40140A) // - .text("(XT) String Low Voltage Trip Phase A")), - STATE_STRING_LOW_VOLTAGE_TRIP_A_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40240A) // - .text("(XT) String Low Voltage Trip Phase A")), - STATE_STRING_LOW_VOLTAGE_TRIP_A_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40340A) // - .text("(XT) String Low Voltage Trip Phase A")), - STATE_STRING_LOW_VOLTAGE_TRIP_A_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40440A) // - .text("(XT) String Low Voltage Trip Phase A")), - STATE_STRING_LOW_VOLTAGE_TRIP_B_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40140B) // - .text("(XT) String Low Voltage Trip Phase B")), - STATE_STRING_LOW_VOLTAGE_TRIP_B_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40240B) // - .text("(XT) String Low Voltage Trip Phase B")), - STATE_STRING_LOW_VOLTAGE_TRIP_B_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40340B) // - .text("(XT) String Low Voltage Trip Phase B")), - STATE_STRING_LOW_VOLTAGE_TRIP_B_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40440B) // - .text("(XT) String Low Voltage Trip Phase B")), - STATE_STRING_LOW_VOLTAGE_TRIP_C_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40140C) // - .text("(XT) String Low Voltage Trip Phase C")), - STATE_STRING_LOW_VOLTAGE_TRIP_C_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40240C) // - .text("(XT) String Low Voltage Trip Phase C")), - STATE_STRING_LOW_VOLTAGE_TRIP_C_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40340C) // - .text("(XT) String Low Voltage Trip Phase C")), - STATE_STRING_LOW_VOLTAGE_TRIP_C_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x40440C) // - .text("(XT) String Low Voltage Trip Phase C")), - STATE_STRING_CURRENT_TRIP_1_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40140D) // - .text("(XT) String Current RMS Trip Phase 1")), - STATE_STRING_CURRENT_TRIP_1_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40240D) // - .text("(XT) String Current RMS Trip Phase 1")), - STATE_STRING_CURRENT_TRIP_1_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40340D) // - .text("(XT) String Current RMS Trip Phase 1")), - STATE_STRING_CURRENT_TRIP_1_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40440D) // - .text("(XT) String Current RMS Trip Phase 1")), - STATE_STRING_CURRENT_TRIP_2_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40140E) // - .text("(XT) String Current RMS Trip Phase 2")), - STATE_STRING_CURRENT_TRIP_2_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40240E) // - .text("(XT) String Current RMS Trip Phase 2")), - STATE_STRING_CURRENT_TRIP_2_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40340E) // - .text("(XT) String Current RMS Trip Phase 2")), - STATE_STRING_CURRENT_TRIP_2_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40440E) // - .text("(XT) String Current RMS Trip Phase 2")), - STATE_STRING_CURRENT_TRIP_3_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40140F) // - .text("(XT) String Current RMS Trip Phase 3")), - STATE_STRING_CURRENT_TRIP_3_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40240F) // - .text("(XT) String Current RMS Trip Phase 3")), - STATE_STRING_CURRENT_TRIP_3_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40340F) // - .text("(XT) String Current RMS Trip Phase 3")), - STATE_STRING_CURRENT_TRIP_3_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false).code(0x40440F) // - .text("(XT) String Current RMS Trip Phase 3")), - STATE_UDC_P_TRIP_IPU_1_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x401800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_2_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x402800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_3_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x403800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_UDC_P_TRIP_IPU_4_5(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x404800) // - .text("(XT) DC-Link Positive Voltage Fault")), - STATE_HARDWARE_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x401801) // - .text("(XT) Hardware Trip")), - STATE_HARDWARE_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x402801) // - .text("(XT) Hardware Trip")), - STATE_HARDWARE_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x403801) // - .text("(XT) Hardware Trip")), - STATE_HARDWARE_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x404801) // - .text("(XT) Hardware Trip")), - STATE_PRECHARGE_TRIP_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401802) // - .text("(XT) Precharge Trip")), - STATE_PRECHARGE_TRIP_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402802) // - .text("(XT) Precharge Trip")), - STATE_PRECHARGE_TRIP_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403802) // - .text("(XT) Precharge Trip")), - STATE_PRECHARGE_TRIP_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404802) // - .text("(XT) Precharge Trip")), - STATE_STATE_TRIP_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401803) // - .text("(XT) StateObject Trip")), - STATE_STATE_TRIP_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402803) // - .text("(XT) StateObject Trip")), - STATE_STATE_TRIP_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403803) // - .text("(XT) StateObject Trip")), - STATE_STATE_TRIP_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // not according to list, hard reset is necessary - .code(0x404803) // - .text("(XT) StateObject Trip")), - STATE_ENABLE24_OFF_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401804) // - .text("(XT) ENABLE 24V OFF")), - STATE_ENABLE24_OFF_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402804) // - .text("(XT) ENABLE 24V OFF")), - STATE_ENABLE24_OFF_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403804) // - .text("(XT) ENABLE 24V OFF")), - STATE_ENABLE24_OFF_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404804) // - .text("(XT) ENABLE 24V OFF")), - STATE_LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401805).text("(XT) Ulink is not valid for connecting DCDC")), - STATE_LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402805).text("(XT) Ulink is not valid for connecting DCDC")), - STATE_LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403805).text("(XT) Ulink is not valid for connecting DCDC")), - STATE_LINKVOLT_NOT_VALID_FOR_CONNECTING_DCDC_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404805).text("(XT) Ulink is not valid for connecting DCDC")), - STATE_INDIVIDUAL_SM_TIMEOUT_IPU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401806) // - .text("(XT) IPU Statemachine timeout")), - STATE_INDIVIDUAL_SM_TIMEOUT_IPU_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402806) // - .text("(XT) IPU Statemachine timeout")), - STATE_INDIVIDUAL_SM_TIMEOUT_IPU_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403806) // - .text("(XT) IPU Statemachine timeout")), - STATE_INDIVIDUAL_SM_TIMEOUT_IPU_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404806) // - .text("(XT) IPU Statemachine timeout")), - STATE_WRONGIPUTYPE_IPU_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x401807) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGIPUTYPE_IPU_2_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x402807) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGIPUTYPE_IPU_3_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x403807) // - .text("(XT) Incorrect IPU type detected")), - STATE_WRONGIPUTYPE_IPU_4_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x404807) // - .text("(XT) Incorrect IPU type detected")), - STATE_VOLTAGE_TRIP_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x301100) // - .text("AC Supply Trip")), - STATE_VOLTAGE_TRIP_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x302100) // - .text("AC Supply Trip")), - STATE_VOLTAGE_TRIP_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x303100) // - .text("AC Supply Trip")), - STATE_VOLTAGE_TRIP_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x304100) // - .text("AC Supply Trip")), - STATE_WATCHDOG_TRIP_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x301109) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x302109) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x303109) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x304109) // - .text("Watchdog Timeout")), - STATE_CURRENT_LOOP_TRIP_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x30110A) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x30210A) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x30310A) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false).code(0x30410A) // - .text("CurrentLoop Open")), - STATE_PLC_TRIP_FAST_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x301400) // - .text("(XT) PLC Trip Fast")), - STATE_PLC_TRIP_FAST_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x302400) // - .text("(XT) PLC Trip Fast")), - STATE_PLC_TRIP_FAST_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x303400) // - .text("(XT) PLC Trip Fast")), - STATE_PLC_TRIP_FAST_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x304400) // - .text("(XT) PLC Trip Fast")), - STATE_PLC_TRIP_SEQUENCED_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x301401) // - .text("(XT) PLC Trip Sequenced")), - STATE_PLC_TRIP_SEQUENCED_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x302401) // - .text("(XT) PLC Trip Sequenced")), - STATE_PLC_TRIP_SEQUENCED_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x303401) // - .text("(XT) PLC Trip Sequenced")), - STATE_PLC_TRIP_SEQUENCED_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x304401) // - .text("(XT) PLC Trip Sequenced")), - STATE_VBE_TRIP_FAST_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x301402) // - .text("(XT) VBE Trip Fast")), - STATE_VBE_TRIP_FAST_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x302402) // - .text("(XT) VBE Trip Fast")), - STATE_VBE_TRIP_FAST_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x303402) // - .text("(XT) VBE Trip Fast")), - STATE_VBE_TRIP_FAST_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x304402) // - .text("(XT) VBE Trip Fast")), - STATE_VBE_TRIP_SEQUENCED_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x301403) // - .text("(XT) VBE Trip Sequenced")), - STATE_VBE_TRIP_SEQUENCED_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x302403) // - .text("(XT) VBE Trip Sequenced")), - STATE_VBE_TRIP_SEQUENCED_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x303403) // - .text("(XT) VBE Trip Sequenced")), - STATE_VBE_TRIP_SEQUENCED_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false).code(0x304403) // - .text("(XT) VBE Trip Sequenced")), - STATE_KZ04_TRIP_FAST_MIO30D_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x301404) // - .text("(XT) KZ04 Trip Fast ")), - STATE_KZ04_TRIP_FAST_MIO30D_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x302404) // - .text("(XT) KZ04 Trip Fast ")), - STATE_KZ04_TRIP_FAST_MIO30D_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x303404) // - .text("(XT) KZ04 Trip Fast ")), - STATE_KZ04_TRIP_FAST_MIO30D_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x304404) // - .text("(XT) KZ04 Trip Fast ")), - STATE_VOLTAGE_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x101100) // - .text("AC Supply Trip")), - STATE_VOLTAGE_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x102100) // - .text("AC Supply Trip")), - STATE_VOLTAGE_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x103100) // - .text("AC Supply Trip")), - STATE_VOLTAGE_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x104100) // - .text("AC Supply Trip")), - STATE_WATCHDOG_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x101109) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x102109) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x103109) // - .text("Watchdog Timeout")), - STATE_WATCHDOG_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x104109) // - .text("Watchdog Timeout")), - STATE_CURRENT_LOOP_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10110A) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10210A) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10310A) // - .text("CurrentLoop Open")), - STATE_CURRENT_LOOP_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10410A) // - .text("CurrentLoop Open")), - STATE_INTERN_TEMP_LOW_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101400).text("(XT) Warning: Internal Temperature Low")), - STATE_INTERN_TEMP_LOW_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102400).text("(XT) Warning: Internal Temperature Low")), - STATE_INTERN_TEMP_LOW_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103400).text("(XT) Warning: Internal Temperature Low")), - STATE_INTERN_TEMP_LOW_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104400).text("(XT) Warning: Internal Temperature Low")), - STATE_INTERN_TEMP_HIGH_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101401).text("(XT) Warning: Internal Temperature High")), - STATE_INTERN_TEMP_HIGH_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102401).text("(XT) Warning: Internal Temperature High")), - STATE_INTERN_TEMP_HIGH_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103401).text("(XT) Warning: Internal Temperature High")), - STATE_INTERN_TEMP_HIGH_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104401).text("(XT) Warning: Internal Temperature High")), - STATE_VOLT_1_LOW_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101402).text("(XT) Warning: Voltage Low Phase 1")), - STATE_VOLT_1_LOW_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102402).text("(XT) Warning: Voltage Low Phase 1")), - STATE_VOLT_1_LOW_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103402).text("(XT) Warning: Voltage Low Phase 1")), - STATE_VOLT_1_LOW_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104402).text("(XT) Warning: Voltage Low Phase 1")), - STATE_VOLT_2_LOW_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101403).text("(XT) Warning: Voltage Low Phase 2")), - STATE_VOLT_2_LOW_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102403).text("(XT) Warning: Voltage Low Phase 2")), - STATE_VOLT_2_LOW_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103403).text("(XT) Warning: Voltage Low Phase 2")), - STATE_VOLT_2_LOW_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104403).text("(XT) Warning: Voltage Low Phase 2")), - STATE_VOLT_3_LOW_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101404).text("(XT) Warning: Voltage Low Phase 3")), - STATE_VOLT_3_LOW_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102404).text("(XT) Warning: Voltage Low Phase 3")), - STATE_VOLT_3_LOW_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103404).text("(XT) Warning: Voltage Low Phase 3")), - STATE_VOLT_3_LOW_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104404).text("(XT) Warning: Voltage Low Phase 3")), - STATE_VOLT_1_HIGH_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101405).text("(XT) Warning: Voltage High Phase 1")), - STATE_VOLT_1_HIGH_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102405).text("(XT) Warning: Voltage High Phase 1")), - STATE_VOLT_1_HIGH_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103405).text("(XT) Warning: Voltage High Phase 1")), - STATE_VOLT_1_HIGH_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104405).text("(XT) Warning: Voltage High Phase 1")), - STATE_VOLT_2_HIGH_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101406).text("(XT) Warning: Voltage High Phase 2")), - STATE_VOLT_2_HIGH_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102406).text("(XT) Warning: Voltage High Phase 2")), - STATE_VOLT_2_HIGH_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103406).text("(XT) Warning: Voltage High Phase 2")), - STATE_VOLT_2_HIGH_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104406).text("(XT) Warning: Voltage High Phase 2")), - STATE_VOLT_3_HIGH_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101407).text("(XT) Warning: Voltage High Phase 3")), - STATE_VOLT_3_HIGH_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102407).text("(XT) Warning: Voltage High Phase 3")), - STATE_VOLT_3_HIGH_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103407).text("(XT) Warning: Voltage High Phase 3")), - STATE_VOLT_3_HIGH_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104407).text("(XT) Warning: Voltage High Phase 3")), - STATE_VOLT_1_THD_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101408).text("(XT) Warning: Voltage THD High Phase 1")), - STATE_VOLT_1_THD_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102408).text("(XT) Warning: Voltage THD High Phase 1")), - STATE_VOLT_1_THD_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103408).text("(XT) Warning: Voltage THD High Phase 1")), - STATE_VOLT_1_THD_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104408).text("(XT) Warning: Voltage THD High Phase 1")), - STATE_VOLT_2_THD_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101409).text("(XT) Warning: Voltage THD High Phase 2")), - STATE_VOLT_2_THD_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102409).text("(XT) Warning: Voltage THD High Phase 2")), - STATE_VOLT_2_THD_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103409).text("(XT) Warning: Voltage THD High Phase 2")), - STATE_VOLT_2_THD_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104409).text("(XT) Warning: Voltage THD High Phase 2")), - STATE_VOLT_3_THD_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x10140A).text("(XT) Warning: Voltage THD High Phase 3")), - STATE_VOLT_3_THD_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x10240A).text("(XT) Warning: Voltage THD High Phase 3")), - STATE_VOLT_3_THD_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x10340A).text("(XT) Warning: Voltage THD High Phase 3")), - STATE_VOLT_3_THD_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x10440A).text("(XT) Warning: Voltage THD High Phase 3")), - STATE_VOLT_1_LOW_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10140B) // - .text("(XT) Voltage Low Trip Phase 1")), - STATE_VOLT_1_LOW_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10240B) // - .text("(XT) Voltage Low Trip Phase 1")), - STATE_VOLT_1_LOW_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10340B) // - .text("(XT) Voltage Low Trip Phase 1")), - STATE_VOLT_1_LOW_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10440B) // - .text("(XT) Voltage Low Trip Phase 1")), - STATE_VOLT_2_LOW_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10140C) // - .text("(XT) Voltage Low Trip Phase 2")), - STATE_VOLT_2_LOW_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10240C) // - .text("(XT) Voltage Low Trip Phase 2")), - STATE_VOLT_2_LOW_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10340C) // - .text("(XT) Voltage Low Trip Phase 2")), - STATE_VOLT_2_LOW_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10440C) // - .text("(XT) Voltage Low Trip Phase 2")), - STATE_VOLT_3_LOW_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10140D) // - .text("(XT) Voltage Low Trip Phase 3")), - STATE_VOLT_3_LOW_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10240D) // - .text("(XT) Voltage Low Trip Phase 3")), - STATE_VOLT_3_LOW_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10340D) // - .text("(XT) Voltage Low Trip Phase 3")), - STATE_VOLT_3_LOW_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10440D) // - .text("(XT) Voltage Low Trip Phase 3")), - STATE_VOLT_1_HIGH_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10140E) // - .text("(XT) Voltage High Trip Phase 1")), - STATE_VOLT_1_HIGH_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10240E) // - .text("(XT) Voltage High Trip Phase 1")), - STATE_VOLT_1_HIGH_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10340E) // - .text("(XT) Voltage High Trip Phase 1")), - STATE_VOLT_1_HIGH_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10440E) // - .text("(XT) Voltage High Trip Phase 1")), - STATE_VOLT_2_HIGH_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10140F) // - .text("(XT) Voltage High Trip Phase 2")), - STATE_VOLT_2_HIGH_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10240F) // - .text("(XT) Voltage High Trip Phase 2")), - STATE_VOLT_2_HIGH_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10340F) // - .text("(XT) Voltage High Trip Phase 2")), - STATE_VOLT_2_HIGH_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10440F) // - .text("(XT) Voltage High Trip Phase 2")), - STATE_VOLT_3_HIGH_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x101410) // - .text("(XT) Voltage High Trip Phase 3")), - STATE_VOLT_3_HIGH_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x102410) // - .text("(XT) Voltage High Trip Phase 3")), - STATE_VOLT_3_HIGH_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x103410) // - .text("(XT) Voltage High Trip Phase 3")), - STATE_VOLT_3_HIGH_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x104410) // - .text("(XT) Voltage High Trip Phase 3")), - STATE_VOLT_1_THD_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x101411) // - .text("(XT) Voltage THD Trip Phase 1")), - STATE_VOLT_1_THD_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x102411) // - .text("(XT) Voltage THD Trip Phase 1")), - STATE_VOLT_1_THD_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x103411) // - .text("(XT) Voltage THD Trip Phase 1")), - STATE_VOLT_1_THD_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x104411) // - .text("(XT) Voltage THD Trip Phase 1")), - STATE_VOLT_2_THD_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x101412) // - .text("(XT) Voltage THD Trip Phase 2")), - STATE_VOLT_2_THD_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x102412) // - .text("(XT) Voltage THD Trip Phase 2")), - STATE_VOLT_2_THD_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x103412) // - .text("(XT) Voltage THD Trip Phase 2")), - STATE_VOLT_2_THD_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x104412) // - .text("(XT) Voltage THD Trip Phase 2")), - STATE_VOLT_3_THD_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x101413) // - .text("(XT) Voltage THD Trip Phase 3")), - STATE_VOLT_3_THD_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x102413) // - .text("(XT) Voltage THD Trip Phase 3")), - STATE_VOLT_3_THD_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x103413) // - .text("(XT) Voltage THD Trip Phase 3")), - STATE_VOLT_3_THD_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x104413) // - .text("(XT) Voltage THD Trip Phase 3")), - STATE_FREQUENCY_LOW_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x101414) // - .text("(XT) Frequency Low Trip")), - STATE_FREQUENCY_LOW_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x102414) // - .text("(XT) Frequency Low Trip")), - STATE_FREQUENCY_LOW_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x103414) // - .text("(XT) Frequency Low Trip")), - STATE_FREQUENCY_LOW_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x104414) // - .text("(XT) Frequency Low Trip")), - STATE_FREQUENCY_HIGH_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x101415) // - .text("(XT) Frequency High Trip")), - STATE_FREQUENCY_HIGH_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x102415) // - .text("(XT) Frequency High Trip")), - STATE_FREQUENCY_HIGH_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x103415) // - .text("(XT) Frequency High Trip")), - STATE_FREQUENCY_HIGH_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x104415) // - .text("(XT) Frequency High Trip")), - STATE_PHASE_ORDER_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x101416) // - .text("(XT) Invalid Phase Order Trip")), - STATE_PHASE_ORDER_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x102416) // - .text("(XT) Invalid Phase Order Trip")), - STATE_PHASE_ORDER_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x103416) // - .text("(XT) Invalid Phase Order Trip")), - STATE_PHASE_ORDER_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x104416) // - .text("(XT) Invalid Phase Order Trip")), - STATE_VOLT_1_SRD_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101417).text("(XT) Selective Resonance Detection (SRD) Phase 1")), - STATE_VOLT_1_SRD_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102417).text("(XT) Selective Resonance Detection (SRD) Phase 1")), - STATE_VOLT_1_SRD_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103417).text("(XT) Selective Resonance Detection (SRD) Phase 1")), - STATE_VOLT_1_SRD_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104417).text("(XT) Selective Resonance Detection (SRD) Phase 1")), - STATE_VOLT_2_SRD_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101418).text("(XT) Selective Resonance Detection (SRD) Phase 2")), - STATE_VOLT_2_SRD_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102418).text("(XT) Selective Resonance Detection (SRD) Phase 2")), - STATE_VOLT_2_SRD_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103418).text("(XT) Selective Resonance Detection (SRD) Phase 2")), - STATE_VOLT_2_SRD_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104418).text("(XT) Selective Resonance Detection (SRD) Phase 2")), - STATE_VOLT_3_SRD_WARNING_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x101419).text("(XT) Selective Resonance Detection (SRD) Phase 3")), - STATE_VOLT_3_SRD_WARNING_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x102419).text("(XT) Selective Resonance Detection (SRD) Phase 3")), - STATE_VOLT_3_SRD_WARNING_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x103419).text("(XT) Selective Resonance Detection (SRD) Phase 3")), - STATE_VOLT_3_SRD_WARNING_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x104419).text("(XT) Selective Resonance Detection (SRD) Phase 3")), - STATE_FREQUENCY_DFDT_TRIP_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10141A) // - .text("(XT) Frequency Change Rate Trip")), - STATE_FREQUENCY_DFDT_TRIP_MIO_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10241A) // - .text("(XT) Frequency Change Rate Trip")), - STATE_FREQUENCY_DFDT_TRIP_MIO_3(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10341A) // - .text("(XT) Frequency Change Rate Trip")), - STATE_FREQUENCY_DFDT_TRIP_MIO_4(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x10441A).text("(XT) Frequency Change Rate Trip")); - - private final Doc doc; - - private ErrorCodeChannelId0(Doc doc) { - this.doc = doc; - } - - public Doc doc() { - return this.doc; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorCodeChannelId1.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorCodeChannelId1.java deleted file mode 100644 index d962277bb95..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorCodeChannelId1.java +++ /dev/null @@ -1,900 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.channel.Level; -import io.openems.edge.common.channel.ChannelId; -import io.openems.edge.common.channel.Doc; -import io.openems.edge.ess.mr.gridcon.enums.ErrorDoc.Acknowledge; -import io.openems.edge.ess.mr.gridcon.enums.ErrorDoc.ReactionLevel; - -/** - * This enum holds every possible error channel id for a gridcon. - */ -public enum ErrorCodeChannelId1 implements ChannelId { - STATE_MERKUR_PORT0_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060000) // - .text("DSC 10 removed !Restart! ")), - STATE_MERKUR_PORT1_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060001) // - .text("DSC 9 removed !Restart! ")), - STATE_MERKUR_PORT2_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060002) // - .text("DSC 8 removed !Restart! ")), - STATE_MERKUR_PORT3_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060003) // - .text("DSC 7 removed !Restart! ")), - STATE_MERKUR_PORT4_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060004) // - .text("DSC 6 removed !Restart! ")), - STATE_MERKUR_PORT5_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060005) // - .text("DSC 5 removed !Restart! ")), - STATE_MERKUR_PORT6_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060006) // - .text("DSC 4 removed !Restart! ")), - STATE_MERKUR_PORT7_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060007) // - .text("DSC 3 removed !Restart! ")), - STATE_MERKUR_PORT8_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060008) // - .text("DSC 2 removed !Restart! ")), - STATE_MERKUR_PORT9_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.NO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060009) // - .text("DSC 1 removed !Restart! ")), - STATE_INPUT_SLOT_Blackfin_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) - // after this error it was even not possible to acknowledge it with MR-Tool, so - // a hard reset has been necessary - .code(0x06000A) // - .text("InputSlot Timeout")), - STATE_COM_SLOT_Sharc_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x06000B) // - .text("CommunicationSlot Timeout")), - STATE_STATUS_SLOT_Sharc_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06000C) // - .text("StatusSlot Timeout")), - STATE_WHILE_LOOP_Sharc_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x06000D) // - .text("While Loop Timeout")), - STATE_IRQ_TIMEOUT_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x06000E) // - .text("Interrupt Request Timeout")), - STATE_SH_BUFFER_SPORT_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x06000F) // - .text("Sharc Buffer Overflow")), - STATE_SH_BUFFER_SPORT_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06000F) // - .text("Sharc Buffer Overflow")), - STATE_BF_BUFFER_SPORT_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060010) // - .text("Blackfin Buffer Overflow")), - STATE_S_INACTIVE_CCU_Master_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x060011) // - .text("Master Inactive @ Slave")), - STATE_S_INVALID_CCU_Master_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.FORCED) // - .needsHardReset(false) // - .code(0x060012) // - .text("Master Packet Invalid @ Slave")), - STATE_AUTOSTART_ENABLED_StateMachine_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060013) // - .text("Autostart enabled")), - STATE_LCU_PRESSURE_LOSS_Fan_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.RESTART) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060014) // - .text("LCU pressure loss trip")), - STATE_LCU_TEMPERTURE_HIGH_Fan_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060015) // - .text("LCU temperature high")), - STATE_DIGITAL_SYSTEMLOCK_MIO_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060016) // - .text("Digital Input : System Locked")), - STATE_PROCX_EXTERN_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060017) // - .text("Pro-CX: External error")), - STATE_PROCX_OVERVOLTAGE_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060018) // - .text("Pro-CX: Overvoltage")), - STATE_PROCX_OVERCOMPENSATED_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060019) // - .text("Pro-CX: Overcompensated")), - STATE_PROCX_UNDERCOMPENSATED_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06001A) // - .text("Pro-CX: Undercompensated")), - STATE_PROCX_HARMONICS_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06001B) // - .text("Pro-CX: Harmonics")), - STATE_PROCX_TEMPERATURE_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06001C) // - .text("Pro-CX: Temperature high")), - STATE_PROCX_UNDERCURRENT_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06001D) // - .text("Pro-CX: Undercurrent")), - STATE_PROCX_UNDERVOLTAGE_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06001E) // - .text("Pro-CX: Undervoltage")), - STATE_PROCX_COMMUNICATION_Pro_CX_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06001F) // - .text("Pro-CX Communication Error")), - STATE_DERATING_RMS_CURRENT_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060020) // - .text("Derating: RMS current")), - STATE_DERATING_PEAK_GRIDCURRENT_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060021) // - .text("Derating: Output peak current")), - STATE_DERATING_PEAK_MODULECURRENT_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060022) // - .text("Derating: IGBT peak current")), - STATE_DERATING_MODULATIONSINDEX_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060023) // - .text("Derating: Modulation limit")), - STATE_DERATING_DC_VOLTAGE_UNBALANCE_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060024) // - .text("Derating: DC voltage unbalance")), - STATE_DERATING_DC_VOLTAGE_MAXIMUM_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060025) // - .text("Derating: DC voltage limit")), - STATE_DERATING_CHOKE_TEMPERATURE_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060026) // - .text("Derating: Choke temperature")), - STATE_DERATING_IGBT_TEMPERATURE_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060027) // - .text("Derating: IGBT temperature")), - STATE_DERATING_MCU_TEMPERATURE_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060028) // - .text("Derating: MCU temperature")), - STATE_DERATING_GRID_VOLTAGE_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x060029) // - .text("Derating: GridVoltage")), - STATE_DERATING_NEUTRAL_CURRENT_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.CFG_DERATING) // - .needsHardReset(false) // - .code(0x06002A) // - .text("Derating: RMS current neutral")), - STATE_STARTSTOP_MODE_StateMachine_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06002B) // - .text("Auto start-stop active")), - STATE_WARMSTART_CCU_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.INFO) // - .needsHardReset(false) // - .code(0x06002C) // - .text("CCU warm restart triggered")), - STATE_SIA_RUNNING_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE).reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06002D).text("(XT) System Identification Algorithm (SIA) running...")), - STATE_SIA_WARNING_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06002E) // - .text("(XT) SIA Warning")), - STATE_SUSPECT_HARMONICS_DETECTED_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x06002F) // - .text("(XT) Suspect Harmonics marked")), - STATE_CRITICAL_HARMONICS_DETECTED_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.AUTO_ACKNOWLEDGE).reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x060030).text("(XT) Compensation of critical harmonics blocked")), - STATE_VOLTAGE_NOT_VALID_FOR_START_ACDCs_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060031) // - .text("(XT) VOLT NOT VALID START ACDC")), - STATE_FREQUENZ_NOT_VALID_FOR_START_ACDCs_CONTROL_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x060032) // - .text("(XT) FREQ NOT VALID START ACDC")), - STATE_PARAM_UNDEFINED_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x010000) // - .text("Undefined fault parameter")), - STATE_PARAM_NULL_POINTER_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x010001) // - .text("Null pointer to fault parameter")), - STATE_INVALID_PARAMETER_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x010002) // - .text("Invalid fault parameter")), - STATE_GROUP_INSPECTOR_NULL_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x010003) // - .text("Undefined group inspector")), - STATE_INVALID_CLIENT_ID_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010004) // - .text("Invalid Merkur client ID")), - STATE_INVALID_HIERARCHY_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x010005) // - .text("Invalid fault hierarchy")), - STATE_MERKUR_INIT_FAIL_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x010006) // - .text("Merkur module initialization failed")), - STATE_INVALID_MIO_ORDER_DSC_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010007) // - .text("Invalid MIO ports sequence")), - STATE_PQM_INVALID_CONFIG_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010008).text("Invalid measurement configuration")), - STATE_PQM_CHANNELS_OVERFLOW_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010009).text("Measurement channels limit reached")), - STATE_PQM_INVALID_FORMAT_Configuration_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x01000A).text("Invalid current sum configuration format")), - STATE_PQM_CALCULATIONS_TIMEOUT_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x01000B) // - .text("Measurements calculation timeout")), - STATE_PQM_PACKET_MISSING__1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x01000C) // - .text("Measurement packet missing")), - STATE_PQM_INVALID_DATA__1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x01000D) // - .text("Invalid measurement data")), - STATE_RTDS_SOFTWARE_Software_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.INFO) // - .needsHardReset(false) // - .code(0x01000E) // - .text("Warning: RTDS Version - Do not use on real hardware")), - STATE_ARRAY_OVERFLOW_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(true) // - .code(0x01000F) // - .text("Array overflow")), - STATE_AUTONOM_TEST_SW_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.INFO) // - .needsHardReset(false) // - .code(0x010010) // - .text("Warning: AUTONOM TEST SW ( Autostart )")), - STATE_NO_BLACKSTART_OR_SYNC_ENABLED_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010011) // - .text("no Blackstart or SyncV enabled")), - STATE_SYNC_V_AND_BLACKSTART_ENABLED_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010012) // - .text("sycnV and Blackstart enabled")), - STATE_VOLTAGE_NOT_ZERO_FOR_BLACKSTART_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010013) // - .text("voltage not zero for Blackstart")), - STATE_VOLTAGE_SYNC_NOT_SUCCEEDED_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010014) // - .text("voltage sync not succeeded")), - STATE_VOLTAGE_NOT_OK_FOR_SYNC_V_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010015) // - .text("voltage not ok for sync V")), - STATE_GENERATOR_CONNECTED_WRONG_PHASE_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010016) // - .text("generator connected wrong phase")), - STATE_FRT_FAULT_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010017) // - .text("FRT Error occurred")), - STATE_IDC_OVERCURRENT_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x010018) // - .text("DC-Link Overcurrent")), - STATE_SUMMANDS_OVERFLOW_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030000) // - .text("Summands overflow")), - STATE_CYCLIC_CONFIG_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030001).text("Cyclic current sum configuration")), - STATE_INVALID_PHASE_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030002).text("Summand set to nonexistent phase")), - STATE_INVALID_MIO_VOLTAGE_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030003) // - .text("Nonexistent MIO voltage channel")), - STATE_INVALID_MIO_CURRENT_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030004) // - .text("Nonexistent MIO current channel")), - STATE_INVALID_MIO_CURRENT_GROUPS_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030005).text("Inconsistent MIO current channels grouping")), - STATE_INVALID_DEVICE_CHANNEL_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030006).text("Nonexistent device phase current")), - STATE_CHANNEL_NULL_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030007).text("Measurement channel not initialized")), - STATE_PHASE_MISSING_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030008).text("Device current configuration missing")), - STATE_DEVICE_DISABLED_SOFTWARE_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x030009).text("Initializing disabled device current")), - STATE_ABCC_ERR_INVALID_PROC_WRITE_DATA_SIZE_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070000) // - .text("Invalid write process data size")), - STATE_ABCC_ERR_INVALID_PROC_READ_DATA_SIZE_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070001) // - .text("Invalid read process data size")), - STATE_ABCC_ERR_MODULE_MISSING_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070002) // - .text("Module missing")), - STATE_ABCC_ERR_NODEID_NOT_SETABLE_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070003) // - .text("Cannot set node ID")), - STATE_ABCC_ERR_ATTR_WRITE_ERROR_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070004) // - .text("Cannot set attribute")), - STATE_ABCC_ERR_INIT_ATTR_READ_ERROR_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070005).text("Error reading attributes during initialization")), - STATE_ABCC_ERR_MODULE_WATCHDOG_TIMEOUT_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070006) // - .text("Module watchdog timeout")), - STATE_ABCC_ERR_READING_EXCEPTION_CODE_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070007) // - .text("Error reading exception code")), - STATE_ABCC_ERR_READING_NW_SPEC_EXCEPTION_CODE_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070008).text("Error reading network specific exception code")), - STATE_ABCC_ERR_NON_RECOVERABLE_EXCEPTION_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070009) // - .text("Non-recoverable exception")), - STATE_ABCC_ERR_CONNECTION_TERMINATED_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07000A) // - .text("Connection terminated")), - STATE_ABCC_ERR_NETWORK_ERROR_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07000B) // - .text("Network error")), - STATE_ABCC_ERR_DRIVER_STATE_CHANGE_DENIED_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07000C).text("Driver handler state change denied")), - STATE_ABCC_ERR_MAX_RESTART_COUNT_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07000D).text("Module restart count limit reached")), - STATE_ABCC_ERR_MODULE_RESTART_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x07000E) // - .text("Module restarted")), - STATE_ABCC_ERR_DRIVER_TERMINATED_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07000F) // - .text("Driver terminated")), - STATE_ABCC_EXCPT_APP_TO_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070010) // - .text("Application timeout")), - STATE_ABCC_EXCPT_INV_DEV_ADDR_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070011) // - .text("Invalid device address")), - STATE_ABCC_EXCPT_INV_COM_SETTINGS_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070012) // - .text("Invalid communication settings")), - STATE_ABCC_EXCPT_MAJ_UNREC_APP_EVNT_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070013).text("Major unrecoverable application event")), - STATE_ABCC_EXCPT_WAIT_APP_RESET_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070014) // - .text("Waiting for application reset")), - STATE_ABCC_EXCPT_INV_PRD_CFG_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED).reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070015).text("Invalid process data configuration")), - STATE_ABCC_EXCPT_INV_APP_RESPONSE_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070016) // - .text("Invalid application response")), - STATE_ABCC_EXCPT_NVS_CHECKSUM_ERROR_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070017).text("Non-volatile memory checksum error")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_1_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070018).text("Network specific exception code: 0x01")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_2_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x070019).text("Network specific exception code: 0x02")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_3_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07001A).text("Network specific exception code: 0x03")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_4_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07001B).text("Network specific exception code: 0x04")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_5_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07001C).text("Network specific exception code: 0x05")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_6_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07001D).text("Network specific exception code: 0x06")), - STATE_ABCC_EXCPT_NETWORK_SPECIFIC_7_ANYBUS_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.CFG_ANYBUS) // - .needsHardReset(false) // - .code(0x07001E).text("Network specific exception code: 0x07")), - STATE_COMMUNICATION_FAULT_RACK_GROUP_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x050300) // - .text("Communication Fault")), - STATE_IMBALANCE_ALARM_RACK_GROUP_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x05030A) // - .text("Imbalance alarm")), - STATE_IMBALANCE_STOP_RACK_GROUP_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x05030B) // - .text("Imbalance error")), - STATE_VOLTAGE_DIFF_RACK_GROUP_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x05030C) // - .text("DC voltage not synchronized")), - STATE_NO_CONTACTOR_ON_COMMAND_RACK_GROUP_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x05030D) // - .text("Close contactor command timeout")), - STATE_CLOSE_BLOCKED_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040200) // - .text("Contactor closing blocked")), - STATE_OPEN_BLOCKED_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040201) // - .text("Contactor opening blocked")), - STATE_CELL_OVERTEMPERATURE_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x040301) // - .text("Cell Overtemperature Trip")), - STATE_CELL_UNDERVOLTAGE_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x040302) // - .text("Cell Undervoltage Trip")), - STATE_CELL_OVERVOLTAGE_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x040303) // - .text("Cell Overvoltage Trip")), - STATE_RACK_UNDERVOLTAGE_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x040307) // - .text("Rack Undervoltage Trip")), - STATE_RACK_OVERVOLTAGE_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x040308) // - .text("Rack Overvoltage Trip")), - STATE_RACK_COMM_FAULT_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x040309) // - .text("Rack Communication Fault")), - STATE_TRAY_COMM_FAULT_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x04030A) // - .text("Tray Communication Fault")), - STATE_OVERCURRENT_RACK_1_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x04030B) // - .text("Overcurrent Trip")), - STATE_ADDITIONAL_PROTECTION_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x04030D) // - .text("Additional Protection Tray")), - STATE_DC_CONTACTOR_FAULT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x04030E) // - .text("DC Contactor Fault")), - STATE_DC_CONTACTOR_SENSOR_FAULT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.SHUTDOWN) // - .needsHardReset(false) // - .code(0x04030F) // - .text("DC Contactor Sensor Fault")), - STATE_CELL_UNDERTEMPERATURE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040310) // - .text("Warning: Cell Undertemperature")), - STATE_CELL_OVERTEMPERATURE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040311) // - .text("Warning: Cell Overtemperature")), - STATE_CELL_UNDERVOLTAGE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040312) // - .text("Warning: Cell Undervoltage")), - STATE_CELL_OVERVOLTAGE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040313) // - .text("Warning: Cell Overvoltage")), - STATE_RACK_VOLTAGE_ERROR_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040314) // - .text("Warning: Rack voltage deviates from sum")), - STATE_CELL_VOLTAGE_IMBALANCE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040315) // - .text("Warning: Cell Voltage Imbalance")), - STATE_CELL_TEMPERATURE_IMBALANCE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040316) // - .text("Warning: Cell Temperature Imbalance")), - STATE_RACK_UNDERVOLTAGE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040317) // - .text("Warning: Rack Undervoltage")), - STATE_RACK_OVERVOLTAGE_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040318) // - .text("Warning: Rack Overvoltage")), - STATE_RACK_COMM_FAULT_RACK_1_2(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x040319) // - .text("Warning: Rack Communication Fault")), - STATE_TRAY_COMM_FAULT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x04031A) // - .text("Warning: Tray Communication Fault")), - STATE_OVERCURRENT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x04031B) // - .text("Warning: Rack Overcurrent")), - STATE_SOC_FULL_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.INFO) // - .needsHardReset(false) // - .code(0x04031C) // - .text("Rack Charge Completed")), - STATE_SENSOR_COMMUNICATION_FAULT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x04031D) // - .text("Warning: Current Sensor Communication Fault")), - STATE_CHARGE_OVERCURRENT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x04031E) // - .text("Warning: Charge Current Limit Exceeded")), - STATE_FAN_FAULT_RACK_1(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.WARNING) // - .needsHardReset(false) // - .code(0x04031F) // - .text("Warning: Fan Fault")), - FLOAT_UNDERFLOW_FOR_PROPERTY(new ErrorDoc(Level.WARNING) // - .acknowledge(Acknowledge.UNDEFINED) // - .reactionLevel(ReactionLevel.INFO) // - .needsHardReset(false) // - .code(0x08000C) // - .text("Float underflow for property")),; - - private final Doc doc; - - private ErrorCodeChannelId1(Doc doc) { - this.doc = doc; - } - - public Doc doc() { - return this.doc; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorDoc.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorDoc.java deleted file mode 100644 index 65b261ca03f..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ErrorDoc.java +++ /dev/null @@ -1,73 +0,0 @@ -// CHECKSTYLE:OFF -package io.openems.edge.ess.mr.gridcon.enums; - -import java.util.HashMap; -import java.util.Map; - -import io.openems.common.channel.Level; -import io.openems.edge.common.channel.StateChannelDoc; - -public class ErrorDoc extends StateChannelDoc { - - public ErrorDoc(Level level) { - super(level); - } - - private static Map mapCodeToDoc = new HashMap<>(); - - public enum Acknowledge { - AUTO_ACKNOWLEDGE, NO_ACKNOWLEDGE, RESTART, UNDEFINED - } - - public enum ReactionLevel { - CFG_ANYBUS, CFG_DERATING, DISABLED, FORCED, INFO, SHUTDOWN, WARNING, - } - - private boolean needsHardReset; - private Acknowledge acknowledge; - private ReactionLevel reactionLevel; - private int code; - - public ErrorDoc getErrorDoc(int code) { - return mapCodeToDoc.get(code); - } - - public boolean isNeedsHardReset() { - return this.needsHardReset; - } - - public ErrorDoc needsHardReset(boolean needsHardReset) { - this.needsHardReset = needsHardReset; - return this; - } - - public Acknowledge getAcknowledge() { - return this.acknowledge; - } - - public ErrorDoc acknowledge(Acknowledge acknowledge) { - this.acknowledge = acknowledge; - return this; - } - - public ReactionLevel getReactionLevel() { - return this.reactionLevel; - } - - public ErrorDoc reactionLevel(ReactionLevel reactionLevel) { - this.reactionLevel = reactionLevel; - return this; - } - - public int getCode() { - return this.code; - } - - public ErrorDoc code(int code) { - this.code = code; - ErrorDoc.mapCodeToDoc.put(code, this); - return this; - } - -} -// CHECKSTYLE:ON \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/FundamentalFrequencyMode.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/FundamentalFrequencyMode.java deleted file mode 100644 index b439895ed97..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/FundamentalFrequencyMode.java +++ /dev/null @@ -1,26 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -public enum FundamentalFrequencyMode { - - DISABLED(false, false), // = 0 - Q_REF(true, false), // = 1 - PFC_COS_PHI(false, true), // = 2 - V_REF(true, true) // = 3 - ; - - private boolean bit1; - private boolean bit2; - - private FundamentalFrequencyMode(boolean bit1, boolean bit2) { - this.bit1 = bit1; - this.bit2 = bit2; - } - - public boolean isBit1() { - return this.bit1; - } - - public boolean isBit2() { - return this.bit2; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/GridConChannelId.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/GridConChannelId.java deleted file mode 100644 index 98c2f09ddf6..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/GridConChannelId.java +++ /dev/null @@ -1,552 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.channel.AccessMode; -import io.openems.common.channel.Unit; -import io.openems.common.types.OpenemsType; -import io.openems.edge.common.channel.BooleanDoc; -import io.openems.edge.common.channel.ChannelId; -import io.openems.edge.common.channel.Doc; -import io.openems.edge.common.channel.FloatDoc; -import io.openems.edge.common.channel.IntegerDoc; -import io.openems.edge.common.channel.LongDoc; - -/** - * This enum holds every possible channel id for a gridcon. - */ -public enum GridConChannelId implements ChannelId { - CCU_STATE(Doc.of(CcuState.values())), // = 1 - CCU_ERROR_COUNT(Doc.of(OpenemsType.INTEGER)), // - CCU_ERROR_CODE(Doc.of(OpenemsType.INTEGER)), // - CCU_VOLTAGE_U12(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), // - CCU_VOLTAGE_U23(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), // - CCU_VOLTAGE_U31(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), // - CCU_CURRENT_IL1(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - CCU_CURRENT_IL2(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - CCU_CURRENT_IL3(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - /** - * Active power. - */ - CCU_POWER_P(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), - /** - * Reactive power. - */ - CCU_POWER_Q(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT_AMPERE_REACTIVE)), // - CCU_FREQUENCY(Doc.of(OpenemsType.FLOAT).unit(Unit.HERTZ)), - - INVERTER_1_STATUS_STATE_MACHINE(Doc.of(StatusIpuStateMachine.values())), - INVERTER_1_STATUS_MCU(Doc.of(StatusIpuStatusMcu.values())), - INVERTER_1_STATUS_FILTER_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - INVERTER_1_STATUS_DC_LINK_POSITIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - INVERTER_1_STATUS_DC_LINK_NEGATIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - INVERTER_1_STATUS_DC_LINK_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - INVERTER_1_STATUS_DC_LINK_ACTIVE_POWER(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), - INVERTER_1_STATUS_DC_LINK_UTILIZATION(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - INVERTER_1_STATUS_FAN_SPEED_MAX(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - INVERTER_1_STATUS_FAN_SPEED_MIN(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - INVERTER_1_STATUS_TEMPERATURE_IGBT_MAX(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_1_STATUS_TEMPERATURE_MCU_BOARD(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_1_STATUS_TEMPERATURE_GRID_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_1_STATUS_TEMPERATURE_INVERTER_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_1_STATUS_RESERVE_1(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_1_STATUS_RESERVE_2(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_1_STATUS_RESERVE_3(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - - INVERTER_2_STATUS_STATE_MACHINE(Doc.of(StatusIpuStateMachine.values())), - INVERTER_2_STATUS_MCU(Doc.of(StatusIpuStatusMcu.values())), - INVERTER_2_STATUS_FILTER_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - INVERTER_2_STATUS_DC_LINK_POSITIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - INVERTER_2_STATUS_DC_LINK_NEGATIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - INVERTER_2_STATUS_DC_LINK_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - INVERTER_2_STATUS_DC_LINK_ACTIVE_POWER(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), - INVERTER_2_STATUS_DC_LINK_UTILIZATION(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - INVERTER_2_STATUS_FAN_SPEED_MAX(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - INVERTER_2_STATUS_FAN_SPEED_MIN(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - INVERTER_2_STATUS_TEMPERATURE_IGBT_MAX(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_2_STATUS_TEMPERATURE_MCU_BOARD(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_2_STATUS_TEMPERATURE_GRID_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_2_STATUS_TEMPERATURE_INVERTER_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_2_STATUS_RESERVE_1(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_2_STATUS_RESERVE_2(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_2_STATUS_RESERVE_3(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - - INVERTER_3_STATUS_STATE_MACHINE(Doc.of(StatusIpuStateMachine.values())), - INVERTER_3_STATUS_MCU(Doc.of(StatusIpuStatusMcu.values())), - INVERTER_3_STATUS_FILTER_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - INVERTER_3_STATUS_DC_LINK_POSITIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - INVERTER_3_STATUS_DC_LINK_NEGATIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - INVERTER_3_STATUS_DC_LINK_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - INVERTER_3_STATUS_DC_LINK_ACTIVE_POWER(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), - INVERTER_3_STATUS_DC_LINK_UTILIZATION(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - INVERTER_3_STATUS_FAN_SPEED_MAX(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - INVERTER_3_STATUS_FAN_SPEED_MIN(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - INVERTER_3_STATUS_TEMPERATURE_IGBT_MAX(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_3_STATUS_TEMPERATURE_MCU_BOARD(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_3_STATUS_TEMPERATURE_GRID_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_3_STATUS_TEMPERATURE_INVERTER_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_3_STATUS_RESERVE_1(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_3_STATUS_RESERVE_2(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - INVERTER_3_STATUS_RESERVE_3(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - - DCDC_STATUS_STATE_MACHINE(Doc.of(StatusIpuStateMachine.values())), - DCDC_STATUS_MCU(Doc.of(StatusIpuStatusMcu.values())), // - DCDC_STATUS_FILTER_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - DCDC_STATUS_DC_LINK_POSITIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - DCDC_STATUS_DC_LINK_NEGATIVE_VOLTAGE(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - DCDC_STATUS_DC_LINK_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - DCDC_STATUS_DC_LINK_ACTIVE_POWER(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), - DCDC_STATUS_DC_LINK_UTILIZATION(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - DCDC_STATUS_FAN_SPEED_MAX(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), // - DCDC_STATUS_FAN_SPEED_MIN(Doc.of(OpenemsType.LONG).unit(Unit.PERCENT)), - DCDC_STATUS_TEMPERATURE_IGBT_MAX(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - DCDC_STATUS_TEMPERATURE_MCU_BOARD(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - DCDC_STATUS_TEMPERATURE_GRID_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - DCDC_STATUS_TEMPERATURE_INVERTER_CHOKE(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - DCDC_STATUS_RESERVE_1(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - DCDC_STATUS_RESERVE_2(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - DCDC_STATUS_RESERVE_3(Doc.of(OpenemsType.FLOAT).unit(Unit.DEGREE_CELSIUS)), - - DCDC_MEASUREMENTS_VOLTAGE_STRING_A(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - DCDC_MEASUREMENTS_VOLTAGE_STRING_B(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - DCDC_MEASUREMENTS_VOLTAGE_STRING_C(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT)), - DCDC_MEASUREMENTS_CURRENT_STRING_A(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - DCDC_MEASUREMENTS_CURRENT_STRING_B(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - DCDC_MEASUREMENTS_CURRENT_STRING_C(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - - DCDC_MEASUREMENTS_CURRENT_STRING_A_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.MILLIAMPERE)), - DCDC_MEASUREMENTS_CURRENT_STRING_B_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.MILLIAMPERE)), - DCDC_MEASUREMENTS_CURRENT_STRING_C_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.MILLIAMPERE)), - - DCDC_MEASUREMENTS_POWER_STRING_A(Doc.of(OpenemsType.FLOAT).unit(Unit.KILOWATT)), - DCDC_MEASUREMENTS_POWER_STRING_B(Doc.of(OpenemsType.FLOAT).unit(Unit.KILOWATT)), - DCDC_MEASUREMENTS_POWER_STRING_C(Doc.of(OpenemsType.FLOAT).unit(Unit.KILOWATT)), - DCDC_MEASUREMENTS_UTILIZATION_STRING_A(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - DCDC_MEASUREMENTS_UTILIZATION_STRING_B(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - DCDC_MEASUREMENTS_UTILIZATION_STRING_C(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - DCDC_MEASUREMENTS_ACCUMULATED_SUM_DC_CURRENT(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - DCDC_MEASUREMENTS_ACCUMULATED_DC_UTILIZATION(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), - DCDC_MEASUREMENTS_RESERVE_1(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - DCDC_MEASUREMENTS_RESERVE_2(Doc.of(OpenemsType.FLOAT).unit(Unit.PERCENT)), - - GRID_MEASUREMENT_I_L1(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - GRID_MEASUREMENT_I_L2(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - GRID_MEASUREMENT_I_L3(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - GRID_MEASUREMENT_I_LN(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE)), // - - GRID_MEASUREMENT_P_L1(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), // - GRID_MEASUREMENT_P_L2(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), // - GRID_MEASUREMENT_P_L3(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), // - GRID_MEASUREMENT_P_SUM(Doc.of(OpenemsType.FLOAT).unit(Unit.WATT)), // - - GRID_MEASUREMENT_Q_L1(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT_AMPERE_REACTIVE)), // - GRID_MEASUREMENT_Q_L2(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT_AMPERE_REACTIVE)), // - GRID_MEASUREMENT_Q_L3(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT_AMPERE_REACTIVE)), // - GRID_MEASUREMENT_Q_SUM(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT_AMPERE_REACTIVE)), // - - COMMAND_CONTROL_WORD_PLAY_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_PLAY(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_PLAY_DEBUG)), - COMMAND_CONTROL_WORD_READY_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_READY(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_READY_DEBUG)), - COMMAND_CONTROL_WORD_ACKNOWLEDGE_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_ACKNOWLEDGE(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_ACKNOWLEDGE_DEBUG)), - COMMAND_CONTROL_WORD_STOP_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_STOP(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_STOP_DEBUG)), - COMMAND_CONTROL_WORD_BLACKSTART_APPROVAL_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_BLACKSTART_APPROVAL(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_BLACKSTART_APPROVAL_DEBUG)), - COMMAND_CONTROL_WORD_SYNC_APPROVAL_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_SYNC_APPROVAL(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_SYNC_APPROVAL_DEBUG)), - COMMAND_CONTROL_WORD_ACTIVATE_SHORT_CIRCUIT_HANDLING_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_ACTIVATE_SHORT_CIRCUIT_HANDLING(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_ACTIVATE_SHORT_CIRCUIT_HANDLING_DEBUG)), - COMMAND_CONTROL_WORD_MODE_SELECTION_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_MODE_SELECTION(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_MODE_SELECTION_DEBUG)), - COMMAND_CONTROL_WORD_TRIGGER_SIA_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_TRIGGER_SIA(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_TRIGGER_SIA_DEBUG)), - COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_1_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_1(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_1_DEBUG)), - COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_2_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_2(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_BALANCING_MODE_BIT_2_DEBUG)), - COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_1_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_1(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_1_DEBUG)), - COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_2_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_2(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_FUNDAMENTAL_FREQUENCY_MODE_BIT_2_DEBUG)), - COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_1_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_1(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_1_DEBUG)), - COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_2_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_2(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.COMMAND_CONTROL_WORD_HARMONIC_COMPENSATION_MODE_BIT_2_DEBUG)), - COMMAND_CONTROL_WORD_DISABLE_IPU_4_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_ENABLE_IPU_4(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_DISABLE_IPU_4_DEBUG)), - COMMAND_CONTROL_WORD_DISABLE_IPU_3_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_ENABLE_IPU_3(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_DISABLE_IPU_3_DEBUG)), - COMMAND_CONTROL_WORD_DISABLE_IPU_2_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_ENABLE_IPU_2(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_DISABLE_IPU_2_DEBUG)), - COMMAND_CONTROL_WORD_DISABLE_IPU_1_DEBUG(Doc.of(OpenemsType.BOOLEAN)), // - COMMAND_CONTROL_WORD_ENABLE_IPU_1(new BooleanDoc() // - .accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_WORD_DISABLE_IPU_1_DEBUG)), - COMMAND_ERROR_CODE_FEEDBACK_DEBUG(Doc.of(OpenemsType.LONG).unit(Unit.NONE)), // - COMMAND_ERROR_CODE_FEEDBACK(new LongDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_ERROR_CODE_FEEDBACK_DEBUG)), - - COMMAND_CONTROL_PARAMETER_U0_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - /** - * Describes the voltage provided in a blackstart where 1 is mains voltage. 1 - * => 230V, 1.02 => 234.6V. Should be 1 when not using blackstart, because - * when system runs into blackstart mode - */ - COMMAND_CONTROL_PARAMETER_U0(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_U0_DEBUG)), - - COMMAND_CONTROL_PARAMETER_F0_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - /** - * Describes the frequency. - */ - COMMAND_CONTROL_PARAMETER_F0(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_F0_DEBUG)), - - COMMAND_CONTROL_PARAMETER_Q_REF_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - /** - * Describes the reactive power. - */ - COMMAND_CONTROL_PARAMETER_Q_REF(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_Q_REF_DEBUG)), - - COMMAND_CONTROL_PARAMETER_P_REF_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - /** - * Describes the active power. - */ - COMMAND_CONTROL_PARAMETER_P_REF(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_CONTROL_PARAMETER_P_REF_DEBUG)), - - COMMAND_TIME_SYNC_DATE_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.NONE)), // - COMMAND_TIME_SYNC_DATE(new IntegerDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_TIME_SYNC_DATE_DEBUG)), - - COMMAND_TIME_SYNC_TIME_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.NONE)), // - COMMAND_TIME_SYNC_TIME(new IntegerDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.COMMAND_TIME_SYNC_TIME_DEBUG)), - - CONTROL_PARAMETER_U_Q_DROOP_MAIN_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_U_Q_DROOP_MAIN_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN_LOWER_DEBUG)), - CONTROL_PARAMETER_U_Q_DROOP_MAIN_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_U_Q_DROOP_MAIN_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_MAIN_UPPER_DEBUG)), - - CONTROL_PARAMETER_U_Q_DROOP_T1_MAIN_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_U_Q_DROOP_T1_MAIN(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_U_Q_DROOP_T1_MAIN_DEBUG)), - - CONTROL_PARAMETER_F_P_DRROP_MAIN_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_F_P_DROOP_MAIN_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_F_P_DRROP_MAIN_LOWER_DEBUG)), - - CONTROL_PARAMETER_F_P_DRROP_MAIN_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_F_P_DROOP_MAIN_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_F_P_DRROP_MAIN_UPPER_DEBUG)), - - CONTROL_PARAMETER_F_P_DROOP_T1_MAIN_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_F_P_DROOP_T1_MAIN(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_F_P_DROOP_T1_MAIN_DEBUG)), - - CONTROL_PARAMETER_Q_U_DROOP_MAIN_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_Q_U_DROOP_MAIN_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN_LOWER_DEBUG)), - - CONTROL_PARAMETER_Q_U_DROOP_MAIN_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_Q_U_DROOP_MAIN_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DROOP_MAIN_UPPER_DEBUG)), - - CONTROL_PARAMETER_Q_U_DEAD_BAND_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_Q_U_DEAD_BAND_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND_LOWER_DEBUG)), - - CONTROL_PARAMETER_Q_U_DEAD_BAND_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), - CONTROL_PARAMETER_Q_U_DEAD_BAND_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_Q_U_DEAD_BAND_UPPER_DEBUG)), - - CONTROL_PARAMETER_Q_LIMIT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_Q_LIMIT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_Q_LIMIT_DEBUG)), - - CONTROL_PARAMETER_P_F_DROOP_MAIN_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_F_DROOP_MAIN_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN_LOWER_DEBUG)), - CONTROL_PARAMETER_P_F_DROOP_MAIN_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_F_DROOP_MAIN_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DROOP_MAIN_UPPER_DEBUG)), - - CONTROL_PARAMETER_P_F_DEAD_BAND_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_F_DEAD_BAND_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND_LOWER_DEBUG)), - CONTROL_PARAMETER_P_F_DEAD_BAND_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_F_DEAD_BAND_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_F_DEAD_BAND_UPPER_DEBUG)), - - CONTROL_PARAMETER_P_U_DROOP_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_U_DROOP_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP_LOWER_DEBUG)), - CONTROL_PARAMETER_P_U_DROOP_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_U_DROOP_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DROOP_UPPER_DEBUG)), - - CONTROL_PARAMETER_P_U_DEAD_BAND_LOWER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_U_DEAD_BAND_LOWER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DEAD_BAND_LOWER_DEBUG)), - CONTROL_PARAMETER_P_U_DEAD_BAND_UPPER_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_U_DEAD_BAND_UPPER(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_U_DEAD_BAND_UPPER_DEBUG)), - - CONTROL_PARAMETER_P_U_MAX_CHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_U_MAX_CHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_U_MAX_CHARGE_DEBUG)), - - CONTROL_PARAMETER_P_U_MAX_DISCHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_U_MAX_DISCHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_U_MAX_DISCHARGE_DEBUG)), - - CONTROL_PARAMETER_P_CONTROL_MODE_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_CONTROL_MODE(new IntegerDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_MODE_DEBUG)), - - CONTROL_PARAMETER_P_CONTROL_LIM_TWO_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_CONTROL_LIM_TWO(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_LIM_TWO_DEBUG)), - - CONTROL_PARAMETER_P_CONTROL_LIM_ONE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_P_CONTROL_LIM_ONE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_P_CONTROL_LIM_ONE_DEBUG)), - - CONTROL_PARAMETER_COS_PHI_SETPOINT_1_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_COS_PHI_SETPOINT_1(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_COS_PHI_SETPOINT_1_DEBUG)), - CONTROL_PARAMETER_COS_PHI_SETPOINT_2_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - CONTROL_PARAMETER_COS_PHI_SETPOINT_2(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.CONTROL_PARAMETER_COS_PHI_SETPOINT_2_DEBUG)), - - INVERTER_1_CONTROL_DC_VOLTAGE_SETPOINT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_DC_VOLTAGE_SETPOINT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_1_CONTROL_DC_VOLTAGE_SETPOINT_DEBUG)), - - INVERTER_1_CONTROL_DC_CURRENT_SETPOINT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_DC_CURRENT_SETPOINT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_1_CONTROL_DC_CURRENT_SETPOINT_DEBUG)), - - INVERTER_1_CONTROL_U0_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_U0_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_1_CONTROL_U0_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_1_CONTROL_F0_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_F0_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_1_CONTROL_F0_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_1_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_1_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_1_CONTROL_P_REF_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_P_REF_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_1_CONTROL_P_REF_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_1_CONTROL_P_MAX_DISCHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_P_MAX_DISCHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_1_CONTROL_P_MAX_DISCHARGE_DEBUG)), - - INVERTER_1_CONTROL_P_MAX_CHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_1_CONTROL_P_MAX_CHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_1_CONTROL_P_MAX_CHARGE_DEBUG)), - - INVERTER_2_CONTROL_DC_VOLTAGE_SETPOINT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_DC_VOLTAGE_SETPOINT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_2_CONTROL_DC_VOLTAGE_SETPOINT_DEBUG)), - - INVERTER_2_CONTROL_DC_CURRENT_SETPOINT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_DC_CURRENT_SETPOINT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_2_CONTROL_DC_CURRENT_SETPOINT_DEBUG)), - - INVERTER_2_CONTROL_U0_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_U0_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_2_CONTROL_U0_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_2_CONTROL_F0_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_F0_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_2_CONTROL_F0_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_2_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_2_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_2_CONTROL_P_REF_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_P_REF_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_2_CONTROL_P_REF_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_2_CONTROL_P_MAX_DISCHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_P_MAX_DISCHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_2_CONTROL_P_MAX_DISCHARGE_DEBUG)), - - INVERTER_2_CONTROL_P_MAX_CHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_2_CONTROL_P_MAX_CHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_2_CONTROL_P_MAX_CHARGE_DEBUG)), - - INVERTER_3_CONTROL_DC_VOLTAGE_SETPOINT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_DC_VOLTAGE_SETPOINT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_3_CONTROL_DC_VOLTAGE_SETPOINT_DEBUG)), - - INVERTER_3_CONTROL_DC_CURRENT_SETPOINT_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_DC_CURRENT_SETPOINT(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_3_CONTROL_DC_CURRENT_SETPOINT_DEBUG)), - - INVERTER_3_CONTROL_U0_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_U0_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_3_CONTROL_U0_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_3_CONTROL_F0_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_F0_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_3_CONTROL_F0_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_3_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_3_CONTROL_Q_REF_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_3_CONTROL_P_REF_OFFSET_TO_CCU_VALUE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_P_REF_OFFSET_TO_CCU_VALUE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE).onChannelSetNextWriteMirrorToDebugChannel( - GridConChannelId.INVERTER_3_CONTROL_P_REF_OFFSET_TO_CCU_VALUE_DEBUG)), - - INVERTER_3_CONTROL_P_MAX_DISCHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_P_MAX_DISCHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_3_CONTROL_P_MAX_DISCHARGE_DEBUG)), - - INVERTER_3_CONTROL_P_MAX_CHARGE_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - INVERTER_3_CONTROL_P_MAX_CHARGE(new FloatDoc() // - .accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.INVERTER_3_CONTROL_P_MAX_CHARGE_DEBUG)), - - DCDC_CONTROL_DC_VOLTAGE_SETPOINT(Doc.of(OpenemsType.FLOAT).unit(Unit.VOLT).accessMode(AccessMode.READ_WRITE)), - DCDC_CONTROL_WEIGHT_STRING_A_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - DCDC_CONTROL_WEIGHT_STRING_A(new FloatDoc().unit(Unit.NONE).accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_A_DEBUG)), - DCDC_CONTROL_WEIGHT_STRING_B_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - DCDC_CONTROL_WEIGHT_STRING_B(new FloatDoc().unit(Unit.NONE).accessMode(AccessMode.READ_WRITE) // - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_B_DEBUG)), - DCDC_CONTROL_WEIGHT_STRING_C_DEBUG(Doc.of(OpenemsType.FLOAT).unit(Unit.NONE)), // - DCDC_CONTROL_WEIGHT_STRING_C(new FloatDoc().unit(Unit.NONE).accessMode(AccessMode.READ_WRITE) - .onChannelSetNextWriteMirrorToDebugChannel(GridConChannelId.DCDC_CONTROL_WEIGHT_STRING_C_DEBUG)), - - DCDC_CONTROL_I_REF_STRING_A_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.MILLIAMPERE)), // - DCDC_CONTROL_I_REF_STRING_B_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.MILLIAMPERE)), // - DCDC_CONTROL_I_REF_STRING_C_DEBUG(Doc.of(OpenemsType.INTEGER).unit(Unit.MILLIAMPERE)), // - - DCDC_CONTROL_I_REF_STRING_A(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE).accessMode(AccessMode.READ_WRITE)), // - DCDC_CONTROL_I_REF_STRING_B(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE).accessMode(AccessMode.READ_WRITE)), // - DCDC_CONTROL_I_REF_STRING_C(Doc.of(OpenemsType.FLOAT).unit(Unit.AMPERE).accessMode(AccessMode.READ_WRITE)), // - - DCDC_CONTROL_STRING_CONTROL_MODE(Doc.of(OpenemsType.INTEGER).unit(Unit.NONE).accessMode(AccessMode.READ_WRITE)),; - - private final Doc doc; - - private GridConChannelId(Doc doc) { - this.doc = doc; - } - - public Doc doc() { - return this.doc; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/HarmonicCompensationMode.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/HarmonicCompensationMode.java deleted file mode 100644 index 4351462b05d..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/HarmonicCompensationMode.java +++ /dev/null @@ -1,26 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -public enum HarmonicCompensationMode { - - DISABLED(false, false), // = 0 - DELTA(true, false), // = 1 - Y(false, true), // = 2 - DELTA_AND_Y(true, true) // = 3 - ; - - private boolean bit1; - private boolean bit2; - - private HarmonicCompensationMode(boolean bit1, boolean bit2) { - this.bit1 = bit1; - this.bit2 = bit2; - } - - public boolean isBit1() { - return this.bit1; - } - - public boolean isBit2() { - return this.bit2; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/InverterCount.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/InverterCount.java deleted file mode 100644 index 23d36787cc9..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/InverterCount.java +++ /dev/null @@ -1,25 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.edge.ess.mr.gridcon.GridconPcsImpl; - -public enum InverterCount { - ONE(1), // - TWO(2), // - THREE(3); - - private final int count; - private final int maxApparentPower; - - private InverterCount(int count) { - this.count = count; - this.maxApparentPower = count * GridconPcsImpl.MAX_POWER_PER_INVERTER; - } - - public int getCount() { - return this.count; - } - - public int getMaxApparentPower() { - return this.maxApparentPower; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/Mode.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/Mode.java deleted file mode 100644 index 69ad1f63f11..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/Mode.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -public enum Mode { - CURRENT_CONTROL(true), // - VOLTAGE_CONTROL(false); - - public final boolean value; - - private Mode(boolean value) { - this.value = value; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/PControlMode.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/PControlMode.java deleted file mode 100644 index af00cc111c8..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/PControlMode.java +++ /dev/null @@ -1,33 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.types.OptionsEnum; - -public enum PControlMode implements OptionsEnum { - UNDEFINED(-1, "Undefined"), // - DISABLED(1, "Disabled"), // - ACTIVE_POWER_CONTROL(1, "Active Power Control Mode"), // - POWER_LIMITER(2, "Power Limiter Mode"); // - - private final int value; - private final String name; - - private PControlMode(int value, String name) { - this.value = value; - this.name = name; - } - - @Override - public String getName() { - return this.name; - } - - @Override - public int getValue() { - return this.value; - } - - @Override - public OptionsEnum getUndefined() { - return UNDEFINED; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ParameterSet.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ParameterSet.java deleted file mode 100644 index 3a9e0a19f83..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/ParameterSet.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -public enum ParameterSet { - SET_1, SET_2, SET_3, SET_4 -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/StatusIpuStateMachine.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/StatusIpuStateMachine.java deleted file mode 100644 index 48ae192198a..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/StatusIpuStateMachine.java +++ /dev/null @@ -1,41 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.types.OptionsEnum; - -public enum StatusIpuStateMachine implements OptionsEnum { - UNDEFINED(-1, "Undefined"), // - OFFLINE(0, "Offline"), // - INIT(1, "Init"), // - IDLE(2, "Idle"), // - PRECHARGE(3, "Precharge"), // - GO_IDLE(4, "Go idle"), // TODO are values right? - READY(6, "Ready"), // - RUN(7, "Run"), // - ERROR(8, "Error"), // - SIA(14, "SIA"), // - FRT(15, "FRT"), // - NOT_DEFINED(16, "Not defined"); - - private final int value; - private final String name; - - private StatusIpuStateMachine(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; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/StatusIpuStatusMcu.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/StatusIpuStatusMcu.java deleted file mode 100644 index 7a2e97106dd..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/enums/StatusIpuStatusMcu.java +++ /dev/null @@ -1,47 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.enums; - -import io.openems.common.types.OptionsEnum; - -public enum StatusIpuStatusMcu implements OptionsEnum { - UNDEFINED(-1, "Undefined"), // - FAN_MONITOR(1, "Fan monitor"), // - HARD_TRIP(2, "Hard trip"), // - WAIT_FOR_ENABLE(3, "Wait for enable"), // - IDLE(4, "Idle"), // - WAIT_RPT(5, "Wait RPT"), // - PRECHARGE(6, "Precharge wait for voltage"), // - TRIP_PRECHG(7, "Trip, prechg"), // - PRECHG_WAIT(8, "Prechg wait"), // - PRECHG_CANCELED(9, "Prechg cancelled"), // - HS_ON(10, "Hs on"), // - HS_ON_POST(11, "Ha on post"), // - READY(12, "Ready extern"), // - READY_INTERN(13, "Ready intern"), // - RUN(14, "Run extern"), // - RUN_INTERN(15, "Run intern"), // - UNKNOWN_STATE_18(18, "Unknown StateObject"), // - UNKNOWN_STATE_21(21, "Unknown StateObject"); - - private final int value; - private final String name; - - private StatusIpuStatusMcu(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; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/Config.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/Config.java deleted file mode 100644 index 5d0e65697af..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/Config.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.meter; - -import org.osgi.service.metatype.annotations.AttributeDefinition; -import org.osgi.service.metatype.annotations.ObjectClassDefinition; - -import io.openems.edge.meter.api.MeterType; - -@ObjectClassDefinition(// - name = "MR Gridcon Meter", // - description = "Implements a meter using the CCU values from gridcon") -@interface Config { - - @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") - String id() default "meter0"; - - @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 = "Meter-Type", description = "What is measured by this Meter?") - MeterType type() default MeterType.GRID; - - @AttributeDefinition(name = "Gridcon-ID", description = "ID of the related gridcon component") - String gridcon_id() default "gridcon0"; - - String webconsole_configurationFactory_nameHint() default "MR Gridcon Meter [{id}]"; -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/MeterGridcon.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/MeterGridcon.java deleted file mode 100644 index a02bcaea57f..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/MeterGridcon.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.meter; - -import org.osgi.service.event.EventHandler; - -import io.openems.edge.common.channel.Doc; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.meter.api.ElectricityMeter; - -public interface MeterGridcon extends ElectricityMeter, OpenemsComponent, ModbusSlave, EventHandler { - - public enum ChannelId implements io.openems.edge.common.channel.ChannelId { - ; - private final Doc doc; - - private ChannelId(Doc doc) { - this.doc = doc; - } - - public Doc doc() { - return this.doc; - } - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/MeterGridconImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/MeterGridconImpl.java deleted file mode 100644 index 5974a3142b7..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/meter/MeterGridconImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.meter; - -import org.osgi.service.cm.ConfigurationAdmin; -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.event.Event; -import org.osgi.service.event.EventHandler; -import org.osgi.service.event.propertytypes.EventTopics; -import org.osgi.service.metatype.annotations.Designate; - -import io.openems.common.channel.AccessMode; -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.AbstractOpenemsComponent; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.event.EdgeEventConstants; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.common.modbusslave.ModbusSlaveTable; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.meter.api.ElectricityMeter; -import io.openems.edge.meter.api.MeterType; - -/** - * Implements a meter using values from a gridcon. - */ -@Designate(ocd = Config.class, factory = true) -@Component(// - name = "Meter.Gridcon", // - immediate = true, // - configurationPolicy = ConfigurationPolicy.REQUIRE // -) -@EventTopics({ // - EdgeEventConstants.TOPIC_CYCLE_BEFORE_PROCESS_IMAGE // -}) -public class MeterGridconImpl extends AbstractOpenemsComponent - implements MeterGridcon, ElectricityMeter, OpenemsComponent, ModbusSlave, EventHandler { - - @Reference - private ConfigurationAdmin cm; - - @Reference - private ComponentManager componentManager; - - private MeterType meterType = MeterType.GRID; - private String gridconId; - - public MeterGridconImpl() { - super(// - OpenemsComponent.ChannelId.values(), // - ElectricityMeter.ChannelId.values(), // - MeterGridcon.ChannelId.values() // - ); - } - - @Activate - private void activate(ComponentContext context, Config config) { - this.meterType = config.type(); - super.activate(context, config.id(), config.alias(), config.enabled()); - this.gridconId = config.gridcon_id(); - } - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public MeterType getMeterType() { - return this.meterType; - } - - @Override - public void handleEvent(Event event) { - if (!isEnabled()) { - return; - } - switch (event.getTopic()) { - case EdgeEventConstants.TOPIC_CYCLE_BEFORE_PROCESS_IMAGE: - this.fillChannels(); - break; - } - } - - private void fillChannels() { - try { - GridconPcs gridconPcs = this.componentManager.getComponent(this.gridconId); - - if (gridconPcs == null) { - return; - } - - _setCurrentL1((int) (gridconPcs.getCurrentL1Grid() * 1000.0)); - _setCurrentL2((int) (gridconPcs.getCurrentL2Grid() * 1000.0)); - _setCurrentL3((int) (gridconPcs.getCurrentL3Grid() * 1000.0)); - _setCurrent((int) (gridconPcs.getCurrentLNGrid() * 1000.0)); // TODO correct?! ;) - - _setActivePowerL1((int) (gridconPcs.getActivePowerL1Grid())); - _setActivePowerL2((int) (gridconPcs.getActivePowerL2Grid())); - _setActivePowerL3((int) (gridconPcs.getActivePowerL3Grid())); - _setActivePower((int) (gridconPcs.getActivePowerSumGrid())); - - _setReactivePowerL1((int) (gridconPcs.getReactivePowerL1Grid())); - _setReactivePowerL2((int) (gridconPcs.getReactivePowerL2Grid())); - _setReactivePowerL3((int) (gridconPcs.getReactivePowerL3Grid())); - _setReactivePower((int) (gridconPcs.getReactivePowerSumGrid())); - - } catch (OpenemsNamedException e) { - System.out.println("Error while reading meter values from gridcon!\n" + e.getMessage()); - } - - } - - @Override - public String debugLog() { - return "L:" + this.getActivePower().asString(); - } - - @Override - public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode) { - return new ModbusSlaveTable(// - OpenemsComponent.getModbusSlaveNatureTable(accessMode), // - ElectricityMeter.getModbusSlaveNatureTable(accessMode) // - ); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/Config.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/Config.java deleted file mode 100644 index 35445befcbd..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/Config.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.ongrid; - -import org.osgi.service.metatype.annotations.AttributeDefinition; -import org.osgi.service.metatype.annotations.ObjectClassDefinition; - -@ObjectClassDefinition(// - name = "MR Gridcon ESS On Grid", // - description = "ESS MR Gridcon PCS on grid variant" // -) -@interface Config { - - @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") - String id() default "ess0"; - - @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 = "Gridcon-ID", description = "ID of Gridcon.") - String gridcon_id() default "gridcon0"; - - @AttributeDefinition(name = "Battery-A-ID", description = "ID of Battery A.") - String bms_a_id() default "bms0"; - - @AttributeDefinition(name = "Battery-B-ID", description = "ID of Battery B.") - String bms_b_id() default ""; - - @AttributeDefinition(name = "Battery-C-ID", description = "ID of Battery C.") - String bms_c_id() default ""; - - @AttributeDefinition(name = "Enable IPU 1", description = "IPU 1 is enabled") - boolean enableIpu1() default true; - - @AttributeDefinition(name = "Enable IPU 2", description = "IPU 2 is enabled") - boolean enableIpu2() default false; - - @AttributeDefinition(name = "Enable IPU 3", description = "IPU 3 is enabled") - boolean enableIpu3() default false; - - @AttributeDefinition(name = "Offset Current", description = "An offset current is put on the rack with the highest cell voltage") - float offsetCurrent() default 0; - - // @AttributeDefinition(name = "Parameter Set", description = "Parameter Set") - // ParameterSet parameterSet() default ParameterSet.SET_1; - - @AttributeDefinition(name = "Output Gridcon Hard Reset", description = "Output for hard reset for gridcon") - String outputHardReset() default "io0/DigitalOutputM1C2"; - - String webconsole_configurationFactory_nameHint() default "MR Gridcon ESS On Grid [{id}]"; - -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/MrGridconOngrid.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/MrGridconOngrid.java deleted file mode 100644 index 2ff0ceb4836..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/MrGridconOngrid.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.ongrid; - -import org.osgi.service.event.EventHandler; - -import io.openems.edge.common.channel.Doc; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.ess.api.ManagedSymmetricEss; -import io.openems.edge.ess.api.SymmetricEss; -import io.openems.edge.ess.mr.gridcon.state.ongrid.OnGridState; - -public interface MrGridconOngrid - extends ManagedSymmetricEss, SymmetricEss, ModbusSlave, OpenemsComponent, EventHandler { - - public enum ChannelId implements io.openems.edge.common.channel.ChannelId { - STATE_MACHINE(Doc.of(OnGridState.values()).text("Current StateObject of StateObject-Machine")); - - private final Doc doc; - - private ChannelId(Doc doc) { - this.doc = doc; - } - - @Override - public Doc doc() { - return this.doc; - } - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/MrGridconOngridImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/MrGridconOngridImpl.java deleted file mode 100644 index d9a2169d20a..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/ongrid/MrGridconOngridImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.ongrid; - -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.event.Event; -import org.osgi.service.event.EventHandler; -import org.osgi.service.event.propertytypes.EventTopics; -import org.osgi.service.metatype.annotations.Designate; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.event.EdgeEventConstants; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.common.sum.GridMode; -import io.openems.edge.ess.api.ManagedSymmetricEss; -import io.openems.edge.ess.api.SymmetricEss; -import io.openems.edge.ess.mr.gridcon.EssGridcon; -import io.openems.edge.ess.mr.gridcon.state.ongrid.OnGridState; -import io.openems.edge.ess.power.api.Power; - -@Designate(ocd = Config.class, factory = true) -@Component(// - name = "MR.Gridcon.Ongrid", // - immediate = true, // - configurationPolicy = ConfigurationPolicy.REQUIRE // -) -@EventTopics({ // - EdgeEventConstants.TOPIC_CYCLE_AFTER_PROCESS_IMAGE, // - EdgeEventConstants.TOPIC_CYCLE_BEFORE_PROCESS_IMAGE // -}) -public class MrGridconOngridImpl extends EssGridcon - implements MrGridconOngrid, ManagedSymmetricEss, SymmetricEss, ModbusSlave, OpenemsComponent, EventHandler { - - @Reference - private ComponentManager componentManager; - - @Reference - private Power power; - - private Config config; - - public MrGridconOngridImpl() { - super(MrGridconOngrid.ChannelId.values()); - } - - @Activate - private void activate(ComponentContext context, Config c) throws OpenemsNamedException { - this.config = c; - MrGridconOngridImpl.super.activate(context, c.id(), c.alias(), c.enabled(), c.gridcon_id(), c.bms_a_id(), - c.bms_b_id(), c.bms_c_id(), c.offsetCurrent()); - this.checkConfiguration(this.config); - } - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public void handleEvent(Event event) { - super.handleEvent(event); - } - - protected void calculateGridMode() throws IllegalArgumentException, OpenemsNamedException { - GridMode gridMode = GridMode.ON_GRID; - _setGridMode(gridMode); - } - - protected void checkConfiguration(Config config) throws OpenemsException { - // TODO checks - } - - @Override - public Power getPower() { - return this.power; - } - - @Override - protected ComponentManager getComponentManager() { - return this.componentManager; - } - - @Override - protected io.openems.edge.ess.mr.gridcon.StateObject getFirstGeneralStateObjectUndefined() { - return stateController.getGeneralStateObject(OnGridState.UNDEFINED); - } - - @Override - protected void initializeStateController(String gridconPcs, String b1, String b2, String b3) { - this.stateController.initOnGrid(this.componentManager, gridconPcs, b1, b2, b3, this.config.enableIpu1(), - this.config.enableIpu2(), this.config.enableIpu3(), - /* config.parameterSet(), */ this.config.outputHardReset(), this.config.offsetCurrent()); - } - - @Override - protected void writeStateMachineToChannel() { - this.channel(MrGridconOngrid.ChannelId.STATE_MACHINE).setNextValue(this.mainStateObject.getState()); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/Config.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/Config.java deleted file mode 100644 index 0023bb00865..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/Config.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.onoffgrid; - -import org.osgi.service.metatype.annotations.AttributeDefinition; -import org.osgi.service.metatype.annotations.ObjectClassDefinition; - -import io.openems.edge.ess.mr.gridcon.enums.ParameterSet; - -@ObjectClassDefinition(// - name = "MR Gridcon ESS On-Off-Grid", // - description = "ESS MR Gridcon PCS on off grid variant" // -) -@interface Config { - - @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") - String id() default "ess0"; - - @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 = "Gridcon-ID", description = "ID of Gridcon.") - String gridcon_id() default "gridcon0"; - - @AttributeDefinition(name = "Battery-A-ID", description = "ID of Battery A.") - String bms_a_id() default "bms0"; - - @AttributeDefinition(name = "Battery-B-ID", description = "ID of Battery B.") - String bms_b_id() default ""; - - @AttributeDefinition(name = "Battery-C-ID", description = "ID of Battery C.") - String bms_c_id() default ""; - - @AttributeDefinition(name = "Meter ID", description = "ID of Meter.") - String meter_id() default "meter0"; - - @AttributeDefinition(name = "Enable IPU 1", description = "IPU 1 is enabled") - boolean enableIpu1() default true; - - @AttributeDefinition(name = "Enable IPU 2", description = "IPU 2 is enabled") - boolean enableIpu2() default false; - - @AttributeDefinition(name = "Enable IPU 3", description = "IPU 3 is enabled") - boolean enableIpu3() default false; - - @AttributeDefinition(name = "Offset Current", description = "An offset current is put on the rack with the highest cell voltage") - float offsetCurrent() default 0; - - @AttributeDefinition(name = "Parameter Set", description = "Parameter Set") - ParameterSet parameterSet() default ParameterSet.SET_1; - - @AttributeDefinition(name = "Input NA 1", description = "Input for NA Protection 1") - String inputNaProtection1() default "io0/DigitalInputM1C1"; - - @AttributeDefinition(name = "Invert Input NA 1", description = "Flag if digital input NA 1 is inverted") - boolean isNaProtection1Inverted() default false; - - @AttributeDefinition(name = "Input NA 2", description = "Input for NA Protection 2") - String inputNaProtection2() default "io0/DigitalInputM1C2"; - - @AttributeDefinition(name = "Invert Input NA 2", description = "Flag if digital input NA 2 is inverted") - boolean isNaProtection2Inverted() default false; - - @AttributeDefinition(name = "Input Sync Device Bridge", description = "Input for sync device bridge") - String inputSyncDeviceBridge() default "io0/DigitalInputM2C1"; - - @AttributeDefinition(name = "Invert Input Sync Device Bridge", description = "Flag if digital input sync device bridge is inverted") - boolean isInputSyncDeviceBridgeInverted() default false; - - @AttributeDefinition(name = "Output Sync Device Bridge", description = "Output for sync device bridge") - String outputSyncDeviceBridge() default "io0/DigitalOutputM1C1"; - - @AttributeDefinition(name = "Invert Output Sync Device Bridge", description = "Flag if digital output sync device bridge is inverted") - boolean isOutputSyncDeviceBridgeInverted() default false; - - @AttributeDefinition(name = "Output Gridcon Hard Reset", description = "Output for hard reset for gridcon") - String outputHardReset() default "io0/DigitalOutputM1C2"; - - @AttributeDefinition(name = "Invert Output Hard Reset", description = "Flag if digital output for hard reset is inverted") - boolean isOutputHardResetInverted() default false; - - @AttributeDefinition(name = "Target Frequency On Grid", description = "Target frequency in on grid mode") - float targetFrequencyOnGrid() default 52.7f; - - @AttributeDefinition(name = "Target Frequency Off Grid", description = "Target frequency in off grid mode") - float targetFrequencyOffGrid() default 50.6f; - - @AttributeDefinition(name = "Delta Frequency For Sync", description = "Delta Frequency For Sync") - float deltaFrequency() default 0.2f; - - @AttributeDefinition(name = "Delta Voltage For Sync", description = "Delta Voltage For Sync") - float deltaVoltage() default 5.0f; - - String webconsole_configurationFactory_nameHint() default "MR Gridcon ESS On-Off-Grid [{id}]"; -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/MrGridconOnOffgrid.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/MrGridconOnOffgrid.java deleted file mode 100644 index c6653cfb1ec..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/MrGridconOnOffgrid.java +++ /dev/null @@ -1,31 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.onoffgrid; - -import org.osgi.service.event.EventHandler; - -import io.openems.edge.common.channel.Doc; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.ess.api.ManagedSymmetricEss; -import io.openems.edge.ess.api.SymmetricEss; -import io.openems.edge.ess.mr.gridcon.state.onoffgrid.OnOffGridState; - -public interface MrGridconOnOffgrid - extends ManagedSymmetricEss, SymmetricEss, ModbusSlave, OpenemsComponent, EventHandler { - - public enum ChannelId implements io.openems.edge.common.channel.ChannelId { - STATE_MACHINE(Doc.of(OnOffGridState.values()) // - .text("Current StateObject of StateObject-Machine")); - - private final Doc doc; - - private ChannelId(Doc doc) { - this.doc = doc; - } - - @Override - public Doc doc() { - return this.doc; - } - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/MrGridconOnOffgridImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/MrGridconOnOffgridImpl.java deleted file mode 100644 index e0445d82c24..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/onoffgrid/MrGridconOnOffgridImpl.java +++ /dev/null @@ -1,148 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.onoffgrid; - -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.event.Event; -import org.osgi.service.event.EventHandler; -import org.osgi.service.event.propertytypes.EventTopics; -import org.osgi.service.metatype.annotations.Designate; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.exceptions.OpenemsException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.event.EdgeEventConstants; -import io.openems.edge.common.modbusslave.ModbusSlave; -import io.openems.edge.common.sum.GridMode; -import io.openems.edge.ess.api.ManagedSymmetricEss; -import io.openems.edge.ess.api.SymmetricEss; -import io.openems.edge.ess.mr.gridcon.EssGridcon; -import io.openems.edge.ess.mr.gridcon.StateObject; -import io.openems.edge.ess.mr.gridcon.state.onoffgrid.DecisionTableCondition; -import io.openems.edge.ess.mr.gridcon.state.onoffgrid.DecisionTableConditionImpl; -import io.openems.edge.ess.mr.gridcon.state.onoffgrid.OnOffGridState; -import io.openems.edge.ess.power.api.Power; - -@Designate(ocd = Config.class, factory = true) -@Component(// - name = "MR.Gridcon.OnOffgrid", // - immediate = true, // - configurationPolicy = ConfigurationPolicy.REQUIRE // -) -@EventTopics({ // - EdgeEventConstants.TOPIC_CYCLE_AFTER_PROCESS_IMAGE, // - EdgeEventConstants.TOPIC_CYCLE_BEFORE_PROCESS_IMAGE // -}) -public class MrGridconOnOffgridImpl extends EssGridcon - implements MrGridconOnOffgrid, ManagedSymmetricEss, SymmetricEss, ModbusSlave, OpenemsComponent, EventHandler { - - @Reference - private ComponentManager componentManager; - - @Reference - private Power power; - - private Config config; - - public MrGridconOnOffgridImpl() { - super(MrGridconOnOffgrid.ChannelId.values()); - } - - @Activate - private void activate(ComponentContext context, Config c) throws OpenemsNamedException { - this.config = c; - MrGridconOnOffgridImpl.super.activate(context, c.id(), c.alias(), c.enabled(), c.gridcon_id(), c.bms_a_id(), - c.bms_b_id(), c.bms_c_id(), c.offsetCurrent()); - this.checkConfiguration(this.config); - } - - @Deactivate - protected void deactivate() { - super.deactivate(); - } - - @Override - public void handleEvent(Event event) { - super.handleEvent(event); - } - - protected void calculateGridMode() throws IllegalArgumentException, OpenemsNamedException { - // TODO - GridMode gridMode = GridMode.UNDEFINED; - - if (this.mainStateObject != null) { - if (// - OnOffGridState.ON_GRID_MODE == this.mainStateObject.getState()// - ) { - gridMode = GridMode.ON_GRID; - } else if (OnOffGridState.OFF_GRID_MODE == this.mainStateObject.getState()) { - gridMode = GridMode.OFF_GRID; - } - } - - _setGridMode(gridMode); - } - - @Override - protected void writeStateMachineToChannel() { - this.channel(MrGridconOnOffgrid.ChannelId.STATE_MACHINE).setNextValue(this.mainStateObject.getState()); - } - - protected void checkConfiguration(Config config) throws OpenemsException { - // TODO checks - } - - @Override - public Power getPower() { - return this.power; - } - - @Override - protected ComponentManager getComponentManager() { - return this.componentManager; - } - - @Override - protected StateObject getFirstGeneralStateObjectUndefined() { - return stateController.getGeneralStateObject(OnOffGridState.UNDEFINED); - } - - @Override - protected void initializeStateController(String gridconPcs, String b1, String b2, String b3) { - DecisionTableCondition tableCondition = new DecisionTableConditionImpl(this.componentManager, gridconPcs, - this.config.meter_id(), this.config.inputNaProtection1(), this.config.inputNaProtection2(), - this.config.inputSyncDeviceBridge(), this.config.isNaProtection1Inverted(), - this.config.isNaProtection2Inverted(), this.config.isInputSyncDeviceBridgeInverted()); - stateController.initDecisionTableCondition(tableCondition); - stateController.initOnOffGrid(// - this.componentManager, // - gridconPcs, // - b1, // - b2, // - b3, // - this.config.enableIpu1(), // - this.config.enableIpu2(), // - this.config.enableIpu3(), // - this.config.parameterSet(), // - this.config.inputNaProtection1(), // - this.config.isNaProtection1Inverted(), // - this.config.inputNaProtection2(), // - this.config.isNaProtection2Inverted(), // - this.config.inputSyncDeviceBridge(), // - this.config.isInputSyncDeviceBridgeInverted(), // - this.config.outputSyncDeviceBridge(), // - this.config.isOutputSyncDeviceBridgeInverted(), // - this.config.outputHardReset(), // - this.config.isOutputHardResetInverted(), // - this.config.targetFrequencyOnGrid(), // - this.config.targetFrequencyOffGrid(), // - this.config.meter_id(), // - this.config.deltaFrequency(), // - this.config.deltaVoltage(), // - this.config.offsetCurrent()); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/BaseState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/BaseState.java deleted file mode 100644 index 2c85e9d9b29..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/BaseState.java +++ /dev/null @@ -1,233 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import java.time.LocalDateTime; -import java.util.BitSet; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.types.ChannelAddress; -import io.openems.edge.battery.api.Battery; -import io.openems.edge.common.channel.BooleanWriteChannel; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.Helper; -import io.openems.edge.ess.mr.gridcon.WeightingHelper; - -public abstract class BaseState implements GridconStateObject { - - private ComponentManager manager; - protected String gridconPcsId; - protected String battery1Id; - protected String battery2Id; - protected String battery3Id; - protected String hardRestartRelayAdress; - - public BaseState(ComponentManager manager, String gridconPcsId, String b1Id, String b2Id, String b3Id, - String hardRestartRelayAdress) { - this.manager = manager; - this.gridconPcsId = gridconPcsId; - this.battery1Id = b1Id; - this.battery2Id = b2Id; - this.battery3Id = b3Id; - this.hardRestartRelayAdress = hardRestartRelayAdress; - } - - protected boolean isNextStateUndefined() { - if (!this.getGridconPcs().isCommunicationBroken() && !this.isGridconDefined()) { - System.out.println("Gridcon is undefined!"); - return true; - } - if (!this.isAtLeastOneBatteryDefined()) { - System.out.println("All Batteries are undefined!"); - return true; - } - return false; - } - - private boolean isAtLeastOneBatteryDefined() { - boolean undefined = true; - - if (this.getBattery1() != null) { - undefined = undefined && Helper.isUndefined(this.getBattery1()); - } - if (this.getBattery2() != null) { - undefined = undefined && Helper.isUndefined(this.getBattery2()); - } - if (this.getBattery3() != null) { - undefined = undefined && Helper.isUndefined(this.getBattery3()); - } - - return !undefined; - } - - private boolean isGridconDefined() { - boolean defined = false; - - if (this.getGridconPcs() != null) { - defined = !this.getGridconPcs().isUndefined(); - } - - return defined; - } - - protected boolean isNextStateError() { - if (this.getGridconPcs() != null - && (this.getGridconPcs().isError() || this.getGridconPcs().isCommunicationBroken())) { - return true; - } - - if (this.getBattery1() != null && this.getBattery1().hasFaults()) { - return true; - } - - if (this.getBattery2() != null && this.getBattery2().hasFaults()) { - return true; - } - - if (this.getBattery3() != null && this.getBattery3().hasFaults()) { - return true; - } - - return false; - } - - protected boolean isNextStateStopped() { - return this.getGridconPcs() != null && this.getGridconPcs().isStopped(); - } - - protected boolean isNextStateRunning() { - return (this.getGridconPcs() != null && this.getGridconPcs().isRunning()); - } - - protected void startBatteries() { - if (this.getBattery1() != null) { - if (!this.getBattery1().isStarted()) { - try { - this.getBattery1().start(); - } catch (OpenemsNamedException e) { - System.out.println( - "Was not able to start battery " + this.getBattery1().id() + "!\n" + e.getMessage()); - } - } - } - if (this.getBattery2() != null) { - if (!this.getBattery2().isStarted()) { - try { - this.getBattery2().start(); - } catch (OpenemsNamedException e) { - System.out.println( - "Was not able to start battery " + this.getBattery2().id() + "!\n" + e.getMessage()); - } - } - } - if (this.getBattery3() != null) { - if (!this.getBattery3().isStarted()) { - try { - this.getBattery3().start(); - } catch (OpenemsNamedException e) { - System.out.println( - "Was not able to start battery " + this.getBattery3().id() + "!\n" + e.getMessage()); - } - } - } - } - - protected boolean isBatteriesStarted() { - boolean running = true; - if (this.getBattery1() != null) { - running = running && this.getBattery1().isStarted(); - } - if (this.getBattery2() != null) { - running = running && this.getBattery2().isStarted(); - } - if (this.getBattery3() != null) { - running = running && this.getBattery3().isStarted(); - } - return running; - } - - protected void setStringControlMode() { - int weightingMode = WeightingHelper.getStringControlMode(this.getBattery1(), this.getBattery2(), - this.getBattery3()); - this.getGridconPcs().setStringControlMode(weightingMode); - } - - protected void setStringWeighting() { - float activePower = this.getGridconPcs().getActivePowerPreset(); - - Float[] weightings = WeightingHelper.getWeighting(activePower, this.getBattery1(), this.getBattery2(), - this.getBattery3()); - - this.getGridconPcs().setWeightStringA(weightings[0]); - this.getGridconPcs().setWeightStringB(weightings[1]); - this.getGridconPcs().setWeightStringC(weightings[2]); - } - - protected void setDateAndTime() { - int date = this.convertToInteger(this.generateDate(LocalDateTime.now())); - this.getGridconPcs().setSyncDate(date); - int time = this.convertToInteger(this.generateTime(LocalDateTime.now())); - this.getGridconPcs().setSyncTime(time); - } - - private BitSet generateDate(LocalDateTime time) { - byte dayOfWeek = (byte) time.getDayOfWeek().ordinal(); - byte day = (byte) time.getDayOfMonth(); - byte month = (byte) time.getMonth().getValue(); - byte year = (byte) (time.getYear() - 2000); // 0 == year 2000 in the protocol - - return BitSet.valueOf(new byte[] { day, dayOfWeek, year, month }); - } - - private BitSet generateTime(LocalDateTime time) { - byte seconds = (byte) time.getSecond(); - byte minutes = (byte) time.getMinute(); - byte hours = (byte) time.getHour(); - // second byte is unused - return BitSet.valueOf(new byte[] { seconds, 0, hours, minutes }); - } - - private int convertToInteger(BitSet bitSet) { - long[] l = bitSet.toLongArray(); - if (l.length == 0) { - return 0; - } - return (int) l[0]; - } - - GridconPcs getGridconPcs() { - return this.getComponent(this.gridconPcsId); - } - - protected void setHardRestartRelay(boolean val) { - try { - ChannelAddress address = ChannelAddress.fromString(this.hardRestartRelayAdress); - BooleanWriteChannel outputHardResetChannel = this.manager.getChannel(address); - outputHardResetChannel.setNextWriteValue(val); - } catch (OpenemsNamedException e) { - System.out.println("Failed to set the hard reset"); - } - } - - Battery getBattery1() { - return this.getComponent(this.battery1Id); - } - - Battery getBattery2() { - return this.getComponent(this.battery2Id); - } - - Battery getBattery3() { - return this.getComponent(this.battery3Id); - } - - T getComponent(String id) { - T component = null; - try { - component = this.manager.getComponent(id); - } catch (OpenemsNamedException e) { - System.out.println(e); - } - return component; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Error.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Error.java deleted file mode 100644 index f5df0803e51..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Error.java +++ /dev/null @@ -1,346 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Collection; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.channel.ChannelId; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.enums.ErrorCodeChannelId0; -import io.openems.edge.ess.mr.gridcon.enums.ErrorCodeChannelId1; -import io.openems.edge.ess.mr.gridcon.enums.ErrorDoc; -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; - -public class Error extends BaseState { - - // TODO hard restart zeit für jeden durchlauf mit einem faktor z.b. 2 - // multiplizieren --> - // 1 Versuch nach 1 minute, 2. versuch nach 2 min., 3 vers. nach 4 min...usw.. - // - - private static final long WAITING_TIME_ERRORS = 20; - private static final long WAITING_TIME_HARD_RESTART = 70; - private static final float MAX_ALLOWED_DELTA_LINK_VOLTAGE = 20; - private static final long COMMUNICATION_TIMEOUT = 70; // After 70 seconds gridcon should be ready - private final Logger log = LoggerFactory.getLogger(Error.class); - - private boolean enableIpu1; - private boolean enableIpu2; - private boolean enableIpu3; - - private long secondsToWait = WAITING_TIME_ERRORS; - private LocalDateTime communicationBrokenSince; - - public Error(ComponentManager manager, String gridconPcsId, String b1Id, String b2Id, String b3Id, - boolean enableIpu1, boolean enableIpu2, boolean enableIpu3, // ParameterSet parameterSet, - String hardRestartRelayAdress) { - super(manager, gridconPcsId, b1Id, b2Id, b3Id, hardRestartRelayAdress); - this.enableIpu1 = enableIpu1; - this.enableIpu2 = enableIpu2; - this.enableIpu3 = enableIpu3; - // this.parameterSet = parameterSet; - } - - @Override - public IState getState() { - return GridconState.ERROR; - } - - @Override - public IState getNextState() { - // According to the state machine the next state can only be STOPPED, ERROR or - // UNDEFINED - - if (this.errorHandlingState != null) { - return GridconState.ERROR; - } - - if (this.isNextStateUndefined()) { - return GridconState.UNDEFINED; - } - - if (this.isNextStateStopped()) { - return GridconState.STOPPED; - } - - return GridconState.ERROR; - } - - @Override - public void act(GridconSettings settings) { - this.log.info("Handle Errors!"); - - setStringWeighting(); - setStringControlMode(); - setDateAndTime(); - - if (!isBatteriesStarted()) { - System.out.println("In error --> start batteries"); - this.keepSystemStopped(settings); - startBatteries(); - try { - getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - e.printStackTrace(); - } - } - - if (getGridconPcs().isCommunicationBroken() && this.errorHandlingState == null) { - System.out.println("Communication broken!"); - if (this.communicationBrokenSince == null) { - this.communicationBrokenSince = LocalDateTime.now(); - System.out.println("Comm broken --> set timestamp!"); - } - if (this.communicationBrokenSince.plusSeconds(COMMUNICATION_TIMEOUT).isAfter(LocalDateTime.now())) { - System.out.println("comm broken --> in waiting time!"); - return; - } else { - System.out.println("comm broken --> hard reset!"); - this.communicationBrokenSince = null; - this.errorHandlingState = ErrorHandlingState.HARD_RESTART; - } - } - - // handle also link voltage too low!! - if (getGridconPcs().isRunning() && this.isLinkVoltageTooLow()) { - System.out.println("In error --> link voltage too low"); - getGridconPcs().setStop(true); - try { - getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return; - } - - // first step, read number of errors, then read errors while complete error list - // is filled - - // TODO sub state machine: start -> reading errors -> acknowledging --> waiting - // for a certain period --> finished - - if (this.errorHandlingState == null) { - this.errorHandlingState = ErrorHandlingState.START; - } - - switch (this.errorHandlingState) { - case START: - this.doStartErrorHandling(settings); - break; - case READING_ERRORS: - this.doReadErrors(); - break; - case ACKNOWLEDGE: - this.doAcknowledge(settings); - break; - case WAITING: - this.doWait(); - break; - case FINISHED: - this.finishing(); - break; - case HARD_RESTART: - this.doHardRestart(); - break; - } - try { - getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - private int hardRestartCnt = 0; - - private void doHardRestart() { - System.out.println(" ---> HARD RESET <---"); - if (this.hardRestartCnt < 10) { - System.out.println(" ---> HARD RESET counting <---"); - this.hardRestartCnt++; - setHardRestartRelay(true); - } else { - System.out.println(" ---> HARD RESET get to waiting<---"); - this.hardRestartCnt = 0; - setHardRestartRelay(false); - this.errorHandlingState = ErrorHandlingState.WAITING; - this.errorsAcknowledged = LocalDateTime.now(); - this.secondsToWait = WAITING_TIME_HARD_RESTART; - } - } - - private void keepSystemStopped(GridconSettings settings) { - System.out.println("Keep system stopped!"); - getGridconPcs().setEnableIpu1(false); - getGridconPcs().setEnableIpu2(false); - getGridconPcs().setEnableIpu3(false); - getGridconPcs().disableDcDc(); - - getGridconPcs().setStop(true); - getGridconPcs().setPlay(false); - getGridconPcs().setAcknowledge(false); - - getGridconPcs().setMode(settings.getMode()); - getGridconPcs().setU0(settings.getU0()); - getGridconPcs().setF0(settings.getF0()); - getGridconPcs().setPControlMode(PControlMode.ACTIVE_POWER_CONTROL); - getGridconPcs().setQLimit(GridconPcs.Q_LIMIT); - getGridconPcs().setDcLinkVoltage(GridconPcs.DC_LINK_VOLTAGE_SETPOINT); - - // getGridconPcs().setParameterSet(parameterSet); - float maxPower = GridconPcs.MAX_POWER_PER_INVERTER; - if (this.enableIpu1) { - getGridconPcs().setPMaxChargeIpu1(maxPower); - getGridconPcs().setPMaxDischargeIpu1(-maxPower); - } - if (this.enableIpu2) { - getGridconPcs().setPMaxChargeIpu2(maxPower); - getGridconPcs().setPMaxDischargeIpu2(-maxPower); - } - if (this.enableIpu3) { - getGridconPcs().setPMaxChargeIpu3(maxPower); - getGridconPcs().setPMaxDischargeIpu3(-maxPower); - } - } - - private boolean isLinkVoltageTooLow() { - return GridconPcs.DC_LINK_VOLTAGE_SETPOINT - - getGridconPcs().getDcLinkPositiveVoltage() > MAX_ALLOWED_DELTA_LINK_VOLTAGE; - } - - private void doStartErrorHandling(GridconSettings settings) { - System.out.println("doStartErrorHandling"); - // Error Count = anzahl der Fehler - // Error code = aktueller fehler im channel - // error code feedback -> channel fürs rückschreiben der fehler damit im error - // code der nächste auftaucht - - this.errorCollection = new ArrayList(); - this.errorCount = getGridconPcs().getErrorCount(); - this.errorHandlingState = ErrorHandlingState.READING_ERRORS; - // getGridconPCS().setStop(true); - this.keepSystemStopped(settings); - } - - private void doReadErrors() { - System.out.println("doReadErrors"); - int currentErrorCode = getGridconPcs().getErrorCode(); - if (!this.errorCollection.contains(currentErrorCode)) { - this.errorCollection.add(currentErrorCode); - getGridconPcs().setErrorCodeFeedback(currentErrorCode); - } else { - getGridconPcs().setErrorCodeFeedback(currentErrorCode); - } - - if (this.errorCollection.size() >= this.errorCount) { - this.errorHandlingState = ErrorHandlingState.ACKNOWLEDGE; - // write errors - this.printErrors(this.errorCollection); - } - } - - private void printErrors(Collection errorCollection) { - for (int i : errorCollection) { - this.printError(i); - } - } - - private void printError(int errorCode) { - for (ErrorCodeChannelId0 id : ErrorCodeChannelId0.values()) { - this.printErrorIfCorresponding(errorCode, id); - } - for (ErrorCodeChannelId1 id : ErrorCodeChannelId1.values()) { - this.printErrorIfCorresponding(errorCode, id); - } - } - - private void printErrorIfCorresponding(int errorCode, ChannelId id) { - ErrorDoc errorDoc = (ErrorDoc) id.doc(); - if (errorDoc.getCode() == errorCode) { - System.out.println(errorDoc.getText()); - } - } - - private void doAcknowledge(GridconSettings settings) { - System.out.println("doAcknowledge"); - this.errorsAcknowledged = LocalDateTime.now(); - this.errorHandlingState = ErrorHandlingState.WAITING; - this.secondsToWait = WAITING_TIME_ERRORS; - - getGridconPcs().setEnableIpu1(false); - getGridconPcs().setEnableIpu2(false); - getGridconPcs().setEnableIpu3(false); - getGridconPcs().disableDcDc(); - - getGridconPcs().setStop(true); - getGridconPcs().setPlay(false); - getGridconPcs().setAcknowledge(true); - - getGridconPcs().setMode(settings.getMode()); - getGridconPcs().setU0(settings.getU0()); - getGridconPcs().setF0(settings.getF0()); - getGridconPcs().setPControlMode(PControlMode.ACTIVE_POWER_CONTROL); - getGridconPcs().setQLimit(GridconPcs.Q_LIMIT); - getGridconPcs().setDcLinkVoltage(GridconPcs.DC_LINK_VOLTAGE_SETPOINT); - - // getGridconPcs().setParameterSet(parameterSet); - float maxPower = GridconPcs.MAX_POWER_PER_INVERTER; - if (this.enableIpu1) { - getGridconPcs().setPMaxChargeIpu1(maxPower); - getGridconPcs().setPMaxDischargeIpu1(-maxPower); - } - if (this.enableIpu2) { - getGridconPcs().setPMaxChargeIpu2(maxPower); - getGridconPcs().setPMaxDischargeIpu2(-maxPower); - } - if (this.enableIpu3) { - getGridconPcs().setPMaxChargeIpu3(maxPower); - getGridconPcs().setPMaxDischargeIpu3(-maxPower); - } - } - - private void finishing() { - System.out.println("finishing"); - // reset all maps etc. - - this.errorCount = null; - this.errorCollection = null; - this.errorHandlingState = null; - this.errorsAcknowledged = null; - - } - - private void doWait() { - System.out.println("doWait"); - - if (this.errorsAcknowledged.plusSeconds(this.secondsToWait).isBefore(LocalDateTime.now())) { - - if (getGridconPcs().isError()) { - System.out.println("Gridcon has still errors.... :-( start from the beginning"); - this.finishing(); // to reset all maps etc... - } - - this.errorHandlingState = ErrorHandlingState.FINISHED; - } else { - System.out.println("we are still waiting"); - } - - } - - private Integer errorCount = null; - private Collection errorCollection = null; - private ErrorHandlingState errorHandlingState = null; - private LocalDateTime errorsAcknowledged = null; - - private enum ErrorHandlingState { - START, READING_ERRORS, ACKNOWLEDGE, WAITING, FINISHED, HARD_RESTART - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/GridconState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/GridconState.java deleted file mode 100644 index 18d7a9410ad..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/GridconState.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import io.openems.common.types.OptionsEnum; -import io.openems.edge.ess.mr.gridcon.IState; - -public enum GridconState implements IState { - UNDEFINED(-1, "Undefined"), // - STOPPED(0, "Stopped"), // - RUN(1, "Run"), // - ERROR(3, "Error"), // - ; - - private final int value; - private final String name; - - private GridconState(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; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/GridconStateObject.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/GridconStateObject.java deleted file mode 100644 index c023ca730c9..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/GridconStateObject.java +++ /dev/null @@ -1,32 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public interface GridconStateObject { - /** - * Returns the corresponding state. - * - * @return the state - */ - IState getState(); - - /** - * Depending on the circumstances the next state according to the state machine - * is returned. - * - * @return the next state - */ - IState getNextState(); - - /** - * in this method everything should be executed what there is to do in this - * state. - * - * @param gridconSettings the {@link GridconSettings} - * @throws OpenemsNamedException on error - */ - void act(GridconSettings gridconSettings) throws OpenemsNamedException; - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Run.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Run.java deleted file mode 100644 index 2ba6e9b5526..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Run.java +++ /dev/null @@ -1,230 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.battery.api.Battery; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconPcsImpl; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; - -public class Run extends BaseState { - - private final Logger log = LoggerFactory.getLogger(Run.class); - private boolean enableIpu1; - private boolean enableIpu2; - private boolean enableIpu3; - private float offsetCurrent; - // private ParameterSet parameterSet; - - public Run(ComponentManager manager, String gridconPcsId, String b1Id, String b2Id, String b3Id, boolean enableIpu1, - boolean enableIpu2, boolean enableIpu3, // ParameterSet parameterSet, - String hardRestartRelayAdress, float offsetCurrent) { - super(manager, gridconPcsId, b1Id, b2Id, b3Id, hardRestartRelayAdress); - this.enableIpu1 = enableIpu1; - this.enableIpu2 = enableIpu2; - this.enableIpu3 = enableIpu3; - // this.parameterSet = parameterSet; - this.offsetCurrent = offsetCurrent; - } - - @Override - public IState getState() { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.RUN; - } - - @Override - public IState getNextState() { - // According to the state machine the next state can only be ERROR, RUN - if (isNextStateUndefined()) { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.UNDEFINED; - } - if (isNextStateError()) { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.ERROR; - } - - if (isNextStateStopped()) { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.STOPPED; - } - - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.RUN; - } - - @Override - public void act(GridconSettings settings) { - this.log.info("run() -> Set all parameters to gridcon!"); - - // sometimes link voltage can be too low unrecognized by gridcon, i.e. no error - // message - // in case of that, restart the system, but this should be detected by isError() - // function - - this.checkBatteries(); - this.setRunParameters(settings); - this.setStringWeighting(); - this.setOffsetCurrent(); - this.setStringControlMode(); - this.setDateAndTime(); - try { - this.getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - this.log.error(e.getMessage()); - } - } - - private void checkBatteries() { - if (getBattery1() != null) { - if (!this.getBattery1().isStarted() && !getBattery1().hasFaults()) { - try { - this.getBattery1().start(); - } catch (OpenemsNamedException e) { - System.out.println( - "Was not able to start battery " + this.getBattery1().id() + "!\n" + e.getMessage()); - } - } - } - if (getBattery2() != null) { - if (!this.getBattery2().isStarted() && !getBattery2().hasFaults()) { - try { - this.getBattery2().start(); - } catch (OpenemsNamedException e) { - System.out.println( - "Was not able to start battery " + this.getBattery2().id() + "!\n" + e.getMessage()); - } - } - } - if (getBattery3() != null) { - if (!this.getBattery3().isStarted() && !getBattery3().hasFaults()) { - try { - this.getBattery3().start(); - } catch (OpenemsNamedException e) { - System.out.println( - "Was not able to start battery " + this.getBattery3().id() + "!\n" + e.getMessage()); - } - } - } - } - - private void setOffsetCurrent() { - if (this.hasBattery1HighestCellVoltage()) { - this.getGridconPcs().setIRefStringA(this.offsetCurrent); - this.getGridconPcs().setIRefStringB(0f); - this.getGridconPcs().setIRefStringC(0f); - } - if (this.hasBattery2HighestCellVoltage()) { - this.getGridconPcs().setIRefStringA(0f); - this.getGridconPcs().setIRefStringB(this.offsetCurrent); - this.getGridconPcs().setIRefStringC(0f); - } - if (this.hasBattery3HighestCellVoltage()) { - this.getGridconPcs().setIRefStringA(0f); - this.getGridconPcs().setIRefStringB(0f); - this.getGridconPcs().setIRefStringC(this.offsetCurrent); - } - } - - private boolean hasBattery1HighestCellVoltage() { - if (getBattery1() == null) { // battery is not existing --> cannot have highest cell voltage - return false; - } - - if (getBattery2() == null && getBattery3() == null) { - // only this battery exists --> must have highest cell voltage - return true; - } - - if (getBattery2() == null) { // only battery one and three are existing - return this.getMaxCellVoltage(this.getBattery1()) >= this.getMaxCellVoltage(this.getBattery3()); - } - - if (getBattery3() == null) { // only battery one and two are existing - return this.getMaxCellVoltage(this.getBattery1()) >= this.getMaxCellVoltage(this.getBattery2()); - } - - return this.getMaxCellVoltage(getBattery1()) >= Math.max(this.getMaxCellVoltage(this.getBattery2()), - this.getMaxCellVoltage(getBattery3())); - } - - private boolean hasBattery2HighestCellVoltage() { - if (this.getBattery2() == null) { // battery is not existing --> cannot have highest cell voltage - return false; - } - - if (this.getBattery1() == null && this.getBattery3() == null) { - // only this battery exists --> must have highest cell voltage - return true; - } - - if (this.getBattery1() == null) { // only battery two and three are existing - return this.getMaxCellVoltage(this.getBattery2()) >= this.getMaxCellVoltage(this.getBattery3()); - } - - if (this.getBattery3() == null) { // only battery one and two are existing - return this.getMaxCellVoltage(this.getBattery2()) >= this.getMaxCellVoltage(this.getBattery1()); - } - - return this.getMaxCellVoltage(this.getBattery2()) >= Math.max(this.getMaxCellVoltage(this.getBattery1()), - this.getMaxCellVoltage(this.getBattery3())); - } - - private boolean hasBattery3HighestCellVoltage() { - if (this.getBattery3() == null) { // battery is not existing --> cannot have highest cell voltage - return false; - } - - if (this.getBattery1() == null && this.getBattery2() == null) { - // only this battery exists --> must have highest cell voltage - return true; - } - - if (this.getBattery2() == null) { // only battery one and three are existing - return this.getMaxCellVoltage(this.getBattery3()) >= this.getMaxCellVoltage(this.getBattery1()); - } - - if (this.getBattery1() == null) { // only battery two and three are existing - return this.getMaxCellVoltage(this.getBattery3()) >= this.getMaxCellVoltage(this.getBattery2()); - } - - return this.getMaxCellVoltage(this.getBattery3()) >= Math.max(this.getMaxCellVoltage(this.getBattery1()), - this.getMaxCellVoltage(this.getBattery2())); - } - - private int getMaxCellVoltage(Battery battery) { - return battery.getMaxCellVoltage().orElse(Integer.MIN_VALUE); - } - - private void setRunParameters(GridconSettings settings) { - getGridconPcs().setEnableIpu1(this.enableIpu1); - getGridconPcs().setEnableIpu2(this.enableIpu2); - getGridconPcs().setEnableIpu3(this.enableIpu3); - - // Enable DC DC - getGridconPcs().enableDcDc(); - getGridconPcs().setDcLinkVoltage(GridconPcs.DC_LINK_VOLTAGE_SETPOINT); - - getGridconPcs().setMode(settings.getMode()); - getGridconPcs().setU0(settings.getU0()); - getGridconPcs().setF0(settings.getF0()); - // getGridconPcs().setParameterSet(parameterSet); - getGridconPcs().setPControlMode(PControlMode.ACTIVE_POWER_CONTROL); - getGridconPcs().setQLimit(GridconPcs.Q_LIMIT); - - float maxPower = GridconPcsImpl.MAX_POWER_PER_INVERTER; - if (this.enableIpu1) { - this.getGridconPcs().setPMaxChargeIpu1(maxPower); - this.getGridconPcs().setPMaxDischargeIpu1(-maxPower); - } - if (this.enableIpu2) { - this.getGridconPcs().setPMaxChargeIpu2(maxPower); - this.getGridconPcs().setPMaxDischargeIpu2(-maxPower); - } - if (this.enableIpu3) { - this.getGridconPcs().setPMaxChargeIpu3(maxPower); - this.getGridconPcs().setPMaxDischargeIpu3(-maxPower); - } - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Stopped.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Stopped.java deleted file mode 100644 index 043afbbeff1..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Stopped.java +++ /dev/null @@ -1,186 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; - -public class Stopped extends BaseState { - - private final Logger log = LoggerFactory.getLogger(Stopped.class); - - private boolean enableIpu1; - private boolean enableIpu2; - private boolean enableIpu3; - // private ParameterSet parameterSet; - - public Stopped(ComponentManager manager, String gridconPcsId, String b1Id, String b2Id, String b3Id, - boolean enableIpu1, boolean enableIpu2, boolean enableIpu3, // ParameterSet parameterSet, - String hardRestartRelayAdress) { - super(manager, gridconPcsId, b1Id, b2Id, b3Id, hardRestartRelayAdress); - this.enableIpu1 = enableIpu1; - this.enableIpu2 = enableIpu2; - this.enableIpu3 = enableIpu3; - // this.parameterSet = parameterSet; - } - - @Override - public IState getState() { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.STOPPED; - } - - @Override - public IState getNextState() { - // According to the state machine the next state can only be STOPPED, ERROR, RUN - if (isNextStateUndefined()) { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.UNDEFINED; - } - if (isNextStateError()) { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.ERROR; - } - if (isBatteriesStarted() && getGridconPcs().isRunning()) { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.RUN; - } - - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.STOPPED; - } - - @Override - public void act(GridconSettings settings) { - this.log.info("Start batteries and gridcon!"); - - this.startSystem(settings); - this.setStringWeighting(); - this.setStringControlMode(); - this.setDateAndTime(); - - try { - this.getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - private void startSystem(GridconSettings settings) { - - if (!this.isBatteriesStarted()) { - System.out.println("Batteries are not started, start batteries and keep system stopped!"); - this.startBatteries(); - this.keepSystemStopped(settings); - return; - } - - if (isBatteriesStarted()) { - - if (!getGridconPcs().isDcDcStarted()) { - this.startDcDc(settings); - return; - } - this.enableIpus(settings); - } - } - - private void keepSystemStopped(GridconSettings settings) { - this.getGridconPcs().setEnableIpu1(false); - this.getGridconPcs().setEnableIpu2(false); - this.getGridconPcs().setEnableIpu3(false); - this.getGridconPcs().disableDcDc(); - - this.getGridconPcs().setStop(true); - this.getGridconPcs().setPlay(false); - this.getGridconPcs().setAcknowledge(false); - - this.getGridconPcs().setMode(settings.getMode()); - this.getGridconPcs().setU0(settings.getU0()); - this.getGridconPcs().setF0(settings.getF0()); - this.getGridconPcs().setPControlMode(PControlMode.ACTIVE_POWER_CONTROL); - this.getGridconPcs().setQLimit(GridconPcs.Q_LIMIT); - this.getGridconPcs().setDcLinkVoltage(GridconPcs.DC_LINK_VOLTAGE_SETPOINT); - - // getGridconPcs().setParameterSet(parameterSet); - float maxPower = GridconPcs.MAX_POWER_PER_INVERTER; - if (this.enableIpu1) { - this.getGridconPcs().setPMaxChargeIpu1(maxPower); - this.getGridconPcs().setPMaxDischargeIpu1(-maxPower); - } - if (this.enableIpu2) { - this.getGridconPcs().setPMaxChargeIpu2(maxPower); - this.getGridconPcs().setPMaxDischargeIpu2(-maxPower); - } - if (this.enableIpu3) { - this.getGridconPcs().setPMaxChargeIpu3(maxPower); - this.getGridconPcs().setPMaxDischargeIpu3(-maxPower); - } - } - - private void enableIpus(GridconSettings settings) { - this.getGridconPcs().setEnableIpu1(this.enableIpu1); - this.getGridconPcs().setEnableIpu2(this.enableIpu2); - this.getGridconPcs().setEnableIpu3(this.enableIpu3); - this.getGridconPcs().enableDcDc(); - this.getGridconPcs().setStop(false); - this.getGridconPcs().setPlay(false); - this.getGridconPcs().setAcknowledge(false); - - this.getGridconPcs().setMode(settings.getMode()); - this.getGridconPcs().setU0(settings.getU0()); - this.getGridconPcs().setF0(settings.getF0()); - this.getGridconPcs().setPControlMode(PControlMode.ACTIVE_POWER_CONTROL); - this.getGridconPcs().setQLimit(GridconPcs.Q_LIMIT); - this.getGridconPcs().setDcLinkVoltage(GridconPcs.DC_LINK_VOLTAGE_SETPOINT); - - // getGridconPcs().setParameterSet(parameterSet); - float maxPower = GridconPcs.MAX_POWER_PER_INVERTER; - if (this.enableIpu1) { - this.getGridconPcs().setPMaxChargeIpu1(maxPower); - this.getGridconPcs().setPMaxDischargeIpu1(-maxPower); - } - if (this.enableIpu2) { - this.getGridconPcs().setPMaxChargeIpu2(maxPower); - this.getGridconPcs().setPMaxDischargeIpu2(-maxPower); - } - if (this.enableIpu3) { - this.getGridconPcs().setPMaxChargeIpu3(maxPower); - this.getGridconPcs().setPMaxDischargeIpu3(-maxPower); - } - } - - private void startDcDc(GridconSettings settings) { - this.getGridconPcs().setEnableIpu1(false); - this.getGridconPcs().setEnableIpu2(false); - this.getGridconPcs().setEnableIpu3(false); - this.getGridconPcs().enableDcDc(); - this.getGridconPcs().setStop(false); - this.getGridconPcs().setPlay(true); - this.getGridconPcs().setAcknowledge(false); - - this.getGridconPcs().setMode(settings.getMode()); - this.getGridconPcs().setU0(settings.getU0()); - this.getGridconPcs().setF0(settings.getF0()); - this.getGridconPcs().setPControlMode(PControlMode.ACTIVE_POWER_CONTROL); - this.getGridconPcs().setQLimit(GridconPcs.Q_LIMIT); - this.getGridconPcs().setDcLinkVoltage(GridconPcs.DC_LINK_VOLTAGE_SETPOINT); - - // getGridconPcs().setParameterSet(parameterSet); - float maxPower = GridconPcs.MAX_POWER_PER_INVERTER; - if (this.enableIpu1) { - this.getGridconPcs().setPMaxChargeIpu1(maxPower); - this.getGridconPcs().setPMaxDischargeIpu1(-maxPower); - } - if (this.enableIpu2) { - this.getGridconPcs().setPMaxChargeIpu2(maxPower); - getGridconPcs().setPMaxDischargeIpu2(-maxPower); - } - if (this.enableIpu3) { - getGridconPcs().setPMaxChargeIpu3(maxPower); - getGridconPcs().setPMaxDischargeIpu3(-maxPower); - } - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Undefined.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Undefined.java deleted file mode 100644 index c61c7188b66..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/gridconstate/Undefined.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.gridconstate; - -import java.time.LocalDateTime; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class Undefined extends BaseState { - - private final Logger log = LoggerFactory.getLogger(Undefined.class); - - private int timeSecondsToWaitWhenUndefined = 70; - private LocalDateTime lastMethodCall; - - public Undefined(ComponentManager manager, String gridconPcsId, String b1Id, String b2Id, String b3Id, - String hardRestartRelayAdress) { - super(manager, gridconPcsId, b1Id, b2Id, b3Id, hardRestartRelayAdress); - } - - @Override - public IState getState() { - return io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.UNDEFINED; - } - - @Override - public IState getNextState() { - // According to the state machine the next state can be STOPPED, ERROR, RUN or - // UNDEFINED - - io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState stateToReturn = io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.UNDEFINED; - - if (this.lastMethodCall == null) { - this.lastMethodCall = LocalDateTime.now(); - } - - if (this.lastMethodCall.plusSeconds(this.timeSecondsToWaitWhenUndefined).isBefore(LocalDateTime.now())) { - - if (isNextStateUndefined()) { - stateToReturn = io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.UNDEFINED; - } - - if (isNextStateError()) { - stateToReturn = io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.ERROR; - } - - if (isNextStateRunning()) { - stateToReturn = io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.RUN; - } - - if (isNextStateStopped()) { - stateToReturn = io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.STOPPED; - } - } - if (stateToReturn != io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState.UNDEFINED) { - this.lastMethodCall = null; - } - - return stateToReturn; - } - - @Override - public void act(GridconSettings settings) { - this.log.info("undefined.act() -> Nothing to do!"); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/BasteState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/BasteState.java deleted file mode 100644 index f6449cd6dfb..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/BasteState.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.ongrid; - -import io.openems.edge.ess.mr.gridcon.StateObject; - -public abstract class BasteState implements StateObject { - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/Error.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/Error.java deleted file mode 100644 index 8cf9f26c4c5..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/Error.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.ongrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class Error extends BasteState { - - @Override - public IState getState() { - return OnGridState.ERROR; - } - - @Override - public IState getNextState() { - return OnGridState.ONGRID; // Currently it is not defined, so it is always ongrid - } - - @Override - public void act() throws OpenemsNamedException { - // Nothing to do - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/OnGrid.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/OnGrid.java deleted file mode 100644 index 77171169dce..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/OnGrid.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.ongrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.enums.Mode; - -public class OnGrid extends BasteState { - - @Override - public IState getState() { - return OnGridState.ONGRID; - } - - @Override - public IState getNextState() { - return OnGridState.ONGRID; // Currently it is not defined, so it is always ongrid - } - - @Override - public void act() throws OpenemsNamedException { - - } - - @Override - public GridconSettings getGridconSettings() { - GridconSettings gridconSettings = GridconSettings.createRunningSettings(1, 1, Mode.CURRENT_CONTROL); - return gridconSettings; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/OnGridState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/OnGridState.java deleted file mode 100644 index 58d49f28e5b..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/OnGridState.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.ongrid; - -import io.openems.common.types.OptionsEnum; -import io.openems.edge.ess.mr.gridcon.IState; - -public enum OnGridState implements IState { - UNDEFINED(-1, "BASE Undefined"), // - ONGRID(0, "BASE OnGrid"), // - ERROR(100, "BASE Error"), // - ; - - private final int value; - private final String name; - - private OnGridState(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; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/Undefined.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/Undefined.java deleted file mode 100644 index 363c3eacf1d..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/ongrid/Undefined.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.ongrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class Undefined extends BasteState { - - @Override - public IState getState() { - return OnGridState.UNDEFINED; - } - - @Override - public IState getNextState() { - return OnGridState.ONGRID; // Currently it is not defined, so it is always ongrid - } - - @Override - public void act() throws OpenemsNamedException { - // Nothing to do - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/AdjustParameter.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/AdjustParameter.java deleted file mode 100644 index 3d16357699f..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/AdjustParameter.java +++ /dev/null @@ -1,77 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class AdjustParameter extends BaseState { - - private float deltaVoltage; - private float deltaFrequency; - - public AdjustParameter(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, float deltaFrequency, float deltaVoltage, boolean na1Inverted, boolean na2Inverted, - boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - - this.deltaFrequency = deltaFrequency; - this.deltaVoltage = deltaVoltage; - } - - @Override - public IState getState() { - return OnOffGridState.OFF_GRID_MODE_ADJUST_PARMETER; - } - - @Override - public IState getNextState() { - - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - if (DecisionTableHelper.isAdjustParameters(condition)) { - return OnOffGridState.OFF_GRID_MODE_ADJUST_PARMETER; - } - - if (DecisionTableHelper.isOffGridMode(condition)) { - return OnOffGridState.OFF_GRID_MODE; - } - - if (DecisionTableHelper.isOnGridMode(condition)) { - return OnOffGridState.ON_GRID_MODE; - } - - return OnOffGridState.OFF_GRID_MODE_ADJUST_PARMETER; - } - - @Override - public void act() throws OpenemsNamedException { - - float targetFrequency = getFrequencyOnMeter() + this.deltaFrequency; - float frequencyFactor = targetFrequency / GridconPcs.DEFAULT_GRID_FREQUENCY; - this.getGridconPcs().setF0(frequencyFactor); - - float targetVoltage = getVoltageOnMeter() + this.deltaVoltage; - float voltageFactor = targetVoltage / GridconPcs.DEFAULT_GRID_VOLTAGE; - this.getGridconPcs().setU0(voltageFactor); - - try { - this.getGridconPcs().doWriteTasks(); - } catch (Exception e) { - System.out.println("Adjust parameter , error while writing the tasks"); - } - - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/BaseState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/BaseState.java deleted file mode 100644 index db3ba1bb5b7..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/BaseState.java +++ /dev/null @@ -1,342 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import java.time.LocalDateTime; -import java.util.BitSet; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.types.ChannelAddress; -import io.openems.edge.battery.api.Battery; -import io.openems.edge.common.channel.BooleanReadChannel; -import io.openems.edge.common.channel.BooleanWriteChannel; -import io.openems.edge.common.channel.value.Value; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.Helper; -import io.openems.edge.ess.mr.gridcon.StateObject; -import io.openems.edge.ess.mr.gridcon.WeightingHelper; -import io.openems.edge.meter.api.ElectricityMeter; - -public abstract class BaseState implements StateObject { - - private static final int VOLTAGE_GRID = 200_000; - public static final float ONOFF_GRID_VOLTAGE_FACTOR = 1; - public static final float ONOFF_GRID_FREQUENCY_FACTOR_ONLY_ONGRID = 1.054f; - - private ComponentManager manager; - private String gridconPcsId; - private String battery1Id; - private String battery2Id; - private String battery3Id; - private String inputNA1; - private boolean na1Inverted; - private String inputNA2; - private boolean na2Inverted; - private String inputSyncBridge; - private String outputSyncBridge; - private String meterId; - protected DecisionTableCondition condition; - - public BaseState(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNA1, String inputNA2, String inputSyncBridge, String outputSyncBridge, - String meterId, boolean na1Inverted, boolean na2Inverted) { - this.manager = manager; - this.gridconPcsId = gridconPcsId; - this.battery1Id = b1Id; - this.battery2Id = b2Id; - this.battery3Id = b3Id; - this.inputNA1 = inputNA1; - this.inputNA2 = inputNA2; - this.inputSyncBridge = inputSyncBridge; - this.outputSyncBridge = outputSyncBridge; - this.meterId = meterId; - this.condition = condition; - this.na1Inverted = na1Inverted; - this.na2Inverted = na2Inverted; - } - - protected boolean isNextStateUndefined() { - return !this.isGridconDefined() || !this.isAtLeastOneBatteryDefined() || !this.isDigitalInputsDefined(); - } - - private boolean isDigitalInputsDefined() { - boolean defined = true; - - defined = defined && this.isDigitalInputDefined(this.inputNA1); - defined = defined && this.isDigitalInputDefined(this.inputNA2); - defined = defined && this.isDigitalInputDefined(this.inputSyncBridge); - - return defined; - } - - private boolean isDigitalInputDefined(String inputAddress) { - boolean defined = false; - try { - BooleanReadChannel inputChannel = this.getBooleanReadChannel(inputAddress); - defined = this.isValueDefined(inputChannel.value()); - } catch (Exception e) { - defined = false; - } - return defined; - } - - private boolean isValueDefined(Value value) { - if (value != null) { - return value.isDefined(); - } - return false; - } - - private BooleanReadChannel getBooleanReadChannel(String channelAddress) - throws IllegalArgumentException, OpenemsNamedException { - return this.manager.getChannel(ChannelAddress.fromString(channelAddress)); - } - - private boolean isAtLeastOneBatteryDefined() { - boolean undefined = true; - - if (this.getBattery1() != null) { - undefined = undefined && Helper.isUndefined(this.getBattery1()); - } - if (this.getBattery2() != null) { - undefined = undefined && Helper.isUndefined(this.getBattery2()); - } - if (this.getBattery3() != null) { - undefined = undefined && Helper.isUndefined(this.getBattery3()); - } - - return !undefined; - } - - private boolean isGridconDefined() { - return !this.getGridconPcs().isUndefined(); - } - - protected boolean isNextStateError() { - if (this.getGridconPcs() != null && this.getGridconPcs().isError()) { - return true; - } - - if (this.getBattery1() != null && this.getBattery1().hasFaults()) { - return true; - } - - if (this.getBattery2() != null && this.getBattery2().hasFaults()) { - return true; - } - - if (this.getBattery3() != null && this.getBattery3().hasFaults()) { - return true; - } - - return false; - } - - protected boolean isNextStateOnGridStopped() { - return this.isSystemOngrid() && this.getGridconPcs() != null && this.getGridconPcs().isStopped(); - } - - protected boolean isNextStateOnGridRunning() { - return this.isSystemOngrid() && (this.getGridconPcs() != null && this.getGridconPcs().isRunning()); - } - - protected boolean isNextStateOffGrid() { - if (this.isSystemOffgrid() && !this.isVoltageOnMeter()) { - return true; - } - return false; - } - - protected boolean isNextStateGoingOnGrid() { - if (this.isSystemOffgrid() && this.isVoltageOnMeter()) { - return true; - } - return false; - } - - private boolean isVoltageOnMeter() { - boolean ret = false; - try { - ElectricityMeter meter = this.manager.getComponent(this.meterId); - Value voltageValue = meter.getVoltage(); - int voltage = voltageValue.orElse(0); // voltage is in mV - ret = voltage > BaseState.VOLTAGE_GRID; - } catch (OpenemsNamedException e) { - ret = false; - } - return ret; - } - - protected float getVoltageOnMeter() { - float ret = Float.MIN_VALUE; - try { - ElectricityMeter meter = this.manager.getComponent(this.meterId); - Value voltageValue = meter.getVoltage(); - int voltage = voltageValue.orElse(0); // voltage is in mV - ret = voltage / 1000.0f; - } catch (OpenemsNamedException e) { - System.out.println(e); - } - return ret; - } - - protected float getFrequencyOnMeter() { - float ret = Float.MIN_VALUE; - try { - ElectricityMeter meter = this.manager.getComponent(this.meterId); - Value frequencyValue = meter.getFrequency(); - int frequency = frequencyValue.orElse(0); // voltage is in mV - ret = frequency / 1000.0f; - } catch (OpenemsNamedException e) { - System.out.println(e); - } - return ret; - } - - protected void setSyncBridge(boolean b) { - System.out.println("setSyncBridge : parameter --> " + b); - try { - System.out.println("Try to write " + b + " to the sync bridge channel"); - System.out.println("output sync bridge address: " + this.outputSyncBridge); - BooleanWriteChannel outputSyncDeviceBridgeChannel = this.manager - .getChannel(ChannelAddress.fromString(this.outputSyncBridge)); - outputSyncDeviceBridgeChannel.setNextWriteValue(b); - } catch (IllegalArgumentException | OpenemsNamedException e) { - System.out.println("Error writing channel"); - System.out.println(e.getMessage()); - } - } - - protected boolean isSystemOngrid() { - if (this.isDigitalInputDefined(this.inputNA1) && this.isDigitalInputDefined(this.inputNA2)) { - try { - boolean na1Value = this.getBooleanReadChannel(this.inputNA1).value().get(); - boolean na2Value = this.getBooleanReadChannel(this.inputNA2).value().get(); - - if (this.na1Inverted) { - na1Value = !na1Value; - } - - if (this.na2Inverted) { - na2Value = !na2Value; - } - - return na1Value && na2Value; - } catch (IllegalArgumentException | OpenemsNamedException e) { - return false; - } - } - return false; - } - - protected boolean isSystemOffgrid() { - if (this.isDigitalInputDefined(this.inputNA1) && this.isDigitalInputDefined(this.inputNA2)) { - try { - boolean na1Value = this.getBooleanReadChannel(this.inputNA1).value().get(); - boolean na2Value = this.getBooleanReadChannel(this.inputNA2).value().get(); - - if (this.na1Inverted) { - na1Value = !na1Value; - } - - if (this.na2Inverted) { - na2Value = !na2Value; - } - - return !na1Value || !na2Value; - } catch (IllegalArgumentException | OpenemsNamedException e) { - return false; - } - } - return false; - } - - protected boolean isBatteriesStarted() { - boolean running = true; - if (this.getBattery1() != null) { - running = running && this.getBattery1().isStarted(); - } - if (this.getBattery2() != null) { - running = running && this.getBattery2().isStarted(); - } - if (this.getBattery3() != null) { - running = running && this.getBattery3().isStarted(); - } - return running; - } - - protected void setStringControlMode() { - int weightingMode = WeightingHelper.getStringControlMode(this.getBattery1(), this.getBattery2(), - this.getBattery3()); - this.getGridconPcs().setStringControlMode(weightingMode); - } - - protected void setStringWeighting() { - float activePower = this.getGridconPcs().getActivePower(); - - Float[] weightings = WeightingHelper.getWeighting(activePower, this.getBattery1(), this.getBattery2(), - this.getBattery3()); - - this.getGridconPcs().setWeightStringA(weightings[0]); - this.getGridconPcs().setWeightStringB(weightings[1]); - this.getGridconPcs().setWeightStringC(weightings[2]); - - } - - protected void setDateAndTime() { - int date = this.convertToInteger(this.generateDate(LocalDateTime.now())); - this.getGridconPcs().setSyncDate(date); - int time = this.convertToInteger(this.generateTime(LocalDateTime.now())); - this.getGridconPcs().setSyncTime(time); - } - - private BitSet generateDate(LocalDateTime time) { - byte dayOfWeek = (byte) time.getDayOfWeek().ordinal(); - byte day = (byte) time.getDayOfMonth(); - byte month = (byte) time.getMonth().getValue(); - byte year = (byte) (time.getYear() - 2000); // 0 == year 2000 in the protocol - - return BitSet.valueOf(new byte[] { day, dayOfWeek, year, month }); - } - - private BitSet generateTime(LocalDateTime time) { - byte seconds = (byte) time.getSecond(); - byte minutes = (byte) time.getMinute(); - byte hours = (byte) time.getHour(); - // second byte is unused - return BitSet.valueOf(new byte[] { seconds, 0, hours, minutes }); - } - - private int convertToInteger(BitSet bitSet) { - long[] l = bitSet.toLongArray(); - if (l.length == 0) { - return 0; - } - return (int) l[0]; - } - - GridconPcs getGridconPcs() { - return this.getComponent(this.gridconPcsId); - } - - Battery getBattery1() { - return this.getComponent(this.battery1Id); - } - - Battery getBattery2() { - return this.getComponent(this.battery2Id); - } - - Battery getBattery3() { - return this.getComponent(this.battery3Id); - } - - T getComponent(String id) { - T component = null; - try { - component = this.manager.getComponent(id); - } catch (OpenemsNamedException e) { - System.out.println(e); - } - return component; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableCondition.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableCondition.java deleted file mode 100644 index 4391dd6b47b..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableCondition.java +++ /dev/null @@ -1,112 +0,0 @@ -// CHECKSTYLE:OFF - -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -public interface DecisionTableCondition { - - public static double LOWER_VOLTAGE = 207.0; - public static double UPPER_VOLTAGE = 253.0; - - NaProtection1On isNaProtection1On() throws Exception; - - NaProtection2On isNaProtection2On() throws Exception; - - GridconCommunicationFailed isGridconCommunicationFailed() throws Exception; - - MeterCommunicationFailed isMeterCommunicationFailed() throws Exception; - - VoltageInRange isVoltageInRange() throws Exception; - - SyncBridgeOn isSyncBridgeOn() throws Exception; - - enum NaProtection1On { - - TRUE(true), FALSE(false), UNSET(null); - - private Boolean value; - - private NaProtection1On(Boolean value) { - this.value = value; - } - - public Boolean getValue() { - return this.value; - } - } - - enum NaProtection2On { - - TRUE(true), FALSE(false), UNSET(null); - - private Boolean value; - - private NaProtection2On(Boolean value) { - this.value = value; - } - - public Boolean getValue() { - return this.value; - } - } - - enum GridconCommunicationFailed { - - TRUE(true), FALSE(false), UNSET(null); - - private Boolean value; - - private GridconCommunicationFailed(Boolean value) { - this.value = value; - } - - public Boolean getValue() { - return this.value; - } - } - - enum MeterCommunicationFailed { - - TRUE(true), FALSE(false), UNSET(null); - - private Boolean value; - - private MeterCommunicationFailed(Boolean value) { - this.value = value; - } - - public Boolean getValue() { - return this.value; - } - } - - enum VoltageInRange { - - TRUE(true), FALSE(false), UNSET(null); - - private Boolean value; - - private VoltageInRange(Boolean value) { - this.value = value; - } - - public Boolean getValue() { - return this.value; - } - } - - enum SyncBridgeOn { - - TRUE(true), FALSE(false), UNSET(null); - - private Boolean value; - - private SyncBridgeOn(Boolean value) { - this.value = value; - } - - public Boolean getValue() { - return this.value; - } - } -} -// CHECKSTYLE:ON \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableConditionImpl.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableConditionImpl.java deleted file mode 100644 index ff0945deba8..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableConditionImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.common.types.ChannelAddress; -import io.openems.edge.bridge.modbus.api.ModbusComponent; -import io.openems.edge.common.channel.BooleanReadChannel; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.meter.api.ElectricityMeter; - -public class DecisionTableConditionImpl implements DecisionTableCondition { - - private ComponentManager manager; - private String gridconPcsId; - private String meterId; - private String inputNaProtection1; - private String inputNaProtection2; - private String inputSyncBridge; - private boolean nA1Inverted; - private boolean nA2Inverted; - private boolean isSyncBridgeInverted; - - public DecisionTableConditionImpl(ComponentManager manager, String gridconPcsId, String meterId, - String inputNaProtection1, String inputNaProtection2, String inputSyncBridge, boolean isNa1Inverted, - boolean isNa2Inverted, boolean isSyncBridgeInverted) { - super(); - this.manager = manager; - this.gridconPcsId = gridconPcsId; - this.meterId = meterId; - this.inputNaProtection1 = inputNaProtection1; - this.inputNaProtection2 = inputNaProtection2; - this.inputSyncBridge = inputSyncBridge; - this.nA1Inverted = isNa1Inverted; - this.nA2Inverted = isNa2Inverted; - this.isSyncBridgeInverted = isSyncBridgeInverted; - } - - @Override - public NaProtection1On isNaProtection1On() { - try { - BooleanReadChannel c = this.manager.getChannel(ChannelAddress.fromString(this.inputNaProtection1)); - - boolean value = c.value().get(); - - if (this.nA1Inverted) { - value = !value; - } - - if (value) { - return NaProtection1On.TRUE; - } else { - return NaProtection1On.FALSE; - } - } catch (Exception e) { - return NaProtection1On.UNSET; - } - - } - - @Override - public NaProtection2On isNaProtection2On() { - try { - BooleanReadChannel c = this.manager.getChannel(ChannelAddress.fromString(this.inputNaProtection2)); - boolean value = c.value().get(); - - if (this.nA2Inverted) { - value = !value; - } - - if (value) { - return NaProtection2On.TRUE; - } else { - return NaProtection2On.FALSE; - } - } catch (Exception e) { - return NaProtection2On.UNSET; - } - } - - @Override - public GridconCommunicationFailed isGridconCommunicationFailed() { - GridconPcs gridconPcs; - try { - gridconPcs = this.manager.getComponent(this.gridconPcsId); - if (gridconPcs.isCommunicationBroken()) { - return GridconCommunicationFailed.TRUE; - } else { - return GridconCommunicationFailed.FALSE; - } - } catch (OpenemsNamedException e) { - return GridconCommunicationFailed.UNSET; - } - } - - @Override - public MeterCommunicationFailed isMeterCommunicationFailed() { - - try { - ModbusComponent meter = this.manager.getComponent(this.meterId); - if (meter.getModbusCommunicationFailed()) { - return MeterCommunicationFailed.TRUE; - } else { - return MeterCommunicationFailed.FALSE; - } - } catch (Exception e) { - return MeterCommunicationFailed.UNSET; - } - } - - @Override - public VoltageInRange isVoltageInRange() { - try { - ElectricityMeter meter = this.manager.getComponent(this.meterId); - double voltage = meter.getVoltage().get() / 1000; - if (voltage > DecisionTableCondition.LOWER_VOLTAGE && voltage < DecisionTableCondition.UPPER_VOLTAGE) { - return VoltageInRange.TRUE; - } else { - return VoltageInRange.FALSE; - } - } catch (Exception e) { - return VoltageInRange.UNSET; - } - - } - - @Override - public SyncBridgeOn isSyncBridgeOn() { - try { - BooleanReadChannel c = this.manager.getChannel(ChannelAddress.fromString(this.inputSyncBridge)); - - boolean value = c.value().get(); - - if (this.isSyncBridgeInverted) { - value = !value; - } - - if (value) { - - return SyncBridgeOn.TRUE; - } else { - return SyncBridgeOn.FALSE; - } - } catch (Exception e) { - return SyncBridgeOn.UNSET; - } - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("Input NA Protection 1: "); - sb.append(this.isNaProtection1On()); - sb.append("\n"); - - sb.append("Input NA Protection 2: "); - sb.append(this.isNaProtection2On()); - sb.append("\n"); - - sb.append("GridconCommunicationFailed: "); - sb.append(this.isGridconCommunicationFailed()); - sb.append("\n"); - - sb.append("MeterCommunicationFailed: "); - sb.append(this.isMeterCommunicationFailed()); - sb.append("\n"); - - sb.append("Voltage in Range: "); - sb.append(this.isVoltageInRange()); - sb.append("\n"); - - sb.append("Sync Bridge On: "); - sb.append(this.isSyncBridgeOn()); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableHelper.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableHelper.java deleted file mode 100644 index 2fa07f21347..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/DecisionTableHelper.java +++ /dev/null @@ -1,129 +0,0 @@ -// CHECKSTYLE:OFF - -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -public class DecisionTableHelper { - - public static boolean isStateStartSystem(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.FALSE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.TRUE - && condition.isMeterCommunicationFailed().getValue() == Boolean.TRUE - && condition.isSyncBridgeOn().getValue() == Boolean.TRUE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isWaitingForDevices(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.FALSE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.TRUE - && condition.isMeterCommunicationFailed().getValue() == Boolean.TRUE - && condition.isSyncBridgeOn().getValue() == Boolean.FALSE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isOnGridMode(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.TRUE - && condition.isNaProtection2On().getValue() == Boolean.TRUE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isOffGridMode(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.FALSE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.FALSE - && condition.isMeterCommunicationFailed().getValue() == Boolean.FALSE - && condition.isVoltageInRange().getValue() == Boolean.FALSE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isOffGridGridBack(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.FALSE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.FALSE - && condition.isMeterCommunicationFailed().getValue() == Boolean.FALSE - && condition.isVoltageInRange().getValue() == Boolean.TRUE - && condition.isSyncBridgeOn().getValue() == Boolean.FALSE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isOffGridWaitForGridAvailable(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.FALSE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.FALSE - && condition.isMeterCommunicationFailed().getValue() == Boolean.FALSE - && condition.isVoltageInRange().getValue() == Boolean.TRUE - && condition.isSyncBridgeOn().getValue() == Boolean.TRUE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isAdjustParameters(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.TRUE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.FALSE - && condition.isMeterCommunicationFailed().getValue() == Boolean.FALSE - && condition.isVoltageInRange().getValue() == Boolean.TRUE - && condition.isSyncBridgeOn().getValue() == Boolean.TRUE; - } catch (Exception e) { - ret = false; - } - return ret; - } - - public static boolean isUndefined(DecisionTableCondition condition) { - return !isStateStartSystem(condition) && !isWaitingForDevices(condition) && !isOnGridMode(condition) - && !isOffGridMode(condition) && !isOffGridGridBack(condition) - && !isOffGridWaitForGridAvailable(condition) && !isAdjustParameters(condition) && !isError(condition); - - } - - // TODO could there really be an error situation? - public static boolean isError(DecisionTableCondition condition) { - boolean ret = false; - try { - ret = condition.isNaProtection1On().getValue() == Boolean.TRUE - && condition.isNaProtection2On().getValue() == Boolean.FALSE - && condition.isGridconCommunicationFailed().getValue() == Boolean.TRUE - && condition.isMeterCommunicationFailed().getValue() == Boolean.FALSE - && condition.isVoltageInRange().getValue() == Boolean.TRUE - && condition.isSyncBridgeOn().getValue() == Boolean.TRUE; - } catch (Exception e) { - ret = false; - } - return ret; - } - -} -// CHECKSTYLE:ON diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OffGrid.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OffGrid.java deleted file mode 100644 index d5359aa3829..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OffGrid.java +++ /dev/null @@ -1,83 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.WeightingHelper; -import io.openems.edge.ess.mr.gridcon.enums.Mode; - -public class OffGrid extends BaseState { - - private float targetFrequencyOffgrid; - - public OffGrid(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, float targetFrequencyOffgrid, boolean na1Inverted, boolean na2Inverted, - boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - this.targetFrequencyOffgrid = targetFrequencyOffgrid; - } - - @Override - public IState getState() { - return OnOffGridState.OFF_GRID_MODE; - } - - @Override - public IState getNextState() { - - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - if (DecisionTableHelper.isOffGridGridBack(condition)) { - return OnOffGridState.OFF_GRID_MODE_GRID_BACK; - } - - if (DecisionTableHelper.isAdjustParameters(condition)) { - return OnOffGridState.OFF_GRID_MODE_ADJUST_PARMETER; - } - - if (DecisionTableHelper.isOffGridMode(condition)) { - return OnOffGridState.OFF_GRID_MODE; - } - - return OnOffGridState.OFF_GRID_MODE; - } - - @Override - public void act() throws OpenemsNamedException { - float factor = this.targetFrequencyOffgrid / GridconPcs.DEFAULT_GRID_FREQUENCY; - this.getGridconPcs().setF0(factor); - - // getGridconPcs().setBlackStartApproval(true); - // getGridconPcs().setSyncApproval(false); - this.getGridconPcs().setMode(Mode.VOLTAGE_CONTROL); - - // Set weighting to strings, use a fix value for active power because in - // off grid mode it is always discharging - float activePower = 1000; - Float[] weightings = WeightingHelper.getWeighting(activePower, getBattery1(), getBattery2(), getBattery3()); - - this.getGridconPcs().setWeightStringA(weightings[0]); - this.getGridconPcs().setWeightStringB(weightings[1]); - this.getGridconPcs().setWeightStringC(weightings[2]); - - try { - this.getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OffGridGridBack.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OffGridGridBack.java deleted file mode 100644 index 238d1a82bb4..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OffGridGridBack.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class OffGridGridBack extends BaseState { - - private float targetFrequencyOffgrid; - - public OffGridGridBack(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, float targetFrequencyOffgrid, boolean na1Inverted, boolean na2Inverted, - boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - this.targetFrequencyOffgrid = targetFrequencyOffgrid; - } - - @Override - public IState getState() { - return OnOffGridState.OFF_GRID_MODE_GRID_BACK; - } - - @Override - public IState getNextState() { - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - if (DecisionTableHelper.isOffGridGridBack(condition)) { - return OnOffGridState.OFF_GRID_MODE_GRID_BACK; - } - - if (DecisionTableHelper.isOffGridWaitForGridAvailable(condition)) { - return OnOffGridState.OFF_GRID_MODE_WAIT_FOR_GRID_AVAILABLE; - } - - if (DecisionTableHelper.isOffGridMode(condition)) { - return OnOffGridState.OFF_GRID_MODE; - } - - return OnOffGridState.OFF_GRID_MODE_GRID_BACK; - } - - @Override - public void act() throws OpenemsNamedException { - setSyncBridge(true); - float factor = this.targetFrequencyOffgrid / GridconPcs.DEFAULT_GRID_FREQUENCY; - this.getGridconPcs().setF0(factor); - try { - this.getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OnGrid.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OnGrid.java deleted file mode 100644 index 946eea98fcf..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OnGrid.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class OnGrid extends BaseState { - - private float targetFrequencyOnGrid; - - public OnGrid(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, float targetFrequencyOnGrid, boolean na1Inverted, boolean na2Inverted, - boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - this.targetFrequencyOnGrid = targetFrequencyOnGrid; - } - - @Override - public IState getState() { - return OnOffGridState.ON_GRID_MODE; - } - - @Override - public IState getNextState() { - - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - if (DecisionTableHelper.isOnGridMode(condition)) { - return OnOffGridState.ON_GRID_MODE; - } - - if (DecisionTableHelper.isOffGridMode(condition)) { - return OnOffGridState.OFF_GRID_MODE; - } - - return OnOffGridState.ON_GRID_MODE; - } - - @Override - public void act() throws OpenemsNamedException { - - setSyncBridge(false); - float factor = this.targetFrequencyOnGrid / GridconPcs.DEFAULT_GRID_FREQUENCY; - System.out.println(" ---> set frequency factor: " + factor); - this.getGridconPcs().setF0(factor); - - try { - this.getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OnOffGridState.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OnOffGridState.java deleted file mode 100644 index 1af956005d8..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/OnOffGridState.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.types.OptionsEnum; -import io.openems.edge.ess.mr.gridcon.IState; - -public enum OnOffGridState implements IState { - UNDEFINED(-1, "Undefined"), // - START_SYSTEM(100, "Start System"), // - WAIT_FOR_DEVICES(101, "Waiting until devices are online"), // - ON_GRID_MODE(102, "On Grid Mode"), // - OFF_GRID_MODE(200, "Off Grid Mode"), // - OFF_GRID_MODE_GRID_BACK(201, "Off Grid Mode - Grid is back"), // - OFF_GRID_MODE_WAIT_FOR_GRID_AVAILABLE(202, "Off Grid Mode - Grid is back"), // - OFF_GRID_MODE_ADJUST_PARMETER(203, "Off Grid Mode - Adjust Parameter for Synchronisation"), // - ERROR(300, "Error"); - - private final int value; - private final String name; - - private OnOffGridState(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; - } -} \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/StartSystem.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/StartSystem.java deleted file mode 100644 index 8734c63c3f2..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/StartSystem.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.StateObject; - -public class StartSystem extends BaseState implements StateObject { - - public StartSystem(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, boolean na1Inverted, boolean na2Inverted, boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - } - - @Override - public IState getState() { - return OnOffGridState.START_SYSTEM; - } - - @Override - public IState getNextState() { - - if (DecisionTableHelper.isWaitingForDevices(condition)) { - return OnOffGridState.WAIT_FOR_DEVICES; - } - - if (DecisionTableHelper.isError(condition)) { - return OnOffGridState.ERROR; - } - - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - return OnOffGridState.START_SYSTEM; - } - - @Override - public void act() throws OpenemsNamedException { - setSyncBridge(false); - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/Undefined.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/Undefined.java deleted file mode 100644 index 8ddc6c52df1..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/Undefined.java +++ /dev/null @@ -1,75 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; -import io.openems.edge.ess.mr.gridcon.StateObject; - -public class Undefined extends BaseState implements StateObject { - - private final Logger log = LoggerFactory.getLogger(Undefined.class); - - public Undefined(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, boolean na1Inverted, boolean na2Inverted, boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - } - - @Override - public IState getState() { - return io.openems.edge.ess.mr.gridcon.state.onoffgrid.OnOffGridState.UNDEFINED; - } - - @Override - public IState getNextState() { - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - if (DecisionTableHelper.isStateStartSystem(condition)) { - return OnOffGridState.START_SYSTEM; - } - - if (DecisionTableHelper.isWaitingForDevices(condition)) { - return OnOffGridState.WAIT_FOR_DEVICES; - } - - if (DecisionTableHelper.isOnGridMode(condition)) { - System.out.println("DecisionTableHelper --> On grid conditions!"); - return OnOffGridState.ON_GRID_MODE; - } - - if (DecisionTableHelper.isOffGridMode(condition)) { - return OnOffGridState.OFF_GRID_MODE; - } - - if (DecisionTableHelper.isOffGridGridBack(condition)) { - return OnOffGridState.OFF_GRID_MODE_GRID_BACK; - } - - if (DecisionTableHelper.isOffGridWaitForGridAvailable(condition)) { - return OnOffGridState.OFF_GRID_MODE_WAIT_FOR_GRID_AVAILABLE; - } - - if (DecisionTableHelper.isAdjustParameters(condition)) { - return OnOffGridState.OFF_GRID_MODE_ADJUST_PARMETER; - } - - return OnOffGridState.UNDEFINED; - } - - @Override - public void act() { - this.log.info("Nothing to do!"); - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/WaitForDevices.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/WaitForDevices.java deleted file mode 100644 index 56853d83a25..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/WaitForDevices.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class WaitForDevices extends BaseState { - - public WaitForDevices(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, String b1Id, - String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, String outputSyncBridge, - String meterId, boolean na1Inverted, boolean na2Inverted, boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - } - - @Override - public IState getState() { - return OnOffGridState.WAIT_FOR_DEVICES; - } - - @Override - public IState getNextState() { - - if (DecisionTableHelper.isWaitingForDevices(condition)) { - return OnOffGridState.WAIT_FOR_DEVICES; - } - - if (DecisionTableHelper.isOnGridMode(condition)) { - return OnOffGridState.ON_GRID_MODE; - } - - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - return OnOffGridState.WAIT_FOR_DEVICES; - } - - @Override - public void act() throws OpenemsNamedException { - // TODO Auto-generated method stub - - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/WaitForGridAvailable.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/WaitForGridAvailable.java deleted file mode 100644 index cf1fd8914b1..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/state/onoffgrid/WaitForGridAvailable.java +++ /dev/null @@ -1,70 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.state.onoffgrid; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.ComponentManager; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.GridconSettings; -import io.openems.edge.ess.mr.gridcon.IState; - -public class WaitForGridAvailable extends BaseState { - - // TODO in diesem state darf ich max. 30 sekunden verbleiben - // danach muss ich den mr runterfahren...=> outputHardresetrelay für mr setzen - - private float targetFrequencyOffgrid; - - public WaitForGridAvailable(ComponentManager manager, DecisionTableCondition condition, String gridconPcsId, - String b1Id, String b2Id, String b3Id, String inputNa1, String inputNa2, String inputSyncBridge, - String outputSyncBridge, String meterId, float targetFrequencyOffgrid, boolean na1Inverted, - boolean na2Inverted, boolean inputSyncInverted) { - super(manager, condition, gridconPcsId, b1Id, b2Id, b3Id, inputNa1, inputNa2, inputSyncBridge, outputSyncBridge, - meterId, na1Inverted, na2Inverted); - this.targetFrequencyOffgrid = targetFrequencyOffgrid; - } - - @Override - public IState getState() { - return OnOffGridState.OFF_GRID_MODE_WAIT_FOR_GRID_AVAILABLE; - } - - @Override - public IState getNextState() { - - if (DecisionTableHelper.isUndefined(condition)) { - return OnOffGridState.UNDEFINED; - } - - if (DecisionTableHelper.isOffGridMode(condition)) { - return OnOffGridState.OFF_GRID_MODE; - } - - if (DecisionTableHelper.isOffGridWaitForGridAvailable(condition)) { - return OnOffGridState.OFF_GRID_MODE_WAIT_FOR_GRID_AVAILABLE; - } - - if (DecisionTableHelper.isAdjustParameters(condition)) { - return OnOffGridState.OFF_GRID_MODE_ADJUST_PARMETER; - } - - return OnOffGridState.OFF_GRID_MODE_WAIT_FOR_GRID_AVAILABLE; - } - - @Override - public void act() throws OpenemsNamedException { - float factor = this.targetFrequencyOffgrid / GridconPcs.DEFAULT_GRID_FREQUENCY; - this.getGridconPcs().setF0(factor); - try { - this.getGridconPcs().doWriteTasks(); - } catch (OpenemsNamedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Override - public GridconSettings getGridconSettings() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CcuParameters1.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CcuParameters1.java deleted file mode 100644 index 7d3dc4d12ee..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CcuParameters1.java +++ /dev/null @@ -1,111 +0,0 @@ -// CHECKSTYLE:OFF - -package io.openems.edge.ess.mr.gridcon.writewords; - -public class CcuParameters1 { - - public static final int CCU_PARAMETERS_1_ADRESS = 32592; - - public CcuParameters1() { - } - - private float uByQDroopMainLower = 0f; - private float uByQDroopMainUpper = 0f; - private float uByQDroopT1Main = 0f; - private float fByPDroopMainLower = 0f; - private float fByPDroopMainUpper = 0f; - private float fByPDroopT1Main = 0f; - private float qByUDroopMainLower = 0f; - private float qByUDroopMainUpper = 0f; - private float qByUDeadBandLower = 0f; - private float qByUDeadBandUpper = 0f; - private float qLimit = 0f; - - public float getqLimit() { - return this.qLimit; - } - - public void setqLimit(float qLimit) { - this.qLimit = qLimit; - } - - public float getuByQDroopMainLower() { - return this.uByQDroopMainLower; - } - - public float getuByQDroopMainUpper() { - return this.uByQDroopMainUpper; - } - - public float getuByQDroopT1Main() { - return this.uByQDroopT1Main; - } - - public float getfByPDroopMainLower() { - return this.fByPDroopMainLower; - } - - public float getfByPDroopMainUpper() { - return this.fByPDroopMainUpper; - } - - public float getfByPDroopT1Main() { - return this.fByPDroopT1Main; - } - - public float getqByUDroopMainLower() { - return this.qByUDroopMainLower; - } - - public float getqByUDroopMainUpper() { - return this.qByUDroopMainUpper; - } - - public float getqByUDeadBandLower() { - return this.qByUDeadBandLower; - } - - public float getqByUDeadBandUpper() { - return this.qByUDeadBandUpper; - } - - @Override - public String toString() { - return "CcuParameters1 [uByQDroopMainLower=" + this.uByQDroopMainLower + ", uByQDroopMainUpper=" - + this.uByQDroopMainUpper + ", uByQDroopT1Main=" + this.uByQDroopT1Main + ", fByPDroopMainLower=" - + this.fByPDroopMainLower + ", fByPDroopMainUpper=" + this.fByPDroopMainUpper + ", fByPDroopT1Main=" - + this.fByPDroopT1Main + ", qByUDroopMainLower=" + this.qByUDroopMainLower + ", qByUDroopMainUpper=" - + this.qByUDroopMainUpper + ", qByUDeadBandLower=" + this.qByUDeadBandLower + ", qByUDeadBandUpper=" - + this.qByUDeadBandUpper + ", qLimit=" + this.qLimit + "]" + "\n" + this.getHexRepresentation(); - } - - private String getHexRepresentation() { - StringBuilder sb = new StringBuilder(); - sb.append(CCU_PARAMETERS_1_ADRESS); - sb.append(": "); - sb.append(HexFormatter.format(this.uByQDroopMainLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.uByQDroopMainUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.uByQDroopT1Main, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.fByPDroopMainLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.fByPDroopMainUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.fByPDroopT1Main, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.qByUDroopMainLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.qByUDroopMainUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.qByUDeadBandLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.qByUDeadBandUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.qLimit, true)); - - return sb.toString(); - } -} -// CHECKSTYLE:ON \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CcuParameters2.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CcuParameters2.java deleted file mode 100644 index 0766704e63a..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CcuParameters2.java +++ /dev/null @@ -1,129 +0,0 @@ -// CHECKSTYLE:OFF - -package io.openems.edge.ess.mr.gridcon.writewords; - -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; - -public class CcuParameters2 { - - public static final int CCU_PARAMETERS_2_ADRESS = 32784; - - public CcuParameters2() { - } - - private float pByFDroopMainLower = 0f; - private float pByFDroopMainUpper = 0f; - private float pByFDeadBandLower = 0f; - private float pByFDeadBandUpper = 0f; - private float pByUDroopLower = 0f; - private float pByUDroopUpper = 0f; - private float pByUDeadBandLower = 0f; - private float pByUDeadBandUpper = 0f; - private float pByUMaxCharge = 0f; - private float pByUMaxDischarge = 0f; - private PControlMode pControlMode = PControlMode.ACTIVE_POWER_CONTROL; - private float pControlLimTwo = 0f; - private float pControlLimOne = 0f; - - public PControlMode getpControlMode() { - return this.pControlMode; - } - - public void setpControlMode(PControlMode pControlMode) { - this.pControlMode = pControlMode; - } - - public float getpByFDroopMainLower() { - return this.pByFDroopMainLower; - } - - public float getpByFDroopMainUpper() { - return this.pByFDroopMainUpper; - } - - public float getpByFDeadBandLower() { - return this.pByFDeadBandLower; - } - - public float getpByFDeadBandUpper() { - return this.pByFDeadBandUpper; - } - - public float getpByUDroopLower() { - return this.pByUDroopLower; - } - - public float getpByUDroopUpper() { - return this.pByUDroopUpper; - } - - public float getpByUDeadBandLower() { - return this.pByUDeadBandLower; - } - - public float getpByUDeadBandUpper() { - return this.pByUDeadBandUpper; - } - - public float getpByUMaxCharge() { - return this.pByUMaxCharge; - } - - public float getpByUMaxDischarge() { - return this.pByUMaxDischarge; - } - - public float getpControlLimTwo() { - return this.pControlLimTwo; - } - - public float getpControlLimOne() { - return this.pControlLimOne; - } - - @Override - public String toString() { - return "CcuParameters2 [pByFDroopMainLower=" + this.pByFDroopMainLower + ", pByFDroopMainUpper=" - + this.pByFDroopMainUpper + ", pByFDeadBandLower=" + this.pByFDeadBandLower + ", pByFDeadBandUpper=" - + this.pByFDeadBandUpper + ", pByUDroopLower=" + this.pByUDroopLower + ", pByUDroopUpper=" - + this.pByUDroopUpper + ", pByUDeadBandLower=" + this.pByUDeadBandLower + ", pByUDeadBandUpper=" - + this.pByUDeadBandUpper + ", pByUMaxCharge=" + this.pByUMaxCharge + ", pByUMaxDischarge=" - + this.pByUMaxDischarge + ", pControlMode=" + this.pControlMode + ", pControlLimTwo=" - + this.pControlLimTwo + ", pControlLimOne=" + this.pControlLimOne + "]" + "\n" - + this.getHexRepresentation(); - } - - private String getHexRepresentation() { - StringBuilder sb = new StringBuilder(); - sb.append(CCU_PARAMETERS_2_ADRESS); - sb.append(": "); - sb.append(HexFormatter.format(this.pByFDroopMainLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByFDroopMainUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByFDeadBandLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByFDeadBandUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByUDroopLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByUDroopUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByUDeadBandLower, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByUDeadBandUpper, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByUMaxCharge, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pByUMaxDischarge, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pControlMode.getValue(), true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pControlLimTwo, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pControlLimOne, true)); - sb.append(" "); - return sb.toString(); - } -} -// CHECKSTYLE:ON \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/Commands.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/Commands.java deleted file mode 100644 index 611bed940f3..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/Commands.java +++ /dev/null @@ -1,370 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.writewords; - -import java.util.BitSet; - -import io.openems.edge.ess.mr.gridcon.enums.BalancingMode; -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; -import io.openems.edge.ess.mr.gridcon.enums.HarmonicCompensationMode; -import io.openems.edge.ess.mr.gridcon.enums.Mode; - -public class Commands { - - public static final int COMMANDS_ADRESS = 32560; - - public Commands() { - } - - // 32560 - private Boolean enableIpu1 = false; - private Boolean enableIpu2 = false; - private Boolean enableIpu3 = false; - private Boolean enableIpu4 = false; - - // 32561 - private Boolean playBit = false; - private Boolean readyAndStopBit2nd = false; - private Boolean acknowledgeBit = false; - private Boolean stopBit1st = false; - private Boolean blackstartApproval = false; - private Boolean syncApproval = false; - private Boolean shortCircuitHandling = false; - private Mode mode = null; // Mode.CURRENT_CONTROL; - private Boolean triggerSia = false; - private BalancingMode balancingMode = BalancingMode.DISABLED; - private FundamentalFrequencyMode fundamentalFrequencyMode = FundamentalFrequencyMode.DISABLED; - private HarmonicCompensationMode harmonicCompensationMode = HarmonicCompensationMode.DISABLED; - // private Boolean parameterSet1 = false; - // private Boolean parameterSet2 = false; - // private Boolean parameterSet3 = false; - // private Boolean parameterSet4 = false; - - // 32562 - private Integer errorCodeFeedback = 0; - private Float parameterU0 = 0f; - private Float parameterF0 = 0f; - private Float parameterQref = 0f; - private Float parameterPref = 0f; - private Integer syncDate = 0; - private Integer syncTime = 0; - - public Boolean isEnableIpu1() { - return this.enableIpu1; - } - - public void setEnableIpu1(Boolean enable) { - this.enableIpu1 = enable; - } - - public Boolean isEnableIpu2() { - return this.enableIpu2; - } - - public void setEnableIpu2(Boolean enable) { - this.enableIpu2 = enable; - } - - public Boolean isEnableIpu3() { - return this.enableIpu3; - } - - public void setEnableIpu3(Boolean enable) { - this.enableIpu3 = enable; - } - - public Boolean isEnableIpu4() { - return this.enableIpu4; - } - - public void setEnableIpu4(Boolean enable) { - this.enableIpu4 = enable; - } - - public Boolean getPlayBit() { - return this.playBit; - } - - public void setPlayBit(Boolean playBit) { - this.playBit = playBit; - } - - public Boolean getReadyAndStopBit2nd() { - return this.readyAndStopBit2nd; - } - - public void setReadyAndStopBit2nd(Boolean readyAndStopBit2nd) { - this.readyAndStopBit2nd = readyAndStopBit2nd; - } - - public Boolean getAcknowledgeBit() { - return this.acknowledgeBit; - } - - public void setAcknowledgeBit(Boolean acknowledgeBit) { - this.acknowledgeBit = acknowledgeBit; - } - - public Boolean getStopBit1st() { - return this.stopBit1st; - } - - public void setStopBit1st(Boolean stopBit1st) { - this.stopBit1st = stopBit1st; - } - - public Boolean isBlackstartApproval() { - return this.blackstartApproval; - } - - // public void setBlackstartApproval(Boolean blackstartApproval) { - // this.blackstartApproval = blackstartApproval; - // } - - public Boolean isSyncApproval() { - return this.syncApproval; - } - - // public void setSyncApproval(Boolean syncApproval) { - // this.syncApproval = syncApproval; - // } - - public Boolean isShortCircuitHandling() { - return this.shortCircuitHandling; - } - - public Mode getMode() { - return this.mode; - } - - /* - * This is the only method that is reachable from outside to set the mode - */ - public void setMode(Mode mode) { - this.mode = mode; - - boolean isSyncApproval = (mode == Mode.CURRENT_CONTROL); - - this.syncApproval = isSyncApproval; - this.blackstartApproval = !isSyncApproval; - } - - public Boolean isTriggerSia() { - return this.triggerSia; - } - - public BalancingMode getBalancingMode() { - return this.balancingMode; - } - - public void setBalancingMode(BalancingMode balancingMode) { - this.balancingMode = balancingMode; - } - - public FundamentalFrequencyMode getFundamentalFrequencyMode() { - return this.fundamentalFrequencyMode; - } - - public void setFundamentalFrequencyMode(FundamentalFrequencyMode fundamentalFrequencyMode) { - this.fundamentalFrequencyMode = fundamentalFrequencyMode; - } - - public HarmonicCompensationMode getHarmonicCompensationMode() { - return this.harmonicCompensationMode; - } - - public void setHarmonicCompensationMode(HarmonicCompensationMode harmonicCompensationMode) { - this.harmonicCompensationMode = harmonicCompensationMode; - } - - // public Boolean isParameterSet1() { - // return parameterSet1; - // } - // - // public void setParameterSet1(Boolean parameterSet1) { - // this.parameterSet1 = parameterSet1; - // } - // - // public Boolean isParameterSet2() { - // return parameterSet2; - // } - // - // public void setParameterSet2(Boolean parameterSet2) { - // this.parameterSet2 = parameterSet2; - // } - // - // public Boolean isParameterSet3() { - // return parameterSet3; - // } - // - // public void setParameterSet3(Boolean parameterSet3) { - // this.parameterSet3 = parameterSet3; - // } - // - // public Boolean isParameterSet4() { - // return parameterSet4; - // } - // - // public void setParameterSet4(Boolean parameterSet4) { - // this.parameterSet4 = parameterSet4; - // } - - public Integer getErrorCodeFeedback() { - return this.errorCodeFeedback; - } - - public void setErrorCodeFeedback(Integer errorCodeFeedback) { - this.errorCodeFeedback = errorCodeFeedback; - } - - public Float getParameterU0() { - return this.parameterU0; - } - - public void setParameterU0(Float parameterU0) { - this.parameterU0 = parameterU0; - } - - public Float getParameterF0() { - return this.parameterF0; - } - - public void setParameterF0(Float parameterF0) { - this.parameterF0 = parameterF0; - } - - public Float getParameterQref() { - return this.parameterQref; - } - - public void setParameterQref(Float parameterQref) { - this.parameterQref = parameterQref; - } - - public Float getParameterPref() { - return this.parameterPref; - } - - public void setParameterPref(Float parameterPref) { - this.parameterPref = parameterPref; - } - - public Integer getSyncDate() { - return this.syncDate; - } - - public void setSyncDate(Integer syncDate) { - this.syncDate = syncDate; - } - - public Integer getSyncTime() { - return this.syncTime; - } - - public void setSyncTime(Integer syncTime) { - this.syncTime = syncTime; - } - - @Override - public String toString() { - return "Commands [" // - + "enableIpu1=" + this.enableIpu1 + ", " // - + "enableIpu2=" + this.enableIpu2 + ", " // - + "enableIpu3=" + this.enableIpu3 + ", " // - + "enableIpu4=" + this.enableIpu4 + ", " // - + "playBit=" + this.playBit + ", " // - + "readyAndStopBit2nd=" + this.readyAndStopBit2nd + ", " // - + "acknowledgeBit=" + this.acknowledgeBit + ", " // - + "stopBit1st=" + this.stopBit1st + ", " // - + "blackstartApproval=" + this.blackstartApproval + ", " // - + "syncApproval=" + this.syncApproval + ", " // - + "shortCircuitHandling=" + this.shortCircuitHandling + ", " // - + "mode=" + this.mode + ", " // - + "triggerSia=" + this.triggerSia + ", " // - + "fundamentalFrequencyMode=" + this.fundamentalFrequencyMode + ", " // - + "balancingMode=" + this.balancingMode + ", " // - + "harmonicCompensationMode=" + this.harmonicCompensationMode + ", " // - + "errorCodeFeedback=" + this.errorCodeFeedback + ", " // - + "parameterU0=" + this.parameterU0 + ", " // - + "parameterF0=" + this.parameterF0 + ", " // - + "parameterQref=" + this.parameterQref + ", " // - + "parameterPref=" + this.parameterPref + ", " // - + "syncDate=" + this.syncDate + ", " // - + "syncTime=" + this.syncTime // - + "]" // - + "\n" // - + this.getHexRepresentation(); - } - - private String getHexRepresentation() { - StringBuilder sb = new StringBuilder(); - sb.append(Commands.COMMANDS_ADRESS); - sb.append(": "); - sb.append(HexFormatter.formatShort(this.getCmdWord1(), true)); - sb.append(" "); - sb.append(HexFormatter.format(this.getCmdWord2(), true)); - sb.append(" "); - sb.append(HexFormatter.format(this.errorCodeFeedback, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.parameterU0, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.parameterF0, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.parameterQref, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.parameterPref, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.syncDate, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.syncTime, true)); - - return sb.toString(); - } - - private short getCmdWord1() { - BitSet set = new BitSet(16); - set.set(0, this.getStopBit1st()); // - set.set(1, this.getPlayBit()); - set.set(2, this.getReadyAndStopBit2nd()); - set.set(3, this.getAcknowledgeBit()); - set.set(4, this.isBlackstartApproval()); - set.set(5, this.isSyncApproval()); - set.set(6, this.isShortCircuitHandling()); - set.set(7, this.mode.value); - set.set(8, this.isTriggerSia()); - set.set(9, this.fundamentalFrequencyMode.isBit1()); - set.set(10, this.fundamentalFrequencyMode.isBit2()); - set.set(11, this.getBalancingMode().isBit1()); - set.set(12, this.getBalancingMode().isBit2()); - set.set(13, this.harmonicCompensationMode.isBit1()); - set.set(14, this.harmonicCompensationMode.isBit2()); - // set.set(10, isParameterSet1()); - // set.set(11, isParameterSet2()); - // set.set(12, isParameterSet3()); - // set.set(13, isParameterSet4()); - - long val = 0; - long[] l = set.toLongArray(); - if (l.length == 0) { - val = 0; - } else { - val = l[0]; - } - return (short) val; - } - - private int getCmdWord2() { - BitSet set = new BitSet(16); - set.set(28 - 16, this.enableIpu4); // - set.set(29 - 16, this.enableIpu3); // - set.set(30 - 16, this.enableIpu2); // - set.set(31 - 16, this.enableIpu1); // - - long val = 0; - long[] l = set.toLongArray(); - if (l.length == 0) { - val = 0; - } else { - val = l[0]; - } - return (int) val; - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CosPhiParameters.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CosPhiParameters.java deleted file mode 100644 index f8a7db7e8cc..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/CosPhiParameters.java +++ /dev/null @@ -1,46 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.writewords; - -public class CosPhiParameters { - - public static final int COS_PHI_ADDRESS = 32752; - - public CosPhiParameters() { - - } - - private float cosPhiSetPoint1 = 1f; - private float cosPhiSetPoint2 = 1f; - - public float getCosPhiSetPoint1() { - return this.cosPhiSetPoint1; - } - - public void setCosPhiSetPoint1(float cosPhiSetPoint1) { - this.cosPhiSetPoint1 = cosPhiSetPoint1; - } - - public float getCosPhiSetPoint2() { - return this.cosPhiSetPoint2; - } - - public void setCosPhiSetPoint2(float cosPhiSetPoint2) { - this.cosPhiSetPoint2 = cosPhiSetPoint2; - } - - @Override - public String toString() { - return "CosPhiParameters [cosPhiSetPoint1=" + this.cosPhiSetPoint1 + ", cosPhiSetPoint2=" + this.cosPhiSetPoint2 - + "]\n" + this.getHexRepresentation(); - } - - private String getHexRepresentation() { - StringBuilder sb = new StringBuilder(); - sb.append(COS_PHI_ADDRESS); - sb.append(": "); - sb.append(HexFormatter.format(this.cosPhiSetPoint1, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.cosPhiSetPoint2, true)); - - return sb.toString(); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/DcDcParameter.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/DcDcParameter.java deleted file mode 100644 index 36b30577ce5..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/DcDcParameter.java +++ /dev/null @@ -1,118 +0,0 @@ -// CHECKSTYLE:OFF - -package io.openems.edge.ess.mr.gridcon.writewords; - -public class DcDcParameter { - - public static final int DC_DC_ADRESS = 32720; - - // 32720 - public DcDcParameter() { - - } - - private float dcVoltageSetpoint = 0f; - private float weightStringA = 0f; - private float weightStringB = 0f; - private float weightStringC = 0f; - private float iRefStringA = 0f; - private float iRefStringB = 0f; - private float iRefStringC = 0f; - private int stringControlMode = 0; - - public float getDcVoltageSetpoint() { - return this.dcVoltageSetpoint; - } - - public void setDcVoltageSetpoint(float dcVoltageSetpoint) { - this.dcVoltageSetpoint = dcVoltageSetpoint; - } - - public float getWeightStringA() { - return this.weightStringA; - } - - public void setWeightStringA(float weightStringA) { - this.weightStringA = weightStringA; - } - - public float getWeightStringB() { - return this.weightStringB; - } - - public void setWeightStringB(float weightStringB) { - this.weightStringB = weightStringB; - } - - public float getWeightStringC() { - return this.weightStringC; - } - - public void setWeightStringC(float weightStringC) { - this.weightStringC = weightStringC; - } - - public int getStringControlMode() { - return this.stringControlMode; - } - - public void setStringControlMode(int stringControlMode) { - this.stringControlMode = stringControlMode; - } - - public float getiRefStringA() { - return this.iRefStringA; - } - - public float getiRefStringB() { - return this.iRefStringB; - } - - public float getiRefStringC() { - return this.iRefStringC; - } - - public void setiRefStringA(float iRefStringA) { - this.iRefStringA = iRefStringA; - } - - public void setiRefStringB(float iRefStringB) { - this.iRefStringB = iRefStringB; - } - - public void setiRefStringC(float iRefStringC) { - this.iRefStringC = iRefStringC; - } - - @Override - public String toString() { - return "DcDcParameter [dcVoltageSetpoint=" + this.dcVoltageSetpoint + ", weightStringA=" + this.weightStringA - + ", weightStringB=" + this.weightStringB + ", weightStringC=" + this.weightStringC + ", iRefStringA=" - + this.iRefStringA + ", iRefStringB=" + this.iRefStringB + ", iRefStringC=" + this.iRefStringC - + ", stringControlMode=" + this.stringControlMode + "]\n" + this.getHexRepresentation(); - } - - private String getHexRepresentation() { - StringBuilder sb = new StringBuilder(); - sb.append(DC_DC_ADRESS); - sb.append(": "); - sb.append(HexFormatter.format(this.dcVoltageSetpoint, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.weightStringA, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.weightStringB, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.weightStringC, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.iRefStringA, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.iRefStringB, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.iRefStringC, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.stringControlMode, true)); - - return sb.toString(); - } -} -// CHECKSTYLE:ON diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/HexFormatter.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/HexFormatter.java deleted file mode 100644 index 40a31bd3ea9..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/HexFormatter.java +++ /dev/null @@ -1,102 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.writewords; - -public class HexFormatter { - - // CHECKSTYLE:OFF - public static String format(Float f, boolean switchQuarters) { - return toTwoQuarterGroup(getFloatToHexString(f), switchQuarters); - } - - public static String format(Integer i, boolean switchQuarters) { - return toTwoQuarterGroup(getIntToHexString(i), switchQuarters); - } - - public static String formatShort(Short i, boolean switchQuarters) { - return toOneQuarterGroup(getShortToHexString(i)); - } - // CHECKSTYLE:ON - - static String toOneQuarterGroup(String toFormat) { - toFormat = addLeadingZeros(toFormat, 4); - String newString = ""; - for (int i = 0; i < toFormat.length(); i++) { - if (i % 4 == 0) { - newString = newString + " "; - } - newString = newString + toFormat.charAt(i); - - } - newString = newString.trim().toUpperCase(); - - return newString; - } - - static String toTwoQuarterGroup(String toFormat, boolean switchQuarters) { - toFormat = addLeadingZeros(toFormat, 8); - - String newString = ""; - for (int i = 0; i < toFormat.length(); i++) { - if (i % 4 == 0) { - newString = newString + " "; - } - newString = newString + toFormat.charAt(i); - - } - newString = newString.trim().toUpperCase(); - - if (switchQuarters) { - newString = switchQuarters(newString); - } - - return newString; - } - - static String switchQuarters(String s) { - // "1234 5678" --> "5678 1234"; "1111 2222 3333 4444" --> "2222 1111 4444 3333" - s = s.trim(); - - int length = s.length(); - int groupLength = 8 + 1; - int groupsToSwitch = length % groupLength + 1; - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < groupsToSwitch; i++) { - String subGroup = s.substring(groupLength * i, groupLength * i + groupLength); - String g1 = subGroup.substring(0, 4); - String g2 = subGroup.substring(5, 9); - sb.append(g2); - sb.append(" "); - sb.append(g1); - sb.append(" "); - } - return sb.toString().trim(); - } - - static String addLeadingZeros(String toFormat, int digits) { - int length = toFormat.length(); - - int remainder = length % digits; - - int toAdd = 0; - if (remainder != 0 || length == 0) { - toAdd = digits - remainder; - ; - } - - for (int i = 0; i < toAdd; i++) { - toFormat = "0" + toFormat; - } - return toFormat; - } - - static String getFloatToHexString(Float input) { - return Integer.toHexString(Float.floatToIntBits(input)); - } - - static String getIntToHexString(Integer input) { - return Integer.toHexString(input); - } - - static String getShortToHexString(Short input) { - return Integer.toHexString(input); - } -} diff --git a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/IpuParameter.java b/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/IpuParameter.java deleted file mode 100644 index 8ab91d3134f..00000000000 --- a/io.openems.edge.ess.mr.gridcon/src/io/openems/edge/ess/mr/gridcon/writewords/IpuParameter.java +++ /dev/null @@ -1,90 +0,0 @@ -// CHECKSTYLE:OFF - -package io.openems.edge.ess.mr.gridcon.writewords; - -public class IpuParameter { - - // 32624, 32656, 32688 - public IpuParameter() { - } - - private float dcVoltageSetpoint = 0f; - private float dcCurrentSetpoint = 0f; - private float u0OffsetToCcu = 0f; - private float f0OffsetToCcu = 0f; - private float qRefOffsetToCcu = 0f; - private float pRefOffsetToCcu = 0f; - private float pMaxDischarge = 0f; - private float pMaxCharge = 0f; - - public float getpMaxDischarge() { - return this.pMaxDischarge; - } - - public void setpMaxDischarge(float pMaxDischarge) { - this.pMaxDischarge = pMaxDischarge; - } - - public float getpMaxCharge() { - return this.pMaxCharge; - } - - public void setpMaxCharge(float pMaxCharge) { - this.pMaxCharge = pMaxCharge; - } - - public float getDcVoltageSetpoint() { - return this.dcVoltageSetpoint; - } - - public float getDcCurrentSetpoint() { - return this.dcCurrentSetpoint; - } - - public float getU0OffsetToCcu() { - return this.u0OffsetToCcu; - } - - public float getF0OffsetToCcu() { - return this.f0OffsetToCcu; - } - - public float getqRefOffsetToCcu() { - return this.qRefOffsetToCcu; - } - - public float getpRefOffsetToCcu() { - return this.pRefOffsetToCcu; - } - - @Override - public String toString() { - return "IpuParameter [dcVoltageSetpoint=" + this.dcVoltageSetpoint + ", dcCurrentSetpoint=" - + this.dcCurrentSetpoint + ", u0OffsetToCcu=" + this.u0OffsetToCcu + ", f0OffsetToCcu=" - + this.f0OffsetToCcu + ", qRefOffsetToCcu=" + this.qRefOffsetToCcu + ", pRefOffsetToCcu=" - + this.pRefOffsetToCcu + ", pMaxDischarge=" + this.pMaxDischarge + ", pMaxCharge=" + this.pMaxCharge - + "]\n" + this.getHexRepresentation(); - } - - private String getHexRepresentation() { - StringBuilder sb = new StringBuilder(); - sb.append(HexFormatter.format(this.dcVoltageSetpoint, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.dcCurrentSetpoint, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.u0OffsetToCcu, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.f0OffsetToCcu, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.qRefOffsetToCcu, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pRefOffsetToCcu, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pMaxDischarge, true)); - sb.append(" "); - sb.append(HexFormatter.format(this.pMaxCharge, true)); - - return sb.toString(); - } -} -// CHECKSTYLE:ON \ No newline at end of file diff --git a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/WeightingHelperTest.java b/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/WeightingHelperTest.java deleted file mode 100644 index ec16a0eb668..00000000000 --- a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/WeightingHelperTest.java +++ /dev/null @@ -1,397 +0,0 @@ -package io.openems.edge.ess.mr.gridcon; - -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.battery.api.Battery; -import io.openems.edge.ess.mr.gridcon.helper.DummyBattery; - -public class WeightingHelperTest { - - public static final double DELTA = 0.000001; - - @Test - public final void testIsBatteryReady() throws OpenemsNamedException { - - Battery b = null; - // should return false if there is no battery - boolean result = WeightingHelper.isBatteryReady(b); - assertFalse(result); - - // should return false if battery is not started - b = new DummyBattery(); - result = WeightingHelper.isBatteryReady(b); - assertFalse(result); - - // should return true if battery is running - b.start(); - result = WeightingHelper.isBatteryReady(b); - assertTrue(result); - - // should return false if battery is stopped - b.stop(); - result = WeightingHelper.isBatteryReady(b); - assertFalse(result); - } - - @Test - public final void testGetWeightingForCharge() throws OpenemsNamedException { - Battery b = null; - // should be '0' is battery is not there or not working - double result = WeightingHelper.getWeightingForCharge(b); - assertEquals(0, result, DELTA); - - b = new DummyBattery(); - result = WeightingHelper.getWeightingForCharge(b); - assertEquals(0, result, DELTA); - - b.start(); - result = WeightingHelper.getWeightingForCharge(b); - double expected = DummyBattery.DEFAULT_MAX_CHARGE_CURRENT * DummyBattery.DEFAULT_VOLTAGE; - - assertNotEquals(0, result, DELTA); - assertEquals(expected, result, DELTA); - - b.stop(); - result = WeightingHelper.getWeightingForCharge(b); - assertEquals(0, result, DELTA); - } - - @Test - public final void testGetWeightingForDischarge() throws OpenemsNamedException { - Battery b = null; - // should be '0' is battery is not there or not working - double result = WeightingHelper.getWeightingForDischarge(b); - assertEquals(0, result, DELTA); - - b = new DummyBattery(); - result = WeightingHelper.getWeightingForDischarge(b); - assertEquals(0, result, DELTA); - - b.start(); - result = WeightingHelper.getWeightingForDischarge(b); - double expected = DummyBattery.DEFAULT_MAX_DISCHARGE_CURRENT * DummyBattery.DEFAULT_VOLTAGE; - - assertNotEquals(0, result, DELTA); - assertEquals(expected, result, DELTA); - - b.stop(); - result = WeightingHelper.getWeightingForDischarge(b); - assertEquals(0, result, DELTA); - } - - @Test - public final void testGetWeightingForNoPowerNoBatteryOrStoppedBatteries() throws OpenemsNamedException { - DummyBattery b1 = null; - DummyBattery b2 = null; - DummyBattery b3 = null; - - // No batteries - Float[] expected = { 0f, 0f, 0f }; - Float[] actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // One battery not running - b1 = new DummyBattery(); - expected = new Float[] { 0f, 0f, 0f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // One battery running - b1.start(); - expected = new Float[] { 1f, 0f, 0f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // Two batteries, one not running - b3 = new DummyBattery(); - expected = new Float[] { 1f, 0f, 0f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // Two batteries - b3 // - .withVoltage(790) // - .start(); - expected = new Float[] { 1f, 0f, 1f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // Two batteries, one not running - b1.stop(); - expected = new Float[] { 0f, 0f, 1f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // Three batteries, one not running - b2 = new DummyBattery() // - .withVoltage(810); - b2.start(); - expected = new Float[] { 0f, 1f, 1f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - - // Three batteries - b1.start(); - expected = new Float[] { 1f, 1f, 1f }; - actual = WeightingHelper.getWeightingForNoPower(b1, b2, b3); - assertArrayEquals(expected, actual); - } - - @Test - public final void testGetWeightingActivePowerZero() throws OpenemsNamedException { - DummyBattery b1 = null; - DummyBattery b2 = null; - DummyBattery b3 = null; - int activePower = 0; - - Float[] expected = { 0f, 0f, 0f }; - Float[] actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b1 = new DummyBattery(); - expected = new Float[] { 0f, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b1.start(); - expected = new Float[] { 1f, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b3 = new DummyBattery(); - expected = new Float[] { 1f, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b3 // - .withVoltage(790) // - .start(); - expected = new Float[] { 1f, 0f, 1f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b1.stop(); - expected = new Float[] { 0f, 0f, 1f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b2 = new DummyBattery() // - .withVoltage(810); - b2.start(); - expected = new Float[] { 0f, 1f, 1f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - b1.start(); - expected = new Float[] { 1f, 1f, 1f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - } - - @Test - public final void testGetWeightingActivePowerCharge() throws OpenemsNamedException { - DummyBattery b1 = null; - DummyBattery b2 = null; - DummyBattery b3 = null; - int activePower = -10; - - // no batteries - Float[] expected = new Float[] { 0f, 0f, 0f }; - Float[] actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // one battery not started - b1 = new DummyBattery(); - expected = new Float[] { 0f, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // one battery started - b1 = new DummyBattery(); - b1.start(); - float maxPower = DummyBattery.DEFAULT_VOLTAGE * DummyBattery.DEFAULT_MAX_CHARGE_CURRENT; - expected = new Float[] { maxPower, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // three batteries, one battery started - b1 = new DummyBattery(); - b2 = new DummyBattery(); - b3 = new DummyBattery(); - b2.start(); - maxPower = DummyBattery.DEFAULT_VOLTAGE * DummyBattery.DEFAULT_MAX_CHARGE_CURRENT; - expected = new Float[] { 0f, maxPower, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // three batteries all started different voltages and current - final int b1Voltage = 650; - final int b1maxCurrent = 80; - final int b2Voltage = 700; - final int b2maxCurrent = 80; - final int b3Voltage = 800; - final int b3maxCurrent = 30; - - b1 = new DummyBattery() // - .withVoltage(b1Voltage) // - .withChargeMaxCurrent(b1maxCurrent); - b2 = new DummyBattery() // - .withVoltage(b2Voltage) // - .withChargeMaxCurrent(b2maxCurrent); - b3 = new DummyBattery() // - .withVoltage(b3Voltage) // - .withChargeMaxCurrent(b3maxCurrent); - - b1.start(); - b2.start(); - b3.start(); - - float maxPower1 = b1Voltage * b1maxCurrent; - float maxPower2 = b2Voltage * b2maxCurrent; - float maxPower3 = b3Voltage * b3maxCurrent; - expected = new Float[] { maxPower1, maxPower2, maxPower3 }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - } - - @Test - public final void testGetWeightingActivePowerDischarge() throws OpenemsNamedException { - DummyBattery b1 = null; - DummyBattery b2 = null; - DummyBattery b3 = null; - int activePower = 10; - - // no batteries - Float[] expected = new Float[] { 0f, 0f, 0f }; - Float[] actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // one battery not started - b1 = new DummyBattery(); - expected = new Float[] { 0f, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // one battery started - b1 = new DummyBattery(); - b1.start(); - float maxPower = DummyBattery.DEFAULT_VOLTAGE * DummyBattery.DEFAULT_MAX_DISCHARGE_CURRENT; - expected = new Float[] { maxPower, 0f, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // three batteries, one battery started - b1 = new DummyBattery(); - b2 = new DummyBattery(); - b3 = new DummyBattery(); - b2.start(); - maxPower = DummyBattery.DEFAULT_VOLTAGE * DummyBattery.DEFAULT_MAX_DISCHARGE_CURRENT; - expected = new Float[] { 0f, maxPower, 0f }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - - // three batteries all started different voltages and current - final int b1Voltage = 650; - final int b1maxCurrent = 80; - final int b2Voltage = 700; - final int b2maxCurrent = 80; - final int b3Voltage = 800; - final int b3maxCurrent = 30; - - b1 = new DummyBattery() // - .withVoltage(b1Voltage) // - .withDischargeMaxCurrent(b1maxCurrent); - b2 = new DummyBattery() // - .withVoltage(b2Voltage) // - .withDischargeMaxCurrent(b2maxCurrent); - b3 = new DummyBattery() // - .withVoltage(b3Voltage) // - .withDischargeMaxCurrent(b3maxCurrent); - - b1.start(); - b2.start(); - b3.start(); - - float maxPower1 = b1Voltage * b1maxCurrent; - float maxPower2 = b2Voltage * b2maxCurrent; - float maxPower3 = b3Voltage * b3maxCurrent; - expected = new Float[] { maxPower1, maxPower2, maxPower3 }; - actual = WeightingHelper.getWeighting(activePower, b1, b2, b3); - assertArrayEquals(expected, actual); - } - - @Test - public final void testGetStringControlMode() throws OpenemsNamedException { - DummyBattery b1 = null; - DummyBattery b2 = null; - DummyBattery b3 = null; - - int expected = 0; - int actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b2 = new DummyBattery(); - expected = 0; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - - b2.start(); - expected = 8; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b2.stop(); - expected = 0; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b1 = new DummyBattery(); - expected = 0; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b1.start(); - expected = 1; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b2.start(); - expected = 9; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b3 = new DummyBattery(); - b1.stop(); - b2.stop(); - expected = 0; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b3.start(); - expected = 64; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b1.start(); - expected = 65; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b2.start(); - expected = 73; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - - b1.stop(); - expected = 72; - actual = WeightingHelper.getStringControlMode(b1, b2, b3); - assertEquals(expected, actual); - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/helper/DummyBattery.java b/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/helper/DummyBattery.java deleted file mode 100644 index 1c8d58cbc9d..00000000000 --- a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/helper/DummyBattery.java +++ /dev/null @@ -1,56 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.helper; - -import io.openems.edge.battery.api.Battery; -import io.openems.edge.battery.protection.BatteryProtection; -import io.openems.edge.battery.test.AbstractDummyBattery; -import io.openems.edge.common.component.OpenemsComponent; -import io.openems.edge.common.startstop.StartStoppable; - -public class DummyBattery extends AbstractDummyBattery implements Battery { - - public static final int DEFAULT_SOC = 50; - public static final int DEFAULT_SOH = 99; - public static final int DEFAULT_CAPACITY = 50_000; - public static final int DEFAULT_MIN_CELL_VOLTAGE = 3280; - public static final int DEFAULT_MAX_CELL_VOLTAGE = 3380; - public static final int DEFAULT_MIN_CELL_TEMPERATURE = 25; - public static final int DEFAULT_MAX_CELL_TEMPERATURE = 33; - - public static final int DEFAULT_VOLTAGE = 800; - public static final int DEFAULT_CURRENT = 0; - public static final int DEFAULT_MAX_CHARGE_CURRENT = 80; - public static final int DEFAULT_MAX_DISCHARGE_CURRENT = 60; - - public static final int DEFAULT_MIN_VOLTAGE = 700; - public static final int DEFAULT_MAX_VOLTAGE = 900; - public static final int DEFAULT_INNER_RESISTANCE = 100; - - public DummyBattery() { - super("battery0", // - OpenemsComponent.ChannelId.values(), // - StartStoppable.ChannelId.values(), // - Battery.ChannelId.values(), // - BatteryProtection.ChannelId.values()); - - this.withMinCellVoltage(DEFAULT_MIN_CELL_VOLTAGE); - this.withMaxCellVoltage(DEFAULT_MAX_CELL_VOLTAGE); - this.withMinCellTemperature(DEFAULT_MIN_CELL_TEMPERATURE); - this.withMaxCellTemperature(DEFAULT_MAX_CELL_TEMPERATURE); - this.withSoc(DEFAULT_SOC); - this.withSoh(DEFAULT_SOH); - this.withCapacity(DEFAULT_CAPACITY); - this.withVoltage(DEFAULT_VOLTAGE); - this.withCurrent(DEFAULT_CURRENT); - this.withChargeMaxCurrent(DEFAULT_MAX_CHARGE_CURRENT); - this.withDischargeMaxCurrent(DEFAULT_MAX_DISCHARGE_CURRENT); - this.withDischargeMinVoltage(DEFAULT_MIN_VOLTAGE); - this.withChargeMaxVoltage(DEFAULT_MAX_VOLTAGE); - this.withInnerResistence(DEFAULT_INNER_RESISTANCE); - } - - @Override - protected DummyBattery self() { - return this; - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/helper/DummyEss.java b/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/helper/DummyEss.java deleted file mode 100644 index 48e9672aadf..00000000000 --- a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/helper/DummyEss.java +++ /dev/null @@ -1,344 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.helper; - -import io.openems.common.exceptions.OpenemsError.OpenemsNamedException; -import io.openems.edge.common.component.AbstractOpenemsComponent; -import io.openems.edge.ess.mr.gridcon.GridconPcs; -import io.openems.edge.ess.mr.gridcon.enums.BalancingMode; -import io.openems.edge.ess.mr.gridcon.enums.FundamentalFrequencyMode; -import io.openems.edge.ess.mr.gridcon.enums.HarmonicCompensationMode; -import io.openems.edge.ess.mr.gridcon.enums.Mode; -import io.openems.edge.ess.mr.gridcon.enums.PControlMode; - -public class DummyEss extends AbstractOpenemsComponent implements GridconPcs { - - protected DummyEss(io.openems.edge.common.channel.ChannelId[] firstInitialChannelIds, - io.openems.edge.common.channel.ChannelId[][] furtherInitialChannelIds) { - super(firstInitialChannelIds, furtherInitialChannelIds); - } - - public static final int MAXIMUM_POWER = 10000; - public static final int DC_LINK_VOLTAGE = 800; - private int currentActivePower = 0; - private boolean running; - private boolean error; - private float dcLinkPositiveVoltage = DC_LINK_VOLTAGE; - - @Override - public float getMaxApparentPower() { - return MAXIMUM_POWER; - } - - @Override - public boolean isRunning() { - return this.running; - } - - @Override - public boolean isStopped() { - return !this.running; - } - - @Override - public boolean isError() { - return this.error; - } - - @Override - public void setPower(int activePower, int reactivePower) { - this.currentActivePower = activePower; - } - - @Override - public void setPlay(boolean play) { - if (play) { - this.running = true; - } - } - - @Override - public void setStop(boolean stop) { - if (stop) { - this.running = false; - } - } - - @Override - public void setAcknowledge(boolean acknowledge) { - if (acknowledge) { - this.error = false; - } - } - - @Override - public void setErrorCodeFeedback(int errorCodeFeedback) { - } - - @Override - public int getErrorCode() { - return 0; - } - - @Override - public float getDcLinkPositiveVoltage() { - return this.dcLinkPositiveVoltage; - } - - @Override - public boolean isCommunicationBroken() { - return false; - } - - @Override - public void setEnableIpu1(boolean enabled) { - } - - @Override - public void setEnableIpu2(boolean enabled) { - } - - @Override - public void setEnableIpu3(boolean enabled) { - } - - @Override - public void setU0(float onGridVoltageFactor) { - } - - @Override - public void setF0(float onGridFrequencyFactor) { - } - - @Override - public void setPControlMode(PControlMode activePowerControl) { - } - - @Override - public void setQLimit(float f) { - } - - @Override - public void setPMaxChargeIpu1(float maxPower) { - } - - @Override - public void setPMaxDischargeIpu1(float maxPower) { - } - - @Override - public void setPMaxChargeIpu2(float maxPower) { - } - - @Override - public void setPMaxDischargeIpu2(float maxPower) { - } - - @Override - public void setPMaxChargeIpu3(float maxPower) { - } - - @Override - public void setPMaxDischargeIpu3(float maxPower) { - } - - @Override - public void setDcLinkVoltage(float dcLinkVoltageSetpoint) { - } - - @Override - public void setWeightStringA(Float weight) { - } - - @Override - public void setWeightStringB(Float weight) { - } - - @Override - public void setWeightStringC(Float weight) { - } - - @Override - public void setStringControlMode(int stringControlMode) { - } - - @Override - public void enableDcDc() { - } - - @Override - public void setSyncDate(int date) { - } - - @Override - public void setSyncTime(int time) { - } - - @Override - public float getActivePower() { - return this.currentActivePower; - } - - @Override - public int getErrorCount() { - return 0; - } - - @Override - public void disableDcDc() { - } - - @Override - public boolean isDcDcStarted() { - return false; - } - - @Override - public boolean isIpusStarted(boolean enableIpu1, boolean enableIpu2, boolean enableIpu3) { - return false; - } - - @Override - public void doWriteTasks() throws OpenemsNamedException { - } - - @Override - public float getReactivePower() { - return 0; - } - - @Override - public float getActivePowerPreset() { - return this.currentActivePower; - } - - @Override - public double getEfficiencyLossChargeFactor() { - return 0; - } - - @Override - public double getEfficiencyLossDischargeFactor() { - return 0; - } - - @Override - public void setIRefStringA(Float current) { - } - - @Override - public void setIRefStringB(Float current) { - } - - @Override - public void setIRefStringC(Float current) { - } - - @Override - public boolean isUndefined() { - return false; - } - - @Override - public void setMode(Mode mode) { - } - - @Override - public void setBalancingMode(BalancingMode balancingMode) { - } - - @Override - public void setFundamentalFrequencyMode(FundamentalFrequencyMode fundamentalFrequencyMode) { - } - - @Override - public void setHarmonicCompensationMode(HarmonicCompensationMode harmonicCompensationMode) { - } - - @Override - public float getCurrentL1Grid() { - return 0; - } - - @Override - public float getCurrentL2Grid() { - return 0; - } - - @Override - public float getCurrentL3Grid() { - return 0; - } - - @Override - public float getCurrentLNGrid() { - return 0; - } - - @Override - public float getActivePowerL1Grid() { - return 0; - } - - @Override - public float getActivePowerL2Grid() { - return 0; - } - - @Override - public float getActivePowerL3Grid() { - return 0; - } - - @Override - public float getActivePowerSumGrid() { - return 0; - } - - @Override - public float getReactivePowerL1Grid() { - return 0; - } - - @Override - public float getReactivePowerL2Grid() { - return 0; - } - - @Override - public float getReactivePowerL3Grid() { - return 0; - } - - @Override - public float getReactivePowerSumGrid() { - return 0; - } - - @Override - public float getApparentPowerL1Grid() { - return 0; - } - - @Override - public float getApparentPowerL2Grid() { - return 0; - } - - @Override - public float getApparentPowerL3Grid() { - return 0; - } - - @Override - public float getApparentPowerSumGrid() { - return 0; - } - - @Override - public void setCosPhiSetPoint1(float cosPhiSetPoint1) { - } - - @Override - public void setCosPhiSetPoint2(float cosPhiSetPoint2) { - } - -} diff --git a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/ongrid/state/TestUndefined.java b/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/ongrid/state/TestUndefined.java deleted file mode 100644 index 310a9927b73..00000000000 --- a/io.openems.edge.ess.mr.gridcon/test/io/openems/edge/ess/mr/gridcon/ongrid/state/TestUndefined.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.openems.edge.ess.mr.gridcon.ongrid.state; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import io.openems.edge.ess.mr.gridcon.state.gridconstate.GridconState; -import io.openems.edge.ess.mr.gridcon.state.gridconstate.Undefined; - -public class TestUndefined { - - private static Undefined sut; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - } - - @Before - public void setUp() throws Exception { - sut = new Undefined(null, null, null, null, null, null); - } - - @Test - public final void testUndefined() { - assertNotNull(sut); - } - - @Test - public final void testGetStateUndefined() { - } - - @Test - public final void testGetNextState() { - // without changes next state should be Undefined - assertEquals(GridconState.UNDEFINED, sut.getNextState()); - - } - - @Test - public final void testAct() { - try { - // nothing should happen - sut.act(null); - } catch (Exception e) { - fail(); - } - } - -} diff --git a/io.openems.edge.io.wago/src/io/openems/edge/wago/Fieldbus5xxDO.java b/io.openems.edge.io.wago/src/io/openems/edge/wago/Fieldbus5xxDO.java index c63a5966e54..4f754f0c2c5 100644 --- a/io.openems.edge.io.wago/src/io/openems/edge/wago/Fieldbus5xxDO.java +++ b/io.openems.edge.io.wago/src/io/openems/edge/wago/Fieldbus5xxDO.java @@ -17,7 +17,7 @@ public class Fieldbus5xxDO extends FieldbusModule { private final BooleanReadChannel[] readChannels; public Fieldbus5xxDO(IoWagoImpl parent, int moduleCount, int coilOffset512, int channelsCount) { - var id = ID_TEMPLATE + moduleCount; + final var id = ID_TEMPLATE + moduleCount; this.readChannels = new BooleanReadChannel[channelsCount]; this.inputCoil512Elements = new CoilElement[channelsCount]; diff --git a/io.openems.edge.scheduler.allalphabetically/test/io/openems/edge/scheduler/allalphabetically/SchedulerAllAlphabeticallyImplTest.java b/io.openems.edge.scheduler.allalphabetically/test/io/openems/edge/scheduler/allalphabetically/SchedulerAllAlphabeticallyImplTest.java index d70d542d30b..204e4e48109 100644 --- a/io.openems.edge.scheduler.allalphabetically/test/io/openems/edge/scheduler/allalphabetically/SchedulerAllAlphabeticallyImplTest.java +++ b/io.openems.edge.scheduler.allalphabetically/test/io/openems/edge/scheduler/allalphabetically/SchedulerAllAlphabeticallyImplTest.java @@ -2,7 +2,9 @@ import static org.junit.Assert.assertEquals; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.junit.Test; @@ -25,7 +27,7 @@ public class SchedulerAllAlphabeticallyImplTest { private static final String CTRL4_ID = "ctrl4"; @Test - public void test() throws Exception { + public void testWithFixedPriorities() throws Exception { final SchedulerAllAlphabetically sut = new SchedulerAllAlphabeticallyImpl(); new ComponentTest(sut) // .addReference("componentManager", new DummyComponentManager()) // @@ -36,15 +38,55 @@ public void test() throws Exception { .addComponent(new DummyController(CTRL4_ID)) // .activate(MyConfig.create() // .setId(SCHEDULER_ID) // - .setControllersIds(CTRL2_ID, CTRL1_ID) // + .setControllersIds(CTRL2_ID, CTRL1_ID, "") // .build()) - .next(new TestCase()); + .next(new TestCase()) // + .deactivate(); assertEquals(// Arrays.asList(CTRL2_ID, CTRL1_ID, CTRL0_ID, CTRL3_ID, CTRL4_ID), // getControllerIds(sut)); } + @Test + public void testOnlyAlphabeticalOrdering() throws Exception { + final var controllerIds = new ArrayList<>(List.of(// + "ctrlController1", // + "a", // + "aa", // + "aA", // + "ab", // + "aB", // + "A", // + "0", // + "1", // + "0controller", // + "0Controller", // + "bla", // + "controller0", // + "controller1", // + "dontroller0", // + "dontroller1", // + "d0", // + "D0", // + "Z", // + "z")); + final var sut = new SchedulerAllAlphabeticallyImpl(); + final var test = new ComponentTest(sut); // + controllerIds.forEach(controllerId -> test.addComponent(new DummyController(controllerId))); + test // + .addReference("componentManager", new DummyComponentManager()) // + .activate(MyConfig.create() // + .setId(SCHEDULER_ID) // + .setControllersIds() // + .build()) // + .next(new TestCase()); + + Collections.sort(controllerIds); + + assertEquals(controllerIds, getControllerIds(sut)); + } + private static List getControllerIds(Scheduler scheduler) throws OpenemsNamedException { return scheduler.getControllers().stream() // .toList(); diff --git a/io.openems.edge.simulator/src/io/openems/edge/simulator/app/SimulatorAppImpl.java b/io.openems.edge.simulator/src/io/openems/edge/simulator/app/SimulatorAppImpl.java index 8236fb6fa7b..a1bce438a71 100644 --- a/io.openems.edge.simulator/src/io/openems/edge/simulator/app/SimulatorAppImpl.java +++ b/io.openems.edge.simulator/src/io/openems/edge/simulator/app/SimulatorAppImpl.java @@ -7,7 +7,6 @@ import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; import java.util.ArrayList; -import java.util.Arrays; import java.util.Dictionary; import java.util.HashSet; import java.util.Hashtable; @@ -43,7 +42,6 @@ import io.openems.common.exceptions.OpenemsException; import io.openems.common.jsonrpc.request.CreateComponentConfigRequest; import io.openems.common.jsonrpc.request.DeleteComponentConfigRequest; -import io.openems.common.jsonrpc.request.UpdateComponentConfigRequest.Property; import io.openems.common.session.Role; import io.openems.common.test.TimeLeapClock; import io.openems.common.timedata.Resolution; @@ -182,8 +180,7 @@ private synchronized CompletableFuture handleExecuteS this.setCycleTime(AbstractWorker.ALWAYS_WAIT_FOR_TRIGGER_NEXT_RUN); // Create Ess.Power with disabled PID filter - this.componentManager.handleCreateComponentConfigRequest(user, - new CreateComponentConfigRequest("Ess.Power", Arrays.asList(new Property("enablePid", false)))); + this.updateEssPower(); // Create Components Set simulatorComponentIds = new HashSet<>(); @@ -328,7 +325,11 @@ private void deleteAllConfigurations(User user) throws OpenemsNamedException { } if (factoryPid.startsWith("Core.") // || factoryPid.startsWith("Controller.Api.") // - || factoryPid.startsWith("Predictor.")) { + || factoryPid.startsWith("Predictor.") // + // Ess.Power exists by default. We don't delete it, but will overwrite the + // configuration later. Delete request for this component does not work for some + // unknown reason. + || factoryPid.equals("Ess.Power")) { continue; } switch (factoryPid) { @@ -401,6 +402,22 @@ private void setCycleTime(int cycleTime) { } } + /** + * Sets the Ess.Power to the default settings for a simulation. + * + */ + private void updateEssPower() { + try { + var config = this.cm.getConfiguration("Ess.Power", null); + Dictionary properties = new Hashtable<>(); + properties.put("enablePid", false); + config.update(properties); + } catch (IOException e) { + this.logError(this.log, + "Unable to configure Ess.Power enabledPid. " + e.getClass() + ": " + e.getMessage()); + } + } + private void waitForComponentsToActivate(Set simulatorComponentIds) throws OpenemsException { // Wait for Components to appear for (var i = 0; i < 100; i++) { diff --git a/io.openems.wrapper/bnd.bnd b/io.openems.wrapper/bnd.bnd index eaa0db0019f..8bed7415c14 100644 --- a/io.openems.wrapper/bnd.bnd +++ b/io.openems.wrapper/bnd.bnd @@ -22,9 +22,9 @@ Bundle-Description: This wraps external java libraries that do not have OSGi hea info.faljse:SDNotify;version='1.5.0',\ io.reactivex.rxjava3.rxjava;version='3.1.8',\ com.google.gson;version='2.10.1',\ - de.bytefish:pgbulkinsert;version='8.1.3',\ + de.bytefish:pgbulkinsert;version='8.1.4',\ fr.turri:aXMLRPC;version='1.13.0',\ - org.dhatim:fastexcel;version='0.18.0',\ - org.dhatim:fastexcel-reader;version='0.18',\ + org.dhatim:fastexcel;version='0.18.1',\ + org.dhatim:fastexcel-reader;version='0.18.1',\ org.eclipse.paho.mqttv5.client;version='1.2.5',\ - org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm;version='1.7.3',\ \ No newline at end of file + org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm;version='1.7.3',\ diff --git a/io.openems.wrapper/fastexcel.bnd b/io.openems.wrapper/fastexcel.bnd index 92ccb7bb914..e3fa142345c 100644 --- a/io.openems.wrapper/fastexcel.bnd +++ b/io.openems.wrapper/fastexcel.bnd @@ -1,11 +1,11 @@ Bundle-Name: fastexcel Bundle-DocURL: https://github.com/dhatim/fastexcel Bundle-License: https://opensource.org/licenses/Apache-2.0 -Bundle-Version: 0.18.0 +Bundle-Version: 0.18.1 Include-Resource: \ - @fastexcel-0.18.0.jar,\ - @fastexcel-reader-0.18.0.jar,\ + @fastexcel-0.18.1.jar,\ + @fastexcel-reader-0.18.1.jar,\ -dsannotations: * diff --git a/io.openems.wrapper/pgbulkinsert.bnd b/io.openems.wrapper/pgbulkinsert.bnd index 85d5e2aa364..41cff7e3259 100644 --- a/io.openems.wrapper/pgbulkinsert.bnd +++ b/io.openems.wrapper/pgbulkinsert.bnd @@ -1,10 +1,10 @@ Bundle-Name: pgbulkinsert Bundle-DocURL: https://github.com/PgBulkInsert/PgBulkInsert Bundle-License: https://opensource.org/licenses/MIT -Bundle-Version: 8.1.3 +Bundle-Version: 8.1.4 Include-Resource: \ - @pgbulkinsert-8.1.3.jar,\ + @pgbulkinsert-8.1.4.jar,\ -dsannotations: * @@ -21,6 +21,7 @@ Export-Package: \ de.bytefish.pgbulkinsert.pgsql.converter,\ de.bytefish.pgbulkinsert.pgsql.handlers,\ de.bytefish.pgbulkinsert.pgsql.model.geometric,\ + de.bytefish.pgbulkinsert.pgsql.model.interval,\ de.bytefish.pgbulkinsert.pgsql.model.network,\ de.bytefish.pgbulkinsert.pgsql.model.range,\ de.bytefish.pgbulkinsert.row,\ diff --git a/tools/common.sh b/tools/common.sh index c5ee2450f1f..47370e548d1 100644 --- a/tools/common.sh +++ b/tools/common.sh @@ -8,6 +8,7 @@ common_initialize_environment() { SRC_PACKAGE_JSON="ui/package.json" SRC_PACKAGE_LOCK_JSON="ui/package-lock.json" SRC_CHANGELOG_CONSTANTS="ui/src/app/changelog/view/component/changelog.constants.ts" + SRC_ANDROID_GRADLE="ui/android/app/build.gradle" # Set environment variables THEME="openems" @@ -60,6 +61,10 @@ common_update_version_in_code() { echo "## Update $SRC_CHANGELOG_CONSTANTS" sed --in-place "s#\(UI_VERSION = \"\).*\(\";\)#\1$VERSION\2#" $SRC_CHANGELOG_CONSTANTS + + echo "## Update $SRC_ANDROID_GRADLE" + sed --in-place "s#\(versionCode \).*\$#\1$(printf "%04d%02d%02d" $VERSION_MAJOR $VERSION_MINOR $VERSION_PATCH)#" $SRC_ANDROID_GRADLE + sed --in-place "s#\(versionName \).*\$#\1\"$VERSION\"#" $SRC_ANDROID_GRADLE } # Build OpenEMS Backend diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json index 939db3ad5a0..ac137be344d 100644 --- a/ui/.eslintrc.json +++ b/ui/.eslintrc.json @@ -87,7 +87,8 @@ "{}": false } } - ] + ], + "@typescript-eslint/member-ordering": "error" } }, { diff --git a/ui/.vscode/extensions.json b/ui/.vscode/extensions.json index 12ffc206521..acc53297748 100644 --- a/ui/.vscode/extensions.json +++ b/ui/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ - "dbaeumer.vscode-eslint" + "dbaeumer.vscode-eslint", + "lokalise.i18n-ally" ] } diff --git a/ui/android/app/build.gradle b/ui/android/app/build.gradle index 04b12182cfc..9a70a646b25 100644 --- a/ui/android/app/build.gradle +++ b/ui/android/app/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 29 - versionName "2024.5.1.1" + versionCode 20240800 + versionName "2024.8.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/ui/package-lock.json b/ui/package-lock.json index b38f652d904..ce222429275 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "openems-ui", - "version": "2024.7.0", + "version": "2024.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "openems-ui", - "version": "2024.7.0", + "version": "2024.8.0", "license": "AGPL-3.0", "dependencies": { "@angular/animations": "~16.2.12", @@ -18,38 +18,40 @@ "@angular/router": "~16.2.12", "@angular/service-worker": "~16.2.12", "@capacitor-community/file-opener": "^1.0.5", - "@capacitor/android": "5.2.3", + "@capacitor/android": "5.7.7", "@capacitor/app": "^5.0.6", - "@capacitor/core": "5.2.3", + "@capacitor/core": "5.7.7", "@capacitor/filesystem": "^5.2.0", - "@capacitor/ios": "5.2.3", + "@capacitor/ios": "5.7.7", "@capacitor/splash-screen": "^5.0.6", "@ionic-native/core": "^5.36.0", "@ionic-native/file-opener": "^5.36.0", "@ionic/angular": "^6.7.5", "@ionic/cli": "^7.1.6", "@ngx-formly/core": "^6.3.0", - "@ngx-formly/ionic": "^6.3.5", + "@ngx-formly/ionic": "^6.3.6", "@ngx-formly/schematics": "^6.3.0", "@ngx-translate/core": "^15.0.0", "@nodro7/angular-mydatepicker": "^0.14.0", - "capacitor-blob-writer": "^1.1.14", + "capacitor-blob-writer": "^1.1.17", "capacitor-ios-autofill-save-password": "^2.0.0", "capacitor-secure-storage-plugin": "^0.9.0", "chart.js": "^4.4.3", "chartjs-adapter-date-fns": "^3.0.0", + "chartjs-plugin-annotation": "^3.0.1", "chartjs-plugin-zoom": "^2.0.1", "classlist.js": "^1.1.20150312", - "compare-versions": "^6.1.0", + "compare-versions": "^6.1.1", "d3": "^7.9.0", "date-fns": "^2.30.0", "file-saver-es": "^2.0.5", "ng2-charts": "4.1.1", "ngx-cookie-service": "^16.1.0", + "ngx-device-detector": "^6.0.2", "ngx-spinner": "^16.0.2", "roboto-fontface": "^0.10.0", "rxjs": "~6.6.7", - "swiper": "11.1.4", + "swiper": "11.1.8", "tslib": "^2.6.2", "uuid": "^10.0.0", "zone.js": "~0.13.3" @@ -65,9 +67,9 @@ "@angular/compiler-cli": "^16.2.12", "@angular/language-service": "^16.2.12", "@capacitor/assets": "^3.0.0", - "@capacitor/cli": "5.2.3", + "@capacitor/cli": "6.1.1", "@ionic/angular-toolkit": "^11.0.1", - "@stylistic/eslint-plugin": "^2.2.2", + "@stylistic/eslint-plugin": "^2.4.0", "@types/jasmine": "~4.3.6", "@types/jasminewd2": "~2.0.13", "@types/node": "^20.12.6", @@ -2851,12 +2853,11 @@ } }, "node_modules/@capacitor/android": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-5.2.3.tgz", - "integrity": "sha512-TqXOq5RIniMACcAckn/X84XajPP2GU4VH7Er390Ja2Y2BWSeUKgk7T8aURcwLYu2hnv+Op9eTww5MTBb3zBtmg==", - "license": "MIT", + "version": "5.7.7", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-5.7.7.tgz", + "integrity": "sha512-gkc8p0jjbRHu5oxKvWQV1d6zRHNeK7/GQUHOL9J6yQqnnttLDf1tSZ4BVjicMdyKlxUailuBcboWvng+KYilvQ==", "peerDependencies": { - "@capacitor/core": "^5.2.0" + "@capacitor/core": "^5.7.0" } }, "node_modules/@capacitor/app": { @@ -3031,32 +3032,6 @@ "node": ">=8" } }, - "node_modules/@capacitor/assets/node_modules/native-run": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/native-run/-/native-run-2.0.1.tgz", - "integrity": "sha512-XfG1FBZLM50J10xH9361whJRC9SHZ0Bub4iNRhhI61C8Jv0e1ud19muex6sNKB51ibQNUJNuYn25MuYET/rE6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ionic/utils-fs": "^3.1.7", - "@ionic/utils-terminal": "^2.3.4", - "bplist-parser": "^0.3.2", - "debug": "^4.3.4", - "elementtree": "^0.1.7", - "ini": "^4.1.1", - "plist": "^3.1.0", - "split2": "^4.2.0", - "through2": "^4.0.2", - "tslib": "^2.6.2", - "yauzl": "^2.10.0" - }, - "bin": { - "native-run": "bin/native-run" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/@capacitor/assets/node_modules/rimraf": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", @@ -3076,16 +3051,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@capacitor/assets/node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 10.x" - } - }, "node_modules/@capacitor/assets/node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", @@ -3111,21 +3076,21 @@ } }, "node_modules/@capacitor/cli": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-5.2.3.tgz", - "integrity": "sha512-iqjOnA9fCxm+cFv5iTvxb/vElK2Z1kDpVS+N9XyD2Msyv3l3ezuOZTSvABiDoo6w6CGkj4/AUMpdT4nrZkTHTg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-6.1.1.tgz", + "integrity": "sha512-rsRqEadfnBSUX90RZj59oXvi30bpSusLMfIcgbOIArOloTgfaaWr9R471F6m3gGWF7BhNoskJpZcCgSUsfywwA==", "dev": true, - "license": "MIT", "dependencies": { "@ionic/cli-framework-output": "^2.2.5", "@ionic/utils-fs": "^3.1.6", - "@ionic/utils-subprocess": "^2.1.11", + "@ionic/utils-process": "^2.1.11", + "@ionic/utils-subprocess": "2.1.11", "@ionic/utils-terminal": "^2.3.3", "commander": "^9.3.0", "debug": "^4.3.4", "env-paths": "^2.2.0", "kleur": "^4.1.4", - "native-run": "^1.7.2", + "native-run": "^2.0.0", "open": "^8.4.0", "plist": "^3.0.5", "prompts": "^2.4.2", @@ -3140,7 +3105,117 @@ "capacitor": "bin/capacitor" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-array": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-array/-/utils-array-2.1.5.tgz", + "integrity": "sha512-HD72a71IQVBmQckDwmA8RxNVMTbxnaLbgFOl+dO5tbvW9CkkSFCv41h6fUuNsSEVgngfkn0i98HDuZC8mk+lTA==", + "dev": true, + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-fs": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-fs/-/utils-fs-3.1.6.tgz", + "integrity": "sha512-eikrNkK89CfGPmexjTfSWl4EYqsPSBh0Ka7by4F0PLc1hJZYtJxUZV3X4r5ecA8ikjicUmcbU7zJmAjmqutG/w==", + "dev": true, + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-object": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-object/-/utils-object-2.1.5.tgz", + "integrity": "sha512-XnYNSwfewUqxq+yjER1hxTKggftpNjFLJH0s37jcrNDwbzmbpFTQTVAp4ikNK4rd9DOebX/jbeZb8jfD86IYxw==", + "dev": true, + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-stream": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-stream/-/utils-stream-3.1.5.tgz", + "integrity": "sha512-hkm46uHvEC05X/8PHgdJi4l4zv9VQDELZTM+Kz69odtO9zZYfnt8DkfXHJqJ+PxmtiE5mk/ehJWLnn/XAczTUw==", + "dev": true, + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-subprocess": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@ionic/utils-subprocess/-/utils-subprocess-2.1.11.tgz", + "integrity": "sha512-6zCDixNmZCbMCy5np8klSxOZF85kuDyzZSTTQKQP90ZtYNCcPYmuFSzaqDwApJT4r5L3MY3JrqK1gLkc6xiUPw==", + "dev": true, + "dependencies": { + "@ionic/utils-array": "2.1.5", + "@ionic/utils-fs": "3.1.6", + "@ionic/utils-process": "2.1.10", + "@ionic/utils-stream": "3.1.5", + "@ionic/utils-terminal": "2.3.3", + "cross-spawn": "^7.0.3", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-process": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@ionic/utils-process/-/utils-process-2.1.10.tgz", + "integrity": "sha512-mZ7JEowcuGQK+SKsJXi0liYTcXd2bNMR3nE0CyTROpMECUpJeAvvaBaPGZf5ERQUPeWBVuwqAqjUmIdxhz5bxw==", + "dev": true, + "dependencies": { + "@ionic/utils-object": "2.1.5", + "@ionic/utils-terminal": "2.3.3", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "tree-kill": "^1.2.2", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@capacitor/cli/node_modules/@ionic/utils-terminal": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.3.tgz", + "integrity": "sha512-RnuSfNZ5fLEyX3R5mtcMY97cGD1A0NVBbarsSQ6yMMfRJ5YHU7hHVyUfvZeClbqkBC/pAqI/rYJuXKCT9YeMCQ==", + "dev": true, + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.3.0" } }, "node_modules/@capacitor/cli/node_modules/brace-expansion": { @@ -3163,6 +3238,21 @@ "node": "^12.20.0 || >=14" } }, + "node_modules/@capacitor/cli/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@capacitor/cli/node_modules/glob": { "version": "9.3.5", "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", @@ -3182,6 +3272,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@capacitor/cli/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/@capacitor/cli/node_modules/minimatch": { "version": "8.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", @@ -3227,6 +3329,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@capacitor/cli/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/@capacitor/cli/node_modules/xml2js": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", @@ -3242,10 +3353,9 @@ } }, "node_modules/@capacitor/core": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.2.3.tgz", - "integrity": "sha512-Q1zbgt3Mvldy7six2/GX54kTL0ozgnR37jeDUAXL/fOJBF4Iorr/8A0OjGEAnwEjpR1la7uFZUunESMFyMLhEQ==", - "license": "MIT", + "version": "5.7.7", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.7.7.tgz", + "integrity": "sha512-LeV1ljAihl/1lFGHZERNY2DtD1fbPBF3rNOSHFPMXIluK4Cq4nK4a4z/dLPX+Cv4F0TyCIzX3+/t79PMbhDwrg==", "dependencies": { "tslib": "^2.1.0" } @@ -3260,12 +3370,11 @@ } }, "node_modules/@capacitor/ios": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-5.2.3.tgz", - "integrity": "sha512-ailR/Mer48GEXdqip+ENyN3Qk+ZtUBNDTlHh83WLNbx6uv71z6lCeoLKBXdtSEBFwzFrwtCO5upzbdzK79pONQ==", - "license": "MIT", + "version": "5.7.7", + "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-5.7.7.tgz", + "integrity": "sha512-bgvSJGia5C5Klfd7t/qlqlRAWzGGAwlIlzkOJYsxpJiYuz6OXVgeesuXRxMNOaUZQ9fmL7OWukmhcv03t9Up+w==", "peerDependencies": { - "@capacitor/core": "^5.2.0" + "@capacitor/core": "^5.7.0" } }, "node_modules/@capacitor/splash-screen": { @@ -4400,10 +4509,9 @@ } }, "node_modules/@ngx-formly/core": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-6.3.5.tgz", - "integrity": "sha512-9p4yl7fr2Ojmm/uN7/nM1hYezheUxecEC0WZ0YI6jeSoEJR8NYTglVxTmHrpW5had2oolHeO39sAo9ttJNifSA==", - "license": "MIT", + "version": "6.3.6", + "resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-6.3.6.tgz", + "integrity": "sha512-0GDllrb9fFBTKG+yT+iQf96N3/CN+qRXIYsSX3uft12+c28qKVfMTsWTPYQsmKfGcrqtOZkMVTc+jGGD2JLZLg==", "dependencies": { "tslib": "^2.0.0" }, @@ -4413,16 +4521,15 @@ } }, "node_modules/@ngx-formly/ionic": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/@ngx-formly/ionic/-/ionic-6.3.5.tgz", - "integrity": "sha512-WqcsG9YXr9PZdWOV+DVT++2cHrndMabRNlOOHx+VIf8QXQc1cyxq9UWW3CmBKw5lT1P2cy4cxxuKMk4EzNJV+Q==", - "license": "MIT", + "version": "6.3.6", + "resolved": "https://registry.npmjs.org/@ngx-formly/ionic/-/ionic-6.3.6.tgz", + "integrity": "sha512-GaZav6bGGuQ3BqEVYK9DV+QsdM92jjfPmKbN9qz5s+kXH4ahjGfMqcq6Rm4SP49vvl5Am3mJZbZU4g9XrJI5tQ==", "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@ionic/angular": "^6.0.0 || ^7.0.0", - "@ngx-formly/core": "6.3.5" + "@ngx-formly/core": "6.3.6" } }, "node_modules/@ngx-formly/schematics": { @@ -4981,17 +5088,16 @@ } }, "node_modules/@stylistic/eslint-plugin": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.3.0.tgz", - "integrity": "sha512-rtiz6u5gRyyEZp36FcF1/gHJbsbT3qAgXZ1qkad6Nr/xJ9wrSJkiSFFQhpYVTIZ7FJNRJurEcumZDCwN9dEI4g==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.4.0.tgz", + "integrity": "sha512-GJ86m60wpKPm0m8sSuApOITjCvKUbyzhVO/BTQb7BNYXVUJMS3ql+uAro0V+4yoHwyBVXTB4EDy3UGkOqtEyyw==", "dev": true, - "license": "MIT", "dependencies": { - "@stylistic/eslint-plugin-js": "2.3.0", - "@stylistic/eslint-plugin-jsx": "2.3.0", - "@stylistic/eslint-plugin-plus": "2.3.0", - "@stylistic/eslint-plugin-ts": "2.3.0", - "@types/eslint": "^8.56.10" + "@stylistic/eslint-plugin-js": "2.4.0", + "@stylistic/eslint-plugin-jsx": "2.4.0", + "@stylistic/eslint-plugin-plus": "2.4.0", + "@stylistic/eslint-plugin-ts": "2.4.0", + "@types/eslint": "^9.6.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5001,16 +5107,15 @@ } }, "node_modules/@stylistic/eslint-plugin-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", - "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.4.0.tgz", + "integrity": "sha512-ScIYDFAwNz+ELr3KfAZMuYMCUq7Q6TdEEIq4RBRR77EHucpDrwi5Kx2d0VdYxb4s4o6nOtSkJmY9MCZupDYJow==", "dev": true, - "license": "MIT", "dependencies": { - "@types/eslint": "^8.56.10", - "acorn": "^8.11.3", + "@types/eslint": "^9.6.0", + "acorn": "^8.12.1", "eslint-visitor-keys": "^4.0.0", - "espree": "^10.0.1" + "espree": "^10.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5024,7 +5129,6 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -5037,7 +5141,6 @@ "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", @@ -5051,14 +5154,13 @@ } }, "node_modules/@stylistic/eslint-plugin-jsx": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.3.0.tgz", - "integrity": "sha512-tsQ0IEKB195H6X9A4iUSgLLLKBc8gUBWkBIU8tp1/3g2l8stu+PtMQVV/VmK1+3bem5FJCyvfcZIQ/WF1fsizA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.4.0.tgz", + "integrity": "sha512-yaZXaRj9lOwrQd1YA1d1Ssz58IrDKDYTvLzlKcKED4NlpjDdMbj//Y4DlNhlW9M9v0ZsRsmKNQl2p5OWFfmdEw==", "dev": true, - "license": "MIT", "dependencies": { - "@stylistic/eslint-plugin-js": "^2.3.0", - "@types/eslint": "^8.56.10", + "@stylistic/eslint-plugin-js": "^2.4.0", + "@types/eslint": "^9.6.0", "estraverse": "^5.3.0", "picomatch": "^4.0.2" }, @@ -5074,7 +5176,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -5084,7 +5185,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -5093,28 +5193,26 @@ } }, "node_modules/@stylistic/eslint-plugin-plus": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.3.0.tgz", - "integrity": "sha512-xboPWGUU5yaPlR+WR57GwXEuY4PSlPqA0C3IdNA/+1o2MuBi95XgDJcZiJ9N+aXsqBXAPIpFFb+WQ7QEHo4f7g==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.4.0.tgz", + "integrity": "sha512-yqVZ2ps3lSzT3Atcx/jSbzTaRJfxtWeuPk1WvINUod1fRVxNlgKLDwiM+63Hq3Q7H4aM0lS5ccAbFlEGINNg0Q==", "dev": true, - "license": "MIT", "dependencies": { - "@types/eslint": "^8.56.10", - "@typescript-eslint/utils": "^7.12.0" + "@types/eslint": "^9.6.0", + "@typescript-eslint/utils": "^7.17.0" }, "peerDependencies": { "eslint": "*" } }, "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/scope-manager": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.14.1.tgz", - "integrity": "sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5125,11 +5223,10 @@ } }, "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.14.1.tgz", - "integrity": "sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -5139,14 +5236,13 @@ } }, "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.14.1.tgz", - "integrity": "sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5168,16 +5264,15 @@ } }, "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/utils": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.14.1.tgz", - "integrity": "sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5191,13 +5286,12 @@ } }, "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.14.1.tgz", - "integrity": "sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -5213,7 +5307,6 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -5223,7 +5316,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -5244,7 +5336,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5260,21 +5351,19 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@stylistic/eslint-plugin-ts": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.3.0.tgz", - "integrity": "sha512-wqOR38/uz/0XPnHX68ftp8sNMSAqnYGjovOTN7w00xnjS6Lxr3Sk7q6AaxWWqbMvOj7V2fQiMC5HWAbTruJsCg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.4.0.tgz", + "integrity": "sha512-0zi3hHrrqaXPGZESTfPNUm4YMvxq+aqPGCUiZfEnn7l5VNC19oKaPonZ6LmKzoksebzpJ7w6nieZLVeQm4o7tg==", "dev": true, - "license": "MIT", "dependencies": { - "@stylistic/eslint-plugin-js": "2.3.0", - "@types/eslint": "^8.56.10", - "@typescript-eslint/utils": "^7.12.0" + "@stylistic/eslint-plugin-js": "2.4.0", + "@types/eslint": "^9.6.0", + "@typescript-eslint/utils": "^7.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5284,14 +5373,13 @@ } }, "node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/scope-manager": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.14.1.tgz", - "integrity": "sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5302,11 +5390,10 @@ } }, "node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.14.1.tgz", - "integrity": "sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -5316,14 +5403,13 @@ } }, "node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.14.1.tgz", - "integrity": "sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5345,16 +5431,15 @@ } }, "node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/utils": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.14.1.tgz", - "integrity": "sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5368,13 +5453,12 @@ } }, "node_modules/@stylistic/eslint-plugin-ts/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.14.1.tgz", - "integrity": "sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -5390,7 +5474,6 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -5400,7 +5483,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -5421,7 +5503,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5437,7 +5518,6 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -5658,11 +5738,10 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", + "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -5695,6 +5774,8 @@ }, "node_modules/@types/express-serve-static-core": { "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz", + "integrity": "sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg==", "dev": true, "license": "MIT", "dependencies": { @@ -6642,11 +6723,10 @@ } }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -7847,10 +7927,9 @@ "license": "CC-BY-4.0" }, "node_modules/capacitor-blob-writer": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/capacitor-blob-writer/-/capacitor-blob-writer-1.1.16.tgz", - "integrity": "sha512-MKeqLUB7hBmRiJQcMeucD22Ckql1tk1GFnk/xYQDtFNBhKcAJBoV5rMXgkTphvZoRFw9b8025PAdjSj23dbg7A==", - "license": "MIT", + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/capacitor-blob-writer/-/capacitor-blob-writer-1.1.17.tgz", + "integrity": "sha512-IixJbl0k4NQ+aPo+UbDvHJxztnaGymVMCkYoHKTjj3F3KDTsMEl5iK7fEZkQ5jhQabe8YJKW0wTGu6Qm/RmXrw==", "peerDependencies": { "@capacitor/core": ">=3.0.0", "@capacitor/filesystem": ">=1.0.0" @@ -7916,6 +7995,15 @@ "date-fns": ">=2.0.0" } }, + "node_modules/chartjs-plugin-annotation": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/chartjs-plugin-annotation/-/chartjs-plugin-annotation-3.0.1.tgz", + "integrity": "sha512-hlIrXXKqSDgb+ZjVYHefmlZUXK8KbkCPiynSVrTb/HjTMkT62cOInaT1NTQCKtxKKOm9oHp958DY3RTAFKtkHg==", + "license": "MIT", + "peerDependencies": { + "chart.js": ">=4.0.0" + } + }, "node_modules/chartjs-plugin-zoom": { "version": "2.0.1", "license": "MIT", @@ -8167,7 +8255,9 @@ } }, "node_modules/compare-versions": { - "version": "6.1.0", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", + "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", "license": "MIT" }, "node_modules/component-emitter": { @@ -15527,39 +15617,28 @@ "license": "MIT" }, "node_modules/native-run": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/native-run/-/native-run-1.7.4.tgz", - "integrity": "sha512-yDEwTp66vmXpqFiSQzz4sVQgyq5U58gGRovglY4GHh12ITyWa6mh6Lbpm2gViVOVD1JYFtYnwcgr7GTFBinXNA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/native-run/-/native-run-2.0.1.tgz", + "integrity": "sha512-XfG1FBZLM50J10xH9361whJRC9SHZ0Bub4iNRhhI61C8Jv0e1ud19muex6sNKB51ibQNUJNuYn25MuYET/rE6w==", "dev": true, - "license": "MIT", "dependencies": { - "@ionic/utils-fs": "^3.1.6", - "@ionic/utils-terminal": "^2.3.3", + "@ionic/utils-fs": "^3.1.7", + "@ionic/utils-terminal": "^2.3.4", "bplist-parser": "^0.3.2", "debug": "^4.3.4", "elementtree": "^0.1.7", - "ini": "^3.0.1", - "plist": "^3.0.6", - "split2": "^4.1.0", + "ini": "^4.1.1", + "plist": "^3.1.0", + "split2": "^4.2.0", "through2": "^4.0.2", - "tslib": "^2.4.0", + "tslib": "^2.6.2", "yauzl": "^2.10.0" }, "bin": { "native-run": "bin/native-run" }, "engines": { - "node": ">=12.13.0" - } - }, - "node_modules/native-run/node_modules/ini": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=16.0.0" } }, "node_modules/native-run/node_modules/split2": { @@ -15567,7 +15646,6 @@ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dev": true, - "license": "ISC", "engines": { "node": ">= 10.x" } @@ -15641,6 +15719,19 @@ "@angular/core": "^16.0.0" } }, + "node_modules/ngx-device-detector": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ngx-device-detector/-/ngx-device-detector-6.0.2.tgz", + "integrity": "sha512-+zaYUYGepNE4vMBA/6kyc1rhuUm5uU4cwbvFEEy0gAY4OarId15zwcb1iyvQbyrLCXhZW0DrPZTBoQxzp7dyVw==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/common": "^16.0.0", + "@angular/core": "^16.0.0" + } + }, "node_modules/ngx-spinner": { "version": "16.0.2", "license": "MIT", @@ -20300,9 +20391,9 @@ } }, "node_modules/swiper": { - "version": "11.1.4", - "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.4.tgz", - "integrity": "sha512-1n7kbYJB2dFEpUHRFszq7gys/ofIBrMNibwTiMvPHwneKND/t9kImnHt6CfGPScMHgI+dWMbGTycCKGMoOO1KA==", + "version": "11.1.8", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.8.tgz", + "integrity": "sha512-sBFp7fA+IfZ/7BMcg8/JSEqDD1qZXBUyliT76yk3zIYVu2fMwFVAghhAJ9vBM5tJUtHW5qcD0pmeEGQs1EK14w==", "funding": [ { "type": "patreon", @@ -20313,7 +20404,6 @@ "url": "http://opencollective.com/swiper" } ], - "license": "MIT", "engines": { "node": ">= 4.7.0" } diff --git a/ui/package.json b/ui/package.json index cf51861bf7d..a5194f5d6bc 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "openems-ui", - "version": "2024.7.0", + "version": "2024.8.0", "license": "AGPL-3.0", "private": true, "dependencies": { @@ -13,38 +13,40 @@ "@angular/router": "~16.2.12", "@angular/service-worker": "~16.2.12", "@capacitor-community/file-opener": "^1.0.5", - "@capacitor/android": "5.2.3", + "@capacitor/android": "5.7.7", "@capacitor/app": "^5.0.6", - "@capacitor/core": "5.2.3", + "@capacitor/core": "5.7.7", "@capacitor/filesystem": "^5.2.0", - "@capacitor/ios": "5.2.3", + "@capacitor/ios": "5.7.7", "@capacitor/splash-screen": "^5.0.6", "@ionic-native/core": "^5.36.0", "@ionic-native/file-opener": "^5.36.0", "@ionic/angular": "^6.7.5", "@ionic/cli": "^7.1.6", "@ngx-formly/core": "^6.3.0", - "@ngx-formly/ionic": "^6.3.5", + "@ngx-formly/ionic": "^6.3.6", "@ngx-formly/schematics": "^6.3.0", "@ngx-translate/core": "^15.0.0", "@nodro7/angular-mydatepicker": "^0.14.0", - "capacitor-blob-writer": "^1.1.14", + "capacitor-blob-writer": "^1.1.17", "capacitor-ios-autofill-save-password": "^2.0.0", "capacitor-secure-storage-plugin": "^0.9.0", "chart.js": "^4.4.3", "chartjs-adapter-date-fns": "^3.0.0", + "chartjs-plugin-annotation": "^3.0.1", "chartjs-plugin-zoom": "^2.0.1", "classlist.js": "^1.1.20150312", - "compare-versions": "^6.1.0", + "compare-versions": "^6.1.1", "d3": "^7.9.0", "date-fns": "^2.30.0", "file-saver-es": "^2.0.5", "ng2-charts": "4.1.1", "ngx-cookie-service": "^16.1.0", + "ngx-device-detector": "^6.0.2", "ngx-spinner": "^16.0.2", "roboto-fontface": "^0.10.0", "rxjs": "~6.6.7", - "swiper": "11.1.4", + "swiper": "11.1.8", "tslib": "^2.6.2", "uuid": "^10.0.0", "zone.js": "~0.13.3" @@ -60,9 +62,9 @@ "@angular/compiler-cli": "^16.2.12", "@angular/language-service": "^16.2.12", "@capacitor/assets": "^3.0.0", - "@capacitor/cli": "5.2.3", + "@capacitor/cli": "6.1.1", "@ionic/angular-toolkit": "^11.0.1", - "@stylistic/eslint-plugin": "^2.2.2", + "@stylistic/eslint-plugin": "^2.4.0", "@types/jasmine": "~4.3.6", "@types/jasminewd2": "~2.0.13", "@types/node": "^20.12.6", diff --git a/ui/src/app/app-routing.module.ts b/ui/src/app/app-routing.module.ts index 4f24cc18d84..cee2a75e5c7 100644 --- a/ui/src/app/app-routing.module.ts +++ b/ui/src/app/app-routing.module.ts @@ -4,16 +4,18 @@ import { environment } from 'src/environments'; import { ChangelogViewComponent } from './changelog/view/view'; import { EdgeComponent } from './edge/edge.component'; -import { OverviewComponent as ChannelthresholdChartOverviewComponent } from './edge/history/Controller/ChannelThreshold/overview/overview'; -import { OverviewComponent as TimeOfUseTariffOverviewComponent } from './edge/history/Controller/Ess/TimeOfUseTariff/overview/overview'; import { OverviewComponent as AutarchyChartOverviewComponent } from './edge/history/common/autarchy/overview/overview'; +import { DetailsOverviewComponent as ConsumptionDetailsOverviewComponent } from './edge/history/common/consumption/details/details.overview'; import { OverviewComponent as ConsumptionChartOverviewComponent } from './edge/history/common/consumption/overview/overview'; import { OverviewComponent as GridChartOverviewComponent } from './edge/history/common/grid/overview/overview'; +import { DetailsOverviewComponent } from './edge/history/common/production/details/details.overview'; import { OverviewComponent as ProductionChartOverviewComponent } from './edge/history/common/production/overview/overview'; import { OverviewComponent as SelfconsumptionChartOverviewComponent } from './edge/history/common/selfconsumption/overview/overview'; +import { OverviewComponent as ChannelthresholdChartOverviewComponent } from './edge/history/Controller/ChannelThreshold/overview/overview'; +import { OverviewComponent as TimeOfUseTariffOverviewComponent } from './edge/history/Controller/Ess/TimeOfUseTariff/overview/overview'; +import { OverviewComponent as GridOptimizedChargeChartOverviewComponent } from './edge/history/Controller/Ess/GridoptimizedCharge/overview/overview'; import { DelayedSellToGridChartOverviewComponent } from './edge/history/delayedselltogrid/symmetricpeakshavingchartoverview/delayedselltogridchartoverview.component'; import { FixDigitalOutputChartOverviewComponent } from './edge/history/fixdigitaloutput/fixdigitaloutputchartoverview/fixdigitaloutputchartoverview.component'; -import { GridOptimizedChargeChartOverviewComponent } from './edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component'; import { HeatingelementChartOverviewComponent } from './edge/history/heatingelement/heatingelementchartoverview/heatingelementchartoverview.component'; import { HeatPumpChartOverviewComponent } from './edge/history/heatpump/heatpumpchartoverview/heatpumpchartoverview.component'; import { HistoryComponent as EdgeHistoryComponent } from './edge/history/history.component'; @@ -38,6 +40,7 @@ import { IndexComponent as EdgeSettingsComponentUpdateIndexComponentComponent } import { ComponentUpdateComponent as EdgeSettingsComponentUpdateComponentComponent } from './edge/settings/component/update/update.component'; import { JsonrpcTestComponent } from './edge/settings/jsonrpctest/jsonrpctest'; import { NetworkComponent as EdgeSettingsNetworkComponent } from './edge/settings/network/network.component'; +import { PowerAssistantComponent } from './edge/settings/powerassistant/powerassistant'; import { AliasUpdateComponent } from './edge/settings/profile/aliasupdate.component'; import { ProfileComponent as EdgeSettingsProfileComponent } from './edge/settings/profile/profile.component'; import { SettingsComponent as EdgeSettingsComponent } from './edge/settings/settings.component'; @@ -46,10 +49,10 @@ import { SystemExecuteComponent as EdgeSettingsSystemExecuteComponent } from './ import { SystemLogComponent as EdgeSettingsSystemLogComponent } from './edge/settings/systemlog/systemlog.component'; import { LoginComponent } from './index/login.component'; import { OverViewComponent } from './index/overview/overview.component'; -import { DataService } from './shared/genericComponents/shared/dataservice'; -import { UserComponent } from './user/user.component'; -import { DetailsOverviewComponent } from './edge/history/common/production/details/details.overview'; import { LoadingScreenComponent } from './index/shared/loading-screen'; +import { DataService } from './shared/components/shared/dataservice'; +import { UserComponent } from './user/user.component'; +import { CurrentAndVoltageOverviewComponent } from './shared/components/edge/meter/currentVoltage/currentVoltage.overview'; const routes: Routes = [ @@ -92,9 +95,12 @@ const routes: Routes = [ { path: ':componentId/timeslotpeakshavingchart', component: TimeslotPeakshavingChartOverviewComponent }, { path: 'autarchychart', component: AutarchyChartOverviewComponent }, { path: 'consumptionchart', component: ConsumptionChartOverviewComponent }, + { path: 'consumptionchart/:componentId', component: ConsumptionDetailsOverviewComponent }, + { path: 'consumptionchart/:componentId/currentVoltage', component: CurrentAndVoltageOverviewComponent }, { path: 'gridchart', component: GridChartOverviewComponent }, { path: 'productionchart', component: ProductionChartOverviewComponent }, { path: 'productionchart/:componentId', component: DetailsOverviewComponent }, + { path: 'productionchart/:componentId/currentVoltage', component: CurrentAndVoltageOverviewComponent }, { path: 'selfconsumptionchart', component: SelfconsumptionChartOverviewComponent }, { path: 'storagechart', component: StorageChartOverviewComponent }, @@ -121,6 +127,7 @@ const routes: Routes = [ { path: 'settings/app/single/:appId', component: EdgeSettingsAppSingle }, { path: 'settings/alerting', component: EdgeSettingsAlerting }, { path: 'settings/jsonrpctest', component: JsonrpcTestComponent }, + { path: 'settings/powerAssistant', component: PowerAssistantComponent, data: { navbarTitle: 'Power-Assistant' } }, ], }, diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index c0981692639..033478c4795 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -23,13 +23,14 @@ export class AppComponent implements OnInit, OnDestroy { public backUrl: string | boolean = '/'; public enableSideMenu: boolean; public isSystemLogEnabled: boolean = false; - private ngUnsubscribe: Subject = new Subject(); - private subscription: Subscription = new Subscription(); protected isUserAllowedToSeeOverview: boolean = false; protected isUserAllowedToSeeFooter: boolean = false; protected isHistoryDetailView: boolean = false; + private ngUnsubscribe: Subject = new Subject(); + private subscription: Subscription = new Subscription(); + constructor( private platform: Platform, public menu: MenuController, @@ -45,7 +46,6 @@ export class AppComponent implements OnInit, OnDestroy { ) { service.setLang(Language.getByKey(localStorage.LANGUAGE) ?? Language.getByBrowserLang(navigator.language)); - this.subscription.add( this.service.metadata.pipe(filter(metadata => !!metadata)).subscribe(metadata => { this.isUserAllowedToSeeOverview = UserPermission.isUserAllowedToSeeOverview(metadata.user); @@ -63,6 +63,12 @@ export class AppComponent implements OnInit, OnDestroy { SplashScreen.hide(); } + ngOnDestroy() { + this.ngUnsubscribe.next(); + this.ngUnsubscribe.complete(); + this.subscription.unsubscribe(); + } + ngOnInit() { // Checks if sessionStorage is not null, undefined or empty string @@ -86,7 +92,6 @@ export class AppComponent implements OnInit, OnDestroy { }); this.platform.ready().then(() => { - // OEM colors exist only after ionic is initialized, so the notch color has to be set here const notchColor = getComputedStyle(document.documentElement).getPropertyValue('--ion-color-background'); this.meta.updateTag( @@ -124,10 +129,4 @@ export class AppComponent implements OnInit, OnDestroy { } } } - - ngOnDestroy() { - this.ngUnsubscribe.next(); - this.ngUnsubscribe.complete(); - this.subscription.unsubscribe(); - } } diff --git a/ui/src/app/app.module.ts b/ui/src/app/app.module.ts index 343f78f6534..79a367d56af 100644 --- a/ui/src/app/app.module.ts +++ b/ui/src/app/app.module.ts @@ -8,9 +8,9 @@ import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { FORMLY_CONFIG } from '@ngx-formly/core'; import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; +import { AngularMyDatePickerModule } from '@nodro7/angular-mydatepicker'; import { CookieService } from 'ngx-cookie-service'; -import { AngularMyDatePickerModule } from '@nodro7/angular-mydatepicker'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { AppService } from './app.service'; @@ -21,21 +21,20 @@ import { SettingsModule as EdgeSettingsModule } from './edge/settings/settings.m import { SystemLogComponent } from './edge/settings/systemlog/systemlog.component'; import { IndexModule } from './index/index.module'; import { RegistrationModule } from './registration/registration.module'; -import { ChartOptionsPopoverComponent } from './shared/chartoptions/popover/popover.component'; -import { PickDatePopoverComponent } from './shared/pickdate/popover/popover.component'; +import { StatusSingleComponent } from './shared/components/status/single/status.component'; +import { ChartOptionsPopoverComponent } from './shared/legacy/chartoptions/popover/popover.component'; import { MyErrorHandler } from './shared/service/myerrorhandler'; import { Pagination } from './shared/service/pagination'; import { SharedModule } from './shared/shared.module'; -import { StatusSingleComponent } from './shared/status/single/status.component'; import { registerTranslateExtension } from './shared/translate.extension'; import { Language, MyTranslateLoader } from './shared/type/language'; import { UserModule } from './user/user.module'; +import { DeviceDetectorService } from 'ngx-device-detector'; @NgModule({ declarations: [ AppComponent, ChartOptionsPopoverComponent, - PickDatePopoverComponent, StatusSingleComponent, SystemLogComponent, ], @@ -62,6 +61,7 @@ import { UserModule } from './user/user.module'; { provide: LOCALE_ID, useValue: Language.DEFAULT.key }, // Use factory for formly. This allows us to use translations in validationMessages. { provide: FORMLY_CONFIG, multi: true, useFactory: registerTranslateExtension, deps: [TranslateService] }, + DeviceDetectorService, Pagination, CheckForUpdateService, AppService, diff --git a/ui/src/app/app.service.ts b/ui/src/app/app.service.ts index 397e6c06b35..5bff76b82b5 100644 --- a/ui/src/app/app.service.ts +++ b/ui/src/app/app.service.ts @@ -7,37 +7,83 @@ import { FileOpener } from '@ionic-native/file-opener'; import { AlertController } from '@ionic/angular'; import { TranslateService } from '@ngx-translate/core'; import { saveAs } from 'file-saver-es'; +import { DeviceDetectorService, DeviceInfo } from 'ngx-device-detector'; import { BehaviorSubject, Subject } from 'rxjs'; +import { environment } from 'src/environments'; import { JsonrpcRequest } from './shared/jsonrpc/base'; -import { Websocket } from './shared/shared'; @Injectable() export class AppService { + + public static readonly platform: string = Capacitor.getPlatform(); + public static isActive: BehaviorSubject = new BehaviorSubject(null); public static lastActive: Subject = new Subject(); - public static readonly isApp: boolean = Capacitor.getPlatform() !== 'web'; + public static deviceInfo: DeviceInfo; public static notifications: Map = new Map(); + private static isMobile: boolean = false; + constructor( - private websocket: Websocket, private alertCtrl: AlertController, private translate: TranslateService, - ) { } + private deviceService: DeviceDetectorService, + ) { + AppService.deviceInfo = this.deviceService.getDeviceInfo(); + AppService.isMobile = this.deviceService.isMobile(); + } - private async updateState() { - const { isActive } = await App.getState(); + public static handleRefresh() { + setTimeout(() => + window.location.reload() + , 1000); + } - if (isActive === true && AppService.isActive?.getValue() === false) { - window.location.reload(); + public static getAppStoreLink(): string | null { + if (this.isMobile) { + switch (AppService.deviceInfo.os) { + case 'iOS': + return environment.links.APP.IOS; + case 'Android': + return environment.links.APP.ANDROID; + default: + return null; + } + } + return null; + } + + static async writeAndOpenFile(data: Blob, fileName: string) { + if (!AppService.platform) { + saveAs(data, fileName); } - AppService.isActive.next(isActive); + const reader = new FileReader(); + reader.readAsDataURL(data); + reader.onloadend = async function () { + try { + const result = await Filesystem.writeFile({ + path: fileName, + data: reader.result.toString(), + directory: Directory.Data, + recursive: true, + encoding: Encoding.UTF8, + }); + + FileOpener.open(result.uri, data.type) + .then(() => console.log('File is opened')) + .catch(e => console.log('Error opening file', e)); + + console.log('Wrote file', result.uri); + } catch (e) { + console.error('Unable to write file', e); + } + }; } public listen() { - - // // Don't use in web - if (!AppService.isApp) { + // Don't use in web + if (AppService.platform === 'web') { return; } @@ -49,7 +95,6 @@ export class AppService { } public async downloadFile(path: string, blob: Blob, fileName: string) { - // await this.presentAlert("Di", "asd", () => { }).then((state) => { // console.log("state", state); // }); @@ -91,14 +136,12 @@ export class AppService { await readSecretFile(); } - /** * Method that shows a confirmation window for the app selection * * @param clickedApp the app that has been clicked */ public async presentAlert(header: string, message: string, successCallback: () => void) { - const alert = this.alertCtrl.create({ header: header, message: message, @@ -117,38 +160,13 @@ export class AppService { (await alert).present(); } - static async writeAndOpenFile(data: Blob, fileName: string) { + private async updateState() { + const { isActive } = await App.getState(); - if (!AppService.isApp) { - saveAs(data, fileName); + if (isActive === true && AppService.isActive?.getValue() === false) { + window.location.reload(); } - const reader = new FileReader(); - reader.readAsDataURL(data); - reader.onloadend = async function () { - try { - const result = await Filesystem.writeFile({ - path: fileName, - data: reader.result.toString(), - directory: Directory.Data, - recursive: true, - encoding: Encoding.UTF8, - }); - - FileOpener.open(result.uri, data.type) - .then(() => console.log('File is opened')) - .catch(e => console.log('Error opening file', e)); - - console.log('Wrote file', result.uri); - } catch (e) { - console.error('Unable to write file', e); - } - }; - } - - public static handleRefresh() { - setTimeout(() => - window.location.reload() - , 1000); + AppService.isActive.next(isActive); } } diff --git a/ui/src/app/changelog/view/component/changelog.component.ts b/ui/src/app/changelog/view/component/changelog.component.ts index 174c598fe38..cb3e44f3df8 100644 --- a/ui/src/app/changelog/view/component/changelog.component.ts +++ b/ui/src/app/changelog/view/component/changelog.component.ts @@ -14,19 +14,7 @@ export class ChangelogComponent { public environment = environment; - protected slice: number = 10; - protected showAll: boolean = false; - constructor( - public translate: TranslateService, - public service: Service, - private route: ActivatedRoute, - ) { } - public readonly roleIsAtLeast = Role.isAtLeast; - public numberToRole(role: number): string { - return Role[role].toLowerCase(); - } - public readonly changelogs: { title?: string, version?: string, @@ -40,4 +28,16 @@ export class ChangelogComponent { }, ]; + + protected slice: number = 10; + protected showAll: boolean = false; + constructor( + public translate: TranslateService, + public service: Service, + private route: ActivatedRoute, + ) { } + + public numberToRole(role: number): string { + return Role[role].toLowerCase(); + } } diff --git a/ui/src/app/changelog/view/component/changelog.constants.ts b/ui/src/app/changelog/view/component/changelog.constants.ts index 1341682b050..e2c21860448 100644 --- a/ui/src/app/changelog/view/component/changelog.constants.ts +++ b/ui/src/app/changelog/view/component/changelog.constants.ts @@ -2,7 +2,7 @@ import { Role } from "src/app/shared/type/role"; export class Changelog { - public static readonly UI_VERSION = "2024.7.0"; + public static readonly UI_VERSION = "2024.8.0"; public static product(...products: Product[]) { return products.map(product => Changelog.link(product.name, product.url)).join(", ") + '. '; @@ -37,13 +37,13 @@ export class Product { public static readonly OPENEMS_BACKEND = new Product('OpenEMS Edge', 'https://github.com/OpenEMS/openems'); // private to disallow creating other instances of this type - private constructor(public readonly name: string, public readonly url: any) { + private constructor(public readonly name: string, public readonly url: string) { } } export class App { // private to disallow creating other instances of this type - private constructor(public readonly name: string, public readonly url: any) { + private constructor(public readonly name: string, public readonly url: string) { } } @@ -52,7 +52,7 @@ export class OpenemsComponent { public static readonly SDM630_ZAEHLER = new OpenemsComponent('SDM 630 Zähler', 'https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.meter.microcare.sdm630'); // private to disallow creating other instances of this type - private constructor(public readonly name: string, public readonly url: any) { + private constructor(public readonly name: string, public readonly url: string) { } } diff --git a/ui/src/app/edge/edge.component.ts b/ui/src/app/edge/edge.component.ts index f732a106824..8f6f8c7e965 100644 --- a/ui/src/app/edge/edge.component.ts +++ b/ui/src/app/edge/edge.component.ts @@ -17,9 +17,10 @@ import { ChannelAddress, Edge, Service, Websocket } from "src/app/shared/shared" }) export class EdgeComponent implements OnInit, OnDestroy { - private edge: Edge | null = null; protected latestIncident: { message: string | null, id: string } | null = null; + private edge: Edge | null = null; + constructor( private router: Router, private activatedRoute: ActivatedRoute, @@ -29,7 +30,6 @@ export class EdgeComponent implements OnInit, OnDestroy { public ngOnInit(): void { this.activatedRoute.params.subscribe((params) => { - // Set CurrentEdge in Metadata const edgeId = params['edgeId']; this.service.updateCurrentEdge(edgeId).then((edge) => { diff --git a/ui/src/app/edge/history/Controller/ChannelThreshold/chart/totalchart.component.ts b/ui/src/app/edge/history/Controller/ChannelThreshold/chart/totalchart.component.ts index 14d525d0c37..56270897edd 100644 --- a/ui/src/app/edge/history/Controller/ChannelThreshold/chart/totalchart.component.ts +++ b/ui/src/app/edge/history/Controller/ChannelThreshold/chart/totalchart.component.ts @@ -1,21 +1,16 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, Utils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, EdgeConfig } from 'src/app/shared/shared'; @Component({ selector: 'totalChart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class TotalChartComponent extends AbstractHistoryChart { - protected override getChartData(): HistoryUtils.ChartData { - - return TotalChartComponent.getChartData(this.config); - } - public static getChartData(config: EdgeConfig): HistoryUtils.ChartData { const controller: string[] = config?.getComponentIdsImplementingNature("io.openems.impl.controller.channelthreshold.ChannelThresholdController") @@ -34,7 +29,7 @@ export class TotalChartComponent extends AbstractHistoryChart { input: input, output: (data: HistoryUtils.ChannelData) => { - const output: HistoryUtils.DisplayValues[] = []; + const output: HistoryUtils.DisplayValue[] = []; const colors: string[] = ['rgb(0,0,139)', 'rgb(0,191,255)', 'rgb(0,0,56)', 'rgb(77,77,174)']; @@ -68,4 +63,10 @@ export class TotalChartComponent extends AbstractHistoryChart { }], }; } + + protected override getChartData(): HistoryUtils.ChartData { + + return TotalChartComponent.getChartData(this.config); + } + } diff --git a/ui/src/app/edge/history/Controller/ChannelThreshold/flat/flat.ts b/ui/src/app/edge/history/Controller/ChannelThreshold/flat/flat.ts index d46cae5a51f..e9c42616532 100644 --- a/ui/src/app/edge/history/Controller/ChannelThreshold/flat/flat.ts +++ b/ui/src/app/edge/history/Controller/ChannelThreshold/flat/flat.ts @@ -1,8 +1,8 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; -import { Converter } from 'src/app/shared/genericComponents/shared/converter'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; +import { Converter } from 'src/app/shared/components/shared/converter'; import { ChannelAddress, EdgeConfig } from 'src/app/shared/shared'; @Component({ diff --git a/ui/src/app/edge/history/Controller/ChannelThreshold/overview/overview.ts b/ui/src/app/edge/history/Controller/ChannelThreshold/overview/overview.ts index 216b7a5f1cc..8ff3f52f7cd 100644 --- a/ui/src/app/edge/history/Controller/ChannelThreshold/overview/overview.ts +++ b/ui/src/app/edge/history/Controller/ChannelThreshold/overview/overview.ts @@ -1,5 +1,5 @@ import { Component } from "@angular/core"; -import { AbstractHistoryChartOverview } from "src/app/shared/genericComponents/chart/abstractHistoryChartOverview"; +import { AbstractHistoryChartOverview } from "src/app/shared/components/chart/abstractHistoryChartOverview"; @Component({ selector: 'overview', diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/chart/chart.ts b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/chart/chart.ts new file mode 100644 index 00000000000..f016859e52f --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/chart/chart.ts @@ -0,0 +1,93 @@ +// @ts-strict-ignore +import { Component } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; +import { ChartAxis, HistoryUtils, Utils, YAxisTitle } from 'src/app/shared/service/utils'; +import { ChannelAddress, EdgeConfig } from 'src/app/shared/shared'; + +@Component({ + selector: 'gridOptimizedChargeChart', + templateUrl: '../../../../../../shared/components/chart/abstracthistorychart.html', +}) +export class GridOptimizedChargeChartComponent extends AbstractHistoryChart { + public static getChartData(component: EdgeConfig.Component, translate: TranslateService): HistoryUtils.ChartData { + return { + input: [ + { + name: 'DelayChargeMaximumChargeLimit', + powerChannel: new ChannelAddress(component.id, 'DelayChargeMaximumChargeLimit'), + }, + { + name: 'SellToGridLimitMinimumChargeLimit', + powerChannel: new ChannelAddress(component.id, 'SellToGridLimitMinimumChargeLimit'), + converter: HistoryUtils.ValueConverter.NEGATIVE_AS_ZERO, + }, + { + name: 'ProductionDcActualPower', + powerChannel: new ChannelAddress('_sum', 'ProductionDcActualPower'), + }, + { + name: 'EssActivePower', + powerChannel: new ChannelAddress('_sum', 'EssActivePower'), + }, + { + name: 'EssSoc', + powerChannel: new ChannelAddress('_sum', 'EssSoc'), + }, + ], + output: (data: HistoryUtils.ChannelData) => ([ + { + name: translate.instant('Edge.Index.Widgets.GridOptimizedCharge.maximumCharge'), + converter: () => data['DelayChargeMaximumChargeLimit'], + color: 'rgb(253,197,7)', + borderDash: [3, 3], + }, + { + name: translate.instant('Edge.Index.Widgets.GridOptimizedCharge.minimumCharge'), + converter: () => data['SellToGridLimitMinimumChargeLimit'], + color: 'rgb(200,0,0)', + borderDash: [3, 3], + }, + { + name: translate.instant('General.chargePower'), + converter: () => + (data['ProductionDcActualPower'] + ? + data['ProductionDcActualPower'].map((value, index) => { + return Utils.subtractSafely(data['EssActivePower'][index], value); + }) + : + data['EssActivePower'])?.map(val => HistoryUtils.ValueConverter.POSITIVE_AS_ZERO_AND_INVERT_NEGATIVE(val)) ?? null, + color: 'rgb(0,223,0)', + }, + { + name: translate.instant('General.soc'), + converter: () => data['EssSoc'].map(el => Utils.multiplySafely(el, 1000)), + color: 'rgb(189, 195, 199)', + borderDash: [10, 10], + yAxisId: ChartAxis.RIGHT, + custom: { + unit: YAxisTitle.PERCENTAGE, + }, + }, + ]), + tooltip: { + formatNumber: '1.0-2', + }, + yAxes: [{ + unit: YAxisTitle.ENERGY, + position: 'left', + yAxisId: ChartAxis.LEFT, + }, { + unit: YAxisTitle.PERCENTAGE, + position: 'right', + yAxisId: ChartAxis.RIGHT, + displayGrid: false, + }], + }; + } + protected getChartData(): HistoryUtils.ChartData { + return GridOptimizedChargeChartComponent.getChartData(this.component, this.translate); + } + +} diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/chart/sellToGridLimitChart.component.ts b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/chart/sellToGridLimitChart.component.ts new file mode 100644 index 00000000000..c1ebb017450 --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/chart/sellToGridLimitChart.component.ts @@ -0,0 +1,71 @@ +// @ts-strict-ignore +import { Component } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; +import { ChartAxis, HistoryUtils, Utils, YAxisTitle } from 'src/app/shared/service/utils'; +import { ChannelAddress } from 'src/app/shared/shared'; + +@Component({ + selector: 'sellToGridLimitChart', + templateUrl: '../../../../../../shared/components/chart/abstracthistorychart.html', +}) +export class SellToGridLimitChartComponent extends AbstractHistoryChart { + + public static getChartData(gridmeterId: string, componentId: string, translate: TranslateService): HistoryUtils.ChartData { + return { + input: [ + { + name: 'ActivePower', + powerChannel: new ChannelAddress(gridmeterId, 'ActivePower'), + converter: HistoryUtils.ValueConverter.ONLY_NEGATIVE_AND_NEGATIVE_AS_POSITIVE, + }, + { + name: '_PropertyMaximumSellToGridPower', + powerChannel: new ChannelAddress(componentId, '_PropertyMaximumSellToGridPower'), + }, + { + name: 'ProductionActivePower', + powerChannel: new ChannelAddress('_sum', 'ProductionActivePower'), + }, + ], + output: (data: HistoryUtils.ChannelData) => ([ + { + name: translate.instant('General.gridSell'), + converter: () => data['ActivePower'], + color: 'rgb(0,0,200)', + }, + { + name: translate.instant('Edge.Index.Widgets.GridOptimizedCharge.maximumGridFeedIn'), + converter: () => data['_PropertyMaximumSellToGridPower'], + color: 'rgb(0,0,0)', + borderDash: [3, 3], + }, + { + name: translate.instant('Edge.Index.Widgets.GridOptimizedCharge.MAXIMUM_GRIDSELL_WITH_CHARGE'), + converter: () => data['_PropertyMaximumSellToGridPower'].map(el => Utils.multiplySafely(el, 0.95)), + color: 'rgb(200,0,0)', + borderDash: [3, 3], + }, + { + name: translate.instant('General.production'), + converter: () => data['ProductionActivePower'], + color: 'rgb(45,143,171)', + }, + ]), + tooltip: { + formatNumber: '1.0-2', + }, + yAxes: [{ + unit: YAxisTitle.ENERGY, + position: 'left', + yAxisId: ChartAxis.LEFT, + }], + }; + } + + protected getChartData(): HistoryUtils.ChartData { + const gridMeterId = this.config.getComponentProperties(this.component.id)['meter.id']; + return SellToGridLimitChartComponent.getChartData(gridMeterId, this.component.id, this.translate); + } + +} diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/flat/flat.html b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/flat/flat.html new file mode 100644 index 00000000000..a369cd1cdb2 --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/flat/flat.html @@ -0,0 +1,13 @@ + + + + + diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/flat/flat.ts b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/flat/flat.ts new file mode 100644 index 00000000000..60c63aa9d5a --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/flat/flat.ts @@ -0,0 +1,14 @@ +// @ts-strict-ignore +import { Component } from '@angular/core'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; +import { Converter } from 'src/app/shared/components/shared/converter'; +import { Filter } from 'src/app/shared/components/shared/filter'; + +@Component({ + selector: 'gridOptimizedChargeWidget', + templateUrl: './flat.html', +}) +export class FlatComponent extends AbstractFlatWidget { + protected FORMAT_SECONDS_TO_DURATION = Converter.FORMAT_SECONDS_TO_DURATION(this.translate.currentLang); + protected filter: Filter = (value: number): boolean => value > 59; +} diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/gridOptimizeCharge.module.ts b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/gridOptimizeCharge.module.ts new file mode 100644 index 00000000000..f36ca307f69 --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/gridOptimizeCharge.module.ts @@ -0,0 +1,28 @@ +import { NgModule } from "@angular/core"; +import { BrowserModule } from "@angular/platform-browser"; +import { SharedModule } from "src/app/shared/shared.module"; + +import { GridOptimizedChargeChartComponent } from "./chart/chart"; +import { SellToGridLimitChartComponent } from "./chart/sellToGridLimitChart.component"; +import { FlatComponent } from "./flat/flat"; +import { OverviewComponent } from "./overview/overview"; + +@NgModule({ + imports: [ + BrowserModule, + SharedModule, + ], + declarations: [ + FlatComponent, + OverviewComponent, + GridOptimizedChargeChartComponent, + SellToGridLimitChartComponent, + ], + exports: [ + FlatComponent, + OverviewComponent, + GridOptimizedChargeChartComponent, + SellToGridLimitChartComponent, + ], +}) +export class GridOptimizeCharge { } diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/overview/overview.html b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/overview/overview.html new file mode 100644 index 00000000000..370e95f0b7e --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/overview/overview.html @@ -0,0 +1,32 @@ + + + + + + + + + + + Edge.Index.Widgets.GridOptimizedCharge.History.priorityDescription + + + + + + + + + + + + + + Edge.Index.Widgets.GridOptimizedCharge.History.batteryChargeGridLimitDescription + + + + + + diff --git a/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/overview/overview.ts b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/overview/overview.ts new file mode 100644 index 00000000000..0fdf540900f --- /dev/null +++ b/ui/src/app/edge/history/Controller/Ess/GridoptimizedCharge/overview/overview.ts @@ -0,0 +1,9 @@ +// @ts-strict-ignore +import { Component } from '@angular/core'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; + +@Component({ + selector: 'gridoptimizedcharge-chart-overview', + templateUrl: './overview.html', +}) +export class OverviewComponent extends AbstractHistoryChartOverview { } diff --git a/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/chart/chart.ts b/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/chart/chart.ts index 84ad2eb878e..8bd48521984 100644 --- a/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/chart/chart.ts +++ b/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/chart/chart.ts @@ -2,18 +2,18 @@ import { Component, Input } from '@angular/core'; import * as Chart from 'chart.js'; import { calculateResolution, ChronoUnit, Resolution } from 'src/app/edge/history/shared'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { ChartAxis, HistoryUtils, TimeOfUseTariffUtils, Utils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, Currency, EdgeConfig } from "src/app/shared/shared"; import { ColorUtils } from 'src/app/shared/utils/color/color.utils'; @Component({ selector: 'scheduleChart', - templateUrl: '../../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { - @Input() public override component: EdgeConfig.Component; + @Input({ required: true }) public override component!: EdgeConfig.Component; private currencyLabel: Currency.Label; // Default diff --git a/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/flat/flat.ts b/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/flat/flat.ts index eeb4fb4fab2..3eb8b26a26f 100644 --- a/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/flat/flat.ts +++ b/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/flat/flat.ts @@ -1,7 +1,6 @@ -// @ts-strict-ignore import { Component, Input } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; import { ChannelAddress, CurrentData } from 'src/app/shared/shared'; @@ -11,20 +10,21 @@ import { ChannelAddress, CurrentData } from 'src/app/shared/shared'; }) export class FlatComponent extends AbstractFlatWidget { - @Input() public period: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; protected delayedActiveTimeOverPeriod: number | null = null; protected chargedConsumptionActiveTimeOverPeriod: number | null = null; - protected override onCurrentData(currentData: CurrentData) { - this.delayedActiveTimeOverPeriod = currentData.allComponents[this.componentId + '/DelayedTime']; - this.chargedConsumptionActiveTimeOverPeriod = currentData.allComponents[this.componentId + '/ChargedTime']; - } - override getChannelAddresses(): ChannelAddress[] { return [ new ChannelAddress(this.componentId, 'DelayedTime'), new ChannelAddress(this.componentId, 'ChargedTime'), ]; } + + protected override onCurrentData(currentData: CurrentData) { + this.delayedActiveTimeOverPeriod = currentData.allComponents[this.componentId + '/DelayedTime']; + this.chargedConsumptionActiveTimeOverPeriod = currentData.allComponents[this.componentId + '/ChargedTime']; + } + } diff --git a/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/overview/overview.ts b/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/overview/overview.ts index 31104830130..a3f812c1a88 100644 --- a/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/overview/overview.ts +++ b/ui/src/app/edge/history/Controller/Ess/TimeOfUseTariff/overview/overview.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChartOverview } from 'src/app/shared/genericComponents/chart/abstractHistoryChartOverview'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; @Component({ templateUrl: './overview.html', diff --git a/ui/src/app/edge/history/Controller/controller.module.ts b/ui/src/app/edge/history/Controller/controller.module.ts index 0dd4866545e..4be2b267717 100644 --- a/ui/src/app/edge/history/Controller/controller.module.ts +++ b/ui/src/app/edge/history/Controller/controller.module.ts @@ -1,15 +1,19 @@ import { NgModule } from "@angular/core"; + import { ChannelThreshold } from "./ChannelThreshold/channelThreshold.module"; +import { GridOptimizeCharge } from "./Ess/GridoptimizedCharge/gridOptimizeCharge.module"; import { TimeOfUseTariff } from "./Ess/TimeOfUseTariff/timeOfUseTariff.module"; @NgModule({ imports: [ ChannelThreshold, TimeOfUseTariff, + GridOptimizeCharge, ], exports: [ ChannelThreshold, TimeOfUseTariff, + GridOptimizeCharge, ], }) export class Controller { } diff --git a/ui/src/app/edge/history/abstracthistorychart.ts b/ui/src/app/edge/history/abstracthistorychart.ts index 7f94b600242..ded3ceb8226 100644 --- a/ui/src/app/edge/history/abstracthistorychart.ts +++ b/ui/src/app/edge/history/abstracthistorychart.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { TranslateService } from '@ngx-translate/core'; import * as Chart from 'chart.js'; -import { AbstractHistoryChart as NewAbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart as NewAbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { JsonrpcResponseError } from 'src/app/shared/jsonrpc/base'; import { QueryHistoricTimeseriesDataRequest } from "src/app/shared/jsonrpc/request/queryHistoricTimeseriesDataRequest"; import { QueryHistoricTimeseriesEnergyPerPeriodRequest } from 'src/app/shared/jsonrpc/request/queryHistoricTimeseriesEnergyPerPeriodRequest'; @@ -13,11 +13,16 @@ import { DateUtils } from 'src/app/shared/utils/date/dateutils'; import { DateTimeUtils } from 'src/app/shared/utils/datetime/datetime-utils'; import { calculateResolution, ChronoUnit, DEFAULT_TIME_CHART_OPTIONS, EMPTY_DATASET, Resolution, setLabelVisible } from './shared'; +import { ChartConstants } from 'src/app/shared/components/chart/chart.constants'; // NOTE: Auto-refresh of widgets is currently disabled to reduce server load export abstract class AbstractHistoryChart { public loading: boolean = true; + public labels: Date[] = []; + public datasets: Chart.ChartDataset[] = []; + public options: Chart.ChartOptions | null = null; + public colors = []; protected edge: Edge | null = null; protected errorResponse: JsonrpcResponseError | null = null; @@ -29,10 +34,6 @@ export abstract class AbstractHistoryChart { // private ngUnsubscribe: Subject = new Subject(); - public labels: Date[] = []; - public datasets: Chart.ChartDataset[] = []; - public options: Chart.ChartOptions | null = null; - public colors = []; // prevents subscribing more than once protected hasSubscribed: boolean = false; @@ -59,17 +60,195 @@ export abstract class AbstractHistoryChart { public readonly spinnerId: string, protected service: Service, protected translate: TranslateService, - ) { + ) { } + + /** + * Generates a Tooltip Title string from a 'fromDate' and 'toDate'. + * + * @param fromDate the From-Date + * @param toDate the To-Date + * @param date Date from TooltipItem + * @returns period for Tooltip Header + */ + protected static toTooltipTitle(fromDate: Date, toDate: Date, date: Date, service: Service): string { + const unit = calculateResolution(service, fromDate, toDate).resolution.unit; + if (unit == ChronoUnit.Type.MONTHS) { + return date.toLocaleDateString('default', { month: 'long' }); + + } else if (unit == ChronoUnit.Type.DAYS) { + return date.toLocaleDateString('default', { day: '2-digit', month: 'long' }); + + } else { + // Default + return date.toLocaleString('default', { day: '2-digit', month: '2-digit', year: '2-digit' }) + ' ' + date.toLocaleTimeString('default', { hour12: false, hour: '2-digit', minute: '2-digit' }); + } } /** - * Gets the ChannelAddresses that should be queried. + * Start NGX-Spinner + * + * Spinner will appear inside html tag only + * + * @example * - * @param edge the current Edge - * @param config the EdgeConfig + * @param selector selector for specific spinner + */ + public startSpinner() { + this.service.startSpinner(this.spinnerId); + } + + /** + * Stop NGX-Spinner + * @param selector selector for specific spinner */ - protected abstract getChannelAddresses(edge: Edge, config: EdgeConfig): Promise; + public stopSpinner() { + this.service.stopSpinner(this.spinnerId); + } + + /** + * + * Sets chart options + * + * @deprecated used for charts not using {@link NewAbstractHistoryChart} but {@link AbstractHistoryChart} + */ + public setOptions(options: Chart.ChartOptions): Promise { + + return new Promise((resolve) => { + const locale = this.service.translate.currentLang; + const yAxis: HistoryUtils.yAxes = { position: 'left', unit: this.unit, yAxisId: ChartAxis.LEFT }; + const chartObject: HistoryUtils.ChartData = { + input: [], + output: () => [], + yAxes: [yAxis], + tooltip: { + formatNumber: this.formatNumber, + }, + }; + const unit = this.unit; + const formatNumber = this.formatNumber; + const colors = this.colors; + const translate = this.translate; + this.service.getConfig().then((conf) => { + options.datasets.line.borderWidth = 2; + /** Hide default displayed yAxis */ + options.scales['y'] = { + display: false, + }; + + // Overwrite TooltipsTitle + options.plugins.tooltip.callbacks.title = (tooltipItems: Chart.TooltipItem[]): string => { + if (tooltipItems?.length === 0) { + return null; + } + const date = DateUtils.stringToDate(tooltipItems[0]?.label); + return AbstractHistoryChart.toTooltipTitle(this.service.historyPeriod.value.from, this.service.historyPeriod.value.to, date, this.service); + }; + + options.plugins.tooltip.callbacks.label = function (tooltipItem: Chart.TooltipItem) { + const label = tooltipItem.dataset.label; + const value = tooltipItem.dataset.data[tooltipItem.dataIndex]; + + const customUnit = tooltipItem.dataset.unit ?? null; + return label.split(":")[0] + ": " + NewAbstractHistoryChart.getToolTipsSuffix("", value, formatNumber, customUnit ?? unit, 'line', locale, translate, conf); + }; + + options.plugins.tooltip.callbacks.labelColor = (item: Chart.TooltipItem) => { + const color = colors[item.datasetIndex]; + + if (!color) { + return; + } + + return { + borderColor: color.borderColor, + backgroundColor: color.backgroundColor, + }; + }; + + options.plugins.legend.labels.generateLabels = function (chart: Chart.Chart) { + const chartLegendLabelItems: Chart.LegendItem[] = []; + chart.data.datasets.forEach((dataset, index) => { + + const color = colors[index]; + + if (!color) { + return; + } + + // Set colors manually + dataset.backgroundColor = color.backgroundColor ?? dataset.backgroundColor; + dataset.borderColor = color.borderColor ?? dataset.borderColor; + + chartLegendLabelItems.push({ + text: dataset.label, + datasetIndex: index, + fillStyle: color.backgroundColor, + fontColor: getComputedStyle(document.documentElement).getPropertyValue('--ion-color-text'), + hidden: !chart.isDatasetVisible(index), + lineWidth: 2, + ...(dataset['borderDash'] && { lineDash: dataset['borderDash'] }), + strokeStyle: color.borderColor, + }); + }); + return chartLegendLabelItems; + }; + + // Remove duplicates from legend, if legendItem with two or more occurrences in legend, use one legendItem to trigger them both + options.plugins.legend.onClick = function (event: Chart.ChartEvent, legendItem: Chart.LegendItem, legend) { + const chart: Chart.Chart = this.chart; + + const legendItems = chart.data.datasets.reduce((arr, ds, i) => { + if (ds.label == legendItem.text) { + arr.push({ label: ds.label, index: i }); + } + return arr; + }, []); + + legendItems.forEach(item => { + // original.call(this, event, legendItem1); + setLabelVisible(item.label, !chart.isDatasetVisible(legendItem.datasetIndex)); + const meta = chart.getDatasetMeta(item.index); + // See controller.isDatasetVisible comment + meta.hidden = meta.hidden === null ? !chart.data.datasets[item.index].hidden : null; + }); + + // We hid a dataset ... rerender the chart + chart.update(); + }; + + const timeFormat = calculateResolution(this.service, this.service.historyPeriod.value.from, this.service.historyPeriod.value.to).timeFormat; + options.scales.x['time'].unit = timeFormat; + switch (timeFormat) { + case 'hour': + options.scales.x.ticks['source'] = 'auto';//labels,auto + options.scales.x.ticks.maxTicksLimit = 31; + break; + case 'day': + case 'month': + options.scales.x.ticks['source'] = 'data'; + break; + } + + // Only one yAxis defined + options = NewAbstractHistoryChart.getYAxisOptions(options, yAxis, this.translate, 'line', locale, ChartConstants.EMPTY_DATASETS, false); + + options.scales.x['stacked'] = true; + options.scales[ChartAxis.LEFT]['stacked'] = false; + options = NewAbstractHistoryChart.applyChartTypeSpecificOptionsChanges('line', options, this.service, chartObject); + + /** Overwrite default yAxisId */ + this.datasets = this.datasets + .map(el => { + el['yAxisID'] = ChartAxis.LEFT; + return el; + }); + }).then(() => { + this.options = options; + resolve(); + }); + }); + } /** * Sends the Historic Timeseries Data Query and makes sure the result is not empty. @@ -156,28 +335,6 @@ export abstract class AbstractHistoryChart { return response; } - /** - * Generates a Tooltip Title string from a 'fromDate' and 'toDate'. - * - * @param fromDate the From-Date - * @param toDate the To-Date - * @param date Date from TooltipItem - * @returns period for Tooltip Header - */ - protected static toTooltipTitle(fromDate: Date, toDate: Date, date: Date, service: Service): string { - const unit = calculateResolution(service, fromDate, toDate).resolution.unit; - if (unit == ChronoUnit.Type.MONTHS) { - return date.toLocaleDateString('default', { month: 'long' }); - - } else if (unit == ChronoUnit.Type.DAYS) { - return date.toLocaleDateString('default', { day: '2-digit', month: 'long' }); - - } else { - // Default - return date.toLocaleString('default', { day: '2-digit', month: '2-digit', year: '2-digit' }) + ' ' + date.toLocaleTimeString('default', { hour12: false, hour: '2-digit', minute: '2-digit' }); - } - } - /** * Creates the default Chart options * @@ -239,16 +396,6 @@ export abstract class AbstractHistoryChart { // this.ngUnsubscribe.complete(); } - /** - * Sets the Label of Chart - */ - protected abstract setLabel(config: EdgeConfig); - - /** - * Updates and Fills the Chart - */ - protected abstract updateChart(); - /** * Initializes empty chart on error * @param spinnerSelector to stop spinner @@ -262,173 +409,26 @@ export abstract class AbstractHistoryChart { } /** - * Sets Chart Height - */ + * Sets Chart Height + */ protected abstract getChartHeight(); /** - * Start NGX-Spinner - * - * Spinner will appear inside html tag only - * - * @example + * Gets the ChannelAddresses that should be queried. * - * @param selector selector for specific spinner + * @param edge the current Edge + * @param config the EdgeConfig */ - public startSpinner() { - this.service.startSpinner(this.spinnerId); - } + protected abstract getChannelAddresses(edge: Edge, config: EdgeConfig): Promise; /** - * Stop NGX-Spinner - * @param selector selector for specific spinner - */ - public stopSpinner() { - this.service.stopSpinner(this.spinnerId); - } + * Sets the Label of Chart + */ + protected abstract setLabel(config: EdgeConfig); /** - * - * Sets chart options - * - * @deprecated used for charts not using {@link NewAbstractHistoryChart} but {@link AbstractHistoryChart} + * Updates and Fills the Chart */ - public setOptions(options: Chart.ChartOptions): Promise { - - return new Promise((resolve) => { - const locale = this.service.translate.currentLang; - const yAxis: HistoryUtils.yAxes = { position: 'left', unit: this.unit, yAxisId: ChartAxis.LEFT }; - const chartObject: HistoryUtils.ChartData = { - input: [], - output: () => [], - yAxes: [yAxis], - tooltip: { - formatNumber: this.formatNumber, - }, - }; - const unit = this.unit; - const formatNumber = this.formatNumber; - const colors = this.colors; - const translate = this.translate; - this.service.getConfig().then((conf) => { - options.datasets.line.borderWidth = 2; - - /** Hide default displayed yAxis */ - options.scales['y'] = { - display: false, - }; - - // Overwrite TooltipsTitle - options.plugins.tooltip.callbacks.title = (tooltipItems: Chart.TooltipItem[]): string => { - if (tooltipItems?.length === 0) { - return null; - } - const date = DateUtils.stringToDate(tooltipItems[0]?.label); - return AbstractHistoryChart.toTooltipTitle(this.service.historyPeriod.value.from, this.service.historyPeriod.value.to, date, this.service); - }; - - options.plugins.tooltip.callbacks.label = function (tooltipItem: Chart.TooltipItem) { - const label = tooltipItem.dataset.label; - const value = tooltipItem.dataset.data[tooltipItem.dataIndex]; - - const customUnit = tooltipItem.dataset.unit ?? null; - return label.split(":")[0] + ": " + NewAbstractHistoryChart.getToolTipsSuffix("", value, formatNumber, customUnit ?? unit, 'line', locale, translate, conf); - }; - - options.plugins.tooltip.callbacks.labelColor = (item: Chart.TooltipItem) => { - const color = colors[item.datasetIndex]; - - if (!color) { - return; - } - - return { - borderColor: color.borderColor, - backgroundColor: color.backgroundColor, - }; - }; - - options.plugins.legend.labels.generateLabels = function (chart: Chart.Chart) { - const chartLegendLabelItems: Chart.LegendItem[] = []; - chart.data.datasets.forEach((dataset, index) => { - - const color = colors[index]; - - if (!color) { - return; - } - - // Set colors manually - dataset.backgroundColor = color.backgroundColor ?? dataset.backgroundColor; - dataset.borderColor = color.borderColor ?? dataset.borderColor; - - chartLegendLabelItems.push({ - text: dataset.label, - datasetIndex: index, - fillStyle: color.backgroundColor, - fontColor: getComputedStyle(document.documentElement).getPropertyValue('--ion-color-text'), - hidden: !chart.isDatasetVisible(index), - lineWidth: 2, - ...(dataset['borderDash'] && { lineDash: dataset['borderDash'] }), - strokeStyle: color.borderColor, - }); - }); - return chartLegendLabelItems; - }; - - // Remove duplicates from legend, if legendItem with two or more occurrences in legend, use one legendItem to trigger them both - options.plugins.legend.onClick = function (event: Chart.ChartEvent, legendItem: Chart.LegendItem, legend) { - const chart: Chart.Chart = this.chart; - - const legendItems = chart.data.datasets.reduce((arr, ds, i) => { - if (ds.label == legendItem.text) { - arr.push({ label: ds.label, index: i }); - } - return arr; - }, []); - - legendItems.forEach(item => { - // original.call(this, event, legendItem1); - setLabelVisible(item.label, !chart.isDatasetVisible(legendItem.datasetIndex)); - const meta = chart.getDatasetMeta(item.index); - // See controller.isDatasetVisible comment - meta.hidden = meta.hidden === null ? !chart.data.datasets[item.index].hidden : null; - }); - - // We hid a dataset ... rerender the chart - chart.update(); - }; - - const timeFormat = calculateResolution(this.service, this.service.historyPeriod.value.from, this.service.historyPeriod.value.to).timeFormat; - options.scales.x['time'].unit = timeFormat; - switch (timeFormat) { - case 'hour': - options.scales.x.ticks['source'] = 'auto';//labels,auto - options.scales.x.ticks.maxTicksLimit = 31; - break; - case 'day': - case 'month': - options.scales.x.ticks['source'] = 'data'; - break; - } - - // Only one yAxis defined - options = NewAbstractHistoryChart.getYAxisOptions(options, yAxis, this.translate, 'line', locale, false); - - options.scales.x['stacked'] = true; - options.scales[ChartAxis.LEFT]['stacked'] = false; - options = NewAbstractHistoryChart.applyChartTypeSpecificOptionsChanges('line' + this.spinnerId, options, this.service, chartObject); + protected abstract updateChart(); - /** Overwrite default yAxisId */ - this.datasets = this.datasets - .map(el => { - el['yAxisID'] = ChartAxis.LEFT; - return el; - }); - }).then(() => { - this.options = options; - resolve(); - }); - }); - } } diff --git a/ui/src/app/edge/history/chpsoc/chart.component.ts b/ui/src/app/edge/history/chpsoc/chart.component.ts index aa37afaee2f..3be26bf6160 100644 --- a/ui/src/app/edge/history/chpsoc/chart.component.ts +++ b/ui/src/app/edge/history/chpsoc/chart.component.ts @@ -14,12 +14,8 @@ import { YAxisTitle } from 'src/app/shared/service/utils'; }) export class ChpSocChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; constructor( protected override service: Service, @@ -29,6 +25,10 @@ export class ChpSocChartComponent extends AbstractHistoryChart implements OnInit super("chpsoc-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -38,6 +38,10 @@ export class ChpSocChartComponent extends AbstractHistoryChart implements OnInit this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -164,7 +168,4 @@ export class ChpSocChartComponent extends AbstractHistoryChart implements OnInit this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/chpsoc/chpsocchartoverview/chpsocchartoverview.component.ts b/ui/src/app/edge/history/chpsoc/chpsocchartoverview/chpsocchartoverview.component.ts index e5b740eccec..da9418c8c68 100644 --- a/ui/src/app/edge/history/chpsoc/chpsocchartoverview/chpsocchartoverview.component.ts +++ b/ui/src/app/edge/history/chpsoc/chpsocchartoverview/chpsocchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; @@ -9,12 +8,10 @@ import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; }) export class ChpSocChartOverviewComponent implements OnInit { - public edge: Edge = null; - public config: EdgeConfig = null; - - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "chpsoc-chart-overview"; + public edge: Edge | null = null; + public config: EdgeConfig | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/chpsoc/widget.component.ts b/ui/src/app/edge/history/chpsoc/widget.component.ts index 090b3ed1da8..a72c4c2fb34 100644 --- a/ui/src/app/edge/history/chpsoc/widget.component.ts +++ b/ui/src/app/edge/history/chpsoc/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { QueryHistoricTimeseriesDataResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesDataResponse'; @@ -14,14 +13,13 @@ import { calculateActiveTimeOverPeriod } from '../shared'; }) export class ChpSocWidgetComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "chpsocWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; - public activeSecondsOverPeriod: number = null; - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public activeSecondsOverPeriod: number | null = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public override service: Service, diff --git a/ui/src/app/edge/history/common/autarchy/chart/chart.ts b/ui/src/app/edge/history/common/autarchy/chart/chart.ts index d6896069cee..e7a0998880c 100644 --- a/ui/src/app/edge/history/common/autarchy/chart/chart.ts +++ b/ui/src/app/edge/history/common/autarchy/chart/chart.ts @@ -1,13 +1,13 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, Utils } from 'src/app/shared/shared'; @Component({ selector: 'autarchychart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { diff --git a/ui/src/app/edge/history/common/autarchy/flat/flat.ts b/ui/src/app/edge/history/common/autarchy/flat/flat.ts index 2cfb7757b8e..748253a44bd 100644 --- a/ui/src/app/edge/history/common/autarchy/flat/flat.ts +++ b/ui/src/app/edge/history/common/autarchy/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from '../../../../../shared/shared'; @Component({ diff --git a/ui/src/app/edge/history/common/autarchy/overview/overview.ts b/ui/src/app/edge/history/common/autarchy/overview/overview.ts index 31104830130..a3f812c1a88 100644 --- a/ui/src/app/edge/history/common/autarchy/overview/overview.ts +++ b/ui/src/app/edge/history/common/autarchy/overview/overview.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChartOverview } from 'src/app/shared/genericComponents/chart/abstractHistoryChartOverview'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; @Component({ templateUrl: './overview.html', diff --git a/ui/src/app/edge/history/common/consumption/Consumption.ts b/ui/src/app/edge/history/common/consumption/Consumption.ts index bc0ccaadea4..e6ce25df02b 100644 --- a/ui/src/app/edge/history/common/consumption/Consumption.ts +++ b/ui/src/app/edge/history/common/consumption/Consumption.ts @@ -1,25 +1,41 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { FooterNavigationModule } from 'src/app/shared/components/footer/subnavigation/footerNavigation.module'; import { SharedModule } from 'src/app/shared/shared.module'; import { ChartComponent } from './chart/chart'; +import { ChartComponent as DetailsChartComponent } from './details/chart/chart'; +import { DetailsOverviewComponent } from './details/details.overview'; import { FlatComponent } from './flat/flat'; import { OverviewComponent } from './overview/overview'; +import { CurrentVoltageModule } from 'src/app/shared/components/edge/meter/currentVoltage/currentVoltageModule'; @NgModule({ imports: [ BrowserModule, SharedModule, + FooterNavigationModule, + CurrentVoltageModule, ], declarations: [ + // consumptionChart FlatComponent, ChartComponent, OverviewComponent, + + // consumptionChart:componentId + DetailsOverviewComponent, + DetailsChartComponent, ], exports: [ + // consumptionChart FlatComponent, ChartComponent, OverviewComponent, + + // consumptionChart:componentId + DetailsOverviewComponent, + DetailsChartComponent, ], }) export class Common_Consumption { } diff --git a/ui/src/app/edge/history/common/consumption/chart/channels.spec.ts b/ui/src/app/edge/history/common/consumption/chart/channels.spec.ts index 259ad7753a5..fdb26cdf064 100644 --- a/ui/src/app/edge/history/common/consumption/chart/channels.spec.ts +++ b/ui/src/app/edge/history/common/consumption/chart/channels.spec.ts @@ -1,4 +1,4 @@ -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; import { QueryHistoricTimeseriesDataResponse } from "src/app/shared/jsonrpc/response/queryHistoricTimeseriesDataResponse"; import { QueryHistoricTimeseriesEnergyPerPeriodResponse } from "src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyPerPeriodResponse"; import { QueryHistoricTimeseriesEnergyResponse } from "src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse"; diff --git a/ui/src/app/edge/history/common/consumption/chart/chart.constants.spec.ts b/ui/src/app/edge/history/common/consumption/chart/chart.constants.spec.ts index d29f93c738f..ef1030814ca 100644 --- a/ui/src/app/edge/history/common/consumption/chart/chart.constants.spec.ts +++ b/ui/src/app/edge/history/common/consumption/chart/chart.constants.spec.ts @@ -1,8 +1,8 @@ -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; -import { OeChartTester } from "src/app/shared/genericComponents/shared/testing/tester"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; +import { OeChartTester } from "src/app/shared/components/shared/testing/tester"; import { EdgeConfig } from "src/app/shared/shared"; -import { removeFunctions, TestContext } from "src/app/shared/test/utils.spec"; +import { removeFunctions, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { ChartComponent } from "./chart"; diff --git a/ui/src/app/edge/history/common/consumption/chart/chart.spec.ts b/ui/src/app/edge/history/common/consumption/chart/chart.spec.ts index 9e124f57aed..2ff4b493fe0 100644 --- a/ui/src/app/edge/history/common/consumption/chart/chart.spec.ts +++ b/ui/src/app/edge/history/common/consumption/chart/chart.spec.ts @@ -1,8 +1,8 @@ // @ts-strict-ignore -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; +import { sharedSetup, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; -import { sharedSetup, TestContext } from "../../../../../shared/test/utils.spec"; import { DATA, LABELS } from "../../energy/chart/chart.constants.spec"; import { History } from "./channels.spec"; import { expectView } from "./chart.constants.spec"; @@ -64,7 +64,7 @@ describe('History Consumption', () => { DATA('Gesamt: 1.033,4 kWh', [1.7843478512581188, 0.9551978135997077, 1.6049176251387696, 1.8215474663613151, 1.2040116271893009, 1.037408900359932, 1.287891020875591, 1.1830577354221141, 1.0278784377276404, 1.4127831967543791, 0.7372379614126091, 0.7306143394985477, 1.7274568452231196, 2.04548274638676, 1.289986737393844, 1.8665731598778827, 0.896448259060122, 1.2710485678635468, 1.4897323302960577, 1.3679696489029907, 2.3756092366846033, 2.3687291028362236, 2.68660326649514, 1.5970390753045414, 0.9726650191463931, 1.7742336901685731, 2.953838257099637, 0.9173087792235759, 1.1729800154902883, null, null]), DATA('Charging Station: 328,5 kWh', [0.598058461158158, 0, 0.6073861225965935, 0.8913491768679577, 0.2696236843407865, 0, 0.30641009901340227, 0.2205140720984315, 0.05015525733301707, 0.35642246970726826, 0, 0, 0.8800942036863182, 0.9774033026217929, 0.21023831546417276, 0.7870712558876392, 0, 0.16550743075023164, 0.5132605942604259, 0.14906825174512017, 0.8836100586172083, 1.2031171015303659, 1.4672314708234808, 0.5536230686820822, 0, 0.7148486366912177, 1.8367765179313804, 0, 0.300374916784946, null, null]), DATA('Whirlpool: 21,6 kWh', [0.01553700680772126, 0.01397856617670663, 0.01622420643945345, 0.01542515500397099, 0.01641557086346929, 0.015280936198647838, 0.015028196655704793, 0.015146427851947055, 0.015567356482244768, 0.017404197969735604, 0.017635152684968115, 0.014140394156739467, 0.016107488806188935, 0.01675001277671301, 0.015512752420609467, 0.014951999780788457, 0.013733457057782297, 0.016868671206682027, 0.014770978996449592, 0.01647697124898351, 0.016772182319685667, 0.016288562161254704, 0.015417362341926746, 0.015892028990939402, 0.013811584043067414, 0.01481782772305683, 0.014165639305307825, 0.016223347257543284, 0.014495672387672808, null, null]), - DATA('Sonstiger: 683,3 kWh', [1.1707523832922395, 0.941219247423001, 0.9813072961027226, 0.9147731344893865, 0.9179723719850451, 1.0221279641612842, 0.966452725206484, 0.9473972354717355, 0.9621558239123786, 1.0389565290773752, 0.719602808727641, 0.7164739453418082, 0.8312551527306125, 1.0513294309882544, 1.0642356695090618, 1.064549904209455, 0.8827148020023398, 1.0886724659066331, 0.9617007570391821, 1.2024244259088868, 1.4752269957477093, 1.149323439144603, 1.2039544333297325, 1.0275239776315197, 0.9588534351033258, 1.0445672257542986, 1.1028960998629487, 0.9010854319660326, 0.8581094263176695, null, null]), + DATA('Sonstiger: 683,3 kWh', [1.1707523832922395, 0.941219247423001, 0.9813072961027226, 0.9147731344893865, 0.9179723719850451, 1.0221279641612842, 0.9664527252064838, 0.9473972354717356, 0.9621558239123786, 1.0389565290773752, 0.719602808727641, 0.7164739453418082, 0.8312551527306125, 1.0513294309882544, 1.0642356695090618, 1.0645499042094553, 0.8827148020023398, 1.0886724659066331, 0.9617007570391821, 1.202424425908887, 1.4752269957477093, 1.149323439144603, 1.2039544333297325, 1.0275239776315197, 0.9588534351033258, 1.0445672257542986, 1.1028960998629487, 0.9010854319660326, 0.8581094263176695, null, null]), ], labels: LABELS(History.MONTH.energyPerPeriodChannelWithValues.result.timestamps), options: OeTester.ChartOptions.BAR_CHART_OPTIONS('day', 'bar', {}), diff --git a/ui/src/app/edge/history/common/consumption/chart/chart.ts b/ui/src/app/edge/history/common/consumption/chart/chart.ts index 13e21ec841c..2c5f3b436bb 100644 --- a/ui/src/app/edge/history/common/consumption/chart/chart.ts +++ b/ui/src/app/edge/history/common/consumption/chart/chart.ts @@ -1,21 +1,17 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, EdgeConfig, Utils } from 'src/app/shared/shared'; @Component({ selector: 'consumptionchart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { - protected override getChartData() { - return ChartComponent.getChartData(this.config, this.translate); - } - public static getChartData(config: EdgeConfig, translate: TranslateService): HistoryUtils.ChartData { const inputChannel: HistoryUtils.InputChannel[] = [{ @@ -55,7 +51,7 @@ export class ChartComponent extends AbstractHistoryChart { ...inputChannel, ], output: (data: HistoryUtils.ChannelData) => { - const datasets: HistoryUtils.DisplayValues[] = []; + const datasets: HistoryUtils.DisplayValue[] = []; datasets.push({ name: translate.instant('General.TOTAL'), nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => { @@ -106,7 +102,6 @@ export class ChartComponent extends AbstractHistoryChart { return Utils.calculateOtherConsumptionTotal(energyValues, evcsComponents, consumptionMeters); }, converter: () => { - return Utils.calculateOtherConsumption(data, evcsComponents, consumptionMeters); }, color: 'rgb(0,0,0)', @@ -127,4 +122,9 @@ export class ChartComponent extends AbstractHistoryChart { }], }; } + + protected override getChartData() { + return ChartComponent.getChartData(this.config, this.translate); + } + } diff --git a/ui/src/app/edge/history/common/consumption/details/chart/chart.ts b/ui/src/app/edge/history/common/consumption/details/chart/chart.ts new file mode 100644 index 00000000000..56430b4557c --- /dev/null +++ b/ui/src/app/edge/history/common/consumption/details/chart/chart.ts @@ -0,0 +1,93 @@ +import { Component } from '@angular/core'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; +import { Phase } from 'src/app/shared/components/shared/phase'; +import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; +import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; +import { ChannelAddress } from 'src/app/shared/shared'; + +@Component({ + selector: 'consumptionMeterChart', + templateUrl: '../../../../../../shared/components/chart/abstracthistorychart.html', +}) +export class ChartComponent extends AbstractHistoryChart { + + protected override getChartData(): HistoryUtils.ChartData { + + const component = this.config?.getComponent(this.route.snapshot.params.componentId); + + const isConsumptionMetered: boolean = this.config?.hasComponentNature("io.openems.edge.meter.api.ElectricityMeter", component?.id) + && this.config?.isTypeConsumptionMetered(component); + const isEvcs: boolean = this.config?.hasComponentNature("io.openems.edge.evcs.api.Evcs", component?.id) + && (component?.factoryId !== 'Evcs.Cluster.SelfConsumption') + && component?.factoryId !== 'Evcs.Cluster.PeakShaving' + && component?.isEnabled !== false; + const channels: HistoryUtils.InputChannel[] = []; + + if (isEvcs) { + channels.push({ + name: component.id, + powerChannel: ChannelAddress.fromString(component.id + '/ChargePower'), + energyChannel: ChannelAddress.fromString(component.id + '/ActiveConsumptionEnergy'), + }); + } + + if (isConsumptionMetered) { + channels.push({ + name: component.id, + powerChannel: ChannelAddress.fromString(component.id + '/ActivePower'), + energyChannel: ChannelAddress.fromString(component.id + '/ActiveProductionEnergy'), + }); + + channels.push(...Phase.THREE_PHASE.map(phase => ({ + name: 'ConsumptionActivePower' + phase, + powerChannel: ChannelAddress.fromString(component.id + '/ActivePower' + phase), + energyChannel: ChannelAddress.fromString(component.id + '/ActiveProductionEnergy' + phase), + }))); + } + + const chartObject: HistoryUtils.ChartData = { + input: channels, + output: (data: HistoryUtils.ChannelData) => { + const datasets: HistoryUtils.DisplayValue[] = []; + datasets.push({ + name: component.alias, + nameSuffix: (energyQueryResponse: QueryHistoricTimeseriesEnergyResponse) => { + return energyQueryResponse.result.data[isEvcs ? component.id + '/ActiveConsumptionEnergy' : component.id + '/ActiveProductionEnergy']; + }, + converter: () => { + return data[component.id]; + }, + color: 'rgb(0,152,204)', + hiddenOnInit: false, + stack: 2, + }); + + if (!isConsumptionMetered) { + return datasets; + } + + datasets.push(...Phase.THREE_PHASE.map((phase, i) => ({ + name: "Phase " + phase, + nameSuffix: (energyQueryResponse: QueryHistoricTimeseriesEnergyResponse) => energyQueryResponse.result.data[component.id + '/ActiveProductionEnergy' + phase], + converter: () => + data['ConsumptionActivePower' + phase], + color: 'rgb(' + AbstractHistoryChart.phaseColors[i] + ')', + stack: 3, + }))); + + return datasets; + }, + tooltip: { + formatNumber: '1.1-2', + afterTitle: this.translate.instant('General.TOTAL'), + }, + yAxes: [{ + unit: YAxisTitle.ENERGY, + position: 'left', + yAxisId: ChartAxis.LEFT, + }], + }; + + return chartObject; + } +} diff --git a/ui/src/app/edge/history/common/consumption/details/details.overview.html b/ui/src/app/edge/history/common/consumption/details/details.overview.html new file mode 100644 index 00000000000..ee10f2f639c --- /dev/null +++ b/ui/src/app/edge/history/common/consumption/details/details.overview.html @@ -0,0 +1,7 @@ + + + + diff --git a/ui/src/app/edge/history/common/consumption/details/details.overview.ts b/ui/src/app/edge/history/common/consumption/details/details.overview.ts new file mode 100644 index 00000000000..10c26d168f3 --- /dev/null +++ b/ui/src/app/edge/history/common/consumption/details/details.overview.ts @@ -0,0 +1,37 @@ +import { Component } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ModalController } from '@ionic/angular'; +import { TranslateService } from '@ngx-translate/core'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; +import { NavigationOption } from 'src/app/shared/components/footer/subnavigation/footerNavigation'; +import { Service } from 'src/app/shared/shared'; +import { Role } from 'src/app/shared/type/role'; + +@Component({ + templateUrl: './details.overview.html', +}) +export class DetailsOverviewComponent extends AbstractHistoryChartOverview { + protected navigationButtons: NavigationOption[] = []; + + constructor( + public override service: Service, + protected override route: ActivatedRoute, + public override modalCtrl: ModalController, + private router: Router, + private translate: TranslateService, + ) { + super(service, route, modalCtrl); + } + + protected override afterIsInitialized() { + this.service.getCurrentEdge().then(edge => { + + if (this.component && this.config?.hasComponentNature("io.openems.edge.evcs.api.Evcs", this.component.id)) { + return; + } + + this.navigationButtons = [ + { id: 'currentVoltage', isEnabled: edge.roleIsAtLeast(Role.INSTALLER), alias: this.translate.instant("Edge.History.CURRENT_AND_VOLTAGE"), callback: () => { this.router.navigate(['./currentVoltage'], { relativeTo: this.route }); } }]; + }); + } +} diff --git a/ui/src/app/edge/history/common/consumption/flat/flat.ts b/ui/src/app/edge/history/common/consumption/flat/flat.ts index 947b0c7c2c8..7431f592845 100644 --- a/ui/src/app/edge/history/common/consumption/flat/flat.ts +++ b/ui/src/app/edge/history/common/consumption/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, EdgeConfig } from '../../../../../shared/shared'; @Component({ diff --git a/ui/src/app/edge/history/common/consumption/overview/overview.html b/ui/src/app/edge/history/common/consumption/overview/overview.html index f8dc45ca420..c7036474b77 100644 --- a/ui/src/app/edge/history/common/consumption/overview/overview.html +++ b/ui/src/app/edge/history/common/consumption/overview/overview.html @@ -2,4 +2,5 @@ *ngIf="isInitialized"> - \ No newline at end of file + + \ No newline at end of file diff --git a/ui/src/app/edge/history/common/consumption/overview/overview.ts b/ui/src/app/edge/history/common/consumption/overview/overview.ts index 31104830130..87fab1299e0 100644 --- a/ui/src/app/edge/history/common/consumption/overview/overview.ts +++ b/ui/src/app/edge/history/common/consumption/overview/overview.ts @@ -1,7 +1,43 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChartOverview } from 'src/app/shared/genericComponents/chart/abstractHistoryChartOverview'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ModalController } from '@ionic/angular'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; +import { NavigationOption } from 'src/app/shared/components/footer/subnavigation/footerNavigation'; +import { ChannelAddress, EdgeConfig, Service } from 'src/app/shared/shared'; @Component({ templateUrl: './overview.html', }) -export class OverviewComponent extends AbstractHistoryChartOverview { } +export class OverviewComponent extends AbstractHistoryChartOverview { + + protected navigationButtons: NavigationOption[] = []; + protected evcsComponents: EdgeConfig.Component[] = []; + protected consumptionMeterComponents: EdgeConfig.Component[] = []; + + constructor( + public override service: Service, + protected override route: ActivatedRoute, + public override modalCtrl: ModalController, + private router: Router, + ) { + super(service, route, modalCtrl); + } + + protected override getChannelAddresses(): ChannelAddress[] { + + this.evcsComponents = this.config?.getComponentsImplementingNature("io.openems.edge.evcs.api.Evcs") + .filter(component => + !(component.factoryId === 'Evcs.Cluster.SelfConsumption') && + !(component.factoryId === 'Evcs.Cluster.PeakShaving') && + !component.isEnabled === false); + + this.consumptionMeterComponents = this.config?.getComponentsImplementingNature("io.openems.edge.meter.api.ElectricityMeter") + .filter(component => component.isEnabled && this.config.isTypeConsumptionMetered(component)); + + this.navigationButtons = [...this.evcsComponents, ...this.consumptionMeterComponents].map(el => ( + { id: el.id, alias: el.alias, callback: () => { this.router.navigate(['./' + el.id], { relativeTo: this.route }); } } + )); + + return []; + } +} diff --git a/ui/src/app/edge/history/common/energy/chart/channels.spec.ts b/ui/src/app/edge/history/common/energy/chart/channels.spec.ts index 632d08a1291..55694cda21b 100644 --- a/ui/src/app/edge/history/common/energy/chart/channels.spec.ts +++ b/ui/src/app/edge/history/common/energy/chart/channels.spec.ts @@ -1,20 +1,20 @@ import { TimeUnit } from "chart.js"; -import { ChartConstants } from "src/app/shared/genericComponents/chart/chart.constants"; -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; -import { OeChartTester } from "src/app/shared/genericComponents/shared/testing/tester"; +import { ChartConstants } from "src/app/shared/components/chart/chart.constants"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; +import { OeChartTester } from "src/app/shared/components/shared/testing/tester"; import { QueryHistoricTimeseriesDataResponse } from "src/app/shared/jsonrpc/response/queryHistoricTimeseriesDataResponse"; import { QueryHistoricTimeseriesEnergyPerPeriodResponse } from "src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyPerPeriodResponse"; import { QueryHistoricTimeseriesEnergyResponse } from "src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse"; export namespace History { - export const LINE_CHART_OPTIONS = (period: string, chartType: 'line' | 'bar', options: { [key: string]: { scale: { min: number, max: number }, ticks: { stepSize: number } } }): OeChartTester.Dataset.Option => ({ + export const LINE_CHART_OPTIONS = (period: string, chartType: 'line' | 'bar', options: { [key: string]: { scale: { min: number, max: number; } | null, ticks: { stepSize: number }; }; }): OeChartTester.Dataset.Option => ({ type: 'option', options: { - "responsive": true, "maintainAspectRatio": false, "elements": { "point": { "radius": 0, "hitRadius": 0, "hoverRadius": 0 }, "line": { "stepped": false, "fill": true } }, "datasets": { "bar": {}, "line": {} }, "plugins": { "colors": { "enabled": false }, "legend": { "display": true, "position": "bottom", "labels": { "color": '' } }, "tooltip": { "intersect": false, "mode": "index", "callbacks": {} } }, "scales": { + "responsive": true, "maintainAspectRatio": false, "elements": { "point": { "radius": 0, "hitRadius": 0, "hoverRadius": 0 }, "line": { "stepped": false, "fill": true } }, "datasets": { "bar": {}, "line": {} }, "plugins": { "colors": { "enabled": false }, "legend": { "display": true, "position": "bottom", "labels": { "color": '' } }, "tooltip": { "intersect": false, "mode": "index", "callbacks": {} }, "annotation": { annotations: {} } }, "scales": { "x": { "stacked": true, "offset": false, "type": "time", "ticks": { "source": "auto", "maxTicksLimit": 31 }, "bounds": "ticks", "adapters": { "date": { "locale": { "code": "de", "formatLong": {}, "localize": {}, "match": {}, "options": { "weekStartsOn": 1, "firstWeekContainsDate": 4 } } } }, "time": { "unit": period as TimeUnit, "displayFormats": { "datetime": "yyyy-MM-dd HH:mm:ss", "millisecond": "SSS [ms]", "second": "HH:mm:ss a", "minute": "HH:mm", "hour": "HH:00", "day": "dd", "week": "ll", "month": "MM", "quarter": "[Q]Q - YYYY", "year": "yyyy" } } }, "left": { - ...options["left"]?.scale, ...(chartType === 'line' ? { stacked: false } : {}), "title": { "text": "kW", "display": true, "padding": 5, "font": { "size": 11 } }, "position": "left", "grid": { "display": true }, + ...options["left"]?.scale, ...(chartType === 'line' ? { stacked: false } : {}), "beginAtZero": true, "title": { "text": "kW", "display": true, "padding": 5, "font": { "size": 11 } }, "position": "left", "grid": { "display": true }, "ticks": { ...options["left"]?.ticks, "color": '', "padding": 5, "maxTicksLimit": ChartConstants.NUMBER_OF_Y_AXIS_TICKS }, }, "right": { @@ -29,13 +29,13 @@ export namespace History { }, }, }); - export const BAR_CHART_OPTIONS = (period: string, chartType: 'line' | 'bar', options: { [key: string]: { scale: { min?: number, max?: number }, ticks: { stepSize?: number } } }): OeChartTester.Dataset.Option => ({ + export const BAR_CHART_OPTIONS = (period: string, chartType: 'line' | 'bar', options: { [key: string]: { scale: { min?: number, max?: number; }, ticks: { stepSize?: number; }; }; }): OeChartTester.Dataset.Option => ({ type: 'option', options: { - "responsive": true, "maintainAspectRatio": false, "elements": { "point": { "radius": 0, "hitRadius": 0, "hoverRadius": 0 }, "line": { "stepped": false, "fill": true } }, "datasets": { "bar": { "barPercentage": 1 }, "line": {} }, "plugins": { "colors": { "enabled": false }, "legend": { "display": true, "position": "bottom", "labels": { "color": '' } }, "tooltip": { "intersect": false, "mode": "x", "callbacks": {} } }, "scales": { + "responsive": true, "maintainAspectRatio": false, "elements": { "point": { "radius": 0, "hitRadius": 0, "hoverRadius": 0 }, "line": { "stepped": false, "fill": true } }, "datasets": { "bar": { "barPercentage": 1 }, "line": {} }, "plugins": { "colors": { "enabled": false }, "legend": { "display": true, "position": "bottom", "labels": { "color": '' } }, "tooltip": { "intersect": false, "mode": "x", "callbacks": {} }, "annotation": { annotations: {} } }, "scales": { "x": { "stacked": true, "offset": true, "type": "time", "ticks": { "source": "auto", "maxTicksLimit": 31 }, "bounds": "ticks", "adapters": { "date": { "locale": { "code": "de", "formatLong": {}, "localize": {}, "match": {}, "options": { "weekStartsOn": 1, "firstWeekContainsDate": 4 } } } }, "time": { "unit": period as TimeUnit, "displayFormats": { "datetime": "yyyy-MM-dd HH:mm:ss", "millisecond": "SSS [ms]", "second": "HH:mm:ss a", "minute": "HH:mm", "hour": "HH:00", "day": "dd", "week": "ll", "month": "MM", "quarter": "[Q]Q - YYYY", "year": "yyyy" } } }, "left": { - ...options["left"]?.scale, ...(chartType === 'line' ? { stacked: false } : {}), "title": { "text": "kWh", "display": true, "padding": 5, "font": { "size": 11 } }, "position": "left", "grid": { "display": true }, + ...options["left"]?.scale, ...(chartType === 'line' ? { stacked: false } : {}), "beginAtZero": true, "title": { "text": "kWh", "display": true, "padding": 5, "font": { "size": 11 } }, "position": "left", "grid": { "display": true }, "ticks": { ...options["left"]?.ticks, "color": '', diff --git a/ui/src/app/edge/history/common/energy/chart/chart.constants.spec.ts b/ui/src/app/edge/history/common/energy/chart/chart.constants.spec.ts index cdbafd832f6..b5d7a8fdae7 100644 --- a/ui/src/app/edge/history/common/energy/chart/chart.constants.spec.ts +++ b/ui/src/app/edge/history/common/energy/chart/chart.constants.spec.ts @@ -1,9 +1,9 @@ -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; import { EdgeConfig } from "src/app/shared/shared"; -import { removeFunctions, TestContext } from "src/app/shared/test/utils.spec"; +import { removeFunctions, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; -import { OeChartTester } from "../../../../../shared/genericComponents/shared/testing/tester"; +import { OeChartTester } from "../../../../../shared/components/shared/testing/tester"; import { ChartComponent } from "./chart"; export function expectView(config: EdgeConfig, testContext: TestContext, chartType: 'line' | 'bar', channels: OeTester.Types.Channels, view: OeChartTester.View): void { @@ -19,7 +19,7 @@ export const DATASET = (data: OeChartTester.Dataset.Data, labels: OeChartTester. options: options, }); -export const DATA = (name: string, value: number[]): OeChartTester.Dataset.Data => ({ +export const DATA = (name: string, value: (number | null)[]): OeChartTester.Dataset.Data => ({ type: "data", label: name, value: value, diff --git a/ui/src/app/edge/history/common/energy/chart/chart.spec.ts b/ui/src/app/edge/history/common/energy/chart/chart.spec.ts index 6520137afc5..312baba765b 100644 --- a/ui/src/app/edge/history/common/energy/chart/chart.spec.ts +++ b/ui/src/app/edge/history/common/energy/chart/chart.spec.ts @@ -1,8 +1,8 @@ // @ts-strict-ignore import { History } from "src/app/edge/history/common/energy/chart/channels.spec"; -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { sharedSetup, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; -import { sharedSetup, TestContext } from "../../../../../shared/test/utils.spec"; import { DATA, expectView, LABELS } from "./chart.constants.spec"; describe('History EnergyMonitor', () => { diff --git a/ui/src/app/edge/history/common/energy/chart/chart.ts b/ui/src/app/edge/history/common/energy/chart/chart.ts index 8e65cb0a53f..1fb80029716 100644 --- a/ui/src/app/edge/history/common/energy/chart/chart.ts +++ b/ui/src/app/edge/history/common/energy/chart/chart.ts @@ -1,21 +1,17 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, EdgeConfig, Utils } from 'src/app/shared/shared'; @Component({ selector: 'energychart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { - public override getChartData() { - return ChartComponent.getChartData(this.config, this.chartType, this.translate); - } - public static getChartData(config: EdgeConfig | null, chartType: 'line' | 'bar', translate: TranslateService): HistoryUtils.ChartData { const input: HistoryUtils.InputChannel[] = config?.widgets.classes.reduce((arr: HistoryUtils.InputChannel[], key) => { @@ -169,9 +165,6 @@ export class ChartComponent extends AbstractHistoryChart { borderDash: [10, 10], yAxisId: ChartAxis.RIGHT, stack: 1, - custom: { - unit: YAxisTitle.PERCENTAGE, - }, }], ]; }, @@ -207,7 +200,12 @@ export class ChartComponent extends AbstractHistoryChart { }; } + public override getChartData() { + return ChartComponent.getChartData(this.config, this.chartType, this.translate); + } + protected override getChartHeight(): number { return this.service.deviceHeight / 2; } + } diff --git a/ui/src/app/edge/history/common/energy/flat/flat.ts b/ui/src/app/edge/history/common/energy/flat/flat.ts index b6b06fa87fc..54cc70482c4 100644 --- a/ui/src/app/edge/history/common/energy/flat/flat.ts +++ b/ui/src/app/edge/history/common/energy/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from '../../../../../shared/shared'; import { Base64PayloadResponse } from 'src/app/shared/jsonrpc/response/base64PayloadResponse'; import { QueryHistoricTimeseriesExportXlxsRequest } from 'src/app/shared/jsonrpc/request/queryHistoricTimeseriesExportXlxs'; @@ -14,11 +14,15 @@ import { AppService } from 'src/app/app.service'; }) export class FlatComponent extends AbstractFlatWidget { - protected autarchyValue: number | null; private static readonly EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'; private static readonly EXCEL_EXTENSION = '.xlsx'; + protected autarchyValue: number | null; protected readonly isSmartphoneResolution = this.service.isSmartphoneResolution; - protected readonly isApp: boolean = AppService.isApp; + protected readonly isApp: boolean = AppService.platform !== 'web'; + + public getChartHeight(): number { + return this.service.deviceHeight / 2; + } protected override onCurrentData(currentData: CurrentData) { this.autarchyValue = @@ -34,16 +38,12 @@ export class FlatComponent extends AbstractFlatWidget { ]; } - public getChartHeight(): number { - return this.service.deviceHeight / 2; - } - /** - * Export historic data to Excel file. - */ + * Export historic data to Excel file. + */ protected exportToXlxs() { - if (AppService.isApp) { + if (this.isApp) { this.service.toast(this.translate.instant('APP.FUNCTIONALITY_TEMPORARILY_NOT_AVAILABLE'), "warning"); return; } diff --git a/ui/src/app/edge/history/common/grid/chart/chart.constants.spec.ts b/ui/src/app/edge/history/common/grid/chart/chart.constants.spec.ts index 5c1700683cd..1c3156cb6e5 100644 --- a/ui/src/app/edge/history/common/grid/chart/chart.constants.spec.ts +++ b/ui/src/app/edge/history/common/grid/chart/chart.constants.spec.ts @@ -1,8 +1,8 @@ -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; -import { OeChartTester } from "src/app/shared/genericComponents/shared/testing/tester"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; +import { OeChartTester } from "src/app/shared/components/shared/testing/tester"; +import { removeFunctions, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { EdgeConfig } from "src/app/shared/shared"; -import { removeFunctions, TestContext } from "src/app/shared/test/utils.spec"; import { ChartComponent } from "./chart"; diff --git a/ui/src/app/edge/history/common/grid/chart/chart.spec.ts b/ui/src/app/edge/history/common/grid/chart/chart.spec.ts index d0af9ae56dd..9510e70e64b 100644 --- a/ui/src/app/edge/history/common/grid/chart/chart.spec.ts +++ b/ui/src/app/edge/history/common/grid/chart/chart.spec.ts @@ -1,79 +1,110 @@ // @ts-strict-ignore import { History } from "src/app/edge/history/common/energy/chart/channels.spec"; -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; -import { OeTester } from "src/app/shared/genericComponents/shared/testing/common"; -import { sharedSetup, TestContext } from "src/app/shared/test/utils.spec"; import { DATA, LABELS } from "../../energy/chart/chart.constants.spec"; import { expectView } from "./chart.constants.spec"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeTester } from "src/app/shared/components/shared/testing/common"; +import { TestContext, sharedSetup } from "src/app/shared/components/shared/testing/utils.spec"; +import { ChartAxis } from "src/app/shared/service/utils"; describe('History Grid', () => { - const defaultEMS = DummyConfig.from( - DummyConfig.Component.SOCOMEC_GRID_METER("meter0", "Netzzähler"), - ); - let TEST_CONTEXT: TestContext; - beforeEach(async () => - TEST_CONTEXT = await sharedSetup(), - ); + const edgeConfigWithOutController14a = DummyConfig.from( + DummyConfig.Component.SOCOMEC_GRID_METER("meter0", "Netzzähler"), + ); - it('#getChartData()', () => { - { - // Line - Chart - expectView(defaultEMS, TEST_CONTEXT, 'line', History.DAY, + const edgeConfig = DummyConfig.from( + DummyConfig.Component.SOCOMEC_GRID_METER("meter0", "Netzzähler"), + DummyConfig.Component.ESS_LIMITER_14A("ctrlEssLimiter14a0"), + ); + + let TEST_CONTEXT: TestContext; + beforeEach(async () => + TEST_CONTEXT = await sharedSetup(), + ); + + it('#getChartData()', () => { + { + // Line - Chart - without Controller 14a + expectView(edgeConfigWithOutController14a, TEST_CONTEXT, 'line', History.DAY, + { + datasets: { + data: [ + DATA('Einspeisung: 15,6 kWh', [null, null, null, 0, 0, 0.006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.004, 0, 0, 0, 0.004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.005, 0, 0, 0, 0, 0, 0.001, 0.002, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001, 0.004, 0, 0.004, 0, 0, 0, 0, 0.005, 0.013, 0.006, 0.004, 0.017, 0.015, 0.017, 0.011, 0, 0, 0, 0, 0.029, 0.015, 0.013, 0.019, 0.014, 0.007, 0.016, 0, 0.018, 0.022, 0, 0.012, 0.011, 0.007, 0, 0.033, 0.007, 0.003, 0.004, 0.011, 0, 0.038, 0, 0, 0.019, 0, 0.016, 0.014, 0.018, 0, 1.119, 3.453, 3.608, 3.941, 4.392, 3.786, 4.805, 4.688, 3.095, 2.32, 2.851, 3.058, 4.044, 5.011, 2.789, 6.53, 5.029, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), + DATA('Bezug: 0,9 kWh', [null, null, null, 0.031, 0.018, 0, 0.02, 0.016, 0.015, 0.014, 0.009, 0.02, 0.025, 0.025, 0.025, 0.021, 0.012, 0.009, 0.01, 0.011, 0.005, 0.003, 0, 0.015, 0.018, 0.023, 0, 0, 0, 0.002, 0.002, 0.003, 0.015, 0.008, 0.022, 0.027, 0.016, 0.003, 0.002, 0, 0.028, 0.027, 0.017, 0.001, 0, 0, 0, null, null, null, null, 0.011, 0.01, 0.004, 0.006, 0.007, 0.018, 0.008, 0.012, 0.009, 0.004, 0.013, 0.015, 0.012, 0, 0, 0, 0.002, 0, 0.005, 0.001, 0.03, 0.062, 0, 0, 0, 0, 0, 0, 0, 0, 0.015, 0.005, 0.004, 0.007, 0, 0, 0, 0, 0, 0, 0, 0.005, 0, 0, 0, 0, 0, 0, 0.021, 0, 0, 0, 0, 0, 0.003, 0, 0.004, 0, 0, 0.032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), + ], + labels: LABELS(History.DAY.dataChannelWithValues.result.timestamps), + options: OeTester.ChartOptions.LINE_CHART_OPTIONS('hour', 'line', { + [ChartAxis.LEFT]: { scale: { beginAtZero: true } }, + }), + }, + }, false); + } { - datasets: { - data: [ - DATA('Einspeisung: 15,6 kWh', [null, null, null, 0, 0, 0.006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.004, 0, 0, 0, 0.004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.005, 0, 0, 0, 0, 0, 0.001, 0.002, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001, 0.004, 0, 0.004, 0, 0, 0, 0, 0.005, 0.013, 0.006, 0.004, 0.017, 0.015, 0.017, 0.011, 0, 0, 0, 0, 0.029, 0.015, 0.013, 0.019, 0.014, 0.007, 0.016, 0, 0.018, 0.022, 0, 0.012, 0.011, 0.007, 0, 0.033, 0.007, 0.003, 0.004, 0.011, 0, 0.038, 0, 0, 0.019, 0, 0.016, 0.014, 0.018, 0, 1.119, 3.453, 3.608, 3.941, 4.392, 3.786, 4.805, 4.688, 3.095, 2.32, 2.851, 3.058, 4.044, 5.011, 2.789, 6.53, 5.029, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), - DATA('Bezug: 0,9 kWh', [null, null, null, 0.031, 0.018, 0, 0.02, 0.016, 0.015, 0.014, 0.009, 0.02, 0.025, 0.025, 0.025, 0.021, 0.012, 0.009, 0.01, 0.011, 0.005, 0.003, 0, 0.015, 0.018, 0.023, 0, 0, 0, 0.002, 0.002, 0.003, 0.015, 0.008, 0.022, 0.027, 0.016, 0.003, 0.002, 0, 0.028, 0.027, 0.017, 0.001, 0, 0, 0, null, null, null, null, 0.011, 0.01, 0.004, 0.006, 0.007, 0.018, 0.008, 0.012, 0.009, 0.004, 0.013, 0.015, 0.012, 0, 0, 0, 0.002, 0, 0.005, 0.001, 0.03, 0.062, 0, 0, 0, 0, 0, 0, 0, 0, 0.015, 0.005, 0.004, 0.007, 0, 0, 0, 0, 0, 0, 0, 0.005, 0, 0, 0, 0, 0, 0, 0.021, 0, 0, 0, 0, 0, 0.003, 0, 0.004, 0, 0, 0.032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), - ], - labels: LABELS(History.DAY.dataChannelWithValues.result.timestamps), - options: OeTester.ChartOptions.LINE_CHART_OPTIONS('hour', 'line', {}), - }, - }, false); - } - { - // Line - Chart - expectView(defaultEMS, TEST_CONTEXT, 'line', History.WEEK, + // Line - Chart + expectView(edgeConfig, TEST_CONTEXT, 'line', History.DAY, + { + datasets: { + data: [ + DATA('Einspeisung: 15,6 kWh', [null, null, null, 0, 0, 0.006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.004, 0, 0, 0, 0.004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.005, 0, 0, 0, 0, 0, 0.001, 0.002, null, null, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.001, 0.004, 0, 0.004, 0, 0, 0, 0, 0.005, 0.013, 0.006, 0.004, 0.017, 0.015, 0.017, 0.011, 0, 0, 0, 0, 0.029, 0.015, 0.013, 0.019, 0.014, 0.007, 0.016, 0, 0.018, 0.022, 0, 0.012, 0.011, 0.007, 0, 0.033, 0.007, 0.003, 0.004, 0.011, 0, 0.038, 0, 0, 0.019, 0, 0.016, 0.014, 0.018, 0, 1.119, 3.453, 3.608, 3.941, 4.392, 3.786, 4.805, 4.688, 3.095, 2.32, 2.851, 3.058, 4.044, 5.011, 2.789, 6.53, 5.029, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), + DATA('Bezug: 0,9 kWh', [null, null, null, 0.031, 0.018, 0, 0.02, 0.016, 0.015, 0.014, 0.009, 0.02, 0.025, 0.025, 0.025, 0.021, 0.012, 0.009, 0.01, 0.011, 0.005, 0.003, 0, 0.015, 0.018, 0.023, 0, 0, 0, 0.002, 0.002, 0.003, 0.015, 0.008, 0.022, 0.027, 0.016, 0.003, 0.002, 0, 0.028, 0.027, 0.017, 0.001, 0, 0, 0, null, null, null, null, 0.011, 0.01, 0.004, 0.006, 0.007, 0.018, 0.008, 0.012, 0.009, 0.004, 0.013, 0.015, 0.012, 0, 0, 0, 0.002, 0, 0.005, 0.001, 0.03, 0.062, 0, 0, 0, 0, 0, 0, 0, 0, 0.015, 0.005, 0.004, 0.007, 0, 0, 0, 0, 0, 0, 0, 0.005, 0, 0, 0, 0, 0, 0, 0.021, 0, 0, 0, 0, 0, 0.003, 0, 0.004, 0, 0, 0.032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]), + ], + labels: LABELS(History.DAY.dataChannelWithValues.result.timestamps), + options: OeTester.ChartOptions.MULTI_LINE_OPTIONS('hour', 'line', { + ['right']: { scale: { max: 1, min: 0 }, ticks: { stepSize: 1 } }, + }), + }, + }, false); + } { - datasets: { - data: [ - DATA('Einspeisung: 119,7 kWh', [0.0023333333333333335, 0, 0, 0, 0, 0, 0, 0.014166666666666666, 0.02808333333333333, 0.9546666666666667, 4.150583333333333, 6.431333333333333, 5.737583333333333, 5.6714166666666666, 5.873333333333333, 5.049083333333333, 3.122, 1.0374166666666667, 0.22808333333333333, 0.02, 0, 0, 0, 0.008333333333333333, 0.0030833333333333333, 0.008333333333333333, 0, 0.007727272727272728, 0, 0, 0.00275, 0.013833333333333335, 0.017416666666666667, 0.006083333333333333, 0.5646666666666667, 2.2251666666666665, 2.03375, 3.99725, 4.990083333333333, 3.0128333333333335, 2.4844166666666667, 1.378, 0.65975, 0, 0.001, 0.006916666666666667, 0.008166666666666666, 0, 0, 0, 0, 0, 0, 0, 0.004083333333333333, 0.010583333333333333, 0.011166666666666667, 1.261, 5.308833333333333, 6.604, 6.321166666666667, 6.488333333333333, 6.78425, 6.052083333333333, 2.5839166666666666, 0.529, 0.01616666666666667, 0.0055, 0, 0.0006666666666666666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0024166666666666664, 0.0125, 0.7065, 5.835416666666667, 4.77025, 6.03925, 6.8445833333333335, 5.370333333333333, 4.490166666666667, 2.3506666666666667, 0.7650833333333333, 0.08583333333333333, 0.011454545454545455, 0, 0, 0.005666666666666667, 0, 0, 0, 0, 0, 0, 0, 0.0033333333333333335, 0.004083333333333333, 0.02033333333333333, 0.02316666666666667, 1.4106666666666667, 0.8588333333333333, 0.0015833333333333333, 0.006583333333333333, 0.010083333333333335, 0.3410833333333333, 2.9290833333333337, 1.1175833333333332, 0.48583333333333334, 0, 0, 0, 0.0006666666666666666, 0.017916666666666668, 0.004, 0, 0, 0.001, 0, 0, 0, 0.02358333333333333, 0.006416666666666667, 0.008166666666666666, 0.0031666666666666666, 0.009916666666666666, 2.7254166666666664, 1.83725, 2.63225, 2.2170833333333335, 0.529, 0, 0, 0, 0, 0, 0.0003333333333333333, 0, 0, 0.011416666666666665, 0.011083333333333334, 0, 0, 0, 0, 0.008333333333333333, 0.008818181818181819, 0.015333333333333334, 0.018857142857142857, 0.024833333333333332, 0.010888888888888889, 2.2174, 3.9214166666666666, 1.6248181818181817, 1.937, 1.789, 0.0195, 0.0143, 0, 0, 0.009, 0.018875]), - DATA('Bezug: 2,4 kWh', [0, 0.011916666666666666, 0.01633333333333333, 0.00609090909090909, 0.015333333333333334, 0.011666666666666665, 0.0024166666666666664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.02425, 0.004416666666666667, 0.0035833333333333333, 0, 0, 0, 0.04441666666666667, 0, 0.013111111111111112, 0.001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0011666666666666668, 0, 0, 0, 0.0015833333333333333, 0.013333333333333334, 0.020416666666666666, 0.01125, 0.019727272727272725, 0.012444444444444445, 0.009583333333333334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.007666666666666667, 0, 0.0023333333333333335, 0.0125, 0.01609090909090909, 0.02016666666666667, 0.014083333333333333, 0.006363636363636363, 0.01955555555555556, 0.04841666666666666, 0.011166666666666667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.014222222222222221, 0.00225, 0, 0.0036666666666666666, 0.032916666666666664, 0.014666666666666666, 0.0135, 0.017363636363636362, 0.013333333333333334, 0.022083333333333333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0009166666666666666, 0, 0.0021666666666666666, 0, 0, 0, 0.0005, 0.04841666666666666, 0, 0.005555555555555556, 0.02716666666666667, 0.017333333333333333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0023333333333333335, 0.008333333333333333, 0.003, 0.015916666666666666, 0.00325, 0, 0.004333333333333333, 0.001, 0, 0, 0.019545454545454546, 0.0017777777777777776, 0.006416666666666667, 0.017666666666666667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0058, 0.005625, 0, 0]), - ], - labels: LABELS(History.WEEK.dataChannelWithValues.result.timestamps), - options: OeTester.ChartOptions.LINE_CHART_OPTIONS('day', 'line', {}), - }, - }, false); - } - { - // Line - Chart - expectView(defaultEMS, TEST_CONTEXT, 'bar', History.MONTH, + // Line - Chart + expectView(edgeConfig, TEST_CONTEXT, 'line', History.WEEK, + { + datasets: { + data: [ + DATA('Einspeisung: 119,7 kWh', [0.0023333333333333335, 0, 0, 0, 0, 0, 0, 0.014166666666666666, 0.02808333333333333, 0.9546666666666667, 4.150583333333333, 6.431333333333333, 5.737583333333333, 5.6714166666666666, 5.873333333333333, 5.049083333333333, 3.122, 1.0374166666666667, 0.22808333333333333, 0.02, 0, 0, 0, 0.008333333333333333, 0.0030833333333333333, 0.008333333333333333, 0, 0.007727272727272728, 0, 0, 0.00275, 0.013833333333333335, 0.017416666666666667, 0.006083333333333333, 0.5646666666666667, 2.2251666666666665, 2.03375, 3.99725, 4.990083333333333, 3.0128333333333335, 2.4844166666666667, 1.378, 0.65975, 0, 0.001, 0.006916666666666667, 0.008166666666666666, 0, 0, 0, 0, 0, 0, 0, 0.004083333333333333, 0.010583333333333333, 0.011166666666666667, 1.261, 5.308833333333333, 6.604, 6.321166666666667, 6.488333333333333, 6.78425, 6.052083333333333, 2.5839166666666666, 0.529, 0.01616666666666667, 0.0055, 0, 0.0006666666666666666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0024166666666666664, 0.0125, 0.7065, 5.835416666666667, 4.77025, 6.03925, 6.8445833333333335, 5.370333333333333, 4.490166666666667, 2.3506666666666667, 0.7650833333333333, 0.08583333333333333, 0.011454545454545455, 0, 0, 0.005666666666666667, 0, 0, 0, 0, 0, 0, 0, 0.0033333333333333335, 0.004083333333333333, 0.02033333333333333, 0.02316666666666667, 1.4106666666666667, 0.8588333333333333, 0.0015833333333333333, 0.006583333333333333, 0.010083333333333335, 0.3410833333333333, 2.9290833333333337, 1.1175833333333332, 0.48583333333333334, 0, 0, 0, 0.0006666666666666666, 0.017916666666666668, 0.004, 0, 0, 0.001, 0, 0, 0, 0.02358333333333333, 0.006416666666666667, 0.008166666666666666, 0.0031666666666666666, 0.009916666666666666, 2.7254166666666664, 1.83725, 2.63225, 2.2170833333333335, 0.529, 0, 0, 0, 0, 0, 0.0003333333333333333, 0, 0, 0.011416666666666665, 0.011083333333333334, 0, 0, 0, 0, 0.008333333333333333, 0.008818181818181819, 0.015333333333333334, 0.018857142857142857, 0.024833333333333332, 0.010888888888888889, 2.2174, 3.9214166666666666, 1.6248181818181817, 1.937, 1.789, 0.0195, 0.0143, 0, 0, 0.009, 0.018875]), + DATA('Bezug: 2,4 kWh', [0, 0.011916666666666666, 0.01633333333333333, 0.00609090909090909, 0.015333333333333334, 0.011666666666666665, 0.0024166666666666664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.02425, 0.004416666666666667, 0.0035833333333333333, 0, 0, 0, 0.04441666666666667, 0, 0.013111111111111112, 0.001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0011666666666666668, 0, 0, 0, 0.0015833333333333333, 0.013333333333333334, 0.020416666666666666, 0.01125, 0.019727272727272725, 0.012444444444444445, 0.009583333333333334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.007666666666666667, 0, 0.0023333333333333335, 0.0125, 0.01609090909090909, 0.02016666666666667, 0.014083333333333333, 0.006363636363636363, 0.01955555555555556, 0.04841666666666666, 0.011166666666666667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.014222222222222221, 0.00225, 0, 0.0036666666666666666, 0.032916666666666664, 0.014666666666666666, 0.0135, 0.017363636363636362, 0.013333333333333334, 0.022083333333333333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0009166666666666666, 0, 0.0021666666666666666, 0, 0, 0, 0.0005, 0.04841666666666666, 0, 0.005555555555555556, 0.02716666666666667, 0.017333333333333333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0023333333333333335, 0.008333333333333333, 0.003, 0.015916666666666666, 0.00325, 0, 0.004333333333333333, 0.001, 0, 0, 0.019545454545454546, 0.0017777777777777776, 0.006416666666666667, 0.017666666666666667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0058, 0.005625, 0, 0]), + ], + labels: LABELS(History.WEEK.dataChannelWithValues.result.timestamps), + options: OeTester.ChartOptions.MULTI_LINE_OPTIONS('day', 'line', { + ['right']: { scale: { max: 1, min: 0 }, ticks: { stepSize: 1 } }, + }), + }, + }, false); + } { - datasets: { - data: [ - DATA('Einspeisung: 12.738 kWh', [603, 590, 551, 572, 69, 236, 626, null, 1003, 261, 518, 698, 640, 388, 471, 373, 373, 677, 286, 406, 249, null, 446, 369, 558, null, 776, 425, 574, null]), - DATA('Bezug: 773 kWh', [16, 6, 3, 3, 5, 48, 4, null, 5, 26, 17, 62, 8, 66, 13, 21, 4, 3, 18, 27, 29, null, 118, 85, 2, null, 72, 28, 84, null]), - ], - labels: LABELS(History.MONTH.energyPerPeriodChannelWithValues.result.timestamps), - options: OeTester.ChartOptions.BAR_CHART_OPTIONS('day', 'bar', {}), - }, + // Line - Chart + expectView(edgeConfig, TEST_CONTEXT, 'bar', History.MONTH, + { + datasets: { + data: [ + DATA('Einspeisung: 12.738 kWh', [603, 590, 551, 572, 69, 236, 626, null, 1003, 261, 518, 698, 640, 388, 471, 373, 373, 677, 286, 406, 249, null, 446, 369, 558, null, 776, 425, 574, null]), + DATA('Bezug: 773 kWh', [16, 6, 3, 3, 5, 48, 4, null, 5, 26, 17, 62, 8, 66, 13, 21, 4, 3, 18, 27, 29, null, 118, 85, 2, null, 72, 28, 84, null]), + ], + labels: LABELS(History.MONTH.energyPerPeriodChannelWithValues.result.timestamps), + options: OeTester.ChartOptions.MULTI_BAR_OPTIONS('day', 'bar', { + ['right']: { scale: {}, ticks: { stepSize: 1 } }, + }), + }, - }, false); - } - { - // BAR - Chart - expectView(defaultEMS, TEST_CONTEXT, 'bar', History.YEAR, + }, false); + } { - datasets: { - data: [ - DATA('Einspeisung: 30.703 kWh', [20, 86, 677, 3657, 12839, 12738, 627, null, null, null, null, null]), - DATA('Bezug: 23.209 kWh', [9829, 4812, 2915, 2036, 2712, 773, 94, null, null, null, null, null]), - ], - labels: LABELS(History.YEAR.energyPerPeriodChannelWithValues.result.timestamps), - options: OeTester.ChartOptions.BAR_CHART_OPTIONS('month', 'bar', {}), - }, - }, false); - } - }); + // BAR - Chart + expectView(edgeConfig, TEST_CONTEXT, 'bar', History.YEAR, + { + datasets: { + data: [ + DATA('Einspeisung: 30.703 kWh', [20, 86, 677, 3657, 12839, 12738, 627, null, null, null, null, null]), + DATA('Bezug: 23.209 kWh', [9829, 4812, 2915, 2036, 2712, 773, 94, null, null, null, null, null]), + ], + labels: LABELS(History.YEAR.energyPerPeriodChannelWithValues.result.timestamps), + options: OeTester.ChartOptions.MULTI_BAR_OPTIONS('month', 'bar', { + ['right']: { scale: {}, ticks: { stepSize: 1 } }, + }), + }, + }, false); + } + }); }); diff --git a/ui/src/app/edge/history/common/grid/chart/chart.ts b/ui/src/app/edge/history/common/grid/chart/chart.ts index c8e5fc00b15..3198760bcb3 100644 --- a/ui/src/app/edge/history/common/grid/chart/chart.ts +++ b/ui/src/app/edge/history/common/grid/chart/chart.ts @@ -1,25 +1,22 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { BoxAnnotationOptions } from 'chartjs-plugin-annotation'; +import { GridSectionComponent } from 'src/app/edge/live/energymonitor/chart/section/grid.component'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; -import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, EdgeConfig } from 'src/app/shared/shared'; +import { ChartAnnotationState } from 'src/app/shared/type/general'; @Component({ selector: 'gridchart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { - public override getChartData() { - return ChartComponent.getChartData(this.config, this.chartType, this.translate, this.showPhases); - } - public static getChartData(config: EdgeConfig, chartType: 'line' | 'bar', translate: TranslateService, showPhases: boolean): HistoryUtils.ChartData { - - const input: DefaultTypes.History.InputChannel[] = [ + const input: HistoryUtils.InputChannel[] = [ { name: 'GridSell', powerChannel: ChannelAddress.fromString('_sum/GridActivePower'), @@ -34,6 +31,19 @@ export class ChartComponent extends AbstractHistoryChart { }, ]; + if (GridSectionComponent.isControllerEnabled(config, "Controller.Ess.Limiter14a")) { + input.push({ + name: 'Restriction', + powerChannel: ChannelAddress.fromString('ctrlEssLimiter14a0/RestrictionMode'), + energyChannel: ChannelAddress.fromString('ctrlEssLimiter14a0/CumulatedRestrictionTime'), + }); + input.push({ + name: 'OffGrid', + powerChannel: ChannelAddress.fromString('_sum/GridMode'), + energyChannel: ChannelAddress.fromString('_sum/GridModeOffGridTime'), + }); + } + if (showPhases) { ['L1', 'L2', 'L3'].forEach(phase => { input.push({ @@ -43,35 +53,102 @@ export class ChartComponent extends AbstractHistoryChart { }); } + const yAxes: HistoryUtils.yAxes[] = [{ + unit: YAxisTitle.ENERGY, + position: 'left', + yAxisId: ChartAxis.LEFT, + }]; + + if (GridSectionComponent.isControllerEnabled(config, "Controller.Ess.Limiter14a")) { + yAxes.push((chartType === 'bar' ? + { + unit: YAxisTitle.TIME, + position: 'right', + yAxisId: ChartAxis.RIGHT, + displayGrid: false, + } : + { + unit: YAxisTitle.RELAY, + position: 'right', + yAxisId: ChartAxis.RIGHT, + customTitle: translate.instant('General.state'), + displayGrid: false, + } + )); + } + return { input: input, - output: (data: DefaultTypes.History.ChannelData) => { + output: (data: HistoryUtils.ChannelData, labels: Date[]) => { + + let restrictionData; + let offGridData; + + if (chartType === 'line') { + // Convert values > 0 to 1 (=on) + restrictionData = data['Restriction']?.map((value) => (value > 0 ? ChartAnnotationState.ON : ChartAnnotationState.OFF_HIDDEN)); + // Off-Grid (=2) to on (=1) + offGridData = data['OffGrid']?.map((value) => (value * 1000 > 1 ? ChartAnnotationState.ON : ChartAnnotationState.OFF_HIDDEN)); + } else { + restrictionData = data['Restriction']?.map((value) => value * 1000); + offGridData = data['OffGrid']?.map((value) => value * 1000); + } - const datasets: DefaultTypes.History.DisplayValues[] = [ + const datasets: HistoryUtils.DisplayValue[] = [ { name: translate.instant('General.gridSellAdvanced'), - nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => { - return energyValues?.result.data['_sum/GridSellActiveEnergy'] ?? null; - }, - converter: () => { - return data['GridSell']; - }, - // TODO create Color class + nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => energyValues?.result.data['_sum/GridSellActiveEnergy'] ?? null, + converter: () => data['GridSell'], color: 'rgba(0,0,200)', stack: 1, }, - { name: translate.instant('General.gridBuyAdvanced'), nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => { return energyValues?.result.data['_sum/GridBuyActiveEnergy'] ?? null; }, - converter: () => { - return data['GridBuy']; - }, + converter: () => data['GridBuy'], color: 'rgb(0,0,0)', stack: 0, - }]; + }, + offGridData ? ({ + name: translate.instant('GRID_STATES.OFF_GRID'), + nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => energyValues?.result.data['_sum/GridModeOffGridTime'], + converter: () => offGridData, + color: 'rgb(139,0,0)', + stack: 2, + custom: ( + chartType === 'line' ? { + unit: YAxisTitle.RELAY, + pluginType: 'box', + annotations: getAnnotations(offGridData, labels), + } : { + unit: YAxisTitle.TIME, + } + ), + yAxisId: ChartAxis.RIGHT, + } as HistoryUtils.DisplayValue) : null, + + + // Show the controller data only if the controller is enabled and there was at least one limitation set(=1) on the current day. + GridSectionComponent.isControllerEnabled(config, "Controller.Ess.Limiter14a") ? ({ + name: translate.instant("GRID_STATES.RESTRICTION"), + nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => energyValues?.result.data['ctrlEssLimiter14a0/CumulatedRestrictionTime'], + converter: () => restrictionData, + color: 'rgb(255, 165, 0)', + stack: 2, + custom: ( + chartType === 'line' ? { + unit: YAxisTitle.RELAY, + pluginType: 'box', + annotations: getAnnotations(restrictionData, labels), + } : { + unit: YAxisTitle.TIME, + } + ), + yAxisId: ChartAxis.RIGHT, + } as HistoryUtils.DisplayValue) : null, + ].filter(dataset => dataset !== null); if (!showPhases) { @@ -81,12 +158,8 @@ export class ChartComponent extends AbstractHistoryChart { ['L1', 'L2', 'L3'].forEach((phase, index) => { datasets.push({ name: 'Phase ' + phase, - nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => { - return energyValues?.result.data['_sum/GridActivePower' + phase]; - }, - converter: () => { - return data['GridActivePower' + phase] ?? null; - }, + nameSuffix: (energyValues: QueryHistoricTimeseriesEnergyResponse) => energyValues?.result.data['_sum/GridActivePower' + phase], + converter: () => data['GridActivePower' + phase] ?? null, color: AbstractHistoryChart.phaseColors[index], stack: 3, }); @@ -97,11 +170,65 @@ export class ChartComponent extends AbstractHistoryChart { tooltip: { formatNumber: '1.0-2', }, - yAxes: [{ - unit: YAxisTitle.ENERGY, - position: 'left', - yAxisId: ChartAxis.LEFT, - }], + yAxes: yAxes, }; + + /** + * Highlights active values as chartJS box annotations. + * @param data - Array of active time values for limitations/off-grid periods. + * @param labels - Array of ISO timestamps for the current day, split into 5-minute intervals. + * @returns An array of chartJS box annotation objects. + */ + function getAnnotations(data: number[], labels: Date[]): BoxAnnotationOptions[] { + if (data) { + const limitationEpochs = getLimitationEpochs(data); + const restrictionAnnotations = limitationEpochs.map(e => ({ + type: 'box', + borderWidth: 1, + xScaleID: 'x', + yMin: null, + yMax: null, + xMin: labels[e.start].toISOString(), + xMax: labels[e.end].toISOString(), + yScaleID: ChartAxis.RIGHT, + })); + return restrictionAnnotations; + } + return []; + } + + /** + * Iterates over chart values of the current day and records all periods where a channel is ON (=1). + * @param chartData - Array of chart values + * @returns an array of objects with start and end times of active periods in ISOString format + */ + function getLimitationEpochs(chartData: number[]): { start: number, end: number; }[] { + const epochs: { start: number, end: number; }[] = []; + let start: number | null = null; + + chartData.forEach((value, index) => { + // If the value is ON and there is not already an active period tracked, start a new period + if (value === ChartAnnotationState.ON && start === null) { + start = index; + // If the value is OFF/null and there is already an active period tracked, end the current period + } else if ((value === ChartAnnotationState.OFF || value === null) && start !== null) { + epochs.push({ start, end: index - 1 }); + start = null; + } + }); + + // If there is an active value until the end of the data, close it + if (start !== null) { + epochs.push({ start, end: chartData.length - 1 }); + } + + return epochs; + } + } + + public override getChartData() { + return ChartComponent.getChartData(this.config, this.chartType, this.translate, this.showPhases); + } + } diff --git a/ui/src/app/edge/history/common/grid/flat/flat.html b/ui/src/app/edge/history/common/grid/flat/flat.html index 77e9bee56f4..b3b81f12c25 100644 --- a/ui/src/app/edge/history/common/grid/flat/flat.html +++ b/ui/src/app/edge/history/common/grid/flat/flat.html @@ -1,5 +1,12 @@ +[title]="'General.grid' | translate" *ngIf="isInitialized"> + + + + + diff --git a/ui/src/app/edge/history/common/grid/flat/flat.ts b/ui/src/app/edge/history/common/grid/flat/flat.ts index 0b7ca3c985b..4d622e9ab7b 100644 --- a/ui/src/app/edge/history/common/grid/flat/flat.ts +++ b/ui/src/app/edge/history/common/grid/flat/flat.ts @@ -1,8 +1,37 @@ import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { GridSectionComponent } from 'src/app/edge/live/energymonitor/chart/section/grid.component'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; +import { ChannelAddress, CurrentData } from 'src/app/shared/shared'; +import { TimeUtils } from 'src/app/shared/utils/time/timeutils'; @Component({ selector: 'gridWidget', templateUrl: './flat.html', }) -export class FlatComponent extends AbstractFlatWidget { } +export class FlatComponent extends AbstractFlatWidget { + + private static readonly RESTRICTION_MODE: ChannelAddress = new ChannelAddress('ctrlEssLimiter14a0', 'RestrictionMode'); + private static readonly RESTRICTION_TIME: ChannelAddress = new ChannelAddress('ctrlEssLimiter14a0', 'CumulatedRestrictionTime'); + private static readonly OFF_GRID_TIME: ChannelAddress = new ChannelAddress('_sum', 'GridModeOffGridTime'); + + protected restrictionTime: number | null = null; + protected offGridTime: number | null = null; + protected TIME_CONVERTER = TimeUtils.formatSecondsToDuration; + + protected override getChannelAddresses(): ChannelAddress[] { + const channelAddresses = []; + if (GridSectionComponent.isControllerEnabled(this.config, "Controller.Ess.Limiter14a")) { + channelAddresses.push( + FlatComponent.RESTRICTION_MODE, + FlatComponent.RESTRICTION_TIME, + FlatComponent.OFF_GRID_TIME, + ); + } + return channelAddresses; + } + + protected override onCurrentData(currentData: CurrentData): void { + this.restrictionTime = currentData.allComponents["ctrlEssLimiter14a0/CumulatedRestrictionTime"]; + this.offGridTime = currentData.allComponents["_sum/GridModeOffGridTime"]; + } +} diff --git a/ui/src/app/edge/history/common/grid/overview/overview.ts b/ui/src/app/edge/history/common/grid/overview/overview.ts index 31104830130..a3f812c1a88 100644 --- a/ui/src/app/edge/history/common/grid/overview/overview.ts +++ b/ui/src/app/edge/history/common/grid/overview/overview.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChartOverview } from 'src/app/shared/genericComponents/chart/abstractHistoryChartOverview'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; @Component({ templateUrl: './overview.html', diff --git a/ui/src/app/edge/history/common/production/chart/chargerChart.ts b/ui/src/app/edge/history/common/production/chart/chargerChart.ts index 593e4d4bc19..9ce42c52677 100644 --- a/ui/src/app/edge/history/common/production/chart/chargerChart.ts +++ b/ui/src/app/edge/history/common/production/chart/chargerChart.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; @@ -8,7 +8,7 @@ import { ChannelAddress } from '../../../../../shared/shared'; @Component({ selector: 'productionChargerChart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChargerChartComponent extends AbstractHistoryChart { diff --git a/ui/src/app/edge/history/common/production/chart/productionMeterChart.ts b/ui/src/app/edge/history/common/production/chart/productionMeterChart.ts index baf66d6a040..b083189112a 100644 --- a/ui/src/app/edge/history/common/production/chart/productionMeterChart.ts +++ b/ui/src/app/edge/history/common/production/chart/productionMeterChart.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; @@ -9,7 +9,7 @@ import { ChannelAddress } from '../../../../../shared/shared'; /** Will be used in the Future again */ @Component({ selector: 'productionMeterchart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ProductionMeterChartComponent extends AbstractHistoryChart { @@ -33,7 +33,7 @@ export class ProductionMeterChartComponent extends AbstractHistoryChart { return { input: channels, output: (data: HistoryUtils.ChannelData) => { - const datasets: HistoryUtils.DisplayValues[] = []; + const datasets: HistoryUtils.DisplayValue[] = []; datasets.push({ name: this.translate.instant('General.production'), nameSuffix: (energyPeriodResponse: QueryHistoricTimeseriesEnergyResponse) => { diff --git a/ui/src/app/edge/history/common/production/chart/totalAcChart.ts b/ui/src/app/edge/history/common/production/chart/totalAcChart.ts index c788ebf8964..78311cd0bfb 100644 --- a/ui/src/app/edge/history/common/production/chart/totalAcChart.ts +++ b/ui/src/app/edge/history/common/production/chart/totalAcChart.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; @@ -8,7 +8,7 @@ import { ChannelAddress } from '../../../../../shared/shared'; @Component({ selector: 'productionTotalAcChart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class TotalAcChartComponent extends AbstractHistoryChart { @@ -35,7 +35,7 @@ export class TotalAcChartComponent extends AbstractHistoryChart { }, ], output: (data: HistoryUtils.ChannelData) => { - const datasets: HistoryUtils.DisplayValues[] = []; + const datasets: HistoryUtils.DisplayValue[] = []; datasets.push({ name: this.translate.instant("General.TOTAL"), diff --git a/ui/src/app/edge/history/common/production/chart/totalChart.ts b/ui/src/app/edge/history/common/production/chart/totalChart.ts index 0f2deef3cc5..1e0c6110d3d 100644 --- a/ui/src/app/edge/history/common/production/chart/totalChart.ts +++ b/ui/src/app/edge/history/common/production/chart/totalChart.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, Utils, YAxisTitle } from '../../../../../shared/service/utils'; @@ -8,10 +8,18 @@ import { ChannelAddress } from '../../../../../shared/shared'; @Component({ selector: 'productionTotalChart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class TotalChartComponent extends AbstractHistoryChart { + public override getChartHeight(): number { + if (this.showTotal) { + return window.innerHeight / 1.3; + } else { + return window.innerHeight / 2.3; + } + } + protected override getChartData(): HistoryUtils.ChartData { const productionMeterComponents = this.config?.getComponentsImplementingNature("io.openems.edge.meter.api.ElectricityMeter") .filter(component => this.config.isProducer(component)); @@ -68,7 +76,7 @@ export class TotalChartComponent extends AbstractHistoryChart { const chartObject: HistoryUtils.ChartData = { input: channels, output: (data: HistoryUtils.ChannelData) => { - const datasets: HistoryUtils.DisplayValues[] = []; + const datasets: HistoryUtils.DisplayValue[] = []; datasets.push({ name: this.showTotal == false ? this.translate.instant('General.production') : this.translate.instant('General.TOTAL'), nameSuffix: (energyQueryResponse: QueryHistoricTimeseriesEnergyResponse) => { @@ -162,11 +170,4 @@ export class TotalChartComponent extends AbstractHistoryChart { return chartObject; } - public override getChartHeight(): number { - if (this.showTotal) { - return window.innerHeight / 1.3; - } else { - return window.innerHeight / 2.3; - } - } } diff --git a/ui/src/app/edge/history/common/production/chart/totalDcChart.ts b/ui/src/app/edge/history/common/production/chart/totalDcChart.ts index a9b87962b9a..3f2c9769794 100644 --- a/ui/src/app/edge/history/common/production/chart/totalDcChart.ts +++ b/ui/src/app/edge/history/common/production/chart/totalDcChart.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; @@ -8,7 +8,7 @@ import { ChannelAddress } from '../../../../../shared/shared'; @Component({ selector: 'totalDcChart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class TotalDcChartComponent extends AbstractHistoryChart { diff --git a/ui/src/app/edge/history/common/production/details/chart/chart.ts b/ui/src/app/edge/history/common/production/details/chart/chart.ts index 6797a9c1612..a8a11e836b9 100644 --- a/ui/src/app/edge/history/common/production/details/chart/chart.ts +++ b/ui/src/app/edge/history/common/production/details/chart/chart.ts @@ -1,13 +1,13 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; -import { Phase } from 'src/app/shared/genericComponents/shared/phase'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; +import { Phase } from 'src/app/shared/components/shared/phase'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress } from 'src/app/shared/shared'; @Component({ selector: 'meterChart', - templateUrl: '../../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { @@ -44,7 +44,7 @@ export class ChartComponent extends AbstractHistoryChart { const chartObject: HistoryUtils.ChartData = { input: channels, output: (data: HistoryUtils.ChannelData) => { - const datasets: HistoryUtils.DisplayValues[] = []; + const datasets: HistoryUtils.DisplayValue[] = []; datasets.push({ name: component.alias, nameSuffix: (energyQueryResponse: QueryHistoricTimeseriesEnergyResponse) => { diff --git a/ui/src/app/edge/history/common/production/details/details.overview.html b/ui/src/app/edge/history/common/production/details/details.overview.html index 5e3c861b1f3..a6146a1ae05 100644 --- a/ui/src/app/edge/history/common/production/details/details.overview.html +++ b/ui/src/app/edge/history/common/production/details/details.overview.html @@ -3,4 +3,5 @@ [period]="service.historyPeriod.value"> - + diff --git a/ui/src/app/edge/history/common/production/details/details.overview.ts b/ui/src/app/edge/history/common/production/details/details.overview.ts index 8a2e5bc46ac..2e385d74067 100644 --- a/ui/src/app/edge/history/common/production/details/details.overview.ts +++ b/ui/src/app/edge/history/common/production/details/details.overview.ts @@ -1,24 +1,33 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChartOverview } from 'src/app/shared/genericComponents/chart/abstractHistoryChartOverview'; -import { ChannelAddress, EdgeConfig } from 'src/app/shared/shared'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ModalController } from '@ionic/angular'; +import { TranslateService } from '@ngx-translate/core'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; +import { NavigationOption } from 'src/app/shared/components/footer/subnavigation/footerNavigation'; +import { Service } from 'src/app/shared/shared'; +import { Role } from 'src/app/shared/type/role'; @Component({ templateUrl: './details.overview.html', }) export class DetailsOverviewComponent extends AbstractHistoryChartOverview { - protected chargerComponents: EdgeConfig.Component[] = []; - protected productionMeterComponents: EdgeConfig.Component[] = []; + protected navigationButtons: NavigationOption[] = []; - protected override getChannelAddresses(): ChannelAddress[] { - // Get Chargers - this.chargerComponents = - this.config.getComponentsImplementingNature("io.openems.edge.ess.dccharger.api.EssDcCharger") - .filter(component => component.isEnabled); + constructor( + public override service: Service, + protected override route: ActivatedRoute, + public override modalCtrl: ModalController, + private router: Router, + private translate: TranslateService, + ) { + super(service, route, modalCtrl); + } + + protected override afterIsInitialized() { - // Get productionMeters - this.productionMeterComponents = - this.config.getComponentsImplementingNature("io.openems.edge.meter.api.ElectricityMeter") - .filter(component => component.isEnabled && this.config.isProducer(component)); - return []; + this.service.getCurrentEdge().then(edge => { + this.navigationButtons = [ + { id: 'currentVoltage', isEnabled: edge.roleIsAtLeast(Role.INSTALLER), alias: this.translate.instant("Edge.History.CURRENT_AND_VOLTAGE"), callback: () => { this.router.navigate(['./currentVoltage'], { relativeTo: this.route }); } }]; + }); } } diff --git a/ui/src/app/edge/history/common/production/flat/flat.ts b/ui/src/app/edge/history/common/production/flat/flat.ts index 3f7d9b0f778..f399e593d02 100644 --- a/ui/src/app/edge/history/common/production/flat/flat.ts +++ b/ui/src/app/edge/history/common/production/flat/flat.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, EdgeConfig, Utils } from '../../../../../shared/shared'; diff --git a/ui/src/app/edge/history/common/production/overview/overview.ts b/ui/src/app/edge/history/common/production/overview/overview.ts index 715e2dfff07..02b85e97ec2 100644 --- a/ui/src/app/edge/history/common/production/overview/overview.ts +++ b/ui/src/app/edge/history/common/production/overview/overview.ts @@ -1,8 +1,9 @@ import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { ModalController } from '@ionic/angular'; -import { NavigationOption } from 'src/app/shared/genericComponents/footer-navigation/footerNavigation'; -import { AbstractHistoryChartOverview } from '../../../../../shared/genericComponents/chart/abstractHistoryChartOverview'; +import { NavigationOption } from 'src/app/shared/components/footer/subnavigation/footerNavigation'; + +import { AbstractHistoryChartOverview } from '../../../../../shared/components/chart/abstractHistoryChartOverview'; import { ChannelAddress, EdgeConfig, Service } from '../../../../../shared/shared'; @Component({ diff --git a/ui/src/app/edge/history/common/production/production.ts b/ui/src/app/edge/history/common/production/production.ts index bb70ba25068..b9f4d389d6c 100644 --- a/ui/src/app/edge/history/common/production/production.ts +++ b/ui/src/app/edge/history/common/production/production.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { FooterNavigationModule } from 'src/app/shared/components/footer/subnavigation/footerNavigation.module'; import { SharedModule } from 'src/app/shared/shared.module'; import { ChargerChartComponent } from './chart/chargerChart'; @@ -11,11 +12,14 @@ import { ChartComponent } from './details/chart/chart'; import { DetailsOverviewComponent } from './details/details.overview'; import { FlatComponent } from './flat/flat'; import { OverviewComponent } from './overview/overview'; +import { CurrentVoltageModule } from 'src/app/shared/components/edge/meter/currentVoltage/currentVoltageModule'; @NgModule({ imports: [ BrowserModule, SharedModule, + FooterNavigationModule, + CurrentVoltageModule, ], declarations: [ FlatComponent, diff --git a/ui/src/app/edge/history/common/selfconsumption/chart/chart.component.ts b/ui/src/app/edge/history/common/selfconsumption/chart/chart.component.ts index 0974e5f5bfe..a3854895d42 100644 --- a/ui/src/app/edge/history/common/selfconsumption/chart/chart.component.ts +++ b/ui/src/app/edge/history/common/selfconsumption/chart/chart.component.ts @@ -1,13 +1,13 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { QueryHistoricTimeseriesEnergyResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse'; import { ChartAxis, HistoryUtils, Utils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress } from 'src/app/shared/shared'; @Component({ selector: 'selfconsumptionChart', - templateUrl: '../../../../../shared/genericComponents/chart/abstracthistorychart.html', + templateUrl: '../../../../../shared/components/chart/abstracthistorychart.html', }) export class ChartComponent extends AbstractHistoryChart { diff --git a/ui/src/app/edge/history/common/selfconsumption/flat/flat.ts b/ui/src/app/edge/history/common/selfconsumption/flat/flat.ts index 4bcd1ba6b0b..e818fc3005f 100644 --- a/ui/src/app/edge/history/common/selfconsumption/flat/flat.ts +++ b/ui/src/app/edge/history/common/selfconsumption/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { CurrentData, Utils, ChannelAddress } from 'src/app/shared/shared'; @Component({ diff --git a/ui/src/app/edge/history/common/selfconsumption/overview/overview.ts b/ui/src/app/edge/history/common/selfconsumption/overview/overview.ts index 31104830130..a3f812c1a88 100644 --- a/ui/src/app/edge/history/common/selfconsumption/overview/overview.ts +++ b/ui/src/app/edge/history/common/selfconsumption/overview/overview.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AbstractHistoryChartOverview } from 'src/app/shared/genericComponents/chart/abstractHistoryChartOverview'; +import { AbstractHistoryChartOverview } from 'src/app/shared/components/chart/abstractHistoryChartOverview'; @Component({ templateUrl: './overview.html', diff --git a/ui/src/app/edge/history/common/storage/overview/overview.html b/ui/src/app/edge/history/common/storage/overview/overview.html new file mode 100644 index 00000000000..9217fe736b8 --- /dev/null +++ b/ui/src/app/edge/history/common/storage/overview/overview.html @@ -0,0 +1,6 @@ + + + + + diff --git a/ui/src/app/edge/history/delayedselltogrid/chart.component.ts b/ui/src/app/edge/history/delayedselltogrid/chart.component.ts index e51dd2b147c..358aef34881 100644 --- a/ui/src/app/edge/history/delayedselltogrid/chart.component.ts +++ b/ui/src/app/edge/history/delayedselltogrid/chart.component.ts @@ -14,12 +14,9 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class DelayedSellToGridChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; - ngOnChanges() { - this.updateChart(); - } constructor( protected override service: Service, @@ -29,6 +26,10 @@ export class DelayedSellToGridChartComponent extends AbstractHistoryChart implem super("delayedsellTogrid-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -38,6 +39,10 @@ export class DelayedSellToGridChartComponent extends AbstractHistoryChart implem this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -210,7 +215,4 @@ export class DelayedSellToGridChartComponent extends AbstractHistoryChart implem this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/delayedselltogrid/symmetricpeakshavingchartoverview/delayedselltogridchartoverview.component.ts b/ui/src/app/edge/history/delayedselltogrid/symmetricpeakshavingchartoverview/delayedselltogridchartoverview.component.ts index fa597ea5577..c258d3f48df 100644 --- a/ui/src/app/edge/history/delayedselltogrid/symmetricpeakshavingchartoverview/delayedselltogridchartoverview.component.ts +++ b/ui/src/app/edge/history/delayedselltogrid/symmetricpeakshavingchartoverview/delayedselltogridchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; @@ -9,10 +8,9 @@ import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; }) export class DelayedSellToGridChartOverviewComponent implements OnInit { - public edge: Edge = null; - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "symmetricpeakshaving-chart-overview"; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/delayedselltogrid/widget.component.ts b/ui/src/app/edge/history/delayedselltogrid/widget.component.ts index 3b4e3442ca5..5a537af8d69 100644 --- a/ui/src/app/edge/history/delayedselltogrid/widget.component.ts +++ b/ui/src/app/edge/history/delayedselltogrid/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { ActivatedRoute } from '@angular/router'; import { Component, Input, OnInit } from '@angular/core'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; @@ -10,13 +9,12 @@ import { Edge, Service, EdgeConfig } from 'src/app/shared/shared'; }) export class DelayedSellToGridWidgetComponent implements OnInit { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "delayedSellToGridWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/fixdigitaloutput/fixdigitaloutputchartoverview/fixdigitaloutputchartoverview.component.ts b/ui/src/app/edge/history/fixdigitaloutput/fixdigitaloutputchartoverview/fixdigitaloutputchartoverview.component.ts index d62eb1766cd..59d90f56e80 100644 --- a/ui/src/app/edge/history/fixdigitaloutput/fixdigitaloutputchartoverview/fixdigitaloutputchartoverview.component.ts +++ b/ui/src/app/edge/history/fixdigitaloutput/fixdigitaloutputchartoverview/fixdigitaloutputchartoverview.component.ts @@ -11,8 +11,8 @@ export class FixDigitalOutputChartOverviewComponent implements OnInit { private static readonly SELECTOR = "fixdigitaloutput-chart-overview"; - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; public showTotal: boolean = false; public fixDigitalOutputComponents: string[] = []; diff --git a/ui/src/app/edge/history/fixdigitaloutput/singlechart.component.ts b/ui/src/app/edge/history/fixdigitaloutput/singlechart.component.ts index 7dba882fa89..bc55416a9c8 100644 --- a/ui/src/app/edge/history/fixdigitaloutput/singlechart.component.ts +++ b/ui/src/app/edge/history/fixdigitaloutput/singlechart.component.ts @@ -16,12 +16,9 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class FixDigitalOutputSingleChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; - ngOnChanges() { - this.updateChart(); - } constructor( protected override service: Service, @@ -31,6 +28,10 @@ export class FixDigitalOutputSingleChartComponent extends AbstractHistoryChart i super("fixdigitaloutput-single-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -40,6 +41,10 @@ export class FixDigitalOutputSingleChartComponent extends AbstractHistoryChart i this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -100,7 +105,4 @@ export class FixDigitalOutputSingleChartComponent extends AbstractHistoryChart i this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/fixdigitaloutput/totalchart.component.ts b/ui/src/app/edge/history/fixdigitaloutput/totalchart.component.ts index ede98a6e38b..e675ed613c0 100644 --- a/ui/src/app/edge/history/fixdigitaloutput/totalchart.component.ts +++ b/ui/src/app/edge/history/fixdigitaloutput/totalchart.component.ts @@ -15,11 +15,7 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class FixDigitalOutputTotalChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; constructor( protected override service: Service, @@ -29,6 +25,10 @@ export class FixDigitalOutputTotalChartComponent extends AbstractHistoryChart im super("fixdigitaloutput-total-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -38,6 +38,9 @@ export class FixDigitalOutputTotalChartComponent extends AbstractHistoryChart im this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -120,7 +123,4 @@ export class FixDigitalOutputTotalChartComponent extends AbstractHistoryChart im this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/fixdigitaloutput/widget.component.ts b/ui/src/app/edge/history/fixdigitaloutput/widget.component.ts index f4990c751fb..7ca50fb8bf5 100644 --- a/ui/src/app/edge/history/fixdigitaloutput/widget.component.ts +++ b/ui/src/app/edge/history/fixdigitaloutput/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { QueryHistoricTimeseriesDataResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesDataResponse'; @@ -14,15 +13,14 @@ import { calculateActiveTimeOverPeriod } from '../shared'; }) export class FixDigitalOutputWidgetComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private config: EdgeConfig = null; - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "fixDigitalOutputWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; - public activeSecondsOverPeriod: number = null; - public edge: Edge = null; + public component: EdgeConfig.Component | null = null; + public activeSecondsOverPeriod: number | null = null; + public edge: Edge | null = null; + private config: EdgeConfig | null = null; constructor( public override service: Service, diff --git a/ui/src/app/edge/history/grid/chart.component.ts b/ui/src/app/edge/history/grid/chart.component.ts deleted file mode 100644 index 285c8d4961e..00000000000 --- a/ui/src/app/edge/history/grid/chart.component.ts +++ /dev/null @@ -1,195 +0,0 @@ -// @ts-strict-ignore -import { formatNumber } from '@angular/common'; -import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; -import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; - -import { ChannelAddress, Edge, EdgeConfig, Service } from '../../../shared/shared'; -import { AbstractHistoryChart } from '../abstracthistorychart'; -import * as Chart from 'chart.js'; - -@Component({ - selector: 'gridChart', - templateUrl: '../abstracthistorychart.html', -}) -export class GridChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public showPhases: boolean; - - ngOnChanges() { - this.updateChart(); - } - - constructor( - protected override service: Service, - protected override translate: TranslateService, - private route: ActivatedRoute, - ) { - super("grid-chart", service, translate); - } - - ngOnInit() { - this.startSpinner(); - this.service.setCurrentComponent('', this.route); - } - - ngOnDestroy() { - this.unsubscribeChartRefresh(); - } - - protected updateChart() { - this.autoSubscribeChartRefresh(); - this.loading = true; - this.startSpinner(); - this.colors = []; - - this.queryHistoricTimeseriesData(this.period.from, this.period.to).then(response => { - - const result = response.result; - // convert labels - const labels: Date[] = []; - for (const timestamp of result.timestamps) { - labels.push(new Date(timestamp)); - } - this.labels = labels; - - // convert datasets - const datasets = []; - - if ('_sum/GridActivePower' in result.data) { - const gridData = result.data['_sum/GridActivePower'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else { - return value / 1000; - } - }); - datasets.push({ - label: this.translate.instant('General.grid'), - data: gridData, - hidden: false, - }); - this.colors.push({ - backgroundColor: 'rgba(0,0,0,0.05)', - borderColor: 'rgba(0,0,0,1)', - }); - } - - if ('_sum/GridActivePowerL1' && '_sum/GridActivePowerL2' && '_sum/GridActivePowerL3' in result.data && this.showPhases == true) { - if ('_sum/GridActivePowerL1' in result.data) { - /** - * Buy From Grid - */ - const gridData = result.data['_sum/GridActivePowerL1'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else { - return value / 1000; - } - }); - datasets.push({ - label: this.translate.instant('General.phase') + ' ' + 'L1', - data: gridData, - hidden: false, - }); - this.colors.push(this.phase1Color); - } - if ('_sum/GridActivePowerL2' in result.data) { - /** - * Buy From Grid - */ - const gridData = result.data['_sum/GridActivePowerL2'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else { - return value / 1000; - } - }); - datasets.push({ - label: this.translate.instant('General.phase') + ' ' + 'L2', - data: gridData, - hidden: false, - }); - this.colors.push(this.phase2Color); - } - if ('_sum/GridActivePowerL3' in result.data) { - /** - * Buy From Grid - */ - const gridData = result.data['_sum/GridActivePowerL3'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else { - return value / 1000; - } - }); - datasets.push({ - label: this.translate.instant('General.phase') + ' ' + 'L3', - data: gridData, - hidden: false, - }); - this.colors.push(this.phase3Color); - } - } - this.datasets = datasets; - this.loading = false; - this.stopSpinner(); - - }).catch(reason => { - console.error(reason); // TODO error message - this.initializeChart(); - return; - }); - } - - protected getChannelAddresses(edge: Edge, config: EdgeConfig): Promise { - return new Promise((resolve) => { - const result: ChannelAddress[] = [ - new ChannelAddress('_sum', 'GridActivePower'), - new ChannelAddress('_sum', 'GridActivePowerL1'), - new ChannelAddress('_sum', 'GridActivePowerL2'), - new ChannelAddress('_sum', 'GridActivePowerL3'), - ]; - resolve(result); - }); - } - - protected setLabel() { - const translate = this.translate; // enables access to TranslateService - const options = this.createDefaultChartOptions(); - options.plugins.tooltip.callbacks.label = function (tooltipItem: Chart.TooltipItem) { - let label = tooltipItem.dataset.label; - const value = tooltipItem.dataset.data[tooltipItem.dataIndex]; - // 0.005 to prevent showing Charge or Discharge if value is e.g. 0.00232138 - if (value < -0.005) { - if (label.includes(translate.instant('General.phase'))) { - label += ' ' + translate.instant('General.gridSell'); - } else { - label = translate.instant('General.gridSell'); - } - } else if (value > 0.005) { - if (label.includes(translate.instant('General.phase'))) { - label += ' ' + translate.instant('General.gridBuy'); - } else { - label = translate.instant('General.gridBuy'); - } - } - return label + ": " + formatNumber(value, 'de', '1.0-2') + " kW"; - }; - this.options = options; - } - - public getChartHeight(): number { - return window.innerHeight / 1.3; - } -} diff --git a/ui/src/app/edge/history/gridoptimizedcharge/chart.component.ts b/ui/src/app/edge/history/gridoptimizedcharge/chart.component.ts deleted file mode 100644 index 828617a2266..00000000000 --- a/ui/src/app/edge/history/gridoptimizedcharge/chart.component.ts +++ /dev/null @@ -1,238 +0,0 @@ -// @ts-strict-ignore -import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; -import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; -import { ChartAxis, HistoryUtils, YAxisTitle } from 'src/app/shared/service/utils'; - -import { AbstractHistoryChart as NewAbstractHistoryChart } from '../../../shared/genericComponents/chart/abstracthistorychart'; -import { QueryHistoricTimeseriesDataResponse } from '../../../shared/jsonrpc/response/queryHistoricTimeseriesDataResponse'; -import { ChannelAddress, EdgeConfig, Service, Utils } from '../../../shared/shared'; -import { AbstractHistoryChart } from '../abstracthistorychart'; - -@Component({ - selector: 'gridOptimizedChargeChart', - templateUrl: '../abstracthistorychart.html', -}) -export class GridOptimizedChargeChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public component: EdgeConfig.Component; - - ngOnChanges() { - this.updateChart(); - } - - constructor( - protected override service: Service, - protected override translate: TranslateService, - private route: ActivatedRoute, - ) { - super("gridOptimizedCharge-chart", service, translate); - } - - ngOnInit() { - this.startSpinner(); - this.service.setCurrentComponent('', this.route); - this.setLabel(); - } - - ngOnDestroy() { - this.unsubscribeChartRefresh(); - } - - protected updateChart() { - this.autoSubscribeChartRefresh(); - this.startSpinner(); - this.colors = []; - this.loading = true; - this.queryHistoricTimeseriesData(this.period.from, this.period.to).then(response => { - this.service.getCurrentEdge().then(() => { - const result = (response as QueryHistoricTimeseriesDataResponse).result; - - // convert labels - const labels: Date[] = []; - for (const timestamp of result.timestamps) { - labels.push(new Date(timestamp)); - } - this.labels = labels; - - // convert datasets - const datasets = []; - - // Delay Charge Limit data - if (this.component.id + '/DelayChargeMaximumChargeLimit' in result.data) { - - const delayChargeData = result.data[this.component.id + '/DelayChargeMaximumChargeLimit'].map(value => { - if (value == null) { - return null; - } else if (value <= 0) { - return 0; - } else { - return value / 1000; // convert to kW - } - }); - datasets.push({ - label: this.translate.instant('Edge.Index.Widgets.GridOptimizedCharge.maximumCharge'), - data: delayChargeData, - hidden: false, - borderDash: [3, 3], - }); - this.colors.push({ - backgroundColor: 'rgba(253,197,7,0.05)', - borderColor: 'rgba(253,197,7,1)', - }); - } - - // Sell to grid limit - Minimum charge limit data - if (this.component.id + '/SellToGridLimitMinimumChargeLimit' in result.data) { - const sellToGridLimitData = result.data[this.component.id + '/SellToGridLimitMinimumChargeLimit'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else if (value < 0) { - return 0; - } else { - return value / 1000; // convert to kW - } - }); - datasets.push({ - label: this.translate.instant('Edge.Index.Widgets.GridOptimizedCharge.minimumCharge'), - data: sellToGridLimitData, - hidden: false, - borderDash: [3, 3], - }); - this.colors.push({ - backgroundColor: 'rgba(200,0,0,0.05)', - borderColor: 'rgba(200,0,0,1)', - }); - } - - if ('_sum/EssActivePower' in result.data) { - /* - * Storage Charge - */ - let effectivePower; - if ('_sum/ProductionDcActualPower' in result.data && result.data['_sum/ProductionDcActualPower'].length > 0) { - effectivePower = result.data['_sum/ProductionDcActualPower'].map((value, index) => { - return Utils.subtractSafely(result.data['_sum/EssActivePower'][index], value); - }); - } else { - effectivePower = result.data['_sum/EssActivePower']; - } - - const chargeData = effectivePower.map(value => { - if (value == null) { - return null; - } else if (value < 0) { - return value / -1000; // convert to kW; - } else { - return 0; - } - }); - - datasets.push({ - label: this.translate.instant('General.chargePower'), - data: chargeData, - hidden: false, - yAxisID: 'yAxis1', - position: 'left', - }); - this.colors.push({ - backgroundColor: 'rgba(0,223,0,0.05)', - borderColor: 'rgba(0,223,0,1)', - }); - - // State of charge data - if ('_sum/EssSoc' in result.data) { - const socData = result.data['_sum/EssSoc'].map(value => { - if (value == null) { - return null; - } else if (value > 100 || value < 0) { - return null; - } else { - return value; - } - }); - datasets.push({ - label: this.translate.instant('General.soc'), - data: socData, - hidden: false, - yAxisID: ChartAxis.RIGHT, - position: 'right', - borderDash: [10, 10], - unit: YAxisTitle.PERCENTAGE, - }); - this.colors.push({ - backgroundColor: 'rgba(189, 195, 199,0.05)', - borderColor: 'rgba(189, 195, 199,1)', - }); - } - } - this.datasets = datasets; - this.loading = false; - this.stopSpinner(); - - }).catch(reason => { - console.error(reason); // TODO error message - this.initializeChart(); - return; - }); - - }).catch(reason => { - console.error(reason); // TODO error message - this.initializeChart(); - return; - }).finally(async () => { - await this.setOptions(this.options); - this.applyControllerSpecificOptions(); - }); - } - - private applyControllerSpecificOptions() { - const yAxisRight: HistoryUtils.yAxes = { unit: YAxisTitle.PERCENTAGE, position: 'right', yAxisId: ChartAxis.RIGHT, displayGrid: false }; - const yAxisLeft: HistoryUtils.yAxes = { position: 'left', unit: YAxisTitle.ENERGY, yAxisId: ChartAxis.LEFT }; - - const locale = this.service.translate.currentLang; - const showYAxisTitle = true; - - [yAxisRight, yAxisLeft].forEach(yAxis => { - this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, yAxis, this.translate, 'line', locale, showYAxisTitle); - }); - - this.datasets = this.datasets.map((el, index, arr) => { - - // align last element to right yAxis - if ((arr.length - 1) === index) { - el['yAxisID'] = ChartAxis.RIGHT; - } - - return el; - }); - } - - protected getChannelAddresses(): Promise { - - return new Promise((resolve) => { - const result: ChannelAddress[] = [ - new ChannelAddress('_sum', 'EssActivePower'), - new ChannelAddress('_sum', 'ProductionDcActualPower'), - new ChannelAddress('_sum', 'EssSoc'), - ]; - if (this.component != null && this.component.id) { - result.push(new ChannelAddress(this.component.id, 'DelayChargeMaximumChargeLimit')); - result.push(new ChannelAddress(this.component.id, 'SellToGridLimitMinimumChargeLimit')); - } - resolve(result); - }); - } - - protected setLabel() { - this.options = this.createDefaultChartOptions(); - } - - public getChartHeight(): number { - return window.innerHeight / 21 * 9; - } -} diff --git a/ui/src/app/edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component.html b/ui/src/app/edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component.html deleted file mode 100644 index 60053246ef2..00000000000 --- a/ui/src/app/edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - {{ component.alias }} - - - - - - - - - - - - - - - - - - - -
    - General.chargePower -
    - - -
    - - - - - - - - Edge.Index.Widgets.GridOptimizedCharge.History.priorityDescription - - - - - - - - - - -
    - General.gridSell -
    - - -
    - - - - - - - - Edge.Index.Widgets.GridOptimizedCharge.History.batteryChargeGridLimitDescription - - - - - -
    -
    \ No newline at end of file diff --git a/ui/src/app/edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component.ts b/ui/src/app/edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component.ts deleted file mode 100644 index 0f2dc33a6aa..00000000000 --- a/ui/src/app/edge/history/gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -// @ts-strict-ignore -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; - -@Component({ - selector: GridOptimizedChargeChartOverviewComponent.SELECTOR, - templateUrl: './gridoptimizedchargechartoverview.component.html', -}) -export class GridOptimizedChargeChartOverviewComponent implements OnInit { - - public edge: Edge = null; - public component: EdgeConfig.Component = null; - - private static readonly SELECTOR = "gridoptimizedcharge-chart-overview"; - - constructor( - public service: Service, - private route: ActivatedRoute, - ) { } - - ngOnInit() { - this.service.setCurrentComponent('', this.route).then(edge => { - this.service.getConfig().then(config => { - this.component = config.getComponent(this.route.snapshot.params.componentId); - this.service.getConfig().then(config => { - this.edge = edge; - this.component = config.getComponent(this.route.snapshot.params.componentId); - }); - }); - }); - } -} diff --git a/ui/src/app/edge/history/gridoptimizedcharge/sellToGridLimitChart.component.ts b/ui/src/app/edge/history/gridoptimizedcharge/sellToGridLimitChart.component.ts deleted file mode 100644 index 0c556547ae4..00000000000 --- a/ui/src/app/edge/history/gridoptimizedcharge/sellToGridLimitChart.component.ts +++ /dev/null @@ -1,202 +0,0 @@ -// @ts-strict-ignore -import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; -import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; - -import { QueryHistoricTimeseriesDataResponse } from '../../../shared/jsonrpc/response/queryHistoricTimeseriesDataResponse'; -import { ChannelAddress, EdgeConfig, Service } from '../../../shared/shared'; -import { AbstractHistoryChart } from '../abstracthistorychart'; - -@Component({ - selector: 'sellToGridLimitChart', - templateUrl: '../abstracthistorychart.html', -}) -export class SellToGridLimitChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public component: EdgeConfig.Component; - - private gridMeter: string; - - ngOnChanges() { - this.gridMeter = this.component.properties['meter.id']; - this.updateChart(); - } - - constructor( - protected override service: Service, - protected override translate: TranslateService, - private route: ActivatedRoute, - ) { - super("gridOptimizedCharge-chart", service, translate); - } - - ngOnInit() { - this.gridMeter = this.component.properties['meter.id']; - this.startSpinner(); - this.service.setCurrentComponent('', this.route); - this.setLabel(); - } - - ngOnDestroy() { - this.unsubscribeChartRefresh(); - } - - protected updateChart() { - this.autoSubscribeChartRefresh(); - this.startSpinner(); - this.colors = []; - this.loading = true; - this.queryHistoricTimeseriesData(this.period.from, this.period.to).then(response => { - this.service.getCurrentEdge().then(() => { - const result = (response as QueryHistoricTimeseriesDataResponse).result; - - // convert labels - const labels: Date[] = []; - for (const timestamp of result.timestamps) { - labels.push(new Date(timestamp)); - } - this.labels = labels; - - // convert datasets - const datasets = []; - - /* - * Sell To Grid - */ - if (this.gridMeter + '/ActivePower' in result.data) { - const sellToGridData = result.data[this.gridMeter + '/ActivePower'].map(value => { - if (value == null) { - return null; - } else if (value < 0) { - return value / -1000; // convert to kW and invert value - } else { - return 0; - } - }); - datasets.push({ - label: this.translate.instant('General.gridSell'), - data: sellToGridData, - hidden: false, - }); - this.colors.push({ - backgroundColor: 'rgba(0,0,200,0.05)', - borderColor: 'rgba(0,0,200,1)', - }); - } - - /* - * Maximum sell to grid limit - */ - if (this.component.id + '/_PropertyMaximumSellToGridPower' in result.data) { - - const sellToGridLimitData = result.data[this.component.id + '/_PropertyMaximumSellToGridPower'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else { - return value / 1000; // convert to kW - } - }); - - datasets.push({ - label: this.translate.instant('Edge.Index.Widgets.GridOptimizedCharge.maximumGridFeedIn'), - data: sellToGridLimitData, - hidden: false, - borderDash: [3, 3], - }); - this.colors.push({ - backgroundColor: 'rgba(0,0,0,0.05)', - borderColor: 'rgba(0,0,0,1)', - }); - - const batterySellToGridLimitData = result.data[this.component.id + '/_PropertyMaximumSellToGridPower'].map(value => { - if (value == null) { - return null; - } else if (value == 0) { - return 0; - } else { - // - return value / 1000 * 0.95; // convert to kW - } - }); - - datasets.push({ - // TODO: Translate - label: "Maximale Netzeinspeisung durch Batteriebeladung", - data: batterySellToGridLimitData, - hidden: false, - borderDash: [3, 3], - }); - this.colors.push({ - backgroundColor: 'rgba(200,0,0,0.05)', - borderColor: 'rgba(200,0,0,1)', - }); - } - - /* - * Production - */ - if ('_sum/ProductionActivePower' in result.data) { - - const productionData = result.data['_sum/ProductionActivePower'].map(value => { - if (value == null) { - return null; - } else { - return value / 1000; // convert to kW - } - }); - datasets.push({ - label: this.translate.instant('General.production'), - data: productionData, - hidden: false, - }); - this.colors.push({ - backgroundColor: 'rgba(45,143,171,0.05)', - borderColor: 'rgba(45,143,171,1)', - }); - } - this.datasets = datasets; - this.loading = false; - this.stopSpinner(); - - }).catch(reason => { - console.error(reason); // TODO error message - this.initializeChart(); - return; - }); - - }).catch(reason => { - console.error(reason); // TODO error message - this.initializeChart(); - return; - }).finally(async () => { - await this.setOptions(this.options); - }); - } - - protected getChannelAddresses(): Promise { - - return new Promise((resolve) => { - const result: ChannelAddress[] = [new ChannelAddress('_sum', 'ProductionActivePower')]; - if (this.component != null && this.gridMeter != null) { - result.push(new ChannelAddress(this.gridMeter, 'ActivePower')); - } - if (this.component != null && this.component.id) { - result.push(new ChannelAddress(this.component.id, '_PropertyMaximumSellToGridPower')); - } - resolve(result); - }); - } - - protected setLabel() { - this.options = this.createDefaultChartOptions(); - } - - public getChartHeight(): number { - //return window.innerHeight / 1.3; - return window.innerHeight / 21 * 9; - } -} diff --git a/ui/src/app/edge/history/gridoptimizedcharge/widget.component.html b/ui/src/app/edge/history/gridoptimizedcharge/widget.component.html deleted file mode 100644 index cbf7c560d85..00000000000 --- a/ui/src/app/edge/history/gridoptimizedcharge/widget.component.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - {{ component.alias }} - - - - - - - - - - - - - - - - - -
    Edge.Index.Widgets.GridOptimizedCharge.chargingDelayed - {{ activeTimeAvoidLowCharging | formatSecondsToDuration }} -
    Edge.Index.Widgets.GridOptimizedCharge.State.chargeLimitActive - {{ activeTimeDelayCharge | formatSecondsToDuration }} -
    Edge.Index.Widgets.GridOptimizedCharge.gridFeedInLimitationAvoided - {{ activeTimeSellToGridLimit | formatSecondsToDuration }} -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/ui/src/app/edge/history/gridoptimizedcharge/widget.component.ts b/ui/src/app/edge/history/gridoptimizedcharge/widget.component.ts deleted file mode 100644 index fd5361b5b33..00000000000 --- a/ui/src/app/edge/history/gridoptimizedcharge/widget.component.ts +++ /dev/null @@ -1,88 +0,0 @@ -// @ts-strict-ignore -import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; - -import { ChannelAddress, Edge, EdgeConfig, Service } from '../../../shared/shared'; -import { AbstractHistoryWidget } from '../abstracthistorywidget'; - -@Component({ - selector: GridOptimizedChargeWidgetComponent.SELECTOR, - templateUrl: './widget.component.html', -}) -export class GridOptimizedChargeWidgetComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - - private static readonly SELECTOR = "gridOptimizedChargeWidget"; - - public component: EdgeConfig.Component = null; - - public activeTimeSellToGridLimit: number | null = null; - public activeTimeDelayCharge: number | null = null; - public activeTimeAvoidLowCharging: number | null = null; - public activeTimeNoChargeLimit: number | null = null; - - public edge: Edge = null; - - constructor( - public override service: Service, - private route: ActivatedRoute, - ) { - super(service); - } - - ngOnInit() { - this.service.setCurrentComponent('', this.route).then(edge => { - this.edge = edge; - this.service.getConfig().then(config => { - this.component = config.getComponent(this.componentId); - }); - }); - } - - ngOnDestroy() { - this.unsubscribeWidgetRefresh(); - } - - ngOnChanges() { - this.updateValues(); - } - - protected updateValues() { - - this.service.getConfig().then(config => { - this.getChannelAddresses(this.edge, config).then(channels => { - this.service.queryEnergy(this.period.from, this.period.to, channels).then(response => { - const result = response.result; - if (this.componentId + '/DelayChargeTime' in result.data) { - this.activeTimeDelayCharge = result.data[this.componentId + '/DelayChargeTime']; - } - if (this.componentId + '/SellToGridLimitTime' in result.data) { - this.activeTimeSellToGridLimit = result.data[this.componentId + '/SellToGridLimitTime']; - } - if (this.componentId + '/AvoidLowChargingTime' in result.data) { - this.activeTimeAvoidLowCharging = result.data[this.componentId + '/AvoidLowChargingTime']; - } - // Not displayed to focus on the active time - if (this.componentId + '/NoLimitationTime' in result.data) { - this.activeTimeNoChargeLimit = result.data[this.componentId + '/NoLimitationTime']; - } - }); - }); - }); - } - - protected getChannelAddresses(edge: Edge, config: EdgeConfig): Promise { - return new Promise((resolve) => { - const channeladdresses = [ - new ChannelAddress(this.componentId, 'DelayChargeTime'), - new ChannelAddress(this.componentId, 'SellToGridLimitTime'), - new ChannelAddress(this.componentId, 'AvoidLowChargingTime'), - new ChannelAddress(this.componentId, 'NoLimitationTime'), - ]; - resolve(channeladdresses); - }); - } -} diff --git a/ui/src/app/edge/history/heatingelement/chart.component.ts b/ui/src/app/edge/history/heatingelement/chart.component.ts index d2647126584..298858a48eb 100644 --- a/ui/src/app/edge/history/heatingelement/chart.component.ts +++ b/ui/src/app/edge/history/heatingelement/chart.component.ts @@ -17,12 +17,8 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class HeatingelementChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public component: EdgeConfig.Component; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public component!: EdgeConfig.Component; constructor( protected override service: Service, @@ -32,6 +28,10 @@ export class HeatingelementChartComponent extends AbstractHistoryChart implement super("heatingelement-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -42,6 +42,10 @@ export class HeatingelementChartComponent extends AbstractHistoryChart implement this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -120,7 +124,4 @@ export class HeatingelementChartComponent extends AbstractHistoryChart implement this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/heatingelement/heatingelementchartoverview/heatingelementchartoverview.component.ts b/ui/src/app/edge/history/heatingelement/heatingelementchartoverview/heatingelementchartoverview.component.ts index 795f4503b0f..440eeb2c38b 100644 --- a/ui/src/app/edge/history/heatingelement/heatingelementchartoverview/heatingelementchartoverview.component.ts +++ b/ui/src/app/edge/history/heatingelement/heatingelementchartoverview/heatingelementchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; @@ -9,10 +8,9 @@ import { Edge, EdgeConfig, Service } from '../../../../shared/shared'; }) export class HeatingelementChartOverviewComponent implements OnInit { - public edge: Edge = null; - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "heatingelement-chart-overview"; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/heatingelement/widget.component.ts b/ui/src/app/edge/history/heatingelement/widget.component.ts index 54c59de124b..5f39ae03bd0 100644 --- a/ui/src/app/edge/history/heatingelement/widget.component.ts +++ b/ui/src/app/edge/history/heatingelement/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { QueryHistoricTimeseriesDataResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesDataResponse'; @@ -13,18 +12,18 @@ import { AbstractHistoryWidget } from '../abstracthistorywidget'; }) export class HeatingelementWidgetComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "heatingelementWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + - public component: EdgeConfig.Component = null; + public component: EdgeConfig.Component | null = null; public activeTimeOverPeriodLevel1: number | null = null; public activeTimeOverPeriodLevel2: number | null = null; public activeTimeOverPeriodLevel3: number | null = null; - public edge: Edge = null; + public edge: Edge | null = null; constructor( public override service: Service, diff --git a/ui/src/app/edge/history/heatpump/chart.component.ts b/ui/src/app/edge/history/heatpump/chart.component.ts index a026c2e3d71..3a00779b838 100644 --- a/ui/src/app/edge/history/heatpump/chart.component.ts +++ b/ui/src/app/edge/history/heatpump/chart.component.ts @@ -15,12 +15,9 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class HeatPumpChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public component: EdgeConfig.Component; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public component!: EdgeConfig.Component; - ngOnChanges() { - this.updateChart(); - } constructor( protected override service: Service, @@ -30,6 +27,10 @@ export class HeatPumpChartComponent extends AbstractHistoryChart implements OnIn super("heatpump-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -39,6 +40,10 @@ export class HeatPumpChartComponent extends AbstractHistoryChart implements OnIn this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -96,6 +101,10 @@ export class HeatPumpChartComponent extends AbstractHistoryChart implements OnIn }); } + protected setLabel() { + this.options = this.createDefaultChartOptions(); + } + private applyControllerSpecificOptions(options: Chart.ChartOptions) { const translate = this.translate; options.scales[ChartAxis.LEFT]['title'].text = this.translate.instant('General.state'); @@ -147,11 +156,4 @@ export class HeatPumpChartComponent extends AbstractHistoryChart implements OnIn this.options = options; } - protected setLabel() { - this.options = this.createDefaultChartOptions(); - } - - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/heatpump/heatpumpchartoverview/heatpumpchartoverview.component.ts b/ui/src/app/edge/history/heatpump/heatpumpchartoverview/heatpumpchartoverview.component.ts index 93e94726d5e..16b4085313c 100644 --- a/ui/src/app/edge/history/heatpump/heatpumpchartoverview/heatpumpchartoverview.component.ts +++ b/ui/src/app/edge/history/heatpump/heatpumpchartoverview/heatpumpchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ModalController } from '@ionic/angular'; @@ -12,8 +11,8 @@ export class HeatPumpChartOverviewComponent implements OnInit { private static readonly SELECTOR = "heatpump-chart-overview"; - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/heatpump/widget.component.ts b/ui/src/app/edge/history/heatpump/widget.component.ts index 14ef01243f7..30b91ac9062 100644 --- a/ui/src/app/edge/history/heatpump/widget.component.ts +++ b/ui/src/app/edge/history/heatpump/widget.component.ts @@ -13,10 +13,9 @@ import { AbstractHistoryWidget } from '../abstracthistorywidget'; }) export class HeatpumpWidgetComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "heatpumpWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; public component: EdgeConfig.Component | null = null; @@ -25,7 +24,7 @@ export class HeatpumpWidgetComponent extends AbstractHistoryWidget implements On public activeTimeOverPeriodRecommendation: number | null = null; public activeTimeOverPeriodLock: number | null = null; - public edge: Edge = null; + public edge: Edge | null = null; constructor( public override service: Service, diff --git a/ui/src/app/edge/history/history.component.html b/ui/src/app/edge/history/history.component.html index e284994f2ce..28687881029 100644 --- a/ui/src/app/edge/history/history.component.html +++ b/ui/src/app/edge/history/history.component.html @@ -68,7 +68,7 @@ - + @@ -108,4 +108,4 @@ - \ No newline at end of file + diff --git a/ui/src/app/edge/history/history.component.ts b/ui/src/app/edge/history/history.component.ts index 03e9c052124..b0a4c35e4bf 100644 --- a/ui/src/app/edge/history/history.component.ts +++ b/ui/src/app/edge/history/history.component.ts @@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { AppService } from 'src/app/app.service'; -import { HeaderComponent } from 'src/app/shared/header/header.component'; +import { HeaderComponent } from 'src/app/shared/components/header/header.component'; import { JsonrpcResponseError } from 'src/app/shared/jsonrpc/base'; import { Edge, EdgeConfig, Service, Widgets } from 'src/app/shared/shared'; import { environment } from 'src/environments'; @@ -18,23 +18,22 @@ export class HistoryComponent implements OnInit { // is a Timedata service available, i.e. can historic data be queried. public isTimedataAvailable: boolean = true; - protected errorResponse: JsonrpcResponseError | null = null; // sets the height for a chart. This is recalculated on every window resize. public socChartHeight: string = "250px"; public energyChartHeight: string = "250px"; // holds the Widgets - public widgets: Widgets = null; + public widgets: Widgets | null = null; // holds the current Edge - public edge: Edge = null; + public edge: Edge | null = null; // holds Channelthreshold Components to display effective active time in % // public channelthresholdComponents: string[] = []; - public config: EdgeConfig = null; - protected handleRefresh: () => void = () => AppService.handleRefresh(); + public config: EdgeConfig | null = null; + protected errorResponse: JsonrpcResponseError | null = null; constructor( public service: Service, @@ -65,10 +64,6 @@ export class HistoryComponent implements OnInit { }); } - protected setErrorResponse(errorResponse: JsonrpcResponseError | null) { - this.errorResponse = errorResponse; - } - // checks arrows when ChartPage is closed // double viewchild is used to prevent undefined state of PickDateComponent ionViewDidEnter() { @@ -87,4 +82,11 @@ export class HistoryComponent implements OnInit { /* maximium size */ Math.min(600, ref), ) + "px"; } + + protected handleRefresh: () => void = () => AppService.handleRefresh(); + + protected setErrorResponse(errorResponse: JsonrpcResponseError | null) { + this.errorResponse = errorResponse; + } + } diff --git a/ui/src/app/edge/history/history.module.ts b/ui/src/app/edge/history/history.module.ts index 6ffeed98e97..9642a03adbf 100644 --- a/ui/src/app/edge/history/history.module.ts +++ b/ui/src/app/edge/history/history.module.ts @@ -1,4 +1,5 @@ import { NgModule } from '@angular/core'; +import { HistoryDataErrorModule } from 'src/app/shared/components/history-data-error/history-data-error.module'; import { SharedModule } from '../../shared/shared.module'; import { ChpSocChartComponent } from './chpsoc/chart.component'; @@ -12,11 +13,6 @@ import { FixDigitalOutputChartOverviewComponent } from './fixdigitaloutput/fixdi import { FixDigitalOutputSingleChartComponent } from './fixdigitaloutput/singlechart.component'; import { FixDigitalOutputTotalChartComponent } from './fixdigitaloutput/totalchart.component'; import { FixDigitalOutputWidgetComponent } from './fixdigitaloutput/widget.component'; -import { GridChartComponent } from './grid/chart.component'; -import { GridOptimizedChargeChartComponent } from './gridoptimizedcharge/chart.component'; -import { GridOptimizedChargeChartOverviewComponent } from './gridoptimizedcharge/gridoptimizedchargechartoverview/gridoptimizedchargechartoverview.component'; -import { SellToGridLimitChartComponent } from './gridoptimizedcharge/sellToGridLimitChart.component'; -import { GridOptimizedChargeWidgetComponent } from './gridoptimizedcharge/widget.component'; import { HeatingelementChartComponent } from './heatingelement/chart.component'; import { HeatingelementChartOverviewComponent } from './heatingelement/heatingelementchartoverview/heatingelementchartoverview.component'; import { HeatingelementWidgetComponent } from './heatingelement/widget.component'; @@ -50,6 +46,7 @@ import { StorageComponent } from './storage/widget.component'; SharedModule, Common, Controller, + HistoryDataErrorModule, ], declarations: [ AsymmetricPeakshavingChartComponent, @@ -64,10 +61,6 @@ import { StorageComponent } from './storage/widget.component'; FixDigitalOutputSingleChartComponent, FixDigitalOutputTotalChartComponent, FixDigitalOutputWidgetComponent, - GridChartComponent, - GridOptimizedChargeChartComponent, - GridOptimizedChargeChartOverviewComponent, - GridOptimizedChargeWidgetComponent, HeatingelementChartComponent, HeatingelementChartOverviewComponent, HeatingelementWidgetComponent, @@ -75,7 +68,6 @@ import { StorageComponent } from './storage/widget.component'; HeatPumpChartOverviewComponent, HeatpumpWidgetComponent, HistoryComponent, - SellToGridLimitChartComponent, SinglethresholdChartComponent, SinglethresholdChartOverviewComponent, SinglethresholdWidgetComponent, diff --git a/ui/src/app/edge/history/historydataservice.ts b/ui/src/app/edge/history/historydataservice.ts index 07f2bec9050..bf64a942674 100644 --- a/ui/src/app/edge/history/historydataservice.ts +++ b/ui/src/app/edge/history/historydataservice.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { Inject, Injectable } from "@angular/core"; -import { DataService } from "../../shared/genericComponents/shared/dataservice"; +import { DataService } from "../../shared/components/shared/dataservice"; import { QueryHistoricTimeseriesEnergyResponse } from "../../shared/jsonrpc/response/queryHistoricTimeseriesEnergyResponse"; import { ChannelAddress, Edge } from "../../shared/shared"; import { DateUtils } from "src/app/shared/utils/date/dateutils"; @@ -13,9 +13,9 @@ import { RefresherCustomEvent } from "@ionic/angular"; @Injectable() export class HistoryDataService extends DataService { - private channelAddresses: { [sourceId: string]: ChannelAddress } = {}; - public queryChannelsTimeout: any | null = null; + public queryChannelsTimeout: ReturnType | null = null; protected override timestamps: string[] = []; + private channelAddresses: { [sourceId: string]: ChannelAddress } = {}; constructor( @Inject(Websocket) protected websocket: Websocket, diff --git a/ui/src/app/edge/history/peakshaving/asymmetric/asymmetricpeakshavingchartoverview/asymmetricpeakshavingchartoverview.component.ts b/ui/src/app/edge/history/peakshaving/asymmetric/asymmetricpeakshavingchartoverview/asymmetricpeakshavingchartoverview.component.ts index 9e012f13202..3cb22de5eca 100644 --- a/ui/src/app/edge/history/peakshaving/asymmetric/asymmetricpeakshavingchartoverview/asymmetricpeakshavingchartoverview.component.ts +++ b/ui/src/app/edge/history/peakshaving/asymmetric/asymmetricpeakshavingchartoverview/asymmetricpeakshavingchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Edge, EdgeConfig, Service } from '../../../../../shared/shared'; @@ -9,10 +8,9 @@ import { Edge, EdgeConfig, Service } from '../../../../../shared/shared'; }) export class AsymmetricPeakshavingChartOverviewComponent implements OnInit { - public edge: Edge = null; - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "asymmetricpeakshaving-chart-overview"; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/peakshaving/asymmetric/chart.component.ts b/ui/src/app/edge/history/peakshaving/asymmetric/chart.component.ts index 158d68ca676..a3ace71ad44 100644 --- a/ui/src/app/edge/history/peakshaving/asymmetric/chart.component.ts +++ b/ui/src/app/edge/history/peakshaving/asymmetric/chart.component.ts @@ -14,12 +14,8 @@ import { AbstractHistoryChart } from '../../abstracthistorychart'; }) export class AsymmetricPeakshavingChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public component: EdgeConfig.Component; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public component!: EdgeConfig.Component; constructor( protected override service: Service, @@ -29,6 +25,10 @@ export class AsymmetricPeakshavingChartComponent extends AbstractHistoryChart im super("asymmetricpeakshaving-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -38,6 +38,10 @@ export class AsymmetricPeakshavingChartComponent extends AbstractHistoryChart im this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -237,7 +241,4 @@ export class AsymmetricPeakshavingChartComponent extends AbstractHistoryChart im this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/peakshaving/asymmetric/widget.component.ts b/ui/src/app/edge/history/peakshaving/asymmetric/widget.component.ts index daf215d6681..85a4b2581e2 100644 --- a/ui/src/app/edge/history/peakshaving/asymmetric/widget.component.ts +++ b/ui/src/app/edge/history/peakshaving/asymmetric/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { ActivatedRoute } from '@angular/router'; import { Component, Input, OnInit } from '@angular/core'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; @@ -10,13 +9,13 @@ import { Edge, Service, EdgeConfig } from 'src/app/shared/shared'; }) export class AsymmetricPeakshavingWidgetComponent implements OnInit { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "asymmetricPeakshavingWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/peakshaving/symmetric/chart.component.ts b/ui/src/app/edge/history/peakshaving/symmetric/chart.component.ts index 8cd625e16b9..4d9de7b5dec 100644 --- a/ui/src/app/edge/history/peakshaving/symmetric/chart.component.ts +++ b/ui/src/app/edge/history/peakshaving/symmetric/chart.component.ts @@ -13,12 +13,8 @@ import { AbstractHistoryChart } from '../../abstracthistorychart'; }) export class SymmetricPeakshavingChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; constructor( protected override service: Service, @@ -28,6 +24,10 @@ export class SymmetricPeakshavingChartComponent extends AbstractHistoryChart imp super("symmetricpeakshaving-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -37,6 +37,10 @@ export class SymmetricPeakshavingChartComponent extends AbstractHistoryChart imp this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -209,7 +213,4 @@ export class SymmetricPeakshavingChartComponent extends AbstractHistoryChart imp this.options = options; } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/peakshaving/symmetric/symmetricpeakshavingchartoverview/symmetricpeakshavingchartoverview.component.ts b/ui/src/app/edge/history/peakshaving/symmetric/symmetricpeakshavingchartoverview/symmetricpeakshavingchartoverview.component.ts index 9da6f44c1bc..8e578e2b5fa 100644 --- a/ui/src/app/edge/history/peakshaving/symmetric/symmetricpeakshavingchartoverview/symmetricpeakshavingchartoverview.component.ts +++ b/ui/src/app/edge/history/peakshaving/symmetric/symmetricpeakshavingchartoverview/symmetricpeakshavingchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Edge, EdgeConfig, Service } from '../../../../../shared/shared'; @@ -9,11 +8,11 @@ import { Edge, EdgeConfig, Service } from '../../../../../shared/shared'; }) export class SymmetricPeakshavingChartOverviewComponent implements OnInit { - public edge: Edge = null; - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "symmetricpeakshaving-chart-overview"; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; + constructor( public service: Service, private route: ActivatedRoute, diff --git a/ui/src/app/edge/history/peakshaving/symmetric/widget.component.ts b/ui/src/app/edge/history/peakshaving/symmetric/widget.component.ts index 179d46e5e31..0ae228ca9f5 100644 --- a/ui/src/app/edge/history/peakshaving/symmetric/widget.component.ts +++ b/ui/src/app/edge/history/peakshaving/symmetric/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; @@ -10,13 +9,13 @@ import { Edge, EdgeConfig, Service } from 'src/app/shared/shared'; }) export class SymmetricPeakshavingWidgetComponent implements OnInit { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "symmetricPeakshavingWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/peakshaving/timeslot/chart.component.ts b/ui/src/app/edge/history/peakshaving/timeslot/chart.component.ts index 1e65baae7f0..379d9d33986 100644 --- a/ui/src/app/edge/history/peakshaving/timeslot/chart.component.ts +++ b/ui/src/app/edge/history/peakshaving/timeslot/chart.component.ts @@ -14,12 +14,8 @@ import { AbstractHistoryChart } from '../../abstracthistorychart'; }) export class TimeslotPeakshavingChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; constructor( protected override service: Service, @@ -29,6 +25,10 @@ export class TimeslotPeakshavingChartComponent extends AbstractHistoryChart impl super("timeslotpeakshaving-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -38,6 +38,10 @@ export class TimeslotPeakshavingChartComponent extends AbstractHistoryChart impl this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -224,7 +228,4 @@ export class TimeslotPeakshavingChartComponent extends AbstractHistoryChart impl this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/peakshaving/timeslot/timeslotpeakshavingchartoverview/timeslotpeakshavingchartoverview.component.ts b/ui/src/app/edge/history/peakshaving/timeslot/timeslotpeakshavingchartoverview/timeslotpeakshavingchartoverview.component.ts index 79375034f28..9c83adacd26 100644 --- a/ui/src/app/edge/history/peakshaving/timeslot/timeslotpeakshavingchartoverview/timeslotpeakshavingchartoverview.component.ts +++ b/ui/src/app/edge/history/peakshaving/timeslot/timeslotpeakshavingchartoverview/timeslotpeakshavingchartoverview.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Edge, EdgeConfig, Service } from '../../../../../shared/shared'; @@ -9,11 +8,11 @@ import { Edge, EdgeConfig, Service } from '../../../../../shared/shared'; }) export class TimeslotPeakshavingChartOverviewComponent implements OnInit { - public edge: Edge = null; - public component: EdgeConfig.Component = null; - private static readonly SELECTOR = "timeslotpeakshaving-chart-overview"; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; + constructor( public service: Service, private route: ActivatedRoute, diff --git a/ui/src/app/edge/history/peakshaving/timeslot/widget.component.ts b/ui/src/app/edge/history/peakshaving/timeslot/widget.component.ts index ab34310c2a0..6903d838553 100644 --- a/ui/src/app/edge/history/peakshaving/timeslot/widget.component.ts +++ b/ui/src/app/edge/history/peakshaving/timeslot/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; @@ -10,13 +9,13 @@ import { Edge, EdgeConfig, Service } from 'src/app/shared/shared'; }) export class TimeslotPeakshavingWidgetComponent implements OnInit { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "timeslotPeakshavingWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + - public edge: Edge = null; - public component: EdgeConfig.Component = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public service: Service, diff --git a/ui/src/app/edge/history/shared.ts b/ui/src/app/edge/history/shared.ts index 647edc7191c..8ff93006ca0 100644 --- a/ui/src/app/edge/history/shared.ts +++ b/ui/src/app/edge/history/shared.ts @@ -77,12 +77,12 @@ export type ChartOptions = { responsive?: boolean, maintainAspectRatio: boolean, legend: { - onClick?(event: MouseEvent, legendItem: Chart.LegendItem): void labels: { generateLabels?(chart: Chart.Chart): Chart.LegendItem[], filter?(legendItem: Chart.LegendItem, data: ChartData): any, }, position: "bottom" + onClick?(event: MouseEvent, legendItem: Chart.LegendItem): void }, elements: { point: { @@ -135,13 +135,13 @@ export type ChartOptions = { mode: string, intersect: boolean, axis: string, - itemSort?(itemA: Chart.TooltipItem, itemB: Chart.TooltipItem, data?: ChartData): number, callbacks: { label?(tooltipItem: TooltipItem, data: Data): string, title?(tooltipItems: Chart.TooltipItem[], data: Data): string, afterTitle?(item: Chart.TooltipItem[], data: Data): string | string[], footer?(item: Chart.TooltipItem[], data: ChartData): string | string[] } + itemSort?(itemA: Chart.TooltipItem, itemB: Chart.TooltipItem, data?: ChartData): number, }, legendCallback?(chart: Chart.Chart): string }; @@ -165,6 +165,9 @@ export const DEFAULT_TIME_CHART_OPTIONS: Chart.ChartOptions = { line: {}, }, plugins: { + annotation: { + annotations: [], + }, colors: { enabled: false, }, diff --git a/ui/src/app/edge/history/singlethreshold/chart.component.ts b/ui/src/app/edge/history/singlethreshold/chart.component.ts index 41371fa0bc4..3165adec062 100644 --- a/ui/src/app/edge/history/singlethreshold/chart.component.ts +++ b/ui/src/app/edge/history/singlethreshold/chart.component.ts @@ -17,13 +17,9 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class SinglethresholdChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - @Input() public inputChannelUnit: string; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + @Input({ required: true }) public inputChannelUnit!: string; constructor( protected override service: Service, @@ -42,6 +38,14 @@ export class SinglethresholdChartComponent extends AbstractHistoryChart implemen this.unsubscribeChartRefresh(); } + ngOnChanges() { + this.updateChart(); + } + + public getChartHeight(): number { + return window.innerHeight / 1.3; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -95,7 +99,7 @@ export class SinglethresholdChartComponent extends AbstractHistoryChart implemen }); } if (channel == inputChannel) { - let inputLabel: string = null; + let inputLabel: string | null = null; const address = ChannelAddress.fromString(channel); switch (address.channelId) { case 'GridActivePower': @@ -269,7 +273,4 @@ export class SinglethresholdChartComponent extends AbstractHistoryChart implemen } - public getChartHeight(): number { - return window.innerHeight / 1.3; - } } diff --git a/ui/src/app/edge/history/singlethreshold/singlethresholdchartoverview/singlethresholdchartoverview.component.ts b/ui/src/app/edge/history/singlethreshold/singlethresholdchartoverview/singlethresholdchartoverview.component.ts index 06a1d3d1f9e..752aafb63ea 100644 --- a/ui/src/app/edge/history/singlethreshold/singlethresholdchartoverview/singlethresholdchartoverview.component.ts +++ b/ui/src/app/edge/history/singlethreshold/singlethresholdchartoverview/singlethresholdchartoverview.component.ts @@ -10,17 +10,19 @@ import { ChannelAddress, Edge, EdgeConfig, Service, Utils, Websocket } from '../ export class SinglethresholdChartOverviewComponent implements OnInit { private static readonly SELECTOR = "channelthreshold-chart-overview"; - protected readonly spinnerid = SinglethresholdChartOverviewComponent.SELECTOR; - public edge: Edge = null; + public edge: Edge | null = null; - public component: EdgeConfig.Component = null; + public component: EdgeConfig.Component | null = null; public inputChannel: string; - protected inputChannelUnit: string; // reference to the Utils method to access via html public isLastElement = Utils.isLastElement; + protected inputChannelUnit: string; + protected readonly spinnerid = SinglethresholdChartOverviewComponent.SELECTOR; + + constructor( public service: Service, private route: ActivatedRoute, diff --git a/ui/src/app/edge/history/singlethreshold/widget.component.ts b/ui/src/app/edge/history/singlethreshold/widget.component.ts index 5af56a066b8..c0ba1844e78 100644 --- a/ui/src/app/edge/history/singlethreshold/widget.component.ts +++ b/ui/src/app/edge/history/singlethreshold/widget.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { QueryHistoricTimeseriesDataResponse } from 'src/app/shared/jsonrpc/response/queryHistoricTimeseriesDataResponse'; @@ -14,14 +13,14 @@ import { calculateActiveTimeOverPeriod } from '../shared'; }) export class SinglethresholdWidgetComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - private static readonly SELECTOR = "singlethresholdWidget"; - public activeSecondsOverPeriod: number = null; - public edge: Edge = null; - public component: EdgeConfig.Component = null; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + + public activeSecondsOverPeriod: number | null = null; + public edge: Edge | null = null; + public component: EdgeConfig.Component | null = null; constructor( public override service: Service, diff --git a/ui/src/app/edge/history/storage/chargerchart.component.ts b/ui/src/app/edge/history/storage/chargerchart.component.ts index 354e37e2aec..60c1ddedb19 100644 --- a/ui/src/app/edge/history/storage/chargerchart.component.ts +++ b/ui/src/app/edge/history/storage/chargerchart.component.ts @@ -13,14 +13,10 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class StorageChargerChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; - private moreThanOneProducer: boolean = null; - - ngOnChanges() { - this.updateChart(); - } + private moreThanOneProducer: boolean | null = null; constructor( protected override service: Service, @@ -30,6 +26,10 @@ export class StorageChargerChartComponent extends AbstractHistoryChart implement super("storage-charger-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -39,6 +39,10 @@ export class StorageChargerChartComponent extends AbstractHistoryChart implement this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 21 * 9; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -103,7 +107,4 @@ export class StorageChargerChartComponent extends AbstractHistoryChart implement this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 21 * 9; - } } diff --git a/ui/src/app/edge/history/storage/esschart.component.ts b/ui/src/app/edge/history/storage/esschart.component.ts index 507377c51dd..45071d138f8 100644 --- a/ui/src/app/edge/history/storage/esschart.component.ts +++ b/ui/src/app/edge/history/storage/esschart.component.ts @@ -14,15 +14,11 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; export class StorageESSChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public componentId: string; - @Input() public showPhases: boolean; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public componentId!: string; + @Input({ required: true }) public showPhases!: boolean; - private moreThanOneProducer: boolean = null; - - ngOnChanges() { - this.updateChart(); - } + private moreThanOneProducer: boolean | null = null; constructor( protected override service: Service, @@ -32,6 +28,10 @@ export class StorageESSChartComponent extends AbstractHistoryChart implements On super("storage-ess-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -42,6 +42,10 @@ export class StorageESSChartComponent extends AbstractHistoryChart implements On this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 21 * 9; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -157,7 +161,4 @@ export class StorageESSChartComponent extends AbstractHistoryChart implements On this.options = options; } - public getChartHeight(): number { - return window.innerHeight / 21 * 9; - } } diff --git a/ui/src/app/edge/history/storage/singlechart.component.ts b/ui/src/app/edge/history/storage/singlechart.component.ts index 44bebe80fff..3f670d816ee 100644 --- a/ui/src/app/edge/history/storage/singlechart.component.ts +++ b/ui/src/app/edge/history/storage/singlechart.component.ts @@ -16,12 +16,8 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class StorageSingleChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public showPhases: boolean; - - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public showPhases!: boolean; constructor( protected override service: Service, @@ -31,6 +27,10 @@ export class StorageSingleChartComponent extends AbstractHistoryChart implements super("storage-single-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -40,6 +40,27 @@ export class StorageSingleChartComponent extends AbstractHistoryChart implements this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 21 * 9; + } + + protected getChannelAddresses(edge: Edge, config: EdgeConfig): Promise { + return new Promise((resolve) => { + const result: ChannelAddress[] = [ + new ChannelAddress('_sum', 'EssActivePower'), + new ChannelAddress('_sum', 'ProductionDcActualPower'), + new ChannelAddress('_sum', 'EssActivePowerL1'), + new ChannelAddress('_sum', 'EssActivePowerL2'), + new ChannelAddress('_sum', 'EssActivePowerL3'), + ]; + resolve(result); + }); + } + + protected setLabel() { + this.options = this.createDefaultChartOptions(); + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -217,24 +238,4 @@ export class StorageSingleChartComponent extends AbstractHistoryChart implements this.options = options; } - protected getChannelAddresses(edge: Edge, config: EdgeConfig): Promise { - return new Promise((resolve) => { - const result: ChannelAddress[] = [ - new ChannelAddress('_sum', 'EssActivePower'), - new ChannelAddress('_sum', 'ProductionDcActualPower'), - new ChannelAddress('_sum', 'EssActivePowerL1'), - new ChannelAddress('_sum', 'EssActivePowerL2'), - new ChannelAddress('_sum', 'EssActivePowerL3'), - ]; - resolve(result); - }); - } - - protected setLabel() { - this.options = this.createDefaultChartOptions(); - } - - public getChartHeight(): number { - return window.innerHeight / 21 * 9; - } } diff --git a/ui/src/app/edge/history/storage/socchart.component.ts b/ui/src/app/edge/history/storage/socchart.component.ts index b6e67531da2..6e76644f311 100644 --- a/ui/src/app/edge/history/storage/socchart.component.ts +++ b/ui/src/app/edge/history/storage/socchart.component.ts @@ -14,13 +14,9 @@ import { AbstractHistoryChart } from '../abstracthistorychart'; }) export class SocStorageChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; private emergencyCapacityReserveComponents: EdgeConfig.Component[] = []; - public ngOnChanges() { - this.updateChart(); - } - constructor( protected override service: Service, protected override translate: TranslateService, @@ -29,6 +25,14 @@ export class SocStorageChartComponent extends AbstractHistoryChart implements On super("storage-single-chart", service, translate); } + public getChartHeight(): number { + return window.innerHeight / 21 * 9; + } + + public ngOnChanges() { + this.updateChart(); + } + public ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -164,7 +168,4 @@ export class SocStorageChartComponent extends AbstractHistoryChart implements On this.options = this.createDefaultChartOptions(); } - public getChartHeight(): number { - return window.innerHeight / 21 * 9; - } } diff --git a/ui/src/app/edge/history/storage/storagechartoverview/storagechartoverview.component.ts b/ui/src/app/edge/history/storage/storagechartoverview/storagechartoverview.component.ts index 1030838ca9c..84f1c456a1a 100644 --- a/ui/src/app/edge/history/storage/storagechartoverview/storagechartoverview.component.ts +++ b/ui/src/app/edge/history/storage/storagechartoverview/storagechartoverview.component.ts @@ -9,12 +9,12 @@ import { Edge, EdgeConfig, Service, Utils } from '../../../../shared/shared'; }) export class StorageChartOverviewComponent implements OnInit { - public edge: Edge = null; - private static readonly SELECTOR = "storage-chart-overview"; - public essComponents: EdgeConfig.Component[] = null; - public chargerComponents: EdgeConfig.Component[] = null; + public edge: Edge | null = null; + + public essComponents: EdgeConfig.Component[] | null = null; + public chargerComponents: EdgeConfig.Component[] | null = null; public showPhases: boolean = false; public showTotal: boolean = false; diff --git a/ui/src/app/edge/history/storage/totalchart.component.ts b/ui/src/app/edge/history/storage/totalchart.component.ts index 36cfb326953..fa75aaac305 100644 --- a/ui/src/app/edge/history/storage/totalchart.component.ts +++ b/ui/src/app/edge/history/storage/totalchart.component.ts @@ -7,20 +7,17 @@ import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; import { ChartAxis, Utils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, Edge, EdgeConfig, Service } from 'src/app/shared/shared'; -import { AbstractHistoryChart } from '../abstracthistorychart'; import { formatNumber } from '@angular/common'; +import { AbstractHistoryChart } from '../abstracthistorychart'; @Component({ selector: 'storageTotalChart', templateUrl: '../abstracthistorychart.html', }) export class StorageTotalChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - @Input() public showPhases: boolean; - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; + @Input({ required: true }) public showPhases!: boolean; constructor( protected override service: Service, @@ -30,6 +27,10 @@ export class StorageTotalChartComponent extends AbstractHistoryChart implements super("storage-total-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.startSpinner(); this.service.setCurrentComponent('', this.route); @@ -39,6 +40,10 @@ export class StorageTotalChartComponent extends AbstractHistoryChart implements this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 21 * 9; + } + protected updateChart() { this.autoSubscribeChartRefresh(); this.startSpinner(); @@ -255,8 +260,4 @@ export class StorageTotalChartComponent extends AbstractHistoryChart implements return label + ": " + formatNumber(value, 'de', '1.0-2') + " kW"; }; } - - public getChartHeight(): number { - return window.innerHeight / 21 * 9; - } } diff --git a/ui/src/app/edge/history/storage/widget.component.ts b/ui/src/app/edge/history/storage/widget.component.ts index 1673230f739..57987a5ca63 100644 --- a/ui/src/app/edge/history/storage/widget.component.ts +++ b/ui/src/app/edge/history/storage/widget.component.ts @@ -12,15 +12,14 @@ import { AbstractHistoryWidget } from '../abstracthistorywidget'; }) export class StorageComponent extends AbstractHistoryWidget implements OnInit, OnChanges, OnDestroy { - @Input() public period: DefaultTypes.HistoryPeriod; - private static readonly SELECTOR = "storageWidget"; + @Input({ required: true }) public period!: DefaultTypes.HistoryPeriod; // reference to the Utils method to access via html public isLastElement = Utils.isLastElement; - public data: Cumulated = null; - public edge: Edge = null; + public data: Cumulated | null = null; + public edge: Edge | null = null; public essComponents: EdgeConfig.Component[] = []; constructor( diff --git a/ui/src/app/edge/live/Controller/Channelthreshold/Channelthreshold.ts b/ui/src/app/edge/live/Controller/Channelthreshold/Channelthreshold.ts index fe75017e03d..f4e1909afe6 100644 --- a/ui/src/app/edge/live/Controller/Channelthreshold/Channelthreshold.ts +++ b/ui/src/app/edge/live/Controller/Channelthreshold/Channelthreshold.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { Icon } from 'src/app/shared/type/widget'; import { ChannelAddress, CurrentData } from '../../../../shared/shared'; diff --git a/ui/src/app/edge/live/Controller/ChpSoc/ChpSoc.ts b/ui/src/app/edge/live/Controller/ChpSoc/ChpSoc.ts index 76f7fc04222..9a56102cea6 100644 --- a/ui/src/app/edge/live/Controller/ChpSoc/ChpSoc.ts +++ b/ui/src/app/edge/live/Controller/ChpSoc/ChpSoc.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { Icon } from 'src/app/shared/type/widget'; import { ChannelAddress, CurrentData } from '../../../../shared/shared'; @@ -12,9 +12,10 @@ import { Controller_ChpSocModalComponent } from './modal/modal.component'; }) export class Controller_ChpSocComponent extends AbstractFlatWidget { - public inputChannel: ChannelAddress = null; - public outputChannel: ChannelAddress = null; - public propertyModeChannel: ChannelAddress = null; + private static PROPERTY_MODE: string = '_PropertyMode'; + public inputChannel: ChannelAddress | null = null; + public outputChannel: ChannelAddress | null = null; + public propertyModeChannel: ChannelAddress | null = null; public highThresholdValue: number; public lowThresholdValue: number; public state: string; @@ -26,7 +27,19 @@ export class Controller_ChpSocComponent extends AbstractFlatWidget { size: 'large', color: 'primary', }; - private static PROPERTY_MODE: string = '_PropertyMode'; + + async presentModal() { + const modal = await this.modalController.create({ + component: Controller_ChpSocModalComponent, + componentProps: { + component: this.component, + edge: this.edge, + outputChannel: this.outputChannel, + inputChannel: this.inputChannel, + }, + }); + return await modal.present(); + } protected override getChannelAddresses() { this.outputChannel = ChannelAddress.fromString( @@ -75,16 +88,4 @@ export class Controller_ChpSocComponent extends AbstractFlatWidget { this.lowThresholdValue = currentData.allComponents[this.component.id + '/_PropertyLowThreshold']; } - async presentModal() { - const modal = await this.modalController.create({ - component: Controller_ChpSocModalComponent, - componentProps: { - component: this.component, - edge: this.edge, - outputChannel: this.outputChannel, - inputChannel: this.inputChannel, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Controller/ChpSoc/modal/modal.component.ts b/ui/src/app/edge/live/Controller/ChpSoc/modal/modal.component.ts index 3a4ab019f79..636e1265b75 100644 --- a/ui/src/app/edge/live/Controller/ChpSoc/modal/modal.component.ts +++ b/ui/src/app/edge/live/Controller/ChpSoc/modal/modal.component.ts @@ -17,10 +17,10 @@ export class Controller_ChpSocModalComponent implements OnInit { private static readonly SELECTOR = "chpsoc-modal"; - @Input() public edge: Edge; - @Input() public component: EdgeConfig.Component; - @Input() public outputChannel: ChannelAddress; - @Input() public inputChannel: ChannelAddress; + @Input({ required: true }) public edge!: Edge; + @Input({ required: true }) public component!: EdgeConfig.Component; + @Input({ required: true }) public outputChannel!: ChannelAddress; + @Input({ required: true }) public inputChannel!: ChannelAddress; public thresholds: RangeValue = { lower: null, diff --git a/ui/src/app/edge/live/Controller/Ess/FixActivePower/flat/flat.ts b/ui/src/app/edge/live/Controller/Ess/FixActivePower/flat/flat.ts index 114bb581a71..fd80147f88a 100644 --- a/ui/src/app/edge/live/Controller/Ess/FixActivePower/flat/flat.ts +++ b/ui/src/app/edge/live/Controller/Ess/FixActivePower/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; @@ -16,19 +16,7 @@ export class FlatComponent extends AbstractFlatWidget { public readonly CONVERT_MANUAL_ON_OFF = Utils.CONVERT_MANUAL_ON_OFF(this.translate); public chargeDischargePower: { name: string, value: number }; - public propertyMode: DefaultTypes.ManualOnOff = null; - - protected override getChannelAddresses(): ChannelAddress[] { - return [ - new ChannelAddress(this.component.id, "_PropertyPower"), - new ChannelAddress(this.component.id, "_PropertyMode"), - ]; - } - - protected override onCurrentData(currentData: CurrentData) { - this.chargeDischargePower = Utils.convertChargeDischargePower(this.translate, currentData.allComponents[this.component.id + '/_PropertyPower']); - this.propertyMode = currentData.allComponents[this.component.id + '/_PropertyMode']; - } + public propertyMode: DefaultTypes.ManualOnOff | null = null; async presentModal() { if (!this.isInitialized) { @@ -42,4 +30,17 @@ export class FlatComponent extends AbstractFlatWidget { }); return await modal.present(); } + + protected override getChannelAddresses(): ChannelAddress[] { + return [ + new ChannelAddress(this.component.id, "_PropertyPower"), + new ChannelAddress(this.component.id, "_PropertyMode"), + ]; + } + + protected override onCurrentData(currentData: CurrentData) { + this.chargeDischargePower = Utils.convertChargeDischargePower(this.translate, currentData.allComponents[this.component.id + '/_PropertyPower']); + this.propertyMode = currentData.allComponents[this.component.id + '/_PropertyMode']; + } + } diff --git a/ui/src/app/edge/live/Controller/Ess/FixActivePower/modal/modal.ts b/ui/src/app/edge/live/Controller/Ess/FixActivePower/modal/modal.ts index 82b9e73d33e..9653441e6e6 100644 --- a/ui/src/app/edge/live/Controller/Ess/FixActivePower/modal/modal.ts +++ b/ui/src/app/edge/live/Controller/Ess/FixActivePower/modal/modal.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; @Component({ diff --git a/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/flat/flat.ts b/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/flat/flat.ts index daf5c9530ab..27f56312580 100644 --- a/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/flat/flat.ts +++ b/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, EdgeConfig, Utils } from 'src/app/shared/shared'; import { ModalComponent } from '../modal/modal'; @@ -11,7 +11,7 @@ import { ModalComponent } from '../modal/modal'; }) export class FlatComponent extends AbstractFlatWidget { - public override component: EdgeConfig.Component = null; + public override component: EdgeConfig.Component | null = null; public mode: string = '-'; public state: string = '-'; public isSellToGridLimitAvoided: boolean = false; @@ -20,6 +20,16 @@ export class FlatComponent extends AbstractFlatWidget { public readonly CONVERT_MODE_TO_MANUAL_OFF_AUTOMATIC = Utils.CONVERT_MODE_TO_MANUAL_OFF_AUTOMATIC(this.translate); public readonly CONVERT_WATT_TO_KILOWATT = Utils.CONVERT_WATT_TO_KILOWATT; + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + componentProps: { + component: this.component, + }, + }); + return await modal.present(); + } + protected override getChannelAddresses() { return [ new ChannelAddress(this.componentId, "DelayChargeState"), @@ -72,13 +82,4 @@ export class FlatComponent extends AbstractFlatWidget { this.delayChargeMaximumChargeLimit = currentData.allComponents[this.component.id + '/DelayChargeMaximumChargeLimit']; } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - componentProps: { - component: this.component, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/modal.ts b/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/modal.ts index 703dc533b0e..07343c6befa 100644 --- a/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/modal.ts +++ b/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/modal.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { ChangeDetectionStrategy, Component } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; import { Role } from 'src/app/shared/type/role'; @@ -22,11 +22,11 @@ export class ModalComponent extends AbstractModal { public state: string = ''; public chargeLimit: { name: string, value: number }; public delayChargeState: number | null = null; - public maximumSellToGridPower: number = null; + public maximumSellToGridPower: number | null = null; public targetMinute: number | null = null; public delayChargeMaximumChargeLimit: number | null = null; public targetEpochSeconds: number | null = null; - public chargeStartEpochSeconds: number = null; + public chargeStartEpochSeconds: number | null = null; protected override getChannelAddresses(): ChannelAddress[] { this.refreshChart = false; diff --git a/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/predictionChart.ts b/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/predictionChart.ts index 746098619b3..f058c8b2480 100644 --- a/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/predictionChart.ts +++ b/ui/src/app/edge/live/Controller/Ess/GridOptimizedCharge/modal/predictionChart.ts @@ -15,17 +15,13 @@ import { ChannelAddress, Edge, EdgeConfig, Service, Utils } from 'src/app/shared }) export class PredictionChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() protected refresh: boolean; - @Input() protected override edge: Edge; - @Input() public component: EdgeConfig.Component; - @Input() public targetEpochSeconds: number; - @Input() public chargeStartEpochSeconds: number; - private static DEFAULT_PERIOD: DefaultTypes.HistoryPeriod = new DefaultTypes.HistoryPeriod(new Date(), new Date()); - ngOnChanges() { - this.updateChart(); - } + @Input({ required: true }) public component!: EdgeConfig.Component; + @Input({ required: true }) public targetEpochSeconds!: number; + @Input({ required: true }) public chargeStartEpochSeconds!: number; + @Input({ required: true }) protected refresh!: boolean; + @Input({ required: true }) protected override edge!: Edge; constructor( protected override service: Service, @@ -35,6 +31,10 @@ export class PredictionChartComponent extends AbstractHistoryChart implements On super("prediction-chart", service, translate); } + ngOnChanges() { + this.updateChart(); + } + ngOnInit() { this.service.startSpinner(this.spinnerId); this.service.setCurrentComponent('', this.route); @@ -44,6 +44,10 @@ export class PredictionChartComponent extends AbstractHistoryChart implements On this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return window.innerHeight / 4; + } + protected updateChart() { this.autoSubscribeChartRefresh(); @@ -207,14 +211,8 @@ export class PredictionChartComponent extends AbstractHistoryChart implements On }); } - private applyControllerSpecificOptions() { - this.options.scales[ChartAxis.LEFT]['position'] = 'right'; - this.options.scales.x.ticks.callback = function (value, index, values) { - const date = new Date(value); - - // Display the label only if the minutes are zero (full hour) - return date.getMinutes() === 0 ? date.getHours() + ':00' : ''; - }; + protected setLabel() { + this.options = Utils.deepCopy(DEFAULT_TIME_CHART_OPTIONS); } protected getChannelAddresses(): Promise { @@ -230,13 +228,16 @@ export class PredictionChartComponent extends AbstractHistoryChart implements On }); } - public getChartHeight(): number { - return window.innerHeight / 4; - } + private applyControllerSpecificOptions() { + this.options.scales[ChartAxis.LEFT]['position'] = 'right'; + this.options.scales.x.ticks.callback = function (value, index, values) { + const date = new Date(value); - protected setLabel() { - this.options = Utils.deepCopy(DEFAULT_TIME_CHART_OPTIONS); + // Display the label only if the minutes are zero (full hour) + return date.getMinutes() === 0 ? date.getHours() + ':00' : ''; + }; } + } export type ChannelChartDescription = { diff --git a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/flat/flat.ts b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/flat/flat.ts index 15a99805cd5..fc6f09c6b4b 100644 --- a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/flat/flat.ts +++ b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/flat/flat.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, Currency, CurrentData, Utils } from 'src/app/shared/shared'; import { ModalComponent } from '../modal/modal'; @@ -12,7 +12,8 @@ export class FlatComponent extends AbstractFlatWidget implements OnInit { protected readonly CONVERT_MODE_TO_MANUAL_OFF_AUTOMATIC = Utils.CONVERT_MODE_TO_MANUAL_OFF_AUTOMATIC(this.translate); protected readonly CONVERT_TIME_OF_USE_TARIFF_STATE = Utils.CONVERT_TIME_OF_USE_TARIFF_STATE(this.translate); - protected priceWithCurrency: any; + + protected priceWithCurrency: string = "-"; async presentModal() { const modal = await this.modalController.create({ diff --git a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/modal.ts b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/modal.ts index 368003307d2..b4a182fd769 100644 --- a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/modal.ts +++ b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/modal.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; import { ChannelAddress, Currency, CurrentData } from 'src/app/shared/shared'; import { Controller_Ess_TimeOfUseTariff } from '../Ess_TimeOfUseTariff'; @@ -11,7 +11,7 @@ import { Controller_Ess_TimeOfUseTariff } from '../Ess_TimeOfUseTariff'; export class ModalComponent extends AbstractModal { protected readonly CONVERT_TIME_OF_USE_TARIFF_STATE = this.Utils.CONVERT_TIME_OF_USE_TARIFF_STATE(this.translate); - protected priceWithCurrency: any; + protected priceWithCurrency: string; protected override getFormGroup(): FormGroup { return this.formBuilder.group({ diff --git a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/powerSocChart.ts b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/powerSocChart.ts index 562a139ceae..1c646bf9601 100644 --- a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/powerSocChart.ts +++ b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/powerSocChart.ts @@ -4,11 +4,12 @@ import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import * as Chart from 'chart.js'; import { AbstractHistoryChart } from 'src/app/edge/history/abstracthistorychart'; -import { AbstractHistoryChart as NewAbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart as NewAbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { ComponentJsonApiRequest } from 'src/app/shared/jsonrpc/request/componentJsonApiRequest'; import { ChartAxis, HistoryUtils, TimeOfUseTariffUtils, Utils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, Edge, EdgeConfig, Service, Websocket } from 'src/app/shared/shared'; +import { ChartConstants } from 'src/app/shared/components/chart/chart.constants'; import { GetScheduleRequest } from '../../../../../../shared/jsonrpc/request/getScheduleRequest'; import { GetScheduleResponse } from '../../../../../../shared/jsonrpc/response/getScheduleResponse'; @@ -18,13 +19,10 @@ import { GetScheduleResponse } from '../../../../../../shared/jsonrpc/response/g }) export class SchedulePowerAndSocChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public refresh: boolean; - @Input() public override edge: Edge; - @Input() public component: EdgeConfig.Component; + @Input({ required: true }) public refresh!: boolean; + @Input({ required: true }) public override edge!: Edge; + @Input({ required: true }) public component!: EdgeConfig.Component; - public ngOnChanges() { - this.updateChart(); - } constructor( protected override service: Service, @@ -35,6 +33,10 @@ export class SchedulePowerAndSocChartComponent extends AbstractHistoryChart impl super("powerSoc-chart", service, translate); } + public ngOnChanges() { + this.updateChart(); + } + public ngOnInit() { this.service.startSpinner(this.spinnerId); this.service.setCurrentComponent('', this.route); @@ -44,6 +46,26 @@ export class SchedulePowerAndSocChartComponent extends AbstractHistoryChart impl this.unsubscribeChartRefresh(); } + public getChartHeight(): number { + return TimeOfUseTariffUtils.getChartHeight(this.service.isSmartphoneResolution); + } + + protected setLabel() { + this.options = this.createDefaultChartOptions(); + const translate = this.translate; + this.options.plugins.tooltip.callbacks.label = function (item: Chart.TooltipItem) { + + const label = item.dataset.label; + const value = item.dataset.data[item.dataIndex]; + + return TimeOfUseTariffUtils.getLabel(value, label, translate); + }; + } + + protected getChannelAddresses(): Promise { + return new Promise(() => { []; }); + } + protected override updateChart() { this.autoSubscribeChartRefresh(); @@ -180,8 +202,8 @@ export class SchedulePowerAndSocChartComponent extends AbstractHistoryChart impl const leftYAxis: HistoryUtils.yAxes = { position: 'left', unit: YAxisTitle.POWER, yAxisId: ChartAxis.LEFT }; const locale = this.service.translate.currentLang; - this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, rightYAxis, this.translate, 'line', locale, true); - this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, leftYAxis, this.translate, 'line', locale, true); + this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, rightYAxis, this.translate, 'line', locale, ChartConstants.EMPTY_DATASETS, true); + this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, leftYAxis, this.translate, 'line', locale, ChartConstants.EMPTY_DATASETS, true); this.datasets = this.datasets.map((el: Chart.ChartDataset) => { @@ -205,23 +227,4 @@ export class SchedulePowerAndSocChartComponent extends AbstractHistoryChart impl this.options.scales[ChartAxis.LEFT].suggestedMax = 1; } - protected setLabel() { - this.options = this.createDefaultChartOptions(); - const translate = this.translate; - this.options.plugins.tooltip.callbacks.label = function (item: Chart.TooltipItem) { - - const label = item.dataset.label; - const value = item.dataset.data[item.dataIndex]; - - return TimeOfUseTariffUtils.getLabel(value, label, translate); - }; - } - - protected getChannelAddresses(): Promise { - return new Promise(() => { []; }); - } - - public getChartHeight(): number { - return TimeOfUseTariffUtils.getChartHeight(this.service.isSmartphoneResolution); - } } diff --git a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/statePriceChart.ts b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/statePriceChart.ts index cb6fc333a81..51737b33769 100644 --- a/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/statePriceChart.ts +++ b/ui/src/app/edge/live/Controller/Ess/TimeOfUseTariff/modal/statePriceChart.ts @@ -4,7 +4,7 @@ import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import * as Chart from 'chart.js'; import { AbstractHistoryChart } from 'src/app/edge/history/abstracthistorychart'; -import { AbstractHistoryChart as NewAbstractHistoryChart } from 'src/app/shared/genericComponents/chart/abstracthistorychart'; +import { AbstractHistoryChart as NewAbstractHistoryChart } from 'src/app/shared/components/chart/abstracthistorychart'; import { ComponentJsonApiRequest } from 'src/app/shared/jsonrpc/request/componentJsonApiRequest'; import { ChartAxis, HistoryUtils, TimeOfUseTariffUtils, YAxisTitle } from 'src/app/shared/service/utils'; import { ChannelAddress, Currency, Edge, EdgeConfig, Service, Websocket } from 'src/app/shared/shared'; @@ -14,6 +14,7 @@ import { ColorUtils } from 'src/app/shared/utils/color/color.utils'; import { GetScheduleRequest } from '../../../../../../shared/jsonrpc/request/getScheduleRequest'; import { GetScheduleResponse } from '../../../../../../shared/jsonrpc/response/getScheduleResponse'; import { Controller_Ess_TimeOfUseTariff } from '../Ess_TimeOfUseTariff'; +import { ChartConstants } from 'src/app/shared/components/chart/chart.constants'; @Component({ selector: 'statePriceChart', @@ -21,17 +22,12 @@ import { Controller_Ess_TimeOfUseTariff } from '../Ess_TimeOfUseTariff'; }) export class ScheduleStateAndPriceChartComponent extends AbstractHistoryChart implements OnInit, OnChanges, OnDestroy { - @Input() public refresh: boolean; - @Input() public override edge: Edge; - @Input() public component: EdgeConfig.Component; + @Input({ required: true }) public refresh!: boolean; + @Input({ required: true }) public override edge!: Edge; + @Input({ required: true }) public component!: EdgeConfig.Component; private currencyLabel: Currency.Label; // Default - public ngOnChanges() { - this.currencyLabel = Currency.getCurrencyLabelByEdgeId(this.edge.id); - this.updateChart(); - } - constructor( protected override service: Service, protected override translate: TranslateService, @@ -41,6 +37,15 @@ export class ScheduleStateAndPriceChartComponent extends AbstractHistoryChart im super("schedule-chart", service, translate); } + public getChartHeight(): number { + return TimeOfUseTariffUtils.getChartHeight(this.service.isSmartphoneResolution); + } + + public ngOnChanges() { + this.currencyLabel = Currency.getCurrencyLabelByEdgeId(this.edge.id); + this.updateChart(); + } + public ngOnInit() { this.service.startSpinner(this.spinnerId); this.service.setCurrentComponent('', this.route); @@ -94,13 +99,21 @@ export class ScheduleStateAndPriceChartComponent extends AbstractHistoryChart im }); } + protected setLabel() { + this.options = this.createDefaultChartOptions(); + } + + protected getChannelAddresses(): Promise { + return new Promise(() => { []; }); + } + private applyControllerSpecificOptions() { const locale = this.service.translate.currentLang; const rightYaxisSoc: HistoryUtils.yAxes = { position: 'right', unit: YAxisTitle.PERCENTAGE, yAxisId: ChartAxis.RIGHT }; - this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, rightYaxisSoc, this.translate, 'line', locale); + this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, rightYaxisSoc, this.translate, 'line', locale, ChartConstants.EMPTY_DATASETS); const rightYAxisPower: HistoryUtils.yAxes = { position: 'right', unit: YAxisTitle.POWER, yAxisId: ChartAxis.RIGHT_2 }; - this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, rightYAxisPower, this.translate, 'line', locale); + this.options = NewAbstractHistoryChart.getYAxisOptions(this.options, rightYAxisPower, this.translate, 'line', locale, ChartConstants.EMPTY_DATASETS); this.options.scales.x['time'].unit = calculateResolution(this.service, this.service.historyPeriod.value.from, this.service.historyPeriod.value.to).timeFormat; this.options.scales.x['ticks'] = { source: 'auto', autoSkip: false }; @@ -163,15 +176,4 @@ export class ScheduleStateAndPriceChartComponent extends AbstractHistoryChart im this.options['animation'] = false; } - protected setLabel() { - this.options = this.createDefaultChartOptions(); - } - - protected getChannelAddresses(): Promise { - return new Promise(() => { []; }); - } - - public getChartHeight(): number { - return TimeOfUseTariffUtils.getChartHeight(this.service.isSmartphoneResolution); - } } diff --git a/ui/src/app/edge/live/Controller/Evcs/administration/administration.component.ts b/ui/src/app/edge/live/Controller/Evcs/administration/administration.component.ts index bc9fb3b4fef..9b2d74b6c55 100644 --- a/ui/src/app/edge/live/Controller/Evcs/administration/administration.component.ts +++ b/ui/src/app/edge/live/Controller/Evcs/administration/administration.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ModalController } from '@ionic/angular'; @@ -11,13 +10,13 @@ import { Edge, EdgeConfig, Service, Websocket } from '../../../../../shared/shar }) export class AdministrationComponent implements OnInit { - @Input() public evcsComponent: EdgeConfig.Component; - @Input() public edge: Edge; - private static readonly SELECTOR = "administration"; + @Input({ required: true }) public evcsComponent!: EdgeConfig.Component; + @Input({ required: true }) public edge!: Edge; + // used for ion-toggle in html - public isCheckedZoe: boolean = null; + public isCheckedZoe: boolean | null = null; constructor( private route: ActivatedRoute, diff --git a/ui/src/app/edge/live/Controller/Evcs/flat/flat.ts b/ui/src/app/edge/live/Controller/Evcs/flat/flat.ts index c8b9a0bbd5b..f4d3d8a38e9 100644 --- a/ui/src/app/edge/live/Controller/Evcs/flat/flat.ts +++ b/ui/src/app/edge/live/Controller/Evcs/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; import { ChannelAddress, CurrentData, EdgeConfig, Utils } from 'src/app/shared/shared'; @@ -19,7 +19,7 @@ export class FlatComponent extends AbstractFlatWidget { public readonly CONVERT_MANUAL_ON_OFF = Utils.CONVERT_MANUAL_ON_OFF(this.translate); protected controller: EdgeConfig.Component; - protected evcsComponent: EdgeConfig.Component = null; + protected evcsComponent: EdgeConfig.Component | null = null; protected isConnectionSuccessful: boolean = false; protected isEnergySinceBeginningAllowed: boolean = false; protected mode: string; @@ -33,16 +33,32 @@ export class FlatComponent extends AbstractFlatWidget { protected minChargePower: number; protected maxChargePower: number; protected forceChargeMinPower: string; - protected chargeMode: ChargeMode = null; + protected chargeMode: ChargeMode | null = null; protected readonly CONVERT_TO_WATT = Utils.CONVERT_TO_WATT; protected readonly CONVERT_TO_KILO_WATTHOURS = Utils.CONVERT_TO_KILO_WATTHOURS; protected readonly CONVERT_MANUAL_ON_OFF_AUTOMATIC = Utils.CONVERT_MODE_TO_MANUAL_OFF_AUTOMATIC(this.translate); protected chargeTarget: string; protected energySession: string; protected chargeDischargePower: { name: string, value: number }; - protected propertyMode: DefaultTypes.ManualOnOff = null; + protected propertyMode: DefaultTypes.ManualOnOff | null = null; protected status: string; + formatNumber(i: number) { + const round = Math.ceil(i / 100) * 100; + return round; + } + + + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + componentProps: { + component: this.component, + }, + }); + return await modal.present(); + } + protected override getChannelAddresses(): ChannelAddress[] { const result = [ new ChannelAddress(this.component.id, 'ChargePower'), @@ -164,21 +180,6 @@ export class FlatComponent extends AbstractFlatWidget { } } - formatNumber(i: number) { - const round = Math.ceil(i / 100) * 100; - return round; - } - - - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - componentProps: { - component: this.component, - }, - }); - return await modal.present(); - } } enum ChargeState { diff --git a/ui/src/app/edge/live/Controller/Evcs/modal/modal.ts b/ui/src/app/edge/live/Controller/Evcs/modal/modal.ts index cac24905c11..461ab9bdba5 100644 --- a/ui/src/app/edge/live/Controller/Evcs/modal/modal.ts +++ b/ui/src/app/edge/live/Controller/Evcs/modal/modal.ts @@ -4,7 +4,7 @@ import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; import { ModalController, PopoverController } from '@ionic/angular'; import { TranslateService } from '@ngx-translate/core'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; import { ChannelAddress, CurrentData, EdgeConfig, Service, Utils, Websocket } from 'src/app/shared/shared'; import { AdministrationComponent } from '../administration/administration.component'; @@ -32,7 +32,7 @@ export class ModalComponent extends AbstractModal { protected numberOfPhases: number = 3; // Defaults to three phases protected defaultChargeMinPower: number; protected energyLimit: boolean; - protected chargeMode: ChargeMode = null; + protected chargeMode: ChargeMode | null = null; protected isEnergySinceBeginningAllowed: boolean = false; protected isChargingEnabled: boolean = false; protected sessionLimit: number; @@ -57,6 +57,43 @@ export class ModalComponent extends AbstractModal { }, 0); } + public static getHelpKey(factoryId: string): string { + switch (factoryId) { + case 'Evcs.Keba.KeContact': + return 'EVCS_KEBA_KECONTACT'; + case 'Evcs.HardyBarth': + return 'EVCS_KEBA_KECONTACT'; + case 'Evcs.IesKeywattSingle': + return 'EVCS_OCPP_IESKEYWATTSINGLE'; + default: + return null; + } + } + + async presentPopover() { + const popover = await this.popoverctrl.create({ + component: PopoverComponent, + componentProps: { + chargeMode: this.formGroup.controls['chargeMode'].value, + }, + }); + return await popover.present(); + } + + async presentModal() { + const modal = await this.detailViewController.create({ + component: AdministrationComponent, + componentProps: { + evcsComponent: this.evcsComponent, + edge: this.edge, + }, + }); + modal.onDidDismiss().then(() => { + this.updateRenaultZoeConfig(); + }); + return await modal.present(); + } + protected override getChannelAddresses(): ChannelAddress[] { this.controller = this.config.getComponentsByFactory("Controller.Evcs") @@ -193,6 +230,11 @@ export class ModalComponent extends AbstractModal { } } + protected formatNumber(i: number) { + const round = Math.ceil(i / 100) * 100; + return round; + } + /** * Returns the state of the EVCS * @@ -234,47 +276,6 @@ export class ModalComponent extends AbstractModal { } } - protected formatNumber(i: number) { - const round = Math.ceil(i / 100) * 100; - return round; - } - - async presentPopover() { - const popover = await this.popoverctrl.create({ - component: PopoverComponent, - componentProps: { - chargeMode: this.formGroup.controls['chargeMode'].value, - }, - }); - return await popover.present(); - } - - async presentModal() { - const modal = await this.detailViewController.create({ - component: AdministrationComponent, - componentProps: { - evcsComponent: this.evcsComponent, - edge: this.edge, - }, - }); - modal.onDidDismiss().then(() => { - this.updateRenaultZoeConfig(); - }); - return await modal.present(); - } - - public static getHelpKey(factoryId: string): string { - switch (factoryId) { - case 'Evcs.Keba.KeContact': - return 'EVCS_KEBA_KECONTACT'; - case 'Evcs.HardyBarth': - return 'EVCS_KEBA_KECONTACT'; - case 'Evcs.IesKeywattSingle': - return 'EVCS_OCPP_IESKEYWATTSINGLE'; - default: - return null; - } - } } enum ChargeState { diff --git a/ui/src/app/edge/live/Controller/Evcs/popover/popover.ts b/ui/src/app/edge/live/Controller/Evcs/popover/popover.ts index 94f6f39109a..1d53c249443 100644 --- a/ui/src/app/edge/live/Controller/Evcs/popover/popover.ts +++ b/ui/src/app/edge/live/Controller/Evcs/popover/popover.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; type ChargeMode = 'FORCE_CHARGE' | 'EXCESS_POWER' | 'OFF'; @Component({ diff --git a/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/Io_ChannelSingleThreshold.ts b/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/Io_ChannelSingleThreshold.ts index 19869fbe442..452e7643dec 100644 --- a/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/Io_ChannelSingleThreshold.ts +++ b/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/Io_ChannelSingleThreshold.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; import { Icon } from 'src/app/shared/type/widget'; import { Controller_Io_ChannelSingleThresholdModalComponent } from './modal/modal.component'; @@ -30,6 +30,21 @@ export class Controller_Io_ChannelSingleThresholdComponent extends AbstractFlatW public switchValue: number | string; public switchConverter = Utils.CONVERT_WATT_TO_KILOWATT; + async presentModal() { + const modal = await this.modalController.create({ + component: Controller_Io_ChannelSingleThresholdModalComponent, + componentProps: { + component: this.component, + config: this.config, + edge: this.edge, + outputChannel: this.outputChannel, + inputChannel: this.inputChannel, + inputChannelUnit: this.unitOfInputChannel, + }, + }); + return await modal.present(); + } + protected override afterIsInitialized(): void { this.inputChannel = ChannelAddress.fromString( this.component.properties['inputChannelAddress']); @@ -172,20 +187,5 @@ export class Controller_Io_ChannelSingleThresholdComponent extends AbstractFlatW } } - - async presentModal() { - const modal = await this.modalController.create({ - component: Controller_Io_ChannelSingleThresholdModalComponent, - componentProps: { - component: this.component, - config: this.config, - edge: this.edge, - outputChannel: this.outputChannel, - inputChannel: this.inputChannel, - inputChannelUnit: this.unitOfInputChannel, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/modal/modal.component.ts b/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/modal/modal.component.ts index 5e58e17716d..a17e536b72a 100644 --- a/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/modal/modal.component.ts +++ b/ui/src/app/edge/live/Controller/Io/ChannelSingleThreshold/modal/modal.component.ts @@ -14,11 +14,11 @@ type inputMode = 'SOC' | 'GRIDSELL' | 'GRIDBUY' | 'PRODUCTION' | 'OTHER'; }) export class Controller_Io_ChannelSingleThresholdModalComponent implements OnInit { - @Input() public edge: Edge; - @Input() public config: EdgeConfig; - @Input() public component: EdgeConfig.Component; + @Input({ required: true }) public edge!: Edge; + @Input({ required: true }) public config!: EdgeConfig; + @Input({ required: true }) public component!: EdgeConfig.Component; @Input() public outputChannel: ChannelAddress | null = null; - @Input() public inputChannel: ChannelAddress; + @Input({ required: true }) public inputChannel!: ChannelAddress; @Input() public inputChannelUnit: string | null = null; public formGroup: FormGroup; @@ -66,20 +66,6 @@ export class Controller_Io_ChannelSingleThresholdModalComponent implements OnIni this.invert = this.formGroup.controls['invert']; } - private getInputMode(): inputMode { - if (this.component.properties.inputChannelAddress == '_sum/GridActivePower' && this.component.properties.threshold < 0) { - return 'GRIDSELL'; - } else if (this.component.properties.inputChannelAddress == '_sum/GridActivePower' && this.component.properties.threshold > 0) { - return 'GRIDBUY'; - } else if (this.component.properties.inputChannelAddress == '_sum/ProductionActivePower') { - return 'PRODUCTION'; - } else if (this.component.properties.inputChannelAddress == '_sum/EssSoc') { - return 'SOC'; - } else if (this.component.properties.inputChannelAddress != null) { - return 'OTHER'; - } - } - public updateInputMode(event: CustomEvent) { let newThreshold: number = this.component.properties.threshold; @@ -154,34 +140,6 @@ export class Controller_Io_ChannelSingleThresholdModalComponent implements OnIni } } - private convertToChannelAddress(inputMode: inputMode): string { - switch (inputMode) { - case 'SOC': - return '_sum/EssSoc'; - case 'GRIDBUY': - return '_sum/GridActivePower'; - case 'GRIDSELL': - return '_sum/GridActivePower'; - case 'PRODUCTION': - return '_sum/ProductionActivePower'; - } - } - - private convertToInputMode(inputChannelAddress: string, threshold: number): inputMode { - switch (inputChannelAddress) { - case '_sum/EssSoc': - return 'SOC'; - case '_sum/ProductionActivePower': - return 'PRODUCTION'; - case '_sum/GridActivePower': - if (threshold > 0) { - return 'GRIDBUY'; - } else if (threshold < 0) { - return 'GRIDSELL'; - } - } - } - public applyChanges(): void { if (this.edge != null) { if (this.edge.roleIsAtLeast('owner')) { @@ -238,4 +196,47 @@ export class Controller_Io_ChannelSingleThresholdModalComponent implements OnIni } } } + + private getInputMode(): inputMode { + if (this.component.properties.inputChannelAddress == '_sum/GridActivePower' && this.component.properties.threshold < 0) { + return 'GRIDSELL'; + } else if (this.component.properties.inputChannelAddress == '_sum/GridActivePower' && this.component.properties.threshold > 0) { + return 'GRIDBUY'; + } else if (this.component.properties.inputChannelAddress == '_sum/ProductionActivePower') { + return 'PRODUCTION'; + } else if (this.component.properties.inputChannelAddress == '_sum/EssSoc') { + return 'SOC'; + } else if (this.component.properties.inputChannelAddress != null) { + return 'OTHER'; + } + } + + private convertToChannelAddress(inputMode: inputMode): string { + switch (inputMode) { + case 'SOC': + return '_sum/EssSoc'; + case 'GRIDBUY': + return '_sum/GridActivePower'; + case 'GRIDSELL': + return '_sum/GridActivePower'; + case 'PRODUCTION': + return '_sum/ProductionActivePower'; + } + } + + private convertToInputMode(inputChannelAddress: string, threshold: number): inputMode { + switch (inputChannelAddress) { + case '_sum/EssSoc': + return 'SOC'; + case '_sum/ProductionActivePower': + return 'PRODUCTION'; + case '_sum/GridActivePower': + if (threshold > 0) { + return 'GRIDBUY'; + } else if (threshold < 0) { + return 'GRIDSELL'; + } + } + } + } diff --git a/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/Io_FixDigitalOutput.ts b/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/Io_FixDigitalOutput.ts index 80c7c667c3f..82f0d1ef04c 100644 --- a/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/Io_FixDigitalOutput.ts +++ b/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/Io_FixDigitalOutput.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData } from 'src/app/shared/shared'; import { Controller_Io_FixDigitalOutputModalComponent } from './modal/modal.component'; @@ -14,6 +14,20 @@ export class Controller_Io_FixDigitalOutputComponent extends AbstractFlatWidget public state: string = '-'; public outputChannel: string; + async presentModal() { + if (!this.isInitialized) { + return; + } + const modal = await this.modalController.create({ + component: Controller_Io_FixDigitalOutputModalComponent, + componentProps: { + component: this.component, + edge: this.edge, + }, + }); + return await modal.present(); + } + protected override getChannelAddresses(): ChannelAddress[] { this.outputChannel = this.component.properties['outputChannelAddress']; return [ChannelAddress.fromString(this.outputChannel)]; @@ -30,17 +44,4 @@ export class Controller_Io_FixDigitalOutputComponent extends AbstractFlatWidget } } - async presentModal() { - if (!this.isInitialized) { - return; - } - const modal = await this.modalController.create({ - component: Controller_Io_FixDigitalOutputModalComponent, - componentProps: { - component: this.component, - edge: this.edge, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/modal/modal.component.ts b/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/modal/modal.component.ts index 3a6111ccab2..b1564acb6da 100644 --- a/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/modal/modal.component.ts +++ b/ui/src/app/edge/live/Controller/Io/FixDigitalOutput/modal/modal.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, Input } from '@angular/core'; import { Router } from '@angular/router'; import { ModalController } from '@ionic/angular'; @@ -11,8 +10,8 @@ import { Edge, EdgeConfig, Service, Websocket } from 'src/app/shared/shared'; }) export class Controller_Io_FixDigitalOutputModalComponent { - @Input() public edge: Edge; - @Input() public component: EdgeConfig.Component; + @Input({ required: true }) public edge!: Edge; + @Input({ required: true }) public component!: EdgeConfig.Component; constructor( public service: Service, diff --git a/ui/src/app/edge/live/Controller/Io/HeatingElement/flat/flat.ts b/ui/src/app/edge/live/Controller/Io/HeatingElement/flat/flat.ts index 2d654ebc840..1ae49e1b903 100644 --- a/ui/src/app/edge/live/Controller/Io/HeatingElement/flat/flat.ts +++ b/ui/src/app/edge/live/Controller/Io/HeatingElement/flat/flat.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; import { WorkMode } from 'src/app/shared/type/general'; @@ -13,7 +13,6 @@ import { ModalComponent } from '../modal/modal'; }) export class FlatComponent extends AbstractFlatWidget { - private outputChannelArray: ChannelAddress[] = []; private static PROPERTY_MODE: string = '_PropertyMode'; protected activePhases: BehaviorSubject = new BehaviorSubject(0); @@ -23,6 +22,17 @@ export class FlatComponent extends AbstractFlatWidget { protected workMode: WorkMode; protected readonly WorkMode = WorkMode; protected readonly CONVERT_SECONDS_TO_DATE_FORMAT = Utils.CONVERT_SECONDS_TO_DATE_FORMAT; + private outputChannelArray: ChannelAddress[] = []; + + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + componentProps: { + component: this.component, + }, + }); + return await modal.present(); + } protected override getChannelAddresses() { @@ -90,15 +100,6 @@ export class FlatComponent extends AbstractFlatWidget { } } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - componentProps: { - component: this.component, - }, - }); - return await modal.present(); - } } export enum Status { diff --git a/ui/src/app/edge/live/Controller/Io/HeatingElement/modal/modal.ts b/ui/src/app/edge/live/Controller/Io/HeatingElement/modal/modal.ts index c440f01a45e..193a683bf9b 100644 --- a/ui/src/app/edge/live/Controller/Io/HeatingElement/modal/modal.ts +++ b/ui/src/app/edge/live/Controller/Io/HeatingElement/modal/modal.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; import { BehaviorSubject } from 'rxjs'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; import { ChannelAddress, CurrentData } from 'src/app/shared/shared'; import { Mode, WorkMode } from 'src/app/shared/type/general'; @@ -21,6 +21,18 @@ export class ModalComponent extends AbstractModal implements OnInit { protected readonly Mode = Mode; protected readonly WorkMode = WorkMode; + // allowMinimumHeating == workMode: none + // TODO remove when outputting of event is errorless possible + switchAllowMinimumHeating(event: CustomEvent) { + if (event.detail.checked == true) { + this.formGroup.controls['workMode'].setValue('TIME'); + this.formGroup.controls['workMode'].markAsDirty(); + } else if (event.detail.checked == false) { + this.formGroup.controls['workMode'].setValue('NONE'); + this.formGroup.controls['workMode'].markAsDirty(); + } + } + protected override getChannelAddresses(): ChannelAddress[] { const outputChannelPhaseOne = ChannelAddress.fromString( this.component.properties['outputChannelPhaseL1']); @@ -73,15 +85,4 @@ export class ModalComponent extends AbstractModal implements OnInit { }); } - // allowMinimumHeating == workMode: none - // TODO remove when outputting of event is errorless possible - switchAllowMinimumHeating(event: CustomEvent) { - if (event.detail.checked == true) { - this.formGroup.controls['workMode'].setValue('TIME'); - this.formGroup.controls['workMode'].markAsDirty(); - } else if (event.detail.checked == false) { - this.formGroup.controls['workMode'].setValue('NONE'); - this.formGroup.controls['workMode'].markAsDirty(); - } - } } diff --git a/ui/src/app/edge/live/Controller/Io/Heatpump/Io_Heatpump.ts b/ui/src/app/edge/live/Controller/Io/Heatpump/Io_Heatpump.ts index 7fbbc30b59d..2d8ec32c161 100644 --- a/ui/src/app/edge/live/Controller/Io/Heatpump/Io_Heatpump.ts +++ b/ui/src/app/edge/live/Controller/Io/Heatpump/Io_Heatpump.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, EdgeConfig } from 'src/app/shared/shared'; import { Controller_Io_HeatpumpModalComponent } from './modal/modal.component'; @@ -12,13 +12,30 @@ import { Controller_Io_HeatpumpModalComponent } from './modal/modal.component'; }) export class Controller_Io_HeatpumpComponent extends AbstractFlatWidget { - public override component: EdgeConfig.Component = null; + private static PROPERTY_MODE: string = '_PropertyMode'; + + public override component: EdgeConfig.Component | null = null; public status: BehaviorSubject<{ name: string }> = new BehaviorSubject(null); public isConnectionSuccessful: boolean; public mode: string; public statusValue: number; - private static PROPERTY_MODE: string = '_PropertyMode'; + async presentModal() { + const modal = await this.modalController.create({ + component: Controller_Io_HeatpumpModalComponent, + componentProps: { + edge: this.edge, + component: this.component, + status: this.status, + }, + }); + modal.onDidDismiss().then(() => { + this.service.getConfig().then(config => { + this.component = config.components[this.componentId]; + }); + }); + return await modal.present(); + } protected override getChannelAddresses() { return [ @@ -62,20 +79,5 @@ export class Controller_Io_HeatpumpComponent extends AbstractFlatWidget { } } } - async presentModal() { - const modal = await this.modalController.create({ - component: Controller_Io_HeatpumpModalComponent, - componentProps: { - edge: this.edge, - component: this.component, - status: this.status, - }, - }); - modal.onDidDismiss().then(() => { - this.service.getConfig().then(config => { - this.component = config.components[this.componentId]; - }); - }); - return await modal.present(); - } + } diff --git a/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/Asymmetric.ts b/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/Asymmetric.ts index c1afbe5d598..59bf0a579b8 100644 --- a/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/Asymmetric.ts +++ b/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/Asymmetric.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { Component } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from '../../../../../shared/shared'; import { Controller_Asymmetric_PeakShavingModalComponent } from './modal/modal.component'; @@ -18,6 +18,18 @@ export class Controller_Asymmetric_PeakShavingComponent extends AbstractFlatWidg public rechargePower: number; public readonly CONVERT_WATT_TO_KILOWATT = Utils.CONVERT_WATT_TO_KILOWATT; + async presentModal() { + const modal = await this.modalController.create({ + component: Controller_Asymmetric_PeakShavingModalComponent, + componentProps: { + component: this.component, + edge: this.edge, + mostStressedPhase: this.mostStressedPhase, + }, + }); + return await modal.present(); + } + protected override getChannelAddresses() { this.meterId = this.component.properties['meter.id']; return [ @@ -49,15 +61,4 @@ export class Controller_Asymmetric_PeakShavingComponent extends AbstractFlatWidg this.rechargePower = this.component.properties['rechargePower']; } - async presentModal() { - const modal = await this.modalController.create({ - component: Controller_Asymmetric_PeakShavingModalComponent, - componentProps: { - component: this.component, - edge: this.edge, - mostStressedPhase: this.mostStressedPhase, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/modal/modal.component.ts b/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/modal/modal.component.ts index 751df3e54b1..327a63386d6 100644 --- a/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/modal/modal.component.ts +++ b/ui/src/app/edge/live/Controller/PeakShaving/Asymmetric/modal/modal.component.ts @@ -12,9 +12,9 @@ import { Edge, EdgeConfig, Service, Websocket } from '../../../../../../shared/s }) export class Controller_Asymmetric_PeakShavingModalComponent implements OnInit { - @Input() protected component: EdgeConfig.Component; - @Input() protected edge: Edge; - @Input() protected mostStressedPhase: Subject<{ name: 'L1' | 'L2' | 'L3' | '', value: number }>; + @Input({ required: true }) protected component!: EdgeConfig.Component; + @Input({ required: true }) protected edge!: Edge; + @Input({ required: true }) protected mostStressedPhase!: Subject<{ name: 'L1' | 'L2' | 'L3' | '', value: number }>; public formGroup: FormGroup; public loading: boolean = false; diff --git a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/Symmetric.ts b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/Symmetric.ts index 1d25869f2bd..3700366d4ad 100644 --- a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/Symmetric.ts +++ b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/Symmetric.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from '../../../../../shared/shared'; import { Controller_Symmetric_PeakShavingModalComponent } from './modal/modal.component'; @@ -16,6 +16,17 @@ export class Controller_Symmetric_PeakShavingComponent extends AbstractFlatWidge public rechargePower: number; public readonly CONVERT_WATT_TO_KILOWATT = Utils.CONVERT_WATT_TO_KILOWATT; + async presentModal() { + const modal = await this.modalController.create({ + component: Controller_Symmetric_PeakShavingModalComponent, + componentProps: { + component: this.component, + edge: this.edge, + }, + }); + return await modal.present(); + } + protected override getChannelAddresses() { return [ new ChannelAddress(this.component.properties['meter.id'], 'ActivePower'), @@ -33,14 +44,4 @@ export class Controller_Symmetric_PeakShavingComponent extends AbstractFlatWidge this.rechargePower = this.component.properties['rechargePower']; } - async presentModal() { - const modal = await this.modalController.create({ - component: Controller_Symmetric_PeakShavingModalComponent, - componentProps: { - component: this.component, - edge: this.edge, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/modal/modal.component.ts b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/modal/modal.component.ts index 2f1c86eed96..b733e98f5b9 100644 --- a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/modal/modal.component.ts +++ b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric/modal/modal.component.ts @@ -11,8 +11,8 @@ import { Edge, EdgeConfig, Service, Websocket } from '../../../../../../shared/s }) export class Controller_Symmetric_PeakShavingModalComponent implements OnInit { - @Input() protected component: EdgeConfig.Component; - @Input() protected edge: Edge; + @Input({ required: true }) protected component!: EdgeConfig.Component; + @Input({ required: true }) protected edge!: Edge; public formGroup: FormGroup; diff --git a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/Symmetric_TimeSlot.ts b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/Symmetric_TimeSlot.ts index e8d9e356b7b..6d8ed6784c2 100644 --- a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/Symmetric_TimeSlot.ts +++ b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/Symmetric_TimeSlot.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from '../../../../../shared/shared'; import { Controller_Symmetric_TimeSlot_PeakShavingModalComponent } from './modal/modal.component'; @@ -16,21 +16,6 @@ export class Controller_Symmetric_TimeSlot_PeakShavingComponent extends Abstract public rechargePower: number; public readonly CONVERT_WATT_TO_KILOWATT = Utils.CONVERT_WATT_TO_KILOWATT; - protected override getChannelAddresses() { - return [ - new ChannelAddress(this.component.properties['meter.id'], 'ActivePower'), - new ChannelAddress(this.componentId, '_PropertyPeakShavingPower'), - new ChannelAddress(this.componentId, '_PropertyRechargePower'), - ]; - } - protected override onCurrentData(currentData: CurrentData) { - - // activePower is 0 for negative Values - this.activePower = currentData.allComponents[this.component.properties['meter.id'] + '/ActivePower'] >= 0 - ? currentData.allComponents[this.component.properties['meter.id'] + '/ActivePower'] : 0; - this.peakShavingPower = this.component.properties['peakShavingPower']; - this.rechargePower = this.component.properties['rechargePower']; - } async presentModal() { const modal = await this.modalController.create({ component: Controller_Symmetric_TimeSlot_PeakShavingModalComponent, @@ -46,4 +31,21 @@ export class Controller_Symmetric_TimeSlot_PeakShavingComponent extends Abstract }); return await modal.present(); } + + protected override getChannelAddresses() { + return [ + new ChannelAddress(this.component.properties['meter.id'], 'ActivePower'), + new ChannelAddress(this.componentId, '_PropertyPeakShavingPower'), + new ChannelAddress(this.componentId, '_PropertyRechargePower'), + ]; + } + protected override onCurrentData(currentData: CurrentData) { + + // activePower is 0 for negative Values + this.activePower = currentData.allComponents[this.component.properties['meter.id'] + '/ActivePower'] >= 0 + ? currentData.allComponents[this.component.properties['meter.id'] + '/ActivePower'] : 0; + this.peakShavingPower = this.component.properties['peakShavingPower']; + this.rechargePower = this.component.properties['rechargePower']; + } + } diff --git a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/modal/modal.component.ts b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/modal/modal.component.ts index a424dd6df36..3655790047f 100644 --- a/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/modal/modal.component.ts +++ b/ui/src/app/edge/live/Controller/PeakShaving/Symmetric_TimeSlot/modal/modal.component.ts @@ -11,11 +11,11 @@ import { Edge, EdgeConfig, Service, Websocket } from '../../../../../../shared/s }) export class Controller_Symmetric_TimeSlot_PeakShavingModalComponent implements OnInit { + private static readonly SELECTOR = "timeslotpeakshaving-modal"; + @Input() protected component: EdgeConfig.Component | null = null; @Input() protected edge: Edge | null = null; - private static readonly SELECTOR = "timeslotpeakshaving-modal"; - public formGroup: FormGroup; public loading: boolean = false; diff --git a/ui/src/app/edge/live/Io/Api_DigitalInput/Io_Api_DigitalInput.ts b/ui/src/app/edge/live/Io/Api_DigitalInput/Io_Api_DigitalInput.ts index ce4fc315570..0c64f49d90c 100644 --- a/ui/src/app/edge/live/Io/Api_DigitalInput/Io_Api_DigitalInput.ts +++ b/ui/src/app/edge/live/Io/Api_DigitalInput/Io_Api_DigitalInput.ts @@ -1,6 +1,5 @@ -// @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { EdgeConfig } from 'src/app/shared/shared'; import { Io_Api_DigitalInput_ModalComponent } from './modal/modal.component'; @@ -12,16 +11,9 @@ import { Io_Api_DigitalInput_ModalComponent } from './modal/modal.component'; export class Io_Api_DigitalInputComponent extends AbstractFlatWidget { - public ioComponents: EdgeConfig.Component[] = null; + public ioComponents: EdgeConfig.Component[] | null = null; public ioComponentCount = 0; - protected override afterIsInitialized(): void { - this.service.getConfig().then(config => { - this.ioComponents = config.getComponentsImplementingNature("io.openems.edge.io.api.DigitalInput").filter(component => component.isEnabled); - this.ioComponentCount = this.ioComponents.length; - }); - } - async presentModal() { const modal = await this.modalController.create({ component: Io_Api_DigitalInput_ModalComponent, @@ -33,4 +25,11 @@ export class Io_Api_DigitalInputComponent extends AbstractFlatWidget { return await modal.present(); } + protected override afterIsInitialized(): void { + this.service.getConfig().then(config => { + this.ioComponents = config.getComponentsImplementingNature("io.openems.edge.io.api.DigitalInput").filter(component => component.isEnabled); + this.ioComponentCount = this.ioComponents.length; + }); + } + } diff --git a/ui/src/app/edge/live/Io/Api_DigitalInput/modal/modal.component.ts b/ui/src/app/edge/live/Io/Api_DigitalInput/modal/modal.component.ts index eda63d38897..5169a6f4ae5 100644 --- a/ui/src/app/edge/live/Io/Api_DigitalInput/modal/modal.component.ts +++ b/ui/src/app/edge/live/Io/Api_DigitalInput/modal/modal.component.ts @@ -13,8 +13,8 @@ import { JsonrpcRequest, JsonrpcResponseSuccess } from 'src/app/shared/jsonrpc/b export class Io_Api_DigitalInput_ModalComponent implements OnInit, OnDestroy { private static readonly SELECTOR = "Io_Api_DigitalInput_ModalComponent"; - @Input() public edge: Edge; - @Input() public ioComponents: EdgeConfig.Component[]; + @Input({ required: true }) public edge!: Edge; + @Input({ required: true }) public ioComponents!: EdgeConfig.Component[]; protected digitalInputChannelsPerComponent: { componentId: string, componentAlias: string, channels: Channel[] }[]; diff --git a/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/Evcs_Api_Cluster.ts b/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/Evcs_Api_Cluster.ts index 43f8fe3fe25..830159e6d27 100644 --- a/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/Evcs_Api_Cluster.ts +++ b/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/Evcs_Api_Cluster.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, EdgeConfig, Utils } from '../../../../shared/shared'; import { Evcs_Api_ClusterModalComponent } from './modal/evcsCluster-modal.page'; @@ -14,12 +14,25 @@ export class Evcs_Api_ClusterComponent extends AbstractFlatWidget { public channelAddresses: ChannelAddress[] = []; public evcsIdsInCluster: string[] = []; public evcssInCluster: EdgeConfig.Component[] = []; - public evcsComponent: EdgeConfig.Component = null; + public evcsComponent: EdgeConfig.Component | null = null; public evcsMap: { [sourceId: string]: EdgeConfig.Component } = {}; public isConnectionSuccessful: boolean; public alias: string; public readonly CONVERT_TO_WATT = Utils.CONVERT_TO_WATT; + async presentModal() { + const modal = await this.modalController.create({ + component: Evcs_Api_ClusterModalComponent, + componentProps: { + config: this.component, + edge: this.edge, + componentId: this.componentId, + evcsMap: this.evcsMap, + }, + }); + return await modal.present(); + } + protected override getChannelAddresses() { this.evcsIdsInCluster = this.config.components[this.componentId].properties["evcs.ids"]; @@ -81,16 +94,4 @@ export class Evcs_Api_ClusterComponent extends AbstractFlatWidget { ); } - async presentModal() { - const modal = await this.modalController.create({ - component: Evcs_Api_ClusterModalComponent, - componentProps: { - config: this.component, - edge: this.edge, - componentId: this.componentId, - evcsMap: this.evcsMap, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcs-chart/evcs.chart.ts b/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcs-chart/evcs.chart.ts index 75ba5857c7a..fec7d8e1ebb 100644 --- a/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcs-chart/evcs.chart.ts +++ b/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcs-chart/evcs.chart.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import * as Chart from 'chart.js'; import { Component, Input, OnInit, OnChanges } from '@angular/core'; -import { CurrentData } from 'src/app/shared/edge/currentdata'; +import { CurrentData } from 'src/app/shared/components/edge/currentdata'; import { Data } from 'src/app/edge/history/shared'; import { EdgeConfig, Edge } from 'src/app/shared/shared'; import { ModalController } from '@ionic/angular'; @@ -13,25 +13,36 @@ import { TranslateService } from '@ngx-translate/core'; }) export class EvcsChartComponent implements OnInit, OnChanges { - @Input() private evcsMap: { [sourceId: string]: EdgeConfig.Component }; - @Input() private edge: Edge; - @Input() private currentData: CurrentData; + private static readonly SELECTOR = "evcsChart"; + + @Input({ required: true }) private evcsMap!: { [sourceId: string]: EdgeConfig.Component }; + @Input({ required: true }) private edge!: Edge; + @Input({ required: true }) private currentData!: CurrentData; @Input() private evcsConfigMap: { [evcsId: string]: EdgeConfig.Component } = {}; - @Input() private componentId: string; + @Input({ required: true }) private componentId!: string; - private static readonly SELECTOR = "evcsChart"; public loading: boolean = true; public options: BarChartOptions; - public labels: any[]; + public labels: string[]; public datasets: Chart.ChartDataset[]; public chart: Chart.Chart; // This will hold our chart info - constructor( protected translate: TranslateService, public modalController: ModalController, ) { } + getMaxPower() { + const minPower = 22; + let maxHW = this.currentData[this.componentId + '/MaximumHardwarePower']; + let chargePower = this.currentData[this.componentId + '/ChargePower']; + maxHW = maxHW == null ? minPower : maxHW / 1000; + chargePower = chargePower == null ? 0 : chargePower / 1000; + + const maxPower: number = chargePower < minPower || maxHW; + return Math.round(maxPower); + } + ngOnInit() { this.options = DEFAULT_BAR_CHART_OPTIONS; @@ -75,16 +86,6 @@ export class EvcsChartComponent implements OnInit, OnChanges { this.loading = false; } - getMaxPower() { - const minPower = 22; - let maxHW = this.currentData[this.componentId + '/MaximumHardwarePower']; - let chargePower = this.currentData[this.componentId + '/ChargePower']; - maxHW = maxHW == null ? minPower : maxHW / 1000; - chargePower = chargePower == null ? 0 : chargePower / 1000; - - const maxPower: number = chargePower < minPower || maxHW; - return Math.round(maxPower); - } } export const DEFAULT_BAR_CHART_OPTIONS: BarChartOptions = { diff --git a/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcsCluster-modal.page.ts b/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcsCluster-modal.page.ts index 065900afded..13b2dfaeb2d 100644 --- a/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcsCluster-modal.page.ts +++ b/ui/src/app/edge/live/Multiple/Evcs_Api_Cluster/modal/evcsCluster-modal.page.ts @@ -14,16 +14,13 @@ type Priority = 'CAR' | 'STORAGE'; }) export class Evcs_Api_ClusterModalComponent implements OnInit { - @Input() public edge: Edge; - @Input() public config: EdgeConfig.Component = null; - @Input() public componentId: string; + @Input({ required: true }) public edge!: Edge; + @Input() public config: EdgeConfig.Component | null = null; + @Input({ required: true }) public componentId!: string; @Input() public evcsMap: { [sourceId: string]: EdgeConfig.Component } = {}; @ViewChild(IonReorderGroup, { static: true }) public reorderGroup: IonReorderGroup; - - public chargeState: ChargeState; - private chargePlug: ChargePlug; public evcsAmount: number; public swiperIndex: number = 0; public slideOpts = { @@ -38,6 +35,9 @@ export class Evcs_Api_ClusterModalComponent implements OnInit { public prioritizedEvcsList: string[]; public evcsConfigMap: { [evcsId: string]: EdgeConfig.Component } = {}; + public chargeState: ChargeState; + private chargePlug: ChargePlug; + constructor( protected service: Service, public websocket: Websocket, diff --git a/ui/src/app/edge/live/common/autarchy/flat/flat.ts b/ui/src/app/edge/live/common/autarchy/flat/flat.ts index cc161dbc2d9..085e4388119 100644 --- a/ui/src/app/edge/live/common/autarchy/flat/flat.ts +++ b/ui/src/app/edge/live/common/autarchy/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; import { ModalComponent } from '../modal/modal'; @@ -12,6 +12,13 @@ export class FlatComponent extends AbstractFlatWidget { public percentageValue: number; + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + }); + return await modal.present(); + } + protected override getChannelAddresses(): ChannelAddress[] { return [ new ChannelAddress('_sum', 'GridActivePower'), @@ -26,11 +33,4 @@ export class FlatComponent extends AbstractFlatWidget { ); } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - }); - return await modal.present(); - } - } diff --git a/ui/src/app/edge/live/common/autarchy/modal/modal.spec.ts b/ui/src/app/edge/live/common/autarchy/modal/modal.spec.ts index f21a09ac974..4c8b585b195 100644 --- a/ui/src/app/edge/live/common/autarchy/modal/modal.spec.ts +++ b/ui/src/app/edge/live/common/autarchy/modal/modal.spec.ts @@ -1,6 +1,6 @@ -import { LINE_INFO } from "src/app/shared/edge/edgeconfig.spec"; -import { OeFormlyViewTester } from "src/app/shared/genericComponents/shared/testing/tester"; -import { sharedSetup, TestContext } from "src/app/shared/test/utils.spec"; +import { LINE_INFO } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeFormlyViewTester } from "src/app/shared/components/shared/testing/tester"; +import { sharedSetup, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { ModalComponent } from "./modal"; diff --git a/ui/src/app/edge/live/common/autarchy/modal/modal.ts b/ui/src/app/edge/live/common/autarchy/modal/modal.ts index dfb182b10e4..8f9fa5aa219 100644 --- a/ui/src/app/edge/live/common/autarchy/modal/modal.ts +++ b/ui/src/app/edge/live/common/autarchy/modal/modal.ts @@ -1,16 +1,13 @@ import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { AbstractFormlyComponent, OeFormlyView } from 'src/app/shared/genericComponents/shared/oe-formly-component'; +import { AbstractFormlyComponent, OeFormlyView } from 'src/app/shared/components/shared/oe-formly-component'; import { EdgeConfig } from 'src/app/shared/shared'; import { Role } from 'src/app/shared/type/role'; @Component({ - templateUrl: '../../../../../shared/formly/formly-field-modal/template.html', + templateUrl: '../../../../../shared/components/formly/formly-field-modal/template.html', }) export class ModalComponent extends AbstractFormlyComponent { - protected override generateView(config: EdgeConfig, role: Role): OeFormlyView { - return ModalComponent.generateView(this.translate); - } public static generateView(translate: TranslateService): OeFormlyView { return { @@ -21,4 +18,8 @@ export class ModalComponent extends AbstractFormlyComponent { }], }; } + protected override generateView(config: EdgeConfig, role: Role): OeFormlyView { + return ModalComponent.generateView(this.translate); + } + } diff --git a/ui/src/app/edge/live/common/consumption/flat/flat.ts b/ui/src/app/edge/live/common/consumption/flat/flat.ts index 34f7f9f16a8..bcc6602c7f0 100644 --- a/ui/src/app/edge/live/common/consumption/flat/flat.ts +++ b/ui/src/app/edge/live/common/consumption/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, EdgeConfig, Utils } from 'src/app/shared/shared'; import { ModalComponent } from '../modal/modal'; @@ -11,12 +11,19 @@ import { ModalComponent } from '../modal/modal'; export class FlatComponent extends AbstractFlatWidget { public evcss: EdgeConfig.Component[] | null = null; - public consumptionMeters: EdgeConfig.Component[] = null; + public consumptionMeters: EdgeConfig.Component[] | null = null; public sumActivePower: number = 0; public evcsSumOfChargePower: number; public otherPower: number; public readonly CONVERT_WATT_TO_KILOWATT = Utils.CONVERT_WATT_TO_KILOWATT; + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + }); + return await modal.present(); + } + protected override getChannelAddresses() { const channelAddresses: ChannelAddress[] = [ @@ -79,10 +86,4 @@ export class FlatComponent extends AbstractFlatWidget { Utils.addSafely(this.evcsSumOfChargePower, consumptionMetersSumOfActivePower)); } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/common/consumption/modal/modal.constants.spec.ts b/ui/src/app/edge/live/common/consumption/modal/modal.constants.spec.ts index dbb19594bed..51914c80ef4 100644 --- a/ui/src/app/edge/live/common/consumption/modal/modal.constants.spec.ts +++ b/ui/src/app/edge/live/common/consumption/modal/modal.constants.spec.ts @@ -1,8 +1,8 @@ -import { DummyConfig } from "src/app/shared/edge/edgeconfig.spec"; +import { DummyConfig } from "src/app/shared/components/edge/edgeconfig.spec"; +import { TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { EdgeConfig } from "src/app/shared/shared"; -import { TestContext } from "src/app/shared/test/utils.spec"; -import { OeFormlyViewTester } from "../../../../../shared/genericComponents/shared/testing/tester"; +import { OeFormlyViewTester } from "../../../../../shared/components/shared/testing/tester"; import { ModalComponent } from "./modal"; export function expectView(config: EdgeConfig, viewContext: OeFormlyViewTester.Context, testContext: TestContext, view: OeFormlyViewTester.View): void { diff --git a/ui/src/app/edge/live/common/consumption/modal/modal.spec.ts b/ui/src/app/edge/live/common/consumption/modal/modal.spec.ts index eb9eae845eb..a0daa57a406 100644 --- a/ui/src/app/edge/live/common/consumption/modal/modal.spec.ts +++ b/ui/src/app/edge/live/common/consumption/modal/modal.spec.ts @@ -1,8 +1,8 @@ // @ts-strict-ignore -import { CHANNEL_LINE, DummyConfig, LINE_HORIZONTAL, LINE_INFO_PHASES_DE, VALUE_FROM_CHANNELS_LINE } from "src/app/shared/edge/edgeconfig.spec"; -import { TextIndentation } from "src/app/shared/genericComponents/modal/modal-line/modal-line"; -import { OeFormlyViewTester } from "src/app/shared/genericComponents/shared/testing/tester"; -import { sharedSetup } from "src/app/shared/test/utils.spec"; +import { CHANNEL_LINE, DummyConfig, LINE_HORIZONTAL, LINE_INFO_PHASES_DE, VALUE_FROM_CHANNELS_LINE } from "src/app/shared/components/edge/edgeconfig.spec"; +import { TextIndentation } from "src/app/shared/components/modal/modal-line/modal-line"; +import { OeFormlyViewTester } from "src/app/shared/components/shared/testing/tester"; +import { sharedSetup } from "src/app/shared/components/shared/testing/utils.spec"; import { expectView } from "./modal.constants.spec"; diff --git a/ui/src/app/edge/live/common/consumption/modal/modal.ts b/ui/src/app/edge/live/common/consumption/modal/modal.ts index 164083897d6..3ed6bfdbded 100644 --- a/ui/src/app/edge/live/common/consumption/modal/modal.ts +++ b/ui/src/app/edge/live/common/consumption/modal/modal.ts @@ -1,22 +1,18 @@ import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { TextIndentation } from 'src/app/shared/genericComponents/modal/modal-line/modal-line'; -import { Converter } from 'src/app/shared/genericComponents/shared/converter'; -import { Name } from 'src/app/shared/genericComponents/shared/name'; -import { AbstractFormlyComponent, OeFormlyField, OeFormlyView } from 'src/app/shared/genericComponents/shared/oe-formly-component'; -import { Phase } from 'src/app/shared/genericComponents/shared/phase'; +import { TextIndentation } from 'src/app/shared/components/modal/modal-line/modal-line'; +import { Converter } from 'src/app/shared/components/shared/converter'; +import { Name } from 'src/app/shared/components/shared/name'; +import { AbstractFormlyComponent, OeFormlyField, OeFormlyView } from 'src/app/shared/components/shared/oe-formly-component'; +import { Phase } from 'src/app/shared/components/shared/phase'; import { ChannelAddress, CurrentData, EdgeConfig } from '../../../../../shared/shared'; @Component({ - templateUrl: '../../../../../shared/formly/formly-field-modal/template.html', + templateUrl: '../../../../../shared/components/formly/formly-field-modal/template.html', }) export class ModalComponent extends AbstractFormlyComponent { - protected override generateView(config: EdgeConfig): OeFormlyView { - return ModalComponent.generateView(config, this.translate); - } - public static generateView(config: EdgeConfig, translate: TranslateService): OeFormlyView { const evcss: EdgeConfig.Component[] | null = config.getComponentsImplementingNature("io.openems.edge.evcs.api.Evcs") @@ -122,4 +118,9 @@ export class ModalComponent extends AbstractFormlyComponent { lines: lines, }; } + + protected override generateView(config: EdgeConfig): OeFormlyView { + return ModalComponent.generateView(config, this.translate); + } + } diff --git a/ui/src/app/edge/live/common/grid/flat/flat.html b/ui/src/app/edge/live/common/grid/flat/flat.html index fde286628df..9c330d1db35 100644 --- a/ui/src/app/edge/live/common/grid/flat/flat.html +++ b/ui/src/app/edge/live/common/grid/flat/flat.html @@ -1,4 +1,9 @@ - + + + + + + diff --git a/ui/src/app/edge/live/common/grid/flat/flat.ts b/ui/src/app/edge/live/common/grid/flat/flat.ts index 047830f4b9f..f89da9ed307 100644 --- a/ui/src/app/edge/live/common/grid/flat/flat.ts +++ b/ui/src/app/edge/live/common/grid/flat/flat.ts @@ -1,7 +1,10 @@ // @ts-strict-ignore import { Component } from '@angular/core'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; +import { Converter } from 'src/app/shared/components/shared/converter'; import { ChannelAddress, CurrentData, GridMode, Utils } from 'src/app/shared/shared'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { Icon } from 'src/app/shared/type/widget'; +import { GridSectionComponent } from '../../../energymonitor/chart/section/grid.component'; import { ModalComponent } from '../modal/modal'; @Component({ @@ -10,6 +13,7 @@ import { ModalComponent } from '../modal/modal'; }) export class FlatComponent extends AbstractFlatWidget { + private static readonly RESTRICTION_MODE: ChannelAddress = new ChannelAddress('ctrlEssLimiter14a0', 'RestrictionMode'); private static readonly GRID_ACTIVE_POWER: ChannelAddress = new ChannelAddress('_sum', 'GridActivePower'); private static readonly GRID_MODE: ChannelAddress = new ChannelAddress('_sum', 'GridMode'); @@ -18,7 +22,21 @@ export class FlatComponent extends AbstractFlatWidget { public gridBuyPower: number; public gridSellPower: number; - public gridMode: number; + + protected gridMode: number; + protected gridState: string; + protected icon: Icon | null = null; + protected isActivated: boolean = false; + + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + componentProps: { + edge: this.edge, + }, + }); + return await modal.present(); + } protected override getChannelAddresses(): ChannelAddress[] { const channelAddresses: ChannelAddress[] = [ @@ -29,22 +47,20 @@ export class FlatComponent extends AbstractFlatWidget { new ChannelAddress('_sum', 'GridActivePowerL2'), new ChannelAddress('_sum', 'GridActivePowerL3'), ]; + + if (GridSectionComponent.isControllerEnabled(this.config, "Controller.Ess.Limiter14a")) { + channelAddresses.push(FlatComponent.RESTRICTION_MODE); + } return channelAddresses; } protected override onCurrentData(currentData: CurrentData) { + this.isActivated = GridSectionComponent.isControllerEnabled(this.config, "Controller.Ess.Limiter14a"); this.gridMode = currentData.allComponents[FlatComponent.GRID_MODE.toString()]; + this.gridState = Converter.GRID_STATE_TO_MESSAGE(this.translate, currentData); const gridActivePower = currentData.allComponents[FlatComponent.GRID_ACTIVE_POWER.toString()]; this.gridBuyPower = gridActivePower; this.gridSellPower = Utils.multiplySafely(gridActivePower, -1); + this.icon = GridSectionComponent.getCurrentGridIcon(currentData); } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - componentProps: { - edge: this.edge, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/common/grid/modal/constants.spec.ts b/ui/src/app/edge/live/common/grid/modal/constants.spec.ts index b5f1150d352..20a54ba09b1 100644 --- a/ui/src/app/edge/live/common/grid/modal/constants.spec.ts +++ b/ui/src/app/edge/live/common/grid/modal/constants.spec.ts @@ -1,7 +1,8 @@ +import { TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { EdgeConfig } from "src/app/shared/shared"; -import { TestContext } from "src/app/shared/test/utils.spec"; import { Role } from "src/app/shared/type/role"; -import { OeFormlyViewTester } from "../../../../../shared/genericComponents/shared/testing/tester"; + +import { OeFormlyViewTester } from "../../../../../shared/components/shared/testing/tester"; import { ModalComponent } from "./modal"; export function expectView(config: EdgeConfig, role: Role, viewContext: OeFormlyViewTester.Context, testContext: TestContext, view: OeFormlyViewTester.View): void { diff --git a/ui/src/app/edge/live/common/grid/modal/modal.spec.ts b/ui/src/app/edge/live/common/grid/modal/modal.spec.ts index 3372107e288..e78fcf03a69 100644 --- a/ui/src/app/edge/live/common/grid/modal/modal.spec.ts +++ b/ui/src/app/edge/live/common/grid/modal/modal.spec.ts @@ -1,7 +1,7 @@ -import { CHANNEL_LINE, DummyConfig, LINE_HORIZONTAL, LINE_INFO_PHASES_DE, PHASE_ADMIN, PHASE_GUEST } from "src/app/shared/edge/edgeconfig.spec"; -import { OeFormlyViewTester } from "src/app/shared/genericComponents/shared/testing/tester"; +import { CHANNEL_LINE, DummyConfig, LINE_HORIZONTAL, LINE_INFO_PHASES_DE, PHASE_ADMIN, PHASE_GUEST, VALUE_FROM_CHANNELS_LINE } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeFormlyViewTester } from "src/app/shared/components/shared/testing/tester"; +import { sharedSetup, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { GridMode } from "src/app/shared/shared"; -import { sharedSetup, TestContext } from "src/app/shared/test/utils.spec"; import { Role } from "src/app/shared/type/role"; import { expectView } from "./constants.spec"; @@ -37,12 +37,14 @@ describe('Grid - Modal', () => { // Single Meter const EMS = DummyConfig.from( DummyConfig.Component.SOCOMEC_GRID_METER("meter0", "Netzzähler"), + DummyConfig.Component.ESS_LIMITER_14A("ctrlEssLimiter14a0"), ); // Admin and Installer expectView(EMS, Role.ADMIN, VIEW_CONTEXT(), TEST_CONTEXT, { title: "Netz", lines: [ + VALUE_FROM_CHANNELS_LINE("Zustand", "keine externe Limitierung"), CHANNEL_LINE("Einspeisung", "1.000 W"), CHANNEL_LINE("Bezug", "0 W"), PHASE_ADMIN("Phase L1 Einspeisung", "230 V", "2,2 A", "500 W"), @@ -57,6 +59,7 @@ describe('Grid - Modal', () => { expectView(EMS, Role.OWNER, VIEW_CONTEXT(), TEST_CONTEXT, { title: "Netz", lines: [ + VALUE_FROM_CHANNELS_LINE("Zustand", "keine externe Limitierung"), CHANNEL_LINE("Einspeisung", "1.000 W"), CHANNEL_LINE("Bezug", "0 W"), PHASE_GUEST("Phase L1 Einspeisung", "500 W"), @@ -76,6 +79,7 @@ describe('Grid - Modal', () => { name: "Keine Netzverbindung!", value: "", }, + VALUE_FROM_CHANNELS_LINE("Zustand", "Netzausfall"), CHANNEL_LINE("Einspeisung", "1.000 W"), CHANNEL_LINE("Bezug", "0 W"), PHASE_ADMIN("Phase L1 Einspeisung", "230 V", "2,2 A", "500 W"), @@ -92,12 +96,14 @@ describe('Grid - Modal', () => { const EMS = DummyConfig.from( DummyConfig.Component.SOCOMEC_GRID_METER("meter10"), DummyConfig.Component.SOCOMEC_GRID_METER("meter11"), + DummyConfig.Component.ESS_LIMITER_14A("ctrlEssLimiter14a0"), ); // Admin and Installer -> two meters expectView(EMS, Role.ADMIN, VIEW_CONTEXT(), TEST_CONTEXT, { title: "Netz", lines: [ + VALUE_FROM_CHANNELS_LINE("Zustand", "keine externe Limitierung"), CHANNEL_LINE("Einspeisung", "1.000 W"), CHANNEL_LINE("Bezug", "0 W"), LINE_HORIZONTAL, @@ -119,6 +125,7 @@ describe('Grid - Modal', () => { expectView(EMS, Role.GUEST, VIEW_CONTEXT(), TEST_CONTEXT, { title: "Netz", lines: [ + VALUE_FROM_CHANNELS_LINE("Zustand", "keine externe Limitierung"), CHANNEL_LINE("Einspeisung", "1.000 W"), CHANNEL_LINE("Bezug", "0 W"), LINE_HORIZONTAL, diff --git a/ui/src/app/edge/live/common/grid/modal/modal.ts b/ui/src/app/edge/live/common/grid/modal/modal.ts index 22edf6859a7..1087a3a69f4 100644 --- a/ui/src/app/edge/live/common/grid/modal/modal.ts +++ b/ui/src/app/edge/live/common/grid/modal/modal.ts @@ -1,24 +1,22 @@ import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { TextIndentation } from 'src/app/shared/genericComponents/modal/modal-line/modal-line'; -import { Converter } from 'src/app/shared/genericComponents/shared/converter'; -import { Filter } from 'src/app/shared/genericComponents/shared/filter'; -import { Name } from 'src/app/shared/genericComponents/shared/name'; -import { AbstractFormlyComponent, OeFormlyField, OeFormlyView } from 'src/app/shared/genericComponents/shared/oe-formly-component'; -import { ChannelAddress, EdgeConfig } from 'src/app/shared/shared'; +import { TextIndentation } from 'src/app/shared/components/modal/modal-line/modal-line'; +import { Converter } from 'src/app/shared/components/shared/converter'; +import { Filter } from 'src/app/shared/components/shared/filter'; +import { Name } from 'src/app/shared/components/shared/name'; +import { AbstractFormlyComponent, OeFormlyField, OeFormlyView } from 'src/app/shared/components/shared/oe-formly-component'; +import { ChannelAddress, CurrentData, EdgeConfig } from 'src/app/shared/shared'; import { Role } from 'src/app/shared/type/role'; +import { GridSectionComponent } from '../../../energymonitor/chart/section/grid.component'; @Component({ - templateUrl: '../../../../../shared/formly/formly-field-modal/template.html', + templateUrl: '../../../../../shared/components/formly/formly-field-modal/template.html', }) export class ModalComponent extends AbstractFormlyComponent { - protected override generateView(config: EdgeConfig, role: Role): OeFormlyView { - return ModalComponent.generateView(config, role, this.translate); - } - public static generateView(config: EdgeConfig, role: Role, translate: TranslateService): OeFormlyView { + const isActivated = GridSectionComponent.isControllerEnabled(config, 'Controller.Ess.Limiter14a'); // Grid-Mode const lines: OeFormlyField[] = [{ type: 'channel-line', @@ -32,6 +30,18 @@ export class ModalComponent extends AbstractFormlyComponent { // Sum Channels (if more than one meter) if (gridMeters.length > 1) { + if (isActivated) { + lines.push({ + type: 'value-from-channels-line', + name: translate.instant("General.state"), + value: (currentData: CurrentData) => Converter.GRID_STATE_TO_MESSAGE(translate, currentData), + channelsToSubscribe: [ + new ChannelAddress("_sum", "GridMode"), + new ChannelAddress("ctrlEssLimiter14a0", "RestrictionMode"), + ], + }); + } + lines.push( { type: 'channel-line', @@ -44,15 +54,30 @@ export class ModalComponent extends AbstractFormlyComponent { name: translate.instant("General.gridBuyAdvanced"), channel: '_sum/GridActivePower', converter: Converter.GRID_BUY_POWER_OR_ZERO, - }, { - type: 'horizontal-line', - }); + }, + { + type: 'horizontal-line', + }, + ); } + // Individual Meters for (const meter of gridMeters) { - if (gridMeters.length == 1) { + if (gridMeters.length === 1) { // Two lines if there is only one meter (= same visualization as with Sum Channels) + if (isActivated) { + lines.push({ + type: 'value-from-channels-line', + name: translate.instant("General.state"), + value: (currentData: CurrentData) => Converter.GRID_STATE_TO_MESSAGE(translate, currentData), + channelsToSubscribe: [ + new ChannelAddress("_sum", "GridMode"), + new ChannelAddress("ctrlEssLimiter14a0", "RestrictionMode"), + ], + }); + } + lines.push( { type: 'channel-line', @@ -65,7 +90,8 @@ export class ModalComponent extends AbstractFormlyComponent { name: translate.instant("General.gridBuyAdvanced"), channel: meter.id + '/ActivePower', converter: Converter.GRID_BUY_POWER_OR_ZERO, - }); + }, + ); } else { // More than one meter? Show only one line per meter. @@ -79,10 +105,12 @@ export class ModalComponent extends AbstractFormlyComponent { lines.push( // Individual phases: Voltage, Current and Power - ...ModalComponent.generatePhasesView(meter, translate, role), { - // Line separator - type: 'horizontal-line', - }); + ...ModalComponent.generatePhasesView(meter, translate, role), + { + // Line separator + type: 'horizontal-line', + }, + ); } if (gridMeters.length > 0) { @@ -134,4 +162,9 @@ export class ModalComponent extends AbstractFormlyComponent { return children; } + + protected override generateView(config: EdgeConfig, role: Role): OeFormlyView { + return ModalComponent.generateView(config, role, this.translate); + } + } diff --git a/ui/src/app/edge/live/common/production/flat/flat.ts b/ui/src/app/edge/live/common/production/flat/flat.ts index c8be6fb8e6a..c0459210a0c 100644 --- a/ui/src/app/edge/live/common/production/flat/flat.ts +++ b/ui/src/app/edge/live/common/production/flat/flat.ts @@ -1,6 +1,6 @@ import { EdgeConfig, Utils } from 'src/app/shared/shared'; import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ModalComponent } from '../modal/modal'; @Component({ @@ -13,6 +13,13 @@ export class FlatComponent extends AbstractFlatWidget { public chargerComponents: EdgeConfig.Component[] = []; public readonly CONVERT_WATT_TO_KILOWATT = Utils.CONVERT_WATT_TO_KILOWATT; + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + }); + return await modal.present(); + } + protected override getChannelAddresses() { // Get Chargers this.chargerComponents = @@ -27,10 +34,4 @@ export class FlatComponent extends AbstractFlatWidget { return []; } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/common/production/modal/modal.ts b/ui/src/app/edge/live/common/production/modal/modal.ts index 9a3b7e10c01..a631d288bef 100644 --- a/ui/src/app/edge/live/common/production/modal/modal.ts +++ b/ui/src/app/edge/live/common/production/modal/modal.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AbstractModal } from 'src/app/shared/genericComponents/modal/abstractModal'; +import { AbstractModal } from 'src/app/shared/components/modal/abstractModal'; import { ChannelAddress, EdgeConfig, Utils } from 'src/app/shared/shared'; @Component({ diff --git a/ui/src/app/edge/live/common/selfconsumption/flat/flat.ts b/ui/src/app/edge/live/common/selfconsumption/flat/flat.ts index 73f504b17de..60c4c13b999 100644 --- a/ui/src/app/edge/live/common/selfconsumption/flat/flat.ts +++ b/ui/src/app/edge/live/common/selfconsumption/flat/flat.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { ChannelAddress, CurrentData, Utils } from 'src/app/shared/shared'; import { ModalComponent } from '../modal/modal'; @@ -13,6 +13,13 @@ export class FlatComponent extends AbstractFlatWidget { public calculatedSelfConsumption: number; + async presentModal() { + const modal = await this.modalController.create({ + component: ModalComponent, + }); + return await modal.present(); + } + protected override getChannelAddresses() { return [ new ChannelAddress('_sum', 'GridActivePower'), @@ -30,10 +37,4 @@ export class FlatComponent extends AbstractFlatWidget { ); } - async presentModal() { - const modal = await this.modalController.create({ - component: ModalComponent, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/common/selfconsumption/modal/modal.spec.ts b/ui/src/app/edge/live/common/selfconsumption/modal/modal.spec.ts index a46a0608e57..f640f899548 100644 --- a/ui/src/app/edge/live/common/selfconsumption/modal/modal.spec.ts +++ b/ui/src/app/edge/live/common/selfconsumption/modal/modal.spec.ts @@ -1,6 +1,6 @@ -import { LINE_INFO } from "src/app/shared/edge/edgeconfig.spec"; -import { OeFormlyViewTester } from "src/app/shared/genericComponents/shared/testing/tester"; -import { sharedSetup, TestContext } from "src/app/shared/test/utils.spec"; +import { LINE_INFO } from "src/app/shared/components/edge/edgeconfig.spec"; +import { OeFormlyViewTester } from "src/app/shared/components/shared/testing/tester"; +import { sharedSetup, TestContext } from "src/app/shared/components/shared/testing/utils.spec"; import { ModalComponent } from "./modal"; diff --git a/ui/src/app/edge/live/common/selfconsumption/modal/modal.ts b/ui/src/app/edge/live/common/selfconsumption/modal/modal.ts index fe6052e80d3..531b1b41123 100644 --- a/ui/src/app/edge/live/common/selfconsumption/modal/modal.ts +++ b/ui/src/app/edge/live/common/selfconsumption/modal/modal.ts @@ -1,16 +1,13 @@ import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { AbstractFormlyComponent, OeFormlyView } from 'src/app/shared/genericComponents/shared/oe-formly-component'; +import { AbstractFormlyComponent, OeFormlyView } from 'src/app/shared/components/shared/oe-formly-component'; import { EdgeConfig } from 'src/app/shared/shared'; import { Role } from 'src/app/shared/type/role'; @Component({ - templateUrl: '../../../../../shared/formly/formly-field-modal/template.html', + templateUrl: '../../../../../shared/components/formly/formly-field-modal/template.html', }) export class ModalComponent extends AbstractFormlyComponent { - protected override generateView(config: EdgeConfig, role: Role): OeFormlyView { - return ModalComponent.generateView(this.translate); - } public static generateView(translate: TranslateService): OeFormlyView { return { @@ -21,4 +18,8 @@ export class ModalComponent extends AbstractFormlyComponent { }], }; } + protected override generateView(config: EdgeConfig, role: Role): OeFormlyView { + return ModalComponent.generateView(this.translate); + } + } diff --git a/ui/src/app/edge/live/common/storage/modal/modal.component.ts b/ui/src/app/edge/live/common/storage/modal/modal.component.ts index 8fc10a04131..e64da36eb1b 100644 --- a/ui/src/app/edge/live/common/storage/modal/modal.component.ts +++ b/ui/src/app/edge/live/common/storage/modal/modal.component.ts @@ -15,11 +15,11 @@ export class StorageModalComponent implements OnInit, OnDestroy { // TODO after refactoring of Model: subscribe to EssActivePowerL1/L2/L3 here instead of Flat Widget - @Input() protected edge: Edge; - @Input() protected config: EdgeConfig; + @Input({ required: true }) protected edge!: Edge; + @Input({ required: true }) protected config!: EdgeConfig; @Input() protected essComponents: EdgeConfig.Component[] | null = null; - @Input() protected chargerComponents: EdgeConfig.Component[]; - @Input() protected singleComponent: EdgeConfig.Component = null; + @Input({ required: true }) protected chargerComponents!: EdgeConfig.Component[]; + @Input() protected singleComponent: EdgeConfig.Component | null = null; // reference to the Utils method to access via html public isLastElement = Utils.isLastElement; diff --git a/ui/src/app/edge/live/common/storage/storage.component.ts b/ui/src/app/edge/live/common/storage/storage.component.ts index f5558444284..98549f34bff 100644 --- a/ui/src/app/edge/live/common/storage/storage.component.ts +++ b/ui/src/app/edge/live/common/storage/storage.component.ts @@ -1,7 +1,7 @@ // @ts-strict-ignore import { formatNumber } from '@angular/common'; import { Component } from '@angular/core'; -import { AbstractFlatWidget } from 'src/app/shared/genericComponents/flat/abstract-flat-widget'; +import { AbstractFlatWidget } from 'src/app/shared/components/flat/abstract-flat-widget'; import { CurrentData } from "src/app/shared/shared"; import { DateUtils } from 'src/app/shared/utils/date/dateutils'; @@ -16,13 +16,74 @@ export class StorageComponent extends AbstractFlatWidget { public essComponents: EdgeConfig.Component[] = []; public chargerComponents: EdgeConfig.Component[] = []; - public storageIconStyle: string = null; + public storageIconStyle: string | null = null; public isHybridEss: boolean[] = []; public emergencyReserveComponents: { [essId: string]: EdgeConfig.Component } = {}; public currentSoc: number[] = []; public isEmergencyReserveEnabled: boolean[] = []; - private prepareBatteryExtensionCtrl: { [key: string]: EdgeConfig.Component }; protected possibleBatteryExtensionMessage: Map = new Map(); + private prepareBatteryExtensionCtrl: { [key: string]: EdgeConfig.Component }; + + /** + * Use 'convertChargePower' to convert/map a value + * + * @param value takes @Input value or channelAddress for chargePower + * @returns value + */ + public convertChargePower = (value: any): string => { + return this.convertPower(Utils.multiplySafely(value, -1), true); + }; + + /** + * Use 'convertDischargePower' to convert/map a value + * + * @param value takes @Input value or channelAddress for dischargePower + * @returns value + */ + public convertDischargePower = (value: any): string => { + return this.convertPower(value); + }; + + /** + * Use 'convertPower' to check whether 'charge/discharge' and to be only showed when not negative + * + * @param value takes passed value when called + * @returns only positive and 0 + */ + public convertPower(value: number, isCharge?: boolean) { + if (value == null) { + return '-'; + } + + const thisValue: number = (value / 1000); + + // Round thisValue to Integer when decimal place equals 0 + if (thisValue > 0) { + return formatNumber(thisValue, 'de', '1.0-1') + " kW"; // TODO get locale dynamically + + } else if (thisValue == 0 && isCharge) { + // if thisValue is 0, then show only when charge and not discharge + return '0 kW'; + + } else { + return '-'; + } + } + + async presentModal() { + const modal = await this.modalController.create({ + component: StorageModalComponent, + componentProps: { + edge: this.edge, + config: this.config, + component: this.component, + essComponents: this.essComponents, + chargerComponents: this.chargerComponents, + singleComponent: this.component, + }, + }); + return await modal.present(); + } protected override getChannelAddresses() { @@ -118,36 +179,6 @@ export class StorageComponent extends AbstractFlatWidget { return channelAddresses; } - private getBatteryCapacityExtensionStatus(isRunning: boolean, essIsBlocking: number, essIsCharging: number, essIsDischarging: number, targetTimeSpecified: boolean, targetDate: Date): { color: string, text: string } { - - if (!isRunning) { - return null; - } - // Planned Expansion - if (targetTimeSpecified && targetDate) { - - const date = DateUtils.stringToDate(targetDate.toString()); - return { - color: 'green', text: this.translate.instant('Edge.Index.RETROFITTING.TARGET_TIME_SPECIFIED', { - targetDate: DateUtils.toLocaleDateString(date), - targetTime: date.toLocaleTimeString(), - }), - }; - } - - if (essIsBlocking != null && essIsBlocking == 1) { - // If ess reached targetSoc - return { color: 'green', text: this.translate.instant('Edge.Index.RETROFITTING.REACHED_TARGET_SOC') }; - - } else if ((essIsCharging != null && essIsCharging == 1) || (essIsDischarging != null && essIsDischarging == 1)) { - - // If Ess is charging to or discharging to the targetSoc - return { color: 'orange', text: this.translate.instant('Edge.Index.RETROFITTING.PREPARING') }; - } else { - return null; - } - } - protected override onCurrentData(currentData: CurrentData) { for (const essId in this.prepareBatteryExtensionCtrl) { @@ -176,64 +207,34 @@ export class StorageComponent extends AbstractFlatWidget { } } - /** - * Use 'convertChargePower' to convert/map a value - * - * @param value takes @Input value or channelAddress for chargePower - * @returns value - */ - public convertChargePower = (value: any): string => { - return this.convertPower(Utils.multiplySafely(value, -1), true); - }; - - /** - * Use 'convertDischargePower' to convert/map a value - * - * @param value takes @Input value or channelAddress for dischargePower - * @returns value - */ - public convertDischargePower = (value: any): string => { - return this.convertPower(value); - }; + private getBatteryCapacityExtensionStatus(isRunning: boolean, essIsBlocking: number, essIsCharging: number, essIsDischarging: number, targetTimeSpecified: boolean, targetDate: Date): { color: string, text: string } { - /** - * Use 'convertPower' to check whether 'charge/discharge' and to be only showed when not negative - * - * @param value takes passed value when called - * @returns only positive and 0 - */ - public convertPower(value: number, isCharge?: boolean) { - if (value == null) { - return '-'; + if (!isRunning) { + return null; } + // Planned Expansion + if (targetTimeSpecified && targetDate) { - const thisValue: number = (value / 1000); + const date = DateUtils.stringToDate(targetDate.toString()); + return { + color: 'green', text: this.translate.instant('Edge.Index.RETROFITTING.TARGET_TIME_SPECIFIED', { + targetDate: DateUtils.toLocaleDateString(date), + targetTime: date.toLocaleTimeString(), + }), + }; + } - // Round thisValue to Integer when decimal place equals 0 - if (thisValue > 0) { - return formatNumber(thisValue, 'de', '1.0-1') + " kW"; // TODO get locale dynamically + if (essIsBlocking != null && essIsBlocking == 1) { + // If ess reached targetSoc + return { color: 'green', text: this.translate.instant('Edge.Index.RETROFITTING.REACHED_TARGET_SOC') }; - } else if (thisValue == 0 && isCharge) { - // if thisValue is 0, then show only when charge and not discharge - return '0 kW'; + } else if ((essIsCharging != null && essIsCharging == 1) || (essIsDischarging != null && essIsDischarging == 1)) { + // If Ess is charging to or discharging to the targetSoc + return { color: 'orange', text: this.translate.instant('Edge.Index.RETROFITTING.PREPARING') }; } else { - return '-'; + return null; } } - async presentModal() { - const modal = await this.modalController.create({ - component: StorageModalComponent, - componentProps: { - edge: this.edge, - config: this.config, - component: this.component, - essComponents: this.essComponents, - chargerComponents: this.chargerComponents, - singleComponent: this.component, - }, - }); - return await modal.present(); - } } diff --git a/ui/src/app/edge/live/delayedselltogrid/delayedselltogrid.component.ts b/ui/src/app/edge/live/delayedselltogrid/delayedselltogrid.component.ts index 5f14f0149a4..13e4c3dd1b9 100644 --- a/ui/src/app/edge/live/delayedselltogrid/delayedselltogrid.component.ts +++ b/ui/src/app/edge/live/delayedselltogrid/delayedselltogrid.component.ts @@ -14,11 +14,11 @@ export class DelayedSellToGridComponent implements OnInit, OnDestroy { private static readonly SELECTOR = "delayedselltogrid"; - @Input() public componentId: string; + @Input({ required: true }) public componentId!: string; - public edge: Edge = null; + public edge: Edge | null = null; - public component: EdgeConfig.Component = null; + public component: EdgeConfig.Component | null = null; constructor( private route: ActivatedRoute, diff --git a/ui/src/app/edge/live/delayedselltogrid/modal/modal.component.ts b/ui/src/app/edge/live/delayedselltogrid/modal/modal.component.ts index c9a4efbb5b5..ef45722f679 100644 --- a/ui/src/app/edge/live/delayedselltogrid/modal/modal.component.ts +++ b/ui/src/app/edge/live/delayedselltogrid/modal/modal.component.ts @@ -11,10 +11,10 @@ import { Edge, EdgeConfig, Service, Websocket } from '../../../../shared/shared' }) export class DelayedSellToGridModalComponent implements OnInit { - @Input() protected component: EdgeConfig.Component; - @Input() protected edge: Edge; - private static readonly SELECTOR = "delayedselltogrid-modal"; + @Input({ required: true }) protected component!: EdgeConfig.Component; + @Input({ required: true }) protected edge!: Edge; + public formGroup: FormGroup; public loading: boolean = false; diff --git a/ui/src/app/edge/live/energymonitor/chart/chart.component.ts b/ui/src/app/edge/live/energymonitor/chart/chart.component.ts index be5fe2c85d0..042fb641643 100644 --- a/ui/src/app/edge/live/energymonitor/chart/chart.component.ts +++ b/ui/src/app/edge/live/energymonitor/chart/chart.component.ts @@ -3,7 +3,7 @@ import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@ang import { fromEvent, Subject } from 'rxjs'; import { debounceTime, delay, takeUntil } from 'rxjs/operators'; import { Service } from 'src/app/shared/shared'; -import { CurrentData } from '../../../../shared/edge/currentdata'; +import { CurrentData } from '../../../../shared/components/edge/currentdata'; import { ConsumptionSectionComponent } from './section/consumption.component'; import { GridSectionComponent } from './section/grid.component'; import { ProductionSectionComponent } from './section/production.component'; @@ -15,8 +15,6 @@ import { StorageSectionComponent } from './section/storage.component'; }) export class EnergymonitorChartComponent implements OnInit, OnDestroy { - public readonly spinnerId = "energymonitor"; - @ViewChild(ConsumptionSectionComponent, { static: true }) public consumptionSection: ConsumptionSectionComponent; @@ -32,22 +30,25 @@ export class EnergymonitorChartComponent implements OnInit, OnDestroy { @ViewChild('energymonitorChart', { static: true }) private chartDiv: ElementRef; - @Input() - set currentData(currentData: CurrentData) { - this.service.stopSpinner(this.spinnerId); - this.updateCurrentData(currentData); - } - public translation: string; public width: number; public height: number; public gridMode: number; + public readonly spinnerId = "energymonitor"; + private ngUnsubscribe: Subject = new Subject(); + + constructor( private service: Service, ) { } + @Input() + set currentData(currentData: CurrentData) { + this.service.stopSpinner(this.spinnerId); + this.updateCurrentData(currentData); + } ngOnInit() { this.service.startSpinner(this.spinnerId); diff --git a/ui/src/app/edge/live/energymonitor/chart/section/abstractsection.component.ts b/ui/src/app/edge/live/energymonitor/chart/section/abstractsection.component.ts index 9acc93e8d58..869a8d30bf9 100644 --- a/ui/src/app/edge/live/energymonitor/chart/section/abstractsection.component.ts +++ b/ui/src/app/edge/live/energymonitor/chart/section/abstractsection.component.ts @@ -1,6 +1,6 @@ // @ts-strict-ignore import { DefaultTypes } from '../../../../../shared/service/defaulttypes'; -import { Service } from 'src/app/shared/shared'; +import { GridMode, Service } from 'src/app/shared/shared'; import { TranslateService } from '@ngx-translate/core'; import * as d3 from 'd3'; @@ -59,6 +59,7 @@ export interface SvgEnergyFlow { export class EnergyFlow { public points: string = "0,0 0,0"; public animationPoints: string = "0,0 0,0"; + public state: "one" | "two" | "three" = "one"; constructor( public radius: number, @@ -99,8 +100,6 @@ export class EnergyFlow { } } - public state: "one" | "two" | "three" = "one"; - public switchState() { if (this.state == 'one') { this.state = 'two'; @@ -116,18 +115,12 @@ export class EnergyFlow { } } -export enum GridMode { - "undefined", - "ongrid", - "offgrid", -} - export abstract class AbstractSection { public fillRef: string = ""; public valuePath: string = ""; public outlinePath: string = ""; - public energyFlow: EnergyFlow = null; + public energyFlow: EnergyFlow | null = null; public square: SvgSquare; public squarePosition: SvgSquarePosition; public name: string = ""; @@ -141,15 +134,16 @@ export abstract class AbstractSection { protected height: number = 0; protected width: number = 0; protected gridMode: GridMode; + protected restrictionMode: number; - private lastCurrentData: DefaultTypes.Summary = null; + private lastCurrentData: DefaultTypes.Summary | null = null; constructor( translateName: string, protected direction: "left" | "right" | "down" | "up" = "left", public color: string, protected translate: TranslateService, - service: Service, + protected service: Service, widgetClass: string, ) { this.sectionId = translateName; @@ -164,6 +158,49 @@ export abstract class AbstractSection { }); } + /** + * Updates the Values for this Section. + * + * @param sum the CurrentData.Summary + */ + public updateCurrentData(sum: DefaultTypes.Summary): void { + this.lastCurrentData = sum; + this._updateCurrentData(sum); + } + + /** + * This method is called on every change of resolution of the browser window. + */ + public updateOnWindowResize(outerRadius: number, innerRadius: number, height: number, width: number) { + this.outerRadius = outerRadius; + this.innerRadius = innerRadius; + this.height = height; + this.width = width; + const outlineArc = this.getArc() + .startAngle(this.deg2rad(this.getStartAngle())) + .endAngle(this.deg2rad(this.getEndAngle())); + this.outlinePath = outlineArc(); + + /** + * imaginary positioning "square" + */ + this.square = this.getSquare(innerRadius); + this.squarePosition = this.getSquarePosition(this.square, innerRadius); + /** + * energy flow rectangle + */ + const availableInnerRadius = innerRadius - this.square.image.y - this.square.image.length - 10; + this.energyFlow = this.initEnergyFlow(availableInnerRadius); + + // now update also the value specific elements + if (this.lastCurrentData) { + this.updateCurrentData(this.lastCurrentData); + } + + // update correct positioning for Image + Text + this.setElementHeight(); + } + /** * attr.fill="{{ fillRef }}" has to be specific if using Safari (IOS Browser) * otherwise Energymonitor wont be displayed correctly @@ -177,61 +214,23 @@ export abstract class AbstractSection { } } - /** - * Gets the Start-Angle in Degree - */ - protected abstract getStartAngle(): number; - - /** - * Gets the End-Angle in Degree - */ - protected abstract getEndAngle(): number; - - /** - * Gets the Ratio-Type of this Section - */ - protected abstract getRatioType(): Ratio; - - /** - * Gets the SVG for EnergyFlow - * - * @param ratio the ratio of the value [-1,1] * scale factor - * @param radius the available radius - */ - protected abstract getSvgEnergyFlow(ratio: number, radius: number): SvgEnergyFlow; - - /** - * Gets the SVG for EnergyFlowAnimation - * - * @param ratio the ratio of the value [-1,1] * scale factor - * @param radius the available radius - */ - protected abstract getSvgAnimationEnergyFlow(ratio: number, radius: number): SvgEnergyFlow; - - /** - * Updates the Values for this Section. - * - * @param sum the CurrentData.Summary - */ - public updateCurrentData(sum: DefaultTypes.Summary): void { - this.lastCurrentData = sum; - this._updateCurrentData(sum); + protected getArc(): any { + return d3.arc() + .innerRadius(this.innerRadius) + .outerRadius(this.outerRadius); } - /** - * Updates the Values for this Section. Should internally call updateSectionData(). - * - * @param sum the CurrentData.Summary - */ - protected abstract _updateCurrentData(sum: DefaultTypes.Summary): void; + protected deg2rad(value: number): number { + return value * (Math.PI / 180); + } /** - * This method is called on every change of values. - * - * @param valueAbsolute the absolute value of the Section - * @param valueRatio the relative value of the Section in [-1,1] - * @param sumRatio the relative value of the Section compared to the total System.InPower/OutPower [0,1] - */ + * This method is called on every change of values. + * + * @param valueAbsolute the absolute value of the Section + * @param valueRatio the relative value of the Section in [-1,1] + * @param sumRatio the relative value of the Section compared to the total System.InPower/OutPower [0,1] + */ protected updateSectionData(valueAbsolute: number, valueRatio: number, sumRatio: number) { if (!this.isEnabled) { return; @@ -278,46 +277,13 @@ export abstract class AbstractSection { this.energyFlow.update(svgEnergyFlow, svgAnimationEnergyFlow); } - /** - * This method is called on every change of resolution of the browser window. - */ - public updateOnWindowResize(outerRadius: number, innerRadius: number, height: number, width: number) { - this.outerRadius = outerRadius; - this.innerRadius = innerRadius; - this.height = height; - this.width = width; - const outlineArc = this.getArc() - .startAngle(this.deg2rad(this.getStartAngle())) - .endAngle(this.deg2rad(this.getEndAngle())); - this.outlinePath = outlineArc(); - - /** - * imaginary positioning "square" - */ - this.square = this.getSquare(innerRadius); - this.squarePosition = this.getSquarePosition(this.square, innerRadius); - /** - * energy flow rectangle - */ - const availableInnerRadius = innerRadius - this.square.image.y - this.square.image.length - 10; - this.energyFlow = this.initEnergyFlow(availableInnerRadius); - - // now update also the value specific elements - if (this.lastCurrentData) { - this.updateCurrentData(this.lastCurrentData); - } - - // update correct positioning for Image + Text - this.setElementHeight(); - } - /** * calculate... * ...length of square and image; * ...x and y of text and image; * ...fontsize of text; */ - private getSquare(innerRadius: any): SvgSquare { + private getSquare(innerRadius: number): SvgSquare { const width = innerRadius / 2.5; const textSize = width / 4; @@ -341,20 +307,47 @@ export abstract class AbstractSection { ); } + /** + * Gets the Start-Angle in Degree + */ + protected abstract getStartAngle(): number; + + /** + * Gets the End-Angle in Degree + */ + protected abstract getEndAngle(): number; + + /** + * Gets the Ratio-Type of this Section + */ + protected abstract getRatioType(): Ratio; + + /** + * Gets the SVG for EnergyFlow + * + * @param ratio the ratio of the value [-1,1] * scale factor + * @param radius the available radius + */ + protected abstract getSvgEnergyFlow(ratio: number, radius: number): SvgEnergyFlow; + + /** + * Gets the SVG for EnergyFlowAnimation + * + * @param ratio the ratio of the value [-1,1] * scale factor + * @param radius the available radius + */ + protected abstract getSvgAnimationEnergyFlow(ratio: number, radius: number): SvgEnergyFlow; + + /** + * Updates the Values for this Section. Should internally call updateSectionData(). + * + * @param sum the CurrentData.Summary + */ + protected abstract _updateCurrentData(sum: DefaultTypes.Summary): void; protected abstract getImagePath(): string; protected abstract getSquarePosition(rect: SvgSquare, innerRadius: number): SvgSquarePosition; protected abstract getValueText(value: number): string; protected abstract initEnergyFlow(radius: number): EnergyFlow; protected abstract setElementHeight(); - protected getArc(): any { - return d3.arc() - .innerRadius(this.innerRadius) - .outerRadius(this.outerRadius); - } - - protected deg2rad(value: number): number { - return value * (Math.PI / 180); - } - } diff --git a/ui/src/app/edge/live/energymonitor/chart/section/consumption.component.ts b/ui/src/app/edge/live/energymonitor/chart/section/consumption.component.ts index 5fc5be23e8c..642f1725a2d 100644 --- a/ui/src/app/edge/live/energymonitor/chart/section/consumption.component.ts +++ b/ui/src/app/edge/live/energymonitor/chart/section/consumption.component.ts @@ -42,6 +42,10 @@ export class ConsumptionSectionComponent extends AbstractSection implements OnIn this.unitpipe = unitpipe; } + get stateName() { + return this.showAnimation ? 'show' : 'hide'; + } + ngOnInit() { this.adjustFillRefbyBrowser(); } @@ -53,8 +57,8 @@ export class ConsumptionSectionComponent extends AbstractSection implements OnIn this.animationTrigger = true; } - get stateName() { - return this.showAnimation ? 'show' : 'hide'; + ngOnDestroy() { + clearInterval(this.startAnimation); } protected getStartAngle(): number { @@ -156,7 +160,4 @@ export class ConsumptionSectionComponent extends AbstractSection implements OnIn return p; } - ngOnDestroy() { - clearInterval(this.startAnimation); - } } diff --git a/ui/src/app/edge/live/energymonitor/chart/section/grid.component.ts b/ui/src/app/edge/live/energymonitor/chart/section/grid.component.ts index a4ddb265ebc..e5183e215c4 100644 --- a/ui/src/app/edge/live/energymonitor/chart/section/grid.component.ts +++ b/ui/src/app/edge/live/energymonitor/chart/section/grid.component.ts @@ -3,8 +3,9 @@ import { animate, state, style, transition, trigger } from '@angular/animations' import { Component, OnDestroy, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { UnitvaluePipe } from 'src/app/shared/pipe/unitvalue/unitvalue.pipe'; -import { DefaultTypes } from '../../../../../shared/service/defaulttypes'; -import { Service, Utils } from '../../../../../shared/shared'; +import { DefaultTypes } from 'src/app/shared/service/defaulttypes'; +import { Icon } from 'src/app/shared/type/widget'; +import { CurrentData, EdgeConfig, GridMode, Service, Utils } from '../../../../../shared/shared'; import { AbstractSection, EnergyFlow, Ratio, SvgEnergyFlow, SvgSquare, SvgSquarePosition } from './abstractsection.component'; @Component({ @@ -39,13 +40,14 @@ import { AbstractSection, EnergyFlow, Ratio, SvgEnergyFlow, SvgSquare, SvgSquare }) export class GridSectionComponent extends AbstractSection implements OnInit, OnDestroy { + public buyAnimationTrigger: boolean = false; + public sellAnimationTrigger: boolean = false; + private unitpipe: UnitvaluePipe; // animation variable to stop animation on destroy private startAnimation = null; private showBuyAnimation = false; private showSellAnimation = false; - public buyAnimationTrigger: boolean = false; - public sellAnimationTrigger: boolean = false; constructor( translate: TranslateService, @@ -56,10 +58,50 @@ export class GridSectionComponent extends AbstractSection implements OnInit, OnD this.unitpipe = unitpipe; } + get stateNameBuy() { + return this.showBuyAnimation ? 'show' : 'hide'; + } + + get stateNameSell() { + return this.showSellAnimation ? 'show' : 'hide'; + } + + public static getCurrentGridIcon(currentData: CurrentData): Icon { + const gridMode = currentData.allComponents['_sum/GridMode']; + const restrictionMode = currentData.allComponents['ctrlEssLimiter14a0/RestrictionMode']; + if (gridMode === GridMode.OFF_GRID) { + return { + color: 'dark', + name: 'oe-offgrid', + size: '', + }; + } + if (restrictionMode === 1) { + return { + color: 'dark', + name: 'oe-grid-restriction', + size: '', + }; + } + return { + color: 'dark', + name: 'oe-grid', + size: '', + }; + } + + public static isControllerEnabled(config: EdgeConfig, factoryId: string): boolean { + return config.getComponentsByFactory(factoryId).filter(component => component.isEnabled).length > 0; + } + ngOnInit() { this.adjustFillRefbyBrowser(); } + ngOnDestroy() { + clearInterval(this.startAnimation); + } + toggleBuyAnimation() { this.startAnimation = setInterval(() => { this.showBuyAnimation = !this.showBuyAnimation; @@ -76,26 +118,6 @@ export class GridSectionComponent extends AbstractSection implements OnInit, OnD this.sellAnimationTrigger = true; } - get stateNameBuy() { - return this.showBuyAnimation ? 'show' : 'hide'; - } - - get stateNameSell() { - return this.showSellAnimation ? 'show' : 'hide'; - } - - protected getStartAngle(): number { - return 226; - } - - protected getEndAngle(): number { - return 314; - } - - protected getRatioType(): Ratio { - return 'Negative and Positive [-1,1]'; - } - public _updateCurrentData(sum: DefaultTypes.Summary): void { // only reacts to kW values (50 W => 0.1 kW rounded) if (sum.grid.buyActivePower && sum.grid.buyActivePower > 49) { @@ -142,6 +164,18 @@ export class GridSectionComponent extends AbstractSection implements OnInit, OnD } } + protected getStartAngle(): number { + return 226; + } + + protected getEndAngle(): number { + return 314; + } + + protected getRatioType(): Ratio { + return 'Negative and Positive [-1,1]'; + } + protected getSquarePosition(square: SvgSquare, innerRadius: number): SvgSquarePosition { const x = (innerRadius - 5) * (-1); const y = (square.length / 2) * (-1); @@ -149,11 +183,12 @@ export class GridSectionComponent extends AbstractSection implements OnInit, OnD } protected getImagePath(): string { - if (this.gridMode == 2) { + if (this.gridMode === GridMode.OFF_GRID) { return "icon/offgrid.svg"; - } else { - return "icon/grid.svg"; + } else if (this.restrictionMode === 1) { + return "icon/gridRestriction.svg"; } + return "icon/grid.svg"; } protected getValueText(value: number): string { @@ -222,8 +257,4 @@ export class GridSectionComponent extends AbstractSection implements OnInit, OnD } return p; } - - ngOnDestroy() { - clearInterval(this.startAnimation); - } } diff --git a/ui/src/app/edge/live/energymonitor/chart/section/production.component.ts b/ui/src/app/edge/live/energymonitor/chart/section/production.component.ts index 655204788d6..e3615983827 100644 --- a/ui/src/app/edge/live/energymonitor/chart/section/production.component.ts +++ b/ui/src/app/edge/live/energymonitor/chart/section/production.component.ts @@ -42,10 +42,18 @@ export class ProductionSectionComponent extends AbstractSection implements OnIni this.unitpipe = unitpipe; } + get stateName() { + return this.showAnimation ? 'show' : 'hide'; + } + ngOnInit() { this.adjustFillRefbyBrowser(); } + ngOnDestroy() { + clearInterval(this.startAnimation); + } + toggleAnimation() { this.startAnimation = setInterval(() => { this.showAnimation = !this.showAnimation; @@ -53,10 +61,6 @@ export class ProductionSectionComponent extends AbstractSection implements OnIni this.animationTrigger = true; } - get stateName() { - return this.showAnimation ? 'show' : 'hide'; - } - protected getStartAngle(): number { return 316; } @@ -156,7 +160,4 @@ export class ProductionSectionComponent extends AbstractSection implements OnIni return p; } - ngOnDestroy() { - clearInterval(this.startAnimation); - } } diff --git a/ui/src/app/edge/live/energymonitor/chart/section/storage.component.ts b/ui/src/app/edge/live/energymonitor/chart/section/storage.component.ts index 0391ff3990e..62f95103b1a 100644 --- a/ui/src/app/edge/live/energymonitor/chart/section/storage.component.ts +++ b/ui/src/app/edge/live/energymonitor/chart/section/storage.component.ts @@ -2,6 +2,7 @@ import { animate, state, style, transition, trigger } from '@angular/animations'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; +import { CurrentData } from 'src/app/shared/components/edge/currentdata'; import { UnitvaluePipe } from 'src/app/shared/pipe/unitvalue/unitvalue.pipe'; import { DefaultTypes } from '../../../../../shared/service/defaulttypes'; import { Service, Utils } from '../../../../../shared/shared'; @@ -39,29 +40,41 @@ import { AbstractSection, EnergyFlow, Ratio, SvgEnergyFlow, SvgSquare, SvgSquare }) export class StorageSectionComponent extends AbstractSection implements OnInit, OnDestroy { + public chargeAnimationTrigger: boolean = false; + public dischargeAnimationTrigger: boolean = false; + public svgStyle: string; private socValue: number; private unitpipe: UnitvaluePipe; // animation variable to stop animation on destroy private startAnimation = null; private showChargeAnimation: boolean = false; private showDischargeAnimation: boolean = false; - public chargeAnimationTrigger: boolean = false; - public dischargeAnimationTrigger: boolean = false; - public svgStyle: string; constructor( translate: TranslateService, - service: Service, + protected override service: Service, unitpipe: UnitvaluePipe, ) { super('Edge.Index.Energymonitor.storage', "down", "#009846", translate, service, "Storage"); this.unitpipe = unitpipe; } + get stateNameCharge() { + return this.showChargeAnimation ? 'show' : 'hide'; + } + + get stateNameDischarge() { + return this.showDischargeAnimation ? 'show' : 'hide'; + } + ngOnInit() { this.adjustFillRefbyBrowser(); } + ngOnDestroy() { + clearInterval(this.startAnimation); + } + toggleCharge() { this.startAnimation = setInterval(() => { this.showChargeAnimation = !this.showChargeAnimation; @@ -78,12 +91,65 @@ export class StorageSectionComponent extends AbstractSection implements OnInit, this.dischargeAnimationTrigger = true; } - get stateNameCharge() { - return this.showChargeAnimation ? 'show' : 'hide'; - } + public _updateCurrentData(sum: DefaultTypes.Summary): void { - get stateNameDischarge() { - return this.showDischargeAnimation ? 'show' : 'hide'; + this.service.getCurrentEdge() + .then(async edge => { + edge.currentData.subscribe(curr => { + const maxApparentPower = edge.isVersionAtLeast('2024.2.2') + ? curr.channel['_sum/EssMaxDischargePower'] + : curr.channel['_sum/EssMaxApparentPower']; + const minDischargePower = edge.isVersionAtLeast('2024.2.2') + ? curr.channel['_sum/EssMinDischargePower'] + : curr.channel['_sum/EssMaxApparentPower']; + + sum.storage.powerRatio = CurrentData.getEssPowerRatio(maxApparentPower, minDischargePower, sum.storage.effectivePower); + + if (sum.storage.effectiveChargePower != null) { + let arrowIndicate: number; + // only reacts to kW values (50 W => 0.1 kW rounded) + if (sum.storage.effectiveChargePower > 49) { + if (!this.chargeAnimationTrigger) { + this.toggleCharge(); + } + arrowIndicate = Utils.divideSafely(sum.storage.effectiveChargePower, sum.system.totalPower); + } else { + arrowIndicate = 0; + } + + this.name = this.translate.instant('Edge.Index.Energymonitor.storageCharge'); + super.updateSectionData( + sum.storage.effectiveChargePower, + sum.storage.powerRatio, + arrowIndicate); + } else if (sum.storage.effectiveDischargePower != null) { + let arrowIndicate: number; + if (sum.storage.effectiveDischargePower > 49) { + if (!this.dischargeAnimationTrigger) { + this.toggleDischarge(); + } + arrowIndicate = Utils.multiplySafely( + Utils.divideSafely(sum.storage.effectiveDischargePower, sum.system.totalPower), -1); + } else { + arrowIndicate = 0; + } + this.name = this.translate.instant('Edge.Index.Energymonitor.storageDischarge'); + super.updateSectionData( + sum.storage.effectiveDischargePower, + sum.storage.powerRatio, + arrowIndicate); + } else { + this.name = this.translate.instant('Edge.Index.Energymonitor.storage'); + super.updateSectionData(null, null, null); + } + + this.socValue = sum.storage.soc; + if (this.square) { + this.square.image.image = "assets/img/" + this.getImagePath(); + this.svgStyle = 'storage-' + Utils.getStorageSocSegment(this.socValue); + } + }); + }); } protected getStartAngle(): number { @@ -98,52 +164,6 @@ export class StorageSectionComponent extends AbstractSection implements OnInit, return 'Negative and Positive [-1,1]'; } - public _updateCurrentData(sum: DefaultTypes.Summary): void { - if (sum.storage.effectiveChargePower != null) { - let arrowIndicate: number; - // only reacts to kW values (50 W => 0.1 kW rounded) - if (sum.storage.effectiveChargePower > 49) { - if (!this.chargeAnimationTrigger) { - this.toggleCharge(); - } - arrowIndicate = Utils.divideSafely(sum.storage.effectiveChargePower, sum.system.totalPower); - } else { - arrowIndicate = 0; - } - - this.name = this.translate.instant('Edge.Index.Energymonitor.storageCharge'); - super.updateSectionData( - sum.storage.effectiveChargePower, - sum.storage.powerRatio, - arrowIndicate); - } else if (sum.storage.effectiveDischargePower != null) { - let arrowIndicate: number; - if (sum.storage.effectiveDischargePower > 49) { - if (!this.dischargeAnimationTrigger) { - this.toggleDischarge(); - } - arrowIndicate = Utils.multiplySafely( - Utils.divideSafely(sum.storage.effectiveDischargePower, sum.system.totalPower), -1); - } else { - arrowIndicate = 0; - } - this.name = this.translate.instant('Edge.Index.Energymonitor.storageDischarge'); - super.updateSectionData( - sum.storage.effectiveDischargePower, - sum.storage.powerRatio, - arrowIndicate); - } else { - this.name = this.translate.instant('Edge.Index.Energymonitor.storage'); - super.updateSectionData(null, null, null); - } - - this.socValue = sum.storage.soc; - if (this.square) { - this.square.image.image = "assets/img/" + this.getImagePath(); - this.svgStyle = 'storage-' + Utils.getStorageSocSegment(this.socValue); - } - } - protected getSquarePosition(square: SvgSquare, innerRadius: number): SvgSquarePosition { const x = (square.length / 2) * (-1); const y = innerRadius - 5 - square.length; @@ -218,7 +238,4 @@ export class StorageSectionComponent extends AbstractSection implements OnInit, return p; } - ngOnDestroy() { - clearInterval(this.startAnimation); - } } diff --git a/ui/src/app/edge/live/energymonitor/energymonitor.component.ts b/ui/src/app/edge/live/energymonitor/energymonitor.component.ts index ef8122fb281..d696a7497ba 100644 --- a/ui/src/app/edge/live/energymonitor/energymonitor.component.ts +++ b/ui/src/app/edge/live/energymonitor/energymonitor.component.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ChannelAddress, Edge, Service, Websocket } from '../../../shared/shared'; @@ -10,8 +9,7 @@ import { ChannelAddress, Edge, Service, Websocket } from '../../../shared/shared export class EnergymonitorComponent implements OnInit, OnDestroy { private static readonly SELECTOR = "energymonitor"; - - public edge: Edge = null; + protected edge: Edge | null = null; constructor( private service: Service, @@ -22,9 +20,15 @@ export class EnergymonitorComponent implements OnInit, OnDestroy { ngOnInit() { this.service.setCurrentComponent('', this.route).then(edge => { this.edge = edge; + + const essMinMaxChannels = this.edge.isVersionAtLeast('2024.2.2') + ? [new ChannelAddress('_sum', 'EssMinDischargePower'), new ChannelAddress('_sum', 'EssMaxDischargePower')] + : [new ChannelAddress('_sum', 'EssMaxApparentPower')]; + edge.subscribeChannels(this.websocket, EnergymonitorComponent.SELECTOR, [ // Ess - new ChannelAddress('_sum', 'EssSoc'), new ChannelAddress('_sum', 'EssActivePower'), new ChannelAddress('_sum', 'EssMaxApparentPower'), + new ChannelAddress('_sum', 'EssSoc'), new ChannelAddress('_sum', 'EssActivePower'), + ...essMinMaxChannels, // Grid new ChannelAddress('_sum', 'GridActivePower'), new ChannelAddress('_sum', 'GridMinActivePower'), new ChannelAddress('_sum', 'GridMaxActivePower'), new ChannelAddress('_sum', 'GridMode'), // Production diff --git a/ui/src/app/edge/live/live.component.ts b/ui/src/app/edge/live/live.component.ts index 8363d1c811d..07ef40f7c93 100644 --- a/ui/src/app/edge/live/live.component.ts +++ b/ui/src/app/edge/live/live.component.ts @@ -1,9 +1,8 @@ -// @ts-strict-ignore import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { RefresherCustomEvent } from '@ionic/angular'; import { Subject } from 'rxjs'; -import { DataService } from 'src/app/shared/genericComponents/shared/dataservice'; +import { DataService } from 'src/app/shared/components/shared/dataservice'; import { Edge, EdgeConfig, Service, Utils, Websocket, Widgets } from 'src/app/shared/shared'; @Component({ @@ -12,11 +11,10 @@ import { Edge, EdgeConfig, Service, Utils, Websocket, Widgets } from 'src/app/sh }) export class LiveComponent implements OnInit, OnDestroy { - public edge: Edge = null; - public config: EdgeConfig = null; - public widgets: Widgets = null; + public edge: Edge | null = null; + public config: EdgeConfig | null = null; + public widgets: Widgets | null = null; private stopOnDestroy: Subject = new Subject(); - protected handleRefresh: (ev: RefresherCustomEvent) => void = (ev: RefresherCustomEvent) => this.dataService.refresh(ev); constructor( private route: ActivatedRoute, @@ -41,4 +39,6 @@ export class LiveComponent implements OnInit, OnDestroy { this.stopOnDestroy.next(); this.stopOnDestroy.complete(); } + + protected handleRefresh: (ev: RefresherCustomEvent) => void = (ev: RefresherCustomEvent) => this.dataService.refresh(ev); } diff --git a/ui/src/app/edge/live/livedataservice.ts b/ui/src/app/edge/live/livedataservice.ts index 4bfbaaf98ac..268b392bf72 100644 --- a/ui/src/app/edge/live/livedataservice.ts +++ b/ui/src/app/edge/live/livedataservice.ts @@ -3,7 +3,7 @@ import { Directive, Inject, OnDestroy } from "@angular/core"; import { takeUntil } from "rxjs/operators"; import { v4 as uuidv4 } from 'uuid'; -import { DataService } from "../../shared/genericComponents/shared/dataservice"; +import { DataService } from "../../shared/components/shared/dataservice"; import { ChannelAddress, Edge, Service, Websocket } from "../../shared/shared"; import { RefresherCustomEvent } from "@ionic/angular"; @@ -60,6 +60,6 @@ export class LiveDataService extends DataService implements OnDestroy { setTimeout(() => { this.edge.subscribeChannels(this.websocket, "", this.subscribedChannelAddresses); ev.target.complete(); - }, 1000); + }, 2000); } } diff --git a/ui/src/app/edge/settings/alerting/alerting.component.ts b/ui/src/app/edge/settings/alerting/alerting.component.ts index fa73c4828b5..a9d378aa220 100644 --- a/ui/src/app/edge/settings/alerting/alerting.component.ts +++ b/ui/src/app/edge/settings/alerting/alerting.component.ts @@ -24,19 +24,18 @@ type DetailedAlertingSetting = AlertingSetting & { isOfflineActive: boolean, isF templateUrl: './alerting.component.html', }) export class AlertingComponent implements OnInit { - protected AlertingType = AlertingType; protected static readonly SELECTOR = "alerting"; + public readonly spinnerId: string = AlertingComponent.SELECTOR; protected readonly defaultValues: DefaultValues; + protected AlertingType = AlertingType; protected edge: Edge; protected error: Error; - protected currentUserInformation: DetailedAlertingSetting; protected currentUserForm: FormGroup; - protected otherUserInformation: AlertingSetting[]; protected otherUserForm: FormGroup; @@ -72,95 +71,6 @@ export class AlertingComponent implements OnInit { }); } - private setupCurrentUser(response: AlertingSettingResponse) { - this.currentUserInformation = this.asDetailedSettings(response); - this.currentUserForm = this.formBuilder.group({ - isOfflineActive: new FormControl(this.currentUserInformation.isOfflineActive), - offlineEdgeDelay: new FormControl(this.currentUserInformation.offlineEdgeDelay), - isFaultActive: new FormControl(this.currentUserInformation.isFaultActive), - faultEdgeDelay: new FormControl(this.currentUserInformation.faultEdgeDelay), - isWarningActive: new FormControl(this.currentUserInformation.isWarningActive), - warningEdgeDelay: new FormControl(this.currentUserInformation.warningEdgeDelay), - }); - } - - private setupOtherUsers(response: AlertingSettingResponse[]) { - if (!response || response.length == 0) { - return; - } - - this.otherUserInformation = []; - this.otherUserForm = new FormGroup({}); - - const sorted = this.sortedAlphabetically(response); - - sorted.forEach((r) => { - const setting: AlertingSetting = { - userLogin: r.userLogin, - offlineEdgeDelay: r.offlineEdgeDelay, - faultEdgeDelay: r.faultEdgeDelay, - warningEdgeDelay: r.warningEdgeDelay, - }; - - this.otherUserInformation.push(setting); - - this.otherUserForm.addControl(setting.userLogin, // - this.formBuilder.group({ - offlineEdgeDelay: new FormControl(setting.offlineEdgeDelay), - faultEdgeDelay: new FormControl(setting.faultEdgeDelay), - warningEdgeDelay: new FormControl(setting.warningEdgeDelay), - })); - }); - } - - private getValue(setting: AlertingSetting, type: AlertingType): number { - switch (type) { - case AlertingType.offline: - return setting.offlineEdgeDelay; - case AlertingType.fault: - return setting.faultEdgeDelay; - case AlertingType.warning: - return setting.warningEdgeDelay; - default: - return 0; - } - } - - private getValueOrDefault(setting: AlertingSetting, type: AlertingType) { - const val = this.getValue(setting, type); - return val <= 0 ? this.defaultValues[type][0].value : val; - } - - private asDetailedSettings(setting: AlertingSetting): DetailedAlertingSetting { - return { - userLogin: setting.userLogin, - offlineEdgeDelay: this.getValueOrDefault(setting, AlertingType.offline), - warningEdgeDelay: this.getValueOrDefault(setting, AlertingType.warning), - faultEdgeDelay: this.getValueOrDefault(setting, AlertingType.fault), - isOfflineActive: setting.offlineEdgeDelay > 0, - isFaultActive: setting.faultEdgeDelay > 0, - isWarningActive: setting.warningEdgeDelay > 0, - }; - } - - protected loadOtherUsers(): void { - console.info("TEST"); - } - - private sortedAlphabetically(userSettings: AlertingSettingResponse[]): AlertingSettingResponse[] { - return userSettings.sort((userA, userB) => { - return userA.userLogin.localeCompare(userB.userLogin, undefined, { sensitivity: 'accent' }); - }); - } - - private asDelayOptions(settings: number[]): Delay[] { - return settings.map(v => this.asDelayOption(v)); - } - - private asDelayOption(setting: number): Delay { - return { value: setting, label: this.getLabelToDelay(setting) }; - } - /** * get if given delay is valid */ @@ -254,6 +164,106 @@ export class AlertingComponent implements OnInit { this.sendRequestAndUpdate(request, dirtyformGroups); } + /** + * get if any userSettings has changed/is dirty. + * @returns true if any settings are changed, else false + */ + protected isDirty(): boolean { + if (this.error || !this.currentUserForm) { + return false; + } + return this.currentUserForm?.dirty || this.otherUserForm?.dirty; + } + + protected loadOtherUsers(): void { + console.info("TEST"); + } + + private setupCurrentUser(response: AlertingSettingResponse) { + this.currentUserInformation = this.asDetailedSettings(response); + this.currentUserForm = this.formBuilder.group({ + isOfflineActive: new FormControl(this.currentUserInformation.isOfflineActive), + offlineEdgeDelay: new FormControl(this.currentUserInformation.offlineEdgeDelay), + isFaultActive: new FormControl(this.currentUserInformation.isFaultActive), + faultEdgeDelay: new FormControl(this.currentUserInformation.faultEdgeDelay), + isWarningActive: new FormControl(this.currentUserInformation.isWarningActive), + warningEdgeDelay: new FormControl(this.currentUserInformation.warningEdgeDelay), + }); + } + + private setupOtherUsers(response: AlertingSettingResponse[]) { + if (!response || response.length == 0) { + return; + } + + this.otherUserInformation = []; + this.otherUserForm = new FormGroup({}); + + const sorted = this.sortedAlphabetically(response); + + sorted.forEach((r) => { + const setting: AlertingSetting = { + userLogin: r.userLogin, + offlineEdgeDelay: r.offlineEdgeDelay, + faultEdgeDelay: r.faultEdgeDelay, + warningEdgeDelay: r.warningEdgeDelay, + }; + + this.otherUserInformation.push(setting); + + this.otherUserForm.addControl(setting.userLogin, // + this.formBuilder.group({ + offlineEdgeDelay: new FormControl(setting.offlineEdgeDelay), + faultEdgeDelay: new FormControl(setting.faultEdgeDelay), + warningEdgeDelay: new FormControl(setting.warningEdgeDelay), + })); + }); + } + + private getValue(setting: AlertingSetting, type: AlertingType): number { + switch (type) { + case AlertingType.offline: + return setting.offlineEdgeDelay; + case AlertingType.fault: + return setting.faultEdgeDelay; + case AlertingType.warning: + return setting.warningEdgeDelay; + default: + return 0; + } + } + + private getValueOrDefault(setting: AlertingSetting, type: AlertingType) { + const val = this.getValue(setting, type); + return val <= 0 ? this.defaultValues[type][0].value : val; + } + + private asDetailedSettings(setting: AlertingSetting): DetailedAlertingSetting { + return { + userLogin: setting.userLogin, + offlineEdgeDelay: this.getValueOrDefault(setting, AlertingType.offline), + warningEdgeDelay: this.getValueOrDefault(setting, AlertingType.warning), + faultEdgeDelay: this.getValueOrDefault(setting, AlertingType.fault), + isOfflineActive: setting.offlineEdgeDelay > 0, + isFaultActive: setting.faultEdgeDelay > 0, + isWarningActive: setting.warningEdgeDelay > 0, + }; + } + + private sortedAlphabetically(userSettings: AlertingSettingResponse[]): AlertingSettingResponse[] { + return userSettings.sort((userA, userB) => { + return userA.userLogin.localeCompare(userB.userLogin, undefined, { sensitivity: 'accent' }); + }); + } + + private asDelayOptions(settings: number[]): Delay[] { + return settings.map(v => this.asDelayOption(v)); + } + + private asDelayOption(setting: number): Delay { + return { value: setting, label: this.getLabelToDelay(setting) }; + } + /** * send requests, show events using toasts and reset given formGroup if successful. * @param request stucture containing neccesary parameters @@ -298,15 +308,4 @@ export class AlertingComponent implements OnInit { private errorToast(errorType: string, errorMsg: string) { this.service.toast('[ ' + errorType + ' ]
    ' + errorMsg, 'danger'); } - - /** - * get if any userSettings has changed/is dirty. - * @returns true if any settings are changed, else false - */ - protected isDirty(): boolean { - if (this.error || !this.currentUserForm) { - return false; - } - return this.currentUserForm?.dirty || this.otherUserForm?.dirty; - } } diff --git a/ui/src/app/edge/settings/app/formly/option-group-picker/formly-option-group-picker.component.ts b/ui/src/app/edge/settings/app/formly/option-group-picker/formly-option-group-picker.component.ts index 0141269e76d..b707644d911 100644 --- a/ui/src/app/edge/settings/app/formly/option-group-picker/formly-option-group-picker.component.ts +++ b/ui/src/app/edge/settings/app/formly/option-group-picker/formly-option-group-picker.component.ts @@ -16,6 +16,31 @@ export class FormlyOptionGroupPickerComponent extends FieldType protected optionGroups: OptionGroup[] = []; + private static getOptionGroups(field: FormlyFieldConfig, optionGroupConfigs: OptionGroupConfig[]): OptionGroup[] { + return optionGroupConfigs.map(groupConfig => { + return { + group: groupConfig.group, + title: groupConfig.title, + options: groupConfig.options + .filter(optionConfig => { + // Remove hidden Options + return !(optionConfig.expressions?.hide?.(field) ?? optionConfig.hide ?? false); + }) + .map