Skip to content

Commit

Permalink
Merge branch 'release/2021.14.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Aug 26, 2021
2 parents e7f9186 + 74ba88d commit 56d037e
Show file tree
Hide file tree
Showing 244 changed files with 11,507 additions and 4,461 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '15'
node-version: '16'

- name: Setup Cache for Node.js
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions cnf/build.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ buildpath: \
osgi.annotation;version='7.0.0',\
osgi.core;version='7.0.0',\
osgi.cmpn;version='7.0.0',\
slf4j.api;version='1.7.30',\
slf4j.api;version='1.7.32',\
com.google.guava;version='30.1.1',\
com.google.gson;version='2.8.7'

Expand All @@ -85,7 +85,7 @@ testpath: \
Edge_Controller_PVinverter;member=${filter;${p};io\.openems\.edge\.controller\.pvinverter\..*},\
Edge_Ess;member=${filter;${p};io\.openems\.edge\.ess\..*},\
Edge_Evcs;member=${filter;${p};io\.openems\.edge\.evcs\..*|io\.openems\.wrapper\.eu\.chargetime\.ocpp},\
Edge_Multiple;member=${filter;${p};io\.openems\.edge\.fenecon\..*|io\.openems\.edge\.goodwe|io\.openems\.edge\.kostal\.piko|io\.openems\.edge\.tesla\.*|io\.openems\.edge\.solaredge},\
Edge_Multiple;member=${filter;${p};io\.openems\.edge\.fenecon\..*|io\.openems\.edge\.goodwe|io\.openems\.edge\.kostal\.piko|io\.openems\.edge\.tesla\..*|io\.openems\.edge\.solaredge|io\.openems\.edge\.bosch\..*},\
Edge_IO;member=${filter;${p};io\.openems\.edge\.io\..*|io\.openems\.edge\.controller\.channelthreshold|io\.openems\.edge\.controller\.chp\..*|io\.openems\.edge\.controller\.highloadtimeslot},\
Edge_Meter;member=${filter;${p};io\.openems\.edge\.meter\..*},\
Edge_Predictor;member=${filter;${p};io\.openems\.edge\.predictor\..*},\
Expand Down
7 changes: 4 additions & 3 deletions cnf/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</module>
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
</module>
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowEscapesForControlCharacters" value="true"/>
Expand Down Expand Up @@ -140,9 +140,9 @@
</module>
<module name="Indentation">
<property name="severity" value="ignore"/>
<property name="arrayInitIndent" value="2"/>
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
<property name="arrayInitIndent" value="2"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="AbbreviationAsWordInName">
Expand All @@ -167,8 +167,8 @@
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationVariables"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<module name="JavadocTagContinuationIndentation"/>
Expand Down Expand Up @@ -201,6 +201,7 @@
</module>
<module name="MissingJavadocMethod">
<property name="allowedAnnotations" value="Before,Test,After,Override"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="ignoreMethodNamesRegex" value="doc|set.+"/>
<property name="tokens" value="METHOD_DEF,ANNOTATION_FIELD_DEF"/>
</module>
Expand Down
26 changes: 19 additions & 7 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@
<artifactId>org.apache.felix.eventadmin</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<!-- Apache Felix Framework -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>7.0.1</version>
</dependency>
<dependency>
<!-- Apache Felix Inventory -->
<!-- Changelog: https://github.com/apache/felix-dev/blob/master/inventory/changelog.txt -->
Expand Down Expand Up @@ -208,11 +214,6 @@
<artifactId>org.eclipse.paho.mqttv5.client</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.16.300</version>
</dependency>
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
Expand All @@ -223,6 +224,17 @@
<artifactId>Java-WebSocket</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<!-- HTML processing -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.10.2</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.framework</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<groupId>org.msgpack</groupId>
<artifactId>msgpack-core</artifactId>
Expand Down Expand Up @@ -273,12 +285,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/single_document.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= OpenEMS - Open Energy Management System
ifndef::toc[]
(c) 2020 OpenEMS Association e.V.
Version 2021.13.0
Version 2021.14.0
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down
2 changes: 1 addition & 1 deletion io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-runfw: org.eclipse.osgi
-runfw: org.apache.felix.framework;version='[7.0.1,7.0.1]'
-runee: JavaSE-1.8
-runprovidedcapabilities: ${native_capability}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package io.openems.backend.common.jsonrpc.request;

import com.google.gson.JsonObject;

import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
import io.openems.common.jsonrpc.base.JsonrpcRequest;
import io.openems.common.utils.JsonUtils;

