Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring v2 up-to-date #270

Draft
wants to merge 101 commits into
base: v2
Choose a base branch
from
Draft

Bring v2 up-to-date #270

wants to merge 101 commits into from

Conversation

TVolden
Copy link
Member

@TVolden TVolden commented Oct 17, 2023

No description provided.

robert-s-ubi and others added 30 commits June 9, 2023 14:26
Add a new sub-project named "ocpp-v2", intended to support all OCPP 2.x
versions in addition to OCPP 1.6, which it has a dependency on.

As a first step, add Java classes for all OCPP 2.0.1 messages and types
as well as client and server event handler interfaces and function
classes corresponding to the OCPP 2.0.1 "functional blocks."
Add support for auto-negotiation of the protocol version to use in the
WebSocket handshake, to offer and accept both OCPP 1.6 and OCPP 2.0.1.

To facilitate this, add multiple protocol capable variants of the
JSONClient, JSONServer, SessionFactory, WebSocketListener and
WebSocketTransmitter classes.

Add new IMultiProtocolClientAPI and IMultiProtocolServerAPI interfaces
which extend IClientAPI and IServerAPI, respectively, with the methods
needed for multi-protocol support. Specifically, methods to add feature
profiles (OCPP 1.6) and functions (OCPP 2.0.1 or later) for a specific
protocol version.

The IMultiProtocolClientAPI interface has an additional method to
retrieve the protocol version selected by the server.

The IMultiProtocolServerAPI interface has an additional method to
retrieve the port number the server is listening on, which is useful for
tests where the server is started with port number 0 to let it pick any
available port.

The MultiProtocolJSONClient and MultiProtocolJSONServer classes are
implementations of these two APIs:

- Both take a list of protocol versions to offer/accept as a constructor
  argument, instead of the OCPP 1.6 CoreProfile, which is now optional.
- The client has the new getProtocolVersion() API to retrieve the
  protocol version selected by the server after connecting.
- The server makes the selected protocol version available through the
  getProtocolVersion() API added to the SessionInformation object passed
  to the ServerEvents#newSession() API.

Refactor the existing Client, Server and Session classes and interfaces
to make the Session provide the feature repository to Client and Server,
to allow selecting or configuring it to the protocol version selected in
the WebSocket handshake. Adapt the tests to the removal of the feature
repository from the constructor parameters.

Add the protocol version to the feature repository interface and
implementation.

Add an exemplary unit test for serialization and deserialization of the
OCPP 2.0.1 BootNotificationRequest message. More unit tests should be
added.

Add integration tests for the protocol version auto-negotiation between
client and server.
Implement sending OCPP 2.0.1 RPC Framework Error Codes with corrected
spelling instead of the incorrect "legacy" OCPP 1.6 ones if connected
with a newer protocol version.

Implement sending CALLERROR responses with the newly added error codes
"MessageTypeNotSupported" and "RpcFrameworkError" if parsing fails at
RPC message level. Note that these error codes will be sent even if
connected with OCPP 1.6, where they were not specified. But this is
deemed better than providing no response at all like before.
... and use it in the MultiProtocolJSONClient
Add a new JSONConfiguration parameter "CONNECT_NON_BLOCKING" of Boolean
type, which, if true, causes the OCPP-J clients to make non-blocking
connect() and disconnect() calls to the underlying WebSocket library.

The completion of the connection or disconnection attempt will be
communicated via the callbacks in the ClientEvents object passed to the
OCPP library's connect() method. Note that a failed connection attempt
(connection refused or timeout, if configured) yields a call to the
connectionClosed() callback.
Bump the overall library version to 1.2, and all subproject versions and
dependencies to 1.2.0.
…tioncrash

validate via test and use suggested fix from #231
Add the missing array string length validation.
Add OCPP 2.0.1 and multi-protocol support
I was pointed out to me that the README needed an update now that we support version 2+.
Bump GH Actions versions and add Dependabot to monitor our dependencies.
Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.5 to 0.8.10.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](jacoco/jacoco@v0.8.5...v0.8.10)

