-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sparkplug): added Sparkplug cloud connection boilerplate (#5059)
* feat(sparkplug): added Sparkplug cloud connection factory Signed-off-by: Marcello Martina <[email protected]> * build: fixed coverage report path Signed-off-by: Marcello Martina <[email protected]> * feat(CloudEndpoint): added default implementation for CloudConnectionListener, CloudDeliveryListener, and DataServiceListener Signed-off-by: Marcello Martina <[email protected]> * chore: added missing copyright header Signed-off-by: Marcello Martina <[email protected]> * build: added DP in distrib Signed-off-by: Marcello Martina <[email protected]> --------- Signed-off-by: Marcello Martina <[email protected]>
- Loading branch information
1 parent
145f109
commit 9480be5
Showing
30 changed files
with
1,676 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
kura/features/org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
############################################################################### | ||
# Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
# | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Eurotech | ||
############################################################################### | ||
|
||
bin.includes = feature.xml,\ | ||
feature.properties |
26 changes: 26 additions & 0 deletions
26
kura/features/org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider/feature.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
############################################################################### | ||
# Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
# | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Eurotech | ||
############################################################################### | ||
|
||
featureName=Eclipse Kura - Sparkplug MQTT Cloud Connection Provider | ||
providerName=Eclipse Kura | ||
description=Eclipse Kura Cloud Connection compliant with the Sparkplug v3.0.0 specification | ||
|
||
copyright=\ | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others\n\ | ||
\n\ | ||
This program and the accompanying materials are made\n\ | ||
available under the terms of the Eclipse Public License 2.0\n\ | ||
which accompanies this distribution, and is available at\n\ | ||
which is available at https://www.eclipse.org/legal/epl-2.0/\n\ | ||
\n\ | ||
SPDX-License-Identifier: EPL-2.0\n |
29 changes: 29 additions & 0 deletions
29
kura/features/org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider" | ||
label="%featureName" | ||
version="1.0.0.qualifier" | ||
provider-name="%providerName" | ||
license-feature="org.eclipse.license" | ||
license-feature-version="0.0.0"> | ||
|
||
<description> | ||
%description | ||
</description> | ||
|
||
<copyright> | ||
%copyright | ||
</copyright> | ||
|
||
<license url="%licenseURL"> | ||
%license | ||
</license> | ||
|
||
<plugin | ||
id="org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
</feature> |
49 changes: 49 additions & 0 deletions
49
kura/features/org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Red Hat Inc and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.eclipse.kura.feature</groupId> | ||
<artifactId>features</artifactId> | ||
<version>5.5.0-SNAPSHOT</version> | ||
<relativePath>..</relativePath> | ||
</parent> | ||
|
||
<artifactId>org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>eclipse-feature</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>de.dentrassi.maven</groupId> | ||
<artifactId>osgi-dp</artifactId> | ||
<version>${osgi-dp-plugin-version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
kura/org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Sparkplug MQTT Cloud Connection Provider | ||
Bundle-SymbolicName: org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider | ||
Bundle-Version: 1.0.0.qualifier | ||
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" | ||
Import-Package: org.eclipse.kura;version="[1.0,2.0)", | ||
org.eclipse.kura.configuration;version="[1.1,2.0)", | ||
org.eclipse.kura.cloud;version="[1.1,2.0)", | ||
org.eclipse.kura.cloudconnection;version="[1.0,1.1)", | ||
org.eclipse.kura.cloudconnection.factory;version="[1.0,1.1)", | ||
org.eclipse.kura.cloudconnection.listener;version="[1.0,2.0)", | ||
org.eclipse.kura.cloudconnection.message;version="[1.0,2.0)", | ||
org.eclipse.kura.cloudconnection.publisher;version="[1.0,1.1)", | ||
org.eclipse.kura.cloudconnection.subscriber;version="[1.0,1.1)", | ||
org.eclipse.kura.cloudconnection.subscriber.listener;version="[1.0,2.0)", | ||
org.eclipse.kura.data;version="[1.0,2.0)", | ||
org.eclipse.kura.data.listener;version="[1.0,2.0)", | ||
org.eclipse.kura.data.transport.listener;version="[1.0,2.0)", | ||
org.osgi.framework;version="1.8.0", | ||
org.osgi.service.component;version="1.2.0", | ||
org.osgi.service.event;version="1.3.1", | ||
org.slf4j;version="[1.7,2.0]" | ||
Bundle-ActivationPolicy: lazy | ||
Service-Component: OSGI-INF/*.xml | ||
Bundle-Vendor: Eclipse Kura | ||
Bundle-License: Eclipse Public License v2.0 |
34 changes: 34 additions & 0 deletions
34
...kura.cloudconnection.sparkplug.mqtt.provider/OSGI-INF/SparkplugCloudConnectionFactory.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" | ||
name="org.eclipse.kura.cloudconnection.sparkplug.mqtt.factory.SparkplugCloudConnectionFactory"> | ||
|
||
<implementation class="org.eclipse.kura.cloudconnection.sparkplug.mqtt.factory.SparkplugCloudConnectionFactory"/> | ||
|
||
<reference interface="org.eclipse.kura.configuration.ConfigurationService" | ||
bind="setConfigurationService" | ||
cardinality="1..1" | ||
name="ConfigurationService" | ||
policy="static"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.kura.cloudconnection.factory.CloudConnectionFactory"/> | ||
</service> | ||
|
||
<property name="kura.ui.csf.pid.default" type="String" value="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint[-optionalSuffix]"/> | ||
<property name="kura.ui.csf.pid.regex" type="String" value="^org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint(\-[a-zA-Z0-9]+)?$"/> | ||
<property name="service.pid" type="String" value="org.eclipse.kura.cloudconnection.sparkplug.mqtt.factory.SparkplugCloudConnectionFactory"/> | ||
</scr:component> |
48 changes: 48 additions & 0 deletions
48
....eclipse.kura.cloudconnection.sparkplug.mqtt.provider/OSGI-INF/SparkplugCloudEndpoint.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" | ||
activate="activate" | ||
deactivate="deactivate" | ||
modified="update" | ||
configuration-policy="require" | ||
enabled="true" | ||
immediate="false" | ||
name="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint"> | ||
|
||
<implementation class="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.kura.configuration.ConfigurableComponent"/> | ||
<provide interface="org.eclipse.kura.cloudconnection.CloudConnectionManager"/> | ||
<provide interface="org.eclipse.kura.cloudconnection.CloudEndpoint"/> | ||
</service> | ||
|
||
<reference interface="org.eclipse.kura.data.DataService" | ||
name="DataService" | ||
policy="static" | ||
cardinality="1..1" | ||
bind="setDataService"/> | ||
|
||
<reference interface="org.osgi.service.event.EventAdmin" | ||
name="EventAdmin" | ||
policy="static" | ||
cardinality="1..1" | ||
bind="setEventAdmin"/> | ||
|
||
<property name="kura.ui.service.hide" type="Boolean" value="true"/> | ||
<property name="kura.ui.factory.hide" type="Boolean" value="true"/> | ||
|
||
</scr:component> |
35 changes: 35 additions & 0 deletions
35
....eclipse.kura.cloudconnection.sparkplug.mqtt.provider/OSGI-INF/SparkplugDataTransport.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.2.0" | ||
configuration-policy="require" | ||
activate="activate" | ||
deactivate="deactivate" | ||
modified="update" | ||
enabled="true" | ||
immediate="true" | ||
name="org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport"> | ||
|
||
<implementation class="org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.kura.data.DataTransportService"/> | ||
<provide interface="org.eclipse.kura.configuration.ConfigurableComponent"/> | ||
</service> | ||
|
||
<property name="kura.ui.service.hide" type="Boolean" value="true"/> | ||
<property name="kura.ui.factory.hide" type="Boolean" value="true"/> | ||
|
||
</scr:component> |
28 changes: 28 additions & 0 deletions
28
...atype/org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0" localization="en_us"> | ||
|
||
<OCD id="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint" | ||
name="SparkplugCloudEndpoint" | ||
description="Cloud Endpoint layer configuration."> | ||
|
||
</OCD> | ||
|
||
<Designate pid="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint" | ||
factoryPid="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint"> | ||
<Object ocdref="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint"/> | ||
</Designate> | ||
</MetaData> |
28 changes: 28 additions & 0 deletions
28
...type/org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0" localization="en_us"> | ||
|
||
<OCD id="org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport" | ||
name="SparkplugDataTransport" | ||
description="Data Transport layer configuration."> | ||
|
||
</OCD> | ||
|
||
<Designate pid="org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport" | ||
factoryPid="org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport"> | ||
<Object ocdref="org.eclipse.kura.cloudconnection.sparkplug.mqtt.transport.SparkplugDataTransport"/> | ||
</Designate> | ||
</MetaData> |
Oops, something went wrong.