/**
* Adds a Edge to a User.
*
* <pre>
* {
* "jsonrpc": "2.0",
* "id": UUID,
* "method": "addEdgeToUser",
* "params": {
* "setupPassword": string
* }
* }
* </pre>
*/
public class AddEdgeToUserRequest extends JsonrpcRequest {

public static final String METHOD = "addEdgeToUser";

/**
* Create {@link AddEdgeToUserRequest} from a template {@link JsonrpcRequest}.
*
* @param r the template {@link JsonrpcRequest}
* @return the {@link AddEdgeToUserRequest}
* @throws OpenemsNamedException on parse error
*/
public static AddEdgeToUserRequest from(JsonrpcRequest r) throws OpenemsNamedException {
JsonObject p = r.getParams();
String setupPassword = JsonUtils.getAsString(p, "setupPassword");
return new AddEdgeToUserRequest(r, setupPassword);
}

private final String setupPassword;

public AddEdgeToUserRequest(String setupPassword) {
super(METHOD);
this.setupPassword = setupPassword;
}

private AddEdgeToUserRequest(JsonrpcRequest request, String setupPassword) {
super(request, METHOD);
this.setupPassword = setupPassword;
}

@Override
public JsonObject getParams() {
return JsonUtils.buildJsonObject() //
.addProperty("setupPassword", this.setupPassword) //
.build();
}

public String getSetupPassword() {
return this.setupPassword;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package io.openems.backend.common.jsonrpc.request;

import com.google.gson.JsonObject;

import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
import io.openems.common.jsonrpc.base.JsonrpcRequest;
import io.openems.common.utils.JsonUtils;

public class GetSetupProtocolRequest extends JsonrpcRequest {

public static final String METHOD = "getSetupProtocol";

/**
* Create {@link GetSetupProtocolRequest} from a template
* {@link JsonrpcRequest}.
*
* @param request the template {@link JsonrpcRequest}
* @return Created {@link GetSetupProtocolRequest}
*/
public static GetSetupProtocolRequest from(JsonrpcRequest request) throws OpenemsNamedException {
JsonObject params = request.getParams();

return new GetSetupProtocolRequest(request, JsonUtils.getAsInt(params, "setupProtocolId"));
}

private final int setupProtocolId;

private GetSetupProtocolRequest(JsonrpcRequest request, int setupProtocolId) {
super(request, METHOD);
this.setupProtocolId = setupProtocolId;
}

@Override
public JsonObject getParams() {
return JsonUtils.buildJsonObject() //
.addProperty("setupProtocolId", this.setupProtocolId) //
.build();
}

/**
* Gets the Setup Protocol ID.
*
* @return the Setup Protocol ID
*/
public int getSetupProtocolId() {
return this.setupProtocolId;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package io.openems.backend.common.jsonrpc.request;

import com.google.gson.JsonObject;

import io.openems.common.jsonrpc.base.JsonrpcRequest;

/**
* Gets the User Information.
*
* <pre>
* {
* "jsonrpc": "2.0",
* "id": UUID,
* "method": "getUserInformation",
* "params": {}
* }
* </pre>
*/
public class GetUserInformationRequest extends JsonrpcRequest {

public static final String METHOD = "getUserInformation";

/**
* Create {@link GetUserInformationRequest} from a template
* {@link JsonrpcRequest}.
*
* @param request the template {@link JsonrpcRequest}
* @return Created {@link GetUserInformationRequest}
*/
public static GetUserInformationRequest from(JsonrpcRequest request) {
return new GetUserInformationRequest(request);
}

private GetUserInformationRequest(JsonrpcRequest request) {
super(request, METHOD);
}

@Override
public JsonObject getParams() {
return new JsonObject();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package io.openems.backend.common.jsonrpc.request;

import com.google.gson.JsonObject;

import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
import io.openems.common.jsonrpc.base.JsonrpcRequest;
import io.openems.common.utils.JsonUtils;

public class RegisterUserRequest extends JsonrpcRequest {

public static final String METHOD = "registerUser";

/**
* Create {@link RegisterUserRequest} from a template {@link JsonrpcRequest}.
*
* @param request the template {@link JsonrpcRequest}
* @return Created {@link RegisterUserRequest}
*/
public static RegisterUserRequest from(JsonrpcRequest request) throws OpenemsNamedException {
JsonObject params = request.getParams();

return new RegisterUserRequest(request, JsonUtils.getAsJsonObject(params, "user"));
}

private final JsonObject jsonObject;

private RegisterUserRequest(JsonrpcRequest request, JsonObject jsonObject) {
super(request, METHOD);
this.jsonObject = jsonObject;
}

@Override
public JsonObject getParams() {
return this.jsonObject;
}

/**
* Gets the User Registration information as {@link JsonObject}.
*
* @return the {@link JsonObject}
*/
public JsonObject getJsonObject() {
return this.jsonObject;
}

}
Loading

0 comments on commit 56d037e

Please sign in to comment.