---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.java-websocket:Java-WebSocket](https://github.com/TooTallNate/Java-WebSocket) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/TooTallNate/Java-WebSocket/releases)
- [Changelog](https://github.com/TooTallNate/Java-WebSocket/blob/master/CHANGELOG.md)
- [Commits](TooTallNate/Java-WebSocket@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: org.java-websocket:Java-WebSocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.codehaus.gmavenplus:gmavenplus-plugin](https://github.com/groovy/GMavenPlus) from 1.13.1 to 3.0.2.
- [Release notes](https://github.com/groovy/GMavenPlus/releases)
- [Commits](groovy/GMavenPlus@1.13.1...3.0.2)

---
updated-dependencies:
- dependency-name: org.codehaus.gmavenplus:gmavenplus-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [junit:junit](https://github.com/junit-team/junit4) from 4.13.1 to 4.13.2.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md)
- [Commits](junit-team/junit4@r4.13.1...r4.13.2)

---
updated-dependencies:
- dependency-name: junit:junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…ebsocket-Java-WebSocket-1.5.4

Bump org.java-websocket:Java-WebSocket from 1.5.3 to 1.5.4
…t-4.13.2

Bump junit:junit from 4.13.1 to 4.13.2
…ithub/codeql-action-2

Bump github/codeql-action from 1 to 2
…-jacoco-maven-plugin-0.8.10

Bump org.jacoco:jacoco-maven-plugin from 0.8.5 to 0.8.10
…us.gmavenplus-gmavenplus-plugin-3.0.2

Bump org.codehaus.gmavenplus:gmavenplus-plugin from 1.13.1 to 3.0.2
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 2.9.1 to 3.6.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](apache/maven-javadoc-plugin@maven-javadoc-plugin-2.9.1...maven-javadoc-plugin-3.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps com.google.code.findbugs:jsr305 from 3.0.1 to 3.0.2.

---
updated-dependencies:
- dependency-name: com.google.code.findbugs:jsr305
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.2.0 to 1.4.11.
- [Commits](qos-ch/logback@v_1.2.0...v_1.4.11)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.5.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.5.1...maven-compiler-plugin-3.11.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps org.slf4j:slf4j-api from 1.7.25 to 2.0.9.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
….maven.plugins-maven-javadoc-plugin-3.6.0

Bump org.apache.maven.plugins:maven-javadoc-plugin from 2.9.1 to 3.6.0
TVolden and others added 30 commits November 30, 2023 10:20
…test/ch.qos.logback-logback-core-1.4.12

Bump ch.qos.logback:logback-core from 1.4.11 to 1.4.12 in /ocpp-v2_0-test
…test/ch.qos.logback-logback-core-1.4.12

Bump ch.qos.logback:logback-core from 1.4.11 to 1.4.12 in /ocpp-v1_6-test
…st/ch.qos.logback-logback-core-1.4.12

Bump ch.qos.logback:logback-core from 1.4.11 to 1.4.12 in /ocpp-v2-test
Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.4.11 to 1.4.13.
- [Commits](qos-ch/logback@v_1.4.11...v_1.4.13)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…back-logback-core-1.4.13

Bump ch.qos.logback:logback-core from 1.4.11 to 1.4.13
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](apache/maven-javadoc-plugin@maven-javadoc-plugin-3.6.2...maven-javadoc-plugin-3.6.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.4.13 to 1.4.14.
- [Commits](qos-ch/logback@v_1.4.13...v_1.4.14)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.4.13 to 1.4.14.
- [Commits](qos-ch/logback@v_1.4.13...v_1.4.14)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.4.13 to 1.4.14.
- [Commits](qos-ch/logback@v_1.4.13...v_1.4.14)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.2 to 3.2.5.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.2.2...surefire-3.2.5)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
java-version: '11' no longer delivers an incompatible JDK.

This reverts commit 3bc476e.
Revert "GitHub Actions: Downgrade maven workflow to 11.0.16+8"
This change allows the configuration of the password length with entries in JSONConfiguration.
Allow configuration of allowed password string length
…test/ch.qos.logback-logback-core-1.4.14

Bump ch.qos.logback:logback-core from 1.4.13 to 1.4.14 in /ocpp-v1_6-test
….maven.plugins-maven-javadoc-plugin-3.6.3

Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.2 to 3.6.3
…st/ch.qos.logback-logback-core-1.4.14

Bump ch.qos.logback:logback-core from 1.4.13 to 1.4.14 in /ocpp-v2-test
…test/ch.qos.logback-logback-core-1.4.14

Bump ch.qos.logback:logback-core from 1.4.13 to 1.4.14 in /ocpp-v2_0-test
Bumps org.slf4j:jul-to-slf4j from 2.0.9 to 2.0.12.

---
updated-dependencies:
- dependency-name: org.slf4j:jul-to-slf4j
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…ithub/codeql-action-3

Bump github/codeql-action from 2 to 3
add stricter validation for Metervalues as described in  #241
….maven.plugins-maven-surefire-plugin-3.2.5

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.2 to 3.2.5
…jul-to-slf4j-2.0.12

Bump org.slf4j:jul-to-slf4j from 2.0.9 to 2.0.12
Fix for the default password max length (as per the 1.6 spec) and other minor changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants