-
Notifications
You must be signed in to change notification settings - Fork 314
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 SparkplugSubscriber (#5119)
* refactor(sparkplug): created utilites package to common factor some code Signed-off-by: Marcello Martina <[email protected]> * feat(sparkplug): added SparkplugSubscriber Signed-off-by: Marcello Martina <[email protected]> * test: added SubscriptionRecordTest Signed-off-by: Marcello Martina <[email protected]> * test: added SubscriptionsMapTest Signed-off-by: Marcello Martina <[email protected]> * test: added SparkplugSubscriberTest Signed-off-by: Marcello Martina <[email protected]> * test: applied review suggestions Signed-off-by: Marcello Martina <[email protected]> --------- Signed-off-by: Marcello Martina <[email protected]>
- Loading branch information
1 parent
523744f
commit 1c36691
Showing
15 changed files
with
1,325 additions
and
108 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...org.eclipse.kura.cloudconnection.sparkplug.mqtt.provider/OSGI-INF/SparkplugSubscriber.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,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2024 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" | ||
configuration-policy="require" | ||
activate="activate" | ||
deactivate="deactivate" | ||
modified="update" | ||
enabled="true" | ||
immediate="true" | ||
name="org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber"> | ||
|
||
<implementation class="org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.kura.cloudconnection.subscriber.CloudSubscriber"/> | ||
<provide interface="org.eclipse.kura.configuration.ConfigurableComponent"/> | ||
</service> | ||
|
||
<property name="service.pid" type="String" value="org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber"/> | ||
<property name="cloud.connection.factory.pid" type="String" value="org.eclipse.kura.cloudconnection.sparkplug.mqtt.endpoint.SparkplugCloudEndpoint"/> | ||
<property name="kura.ui.service.hide" type="Boolean" value="true"/> | ||
<property name="kura.ui.factory.hide" type="String" value="true"/> | ||
|
||
</scr:component> |
49 changes: 49 additions & 0 deletions
49
...tatype/org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber.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) 2024 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.subscriber.SparkplugSubscriber" | ||
name="SparkplugSubscriber" | ||
description="Component that serves as a CloudSubscriber for this Sparkplug Cloud Connection."> | ||
|
||
<AD id="topic.filter" | ||
name="Topic Filter" | ||
type="String" | ||
cardinality="0" | ||
required="true" | ||
default="A/B/C" | ||
description="The MQTT subscription topic filter. For example foo/bar/baz, foo/+/bar, #, foo/#."/> | ||
|
||
<AD id="qos" | ||
name="QoS" | ||
type="Integer" | ||
cardinality="0" | ||
required="true" | ||
default="0" | ||
description="The maximum desired quality of service for the subscription messages."> | ||
|
||
<Option label="QoS 0 - at most once" value="0" /> | ||
<Option label="QoS 1 - at least once" value="1" /> | ||
<Option label="QoS 2 - exactly once" value="2" /> | ||
</AD> | ||
|
||
</OCD> | ||
|
||
<Designate pid="org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber" | ||
factoryPid="org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber"> | ||
<Object ocdref="org.eclipse.kura.cloudconnection.sparkplug.mqtt.subscriber.SparkplugSubscriber"/> | ||
</Designate> | ||
</MetaData> |
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
Oops, something went wrong.