Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

Protocol SDK

SDK: https://github.com/BellaDati/IoT-Co-Custom-Protocol-SDK

Example implementing OPC UA protocol: https://github.com/BellaDati/IoT-Co-OPC-UA-Extension

Dependency

Maven dependency

<dependency>
<groupId>com.belladati</groupId>
<artifactId>iot-protocol-sdk</artifactId>
<version>${protocol.sdk.version}</version>
</dependency>

Implementation

ReceiverEndpoint interface is provided to support implementation of custom protocol processing. One can implement connection to any device via any protocol and handle received data to a provided instance of a message processor.

java.util.ServiceLoader is used to load this implementation into the receiver. Basically, all that needs to be done is to create a file META-INF/services/com.belladati.iot.collector.generic.receiver.endpoint.ReceiverEndpoint that would contain fully qualified name of your implementation class, e.g.

com.belladati.iot.ext.MyCustomEndpointImpl

Execution

Once this extension is bundled in a single JAR with all its dependencies (or you may add the dependencies to the classpath), the receiver can be started with altered command that would look like this

java -cp iot-collector-generic-receiver-prod.jar;iot-ext-1.0-SNAPSHOT-jar-with-dependencies.jar com.belladati.iot.collector.common.BellaDatiLauncher -Dapplication.name=receiver1

instead of traditional java -jar.


Sv translation
languageja

プロトコル SDK

SDK: https://github.com/BellaDati/IoT-Co-Custom-Protocol-SDK

OPC UAプロトコルの実装例: https://github.com/BellaDati/IoT-Co-OPC-UA-Extension

依存関係

Maven依存関係

<dependency>
<groupId>com.belladati</groupId>
<artifactId>iot-protocol-sdk</artifactId>
<version>${protocol.sdk.version}</version>
</dependency>

実装

ReceiverEndpointインターフェースは、カスタムプロトコル処理の実装をサポートするために提供されています。任意のプロトコルを介して任意のデバイスへの接続を実装し、メッセージプロセッサの提供されたインスタンスへの受信データを処理できます。

java.util.ServiceLoaderは、この実装をreceiverにロードするために使用されます。基本的に、実行する必要があるのは、実装クラスの完全修飾名を含むファイル META-INF/services/com.belladati.iot.collector.generic.receiver.endpoint.ReceiverEndpointを作成することだけです。

例 com.belladati.iot.ext.MyCustomEndpointImpl

実行

この拡張機能がすべての依存関係とともに単一のJARにバンドルされると (または、依存関係をクラスパスに追加することもできます)、次のような変更されたコマンドでReceiverを起動できます。

java -cp iot-collector-generic-receiver-prod.jar;iot-ext-1.0-SNAPSHOT-jar-with-dependencies.jar com.belladati.iot.collector.common.BellaDatiLauncher -Dapplication.name=receiver1

従来のjava -jar.の代わりに。