Skip to content

Commit

Permalink
Merge branch 'release/2022.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Jan 1, 2022
2 parents e9e21e0 + 95fa343 commit 2313a00
Show file tree
Hide file tree
Showing 40 changed files with 444 additions and 140 deletions.
2 changes: 1 addition & 1 deletion .gradle-wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<!-- Changelog: https://github.com/apache/felix-dev/blob/master/webconsole/changelog.txt -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
<version>4.7.0</version>
<version>4.7.2</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Expand Down Expand Up @@ -245,12 +245,12 @@
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
<version>2.0.11</version>
<version>2.0.14</version>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-log4j1</artifactId>
<version>2.0.11</version>
<artifactId>pax-logging-log4j2</artifactId>
<version>2.0.14</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand All @@ -277,7 +277,7 @@
<!-- Used by io.openems.edge.timedata.rrd4j -->
<groupId>org.rrd4j</groupId>
<artifactId>rrd4j</artifactId>
<version>3.8</version>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
1 change: 0 additions & 1 deletion doc/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@
** xref:simulation/realtime.adoc[Real-Time Simulation]
** xref:simulation/ui-history.adoc[UI History Simulation]
* xref:documentation.adoc[Documentation]
* xref:randd.adoc[Research and Development]
* https://openems.github.io/openems.io/javadoc/[Javadoc]
9 changes: 4 additions & 5 deletions doc/modules/ROOT/pages/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ image::system-architecture.png[OpenEMS system architecture]

== Development guidelines

Development follows the https://de.wikipedia.org/wiki/Agile_Softwareentwicklung[Agile Manifesto icon:external-link[]] and is driven by the https://de.wikipedia.org/wiki/Scrum[Scrum icon:external-link[]] methodology.
The source code is available online at https://openems.io[openems.io] and on https://github.com/OpenEMS/openems[GitHub icon:github[]].
New versions are released after every Scrum Sprint and https://github.com/OpenEMS/openems/releases[tagged icon:github[]] accordingly.
Version numbers are built using the pattern `year.number of sprint`, e.g. version `2020.14.0` is the result of the 14th sprint in 2020.
New versions are released every month and https://github.com/OpenEMS/openems/releases[tagged icon:github[]] accordingly.
Version numbers are built using the pattern `year.month.0`, e.g. version `2022.1.0` is the release of January 2022. The patch version is always `0` and reserved for private distributions.
Git development follows the https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow[Gitflow Workflow], so the https://github.com/OpenEMS/openems/tree/master/[master branch icon:github[]] always holds the stable release, while active development is happening on the https://github.com/OpenEMS/openems/tree/develop[develop branch icon:github[]] or in separate feature branches.

For Edge and Backend Java development we recommend the https://www.eclipse.org/ide/[Eclipse IDE icon:external-link[]].
Expand All @@ -74,14 +73,14 @@ OpenEMS is funded by several federal and EU funding projects. If you are a devel
* OpenEMS Edge
* OpenEMS Backend

Copyright (C) 2016-2021 OpenEMS Association e.V., FENECON GmbH.
Copyright (C) 2016-2022 OpenEMS Association e.V., FENECON GmbH.

This product includes software developed at FENECON GmbH: you can
redistribute it and/or modify it under the terms of the https://github.com/OpenEMS/openems/blob/develop/LICENSE-EPL-2.0[Eclipse Public License version 2.0].

* OpenEMS UI

Copyright (C) 2016-2021 OpenEMS Association e.V., FENECON GmbH.
Copyright (C) 2016-2022 OpenEMS Association e.V., FENECON GmbH.

This product includes software developed at FENECON GmbH: you can
redistribute it and/or modify it under the terms of the https://github.com/OpenEMS/openems/blob/develop/LICENSE-AGPL-3.0[GNU Affero General Public License version 3].
70 changes: 0 additions & 70 deletions doc/modules/ROOT/pages/randd.adoc

This file was deleted.

5 changes: 2 additions & 3 deletions 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.22.0
(c) 2022 OpenEMS Association e.V.
Version 2022.1.0-SNAPSHOT
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down Expand Up @@ -43,4 +43,3 @@ include::component-communication/index.adoc[leveloffset=+1]
include::simulation/realtime.adoc[leveloffset=+1]
include::simulation/ui-history.adoc[leveloffset=+1]
include::documentation.adoc[leveloffset=+1]
include::randd.adoc[leveloffset=+1]
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down
10 changes: 5 additions & 5 deletions io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

-runbundles+: \
org.apache.felix.scr;startlevel=10,\
org.ops4j.pax.logging.pax-logging-log4j1;startlevel=12
org.ops4j.pax.logging.pax-logging-log4j2;startlevel=12

