Skip to content

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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
…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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
….maven.plugins-maven-javadoc-plugin-3.6.0

Bump org.apache.maven.plugins:maven-javadoc-plugin from 2.9.1 to 3.6.0
dependabot bot and others added 28 commits December 5, 2025 14:23
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
….maven.plugins-maven-surefire-plugin-3.5.4

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 to 3.5.4
….maven.plugins-maven-gpg-plugin-3.2.8

Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.8
…pe.plugins-nexus-staging-maven-plugin-1.7.0

Bump org.sonatype.plugins:nexus-staging-maven-plugin from 1.6.13 to 1.7.0
…st-hamcrest-core-3.0

Bump org.hamcrest:hamcrest-core from 2.2 to 3.0
…us.gmavenplus-gmavenplus-plugin-4.2.1

Bump org.codehaus.gmavenplus:gmavenplus-plugin from 3.0.2 to 4.2.1
…ithub/codeql-action-4

Bump github/codeql-action from 3 to 4
…ctions/setup-java-5

Bump actions/setup-java from 3 to 5
…ctions/checkout-6

Bump actions/checkout from 4 to 6
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.10.1 to 2.13.2.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](google/gson@gson-parent-2.10.1...gson-parent-2.13.2)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-source-plugin/releases)
- [Commits](apache/maven-source-plugin@maven-source-plugin-3.3.0...maven-source-plugin-3.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.3 to 3.12.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](apache/maven-javadoc-plugin@maven-javadoc-plugin-3.6.3...maven-javadoc-plugin-3.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps org.slf4j:jul-to-slf4j from 2.0.12 to 2.0.17.

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

Signed-off-by: dependabot[bot] <support@github.com>
….code.gson-gson-2.13.2

Bump com.google.code.gson:gson from 2.10.1 to 2.13.2
….maven.plugins-maven-source-plugin-3.4.0

Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.4.0
….maven.plugins-maven-javadoc-plugin-3.12.0

Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.3 to 3.12.0
…jul-to-slf4j-2.0.17

Bump org.slf4j:jul-to-slf4j from 2.0.12 to 2.0.17
The logback-classic and logback-core packages 1.4+ do not support Java 8
anymore.

Downgrade the dependencies to the latest 1.3.x release to remain Java 8
compatible.
…y_for_java_8

Downgrade logback dependencies to version 1.3.16
The merged github dependabot PRs only updated the maven pom.xml files.

Update the gradle build files to the same dependency versions.
Update gradle dependencies after dependabot updates
The "ocpp-v2_0" subproject was the first attempt at OCPP 2.0.1 support,
which only allowed using this protocol version. It has been replaced by
the new "ocpp-v2" implementation, which allows offering multiple OCPP
versions in the Websocket handshake (currently OCPP 1.6 and OCPP 2.0.1)
and is extensible for future OCPP 2.x versions.

Remove the deprecated "ocpp-v2_0" subproject to avoid confusion.
The last rebase of PR #371 left files that were supposed to be deleted,
because they had been altered since the PR had been created.

Remove the leftover files.
@robert-s-ubi
Copy link
Contributor

We've prepared the 2.0 release in the master branch, so there is no need to update the v2 branch anymore.

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.

10 participants