-runrequires: \
bnd.identity;id='org.ops4j.pax.logging.pax-logging-api',\
bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j1',\
bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j2',\
bnd.identity;id='org.osgi.service.jdbc',\
bnd.identity;id='org.apache.felix.http.jetty',\
bnd.identity;id='org.apache.felix.webconsole',\
Expand Down Expand Up @@ -74,11 +74,11 @@
org.apache.felix.inventory;version='[1.1.0,1.1.1)',\
org.apache.felix.metatype;version='[1.2.4,1.2.5)',\
org.apache.felix.scr;version='[2.1.30,2.1.31)',\
org.apache.felix.webconsole;version='[4.7.0,4.7.1)',\
org.apache.felix.webconsole;version='[4.7.2,4.7.3)',\
org.apache.felix.webconsole.plugins.ds;version='[2.1.0,2.1.1)',\
org.jsr-305;version='[3.0.2,3.0.3)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.0.11,2.0.12)',\
org.ops4j.pax.logging.pax-logging-log4j1;version='[2.0.11,2.0.12)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.0.14,2.0.15)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.14,2.0.15)',\
org.osgi.service.jdbc;version='[1.0.1,1.0.2)',\
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.2.0,1.2.1)',\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ void activate() {
try {
config = cm.getConfiguration("org.ops4j.pax.logging", null);
Dictionary<String, Object> properties = config.getProperties();
if (properties != null && properties.isEmpty()) {
if (properties == null || properties.isEmpty() || properties.get("log4j2.rootLogger.level") == null) {
Hashtable<String, Object> log4j = new Hashtable<>();
log4j.put("log4j.rootLogger", "INFO, CONSOLE, osgi:*");
log4j.put("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender");
log4j.put("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout");
log4j.put("log4j.appender.CONSOLE.layout.ConversionPattern",
"%d{ISO8601} [%-8.8t] %-5p [%-30.30c] %m%n");
log4j.put("log4j.logger.org.eclipse.osgi", "WARN");
log4j.put("log4j2.appender.console.type", "Console");
log4j.put("log4j2.appender.console.name", "console");
log4j.put("log4j2.appender.console.layout.type", "PatternLayout");
log4j.put("log4j2.appender.console.layout.pattern", "%d{ISO8601} [%-8.8t] %-5p [%-30.30c] %m%n");

log4j.put("log4j2.appender.paxosgi.type", "PaxOsgi");
log4j.put("log4j2.appender.paxosgi.name", "paxosgi");

log4j.put("log4j2.rootLogger.level", "INFO");
log4j.put("log4j2.rootLogger.appenderRef.console.ref", "console");
log4j.put("log4j2.rootLogger.appenderRef.paxosgi.ref", "paxosgi");
config.update(log4j);
}
} catch (IOException | SecurityException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,38 @@

public interface Field {

/**
* Gets the Field ID.
*
* @return the ID
*/
public String id();

/**
* Gets the Field index.
*
* @return the index
*/
public int index();

/**
* Gets the Field name.
*
* @return the name
*/
public String name();

/**
* Should this Field be queried?.
*
* @return true if yes
*/
public boolean isQuery();

/**
* Gets all fields that should be queried as a comma separated string.
*
* @param fields an array of {@link Field}s
* @return the String
*/
public static String getSqlQueryFields(Field[] fields) {
Expand Down Expand Up @@ -68,10 +89,12 @@ private EdgeDevice(String id, boolean query) {
}
}

@Override
public String id() {
return this.id;
}

@Override
public int index() {
return this.queryIndex;
}
Expand Down Expand Up @@ -120,10 +143,12 @@ private EdgeDeviceStatus(String id, boolean query) {
}
}

@Override
public String id() {
return this.id;
}

@Override
public int index() {
return this.queryIndex;
}
Expand Down Expand Up @@ -167,10 +192,12 @@ private EdgeConfigUpdate(String id, boolean query) {
}
}

@Override
public String id() {
return this.id;
}

@Override
public int index() {
return this.queryIndex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public int getOdooId() {
}

public String getApikey() {
return apikey;
return this.apikey;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
*/
public class Credentials {

/**
* Creates {@link Credentials} from a {@link Config}uration.
*
* @param config the configuration
* @return a new {@link Credentials} object
*/
public static Credentials fromConfig(Config config) {
return new Credentials(//
config.odooProtocol(), config.odooHost(), config.odooPort(), config.odooUid(), config.odooPassword(),
Expand All @@ -32,15 +38,15 @@ public Credentials(Protocol protocol, String host, int port, int uid, String pas
}

public Protocol getProtocol() {
return protocol;
return this.protocol;
}

public String getHost() {
return host;
return this.host;
}

public int getPort() {
return port;
return this.port;
}

public int getUid() {
Expand All @@ -52,7 +58,7 @@ public String getUrl() {
}

public String getPassword() {
return password;
return this.password;
}

public String getDatabase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ public FieldValue(Field field, T value) {
}

public Field getField() {
return field;
return this.field;
}

public T getValue() {
return value;
return this.value;
}

@Override
public String toString() {
String string;
if (value instanceof JsonElement) {
string = StringUtils.toShortString((JsonElement) value, 100);
} else if (value instanceof String) {
string = StringUtils.toShortString((String) value, 100);
if (this.value instanceof JsonElement) {
string = StringUtils.toShortString((JsonElement) this.value, 100);
} else if (this.value instanceof String) {
string = StringUtils.toShortString((String) this.value, 100);
} else {
string = this.value.toString();
}
Expand Down
Loading

0 comments on commit 2313a00

Please sign in to comment.