sparkplug: connection5
This commit is contained in:
parent
f6aa9e6125
commit
ee819e2d80
@ -47,6 +47,7 @@ import org.thingsboard.server.common.data.DeviceProfile;
|
||||
import org.thingsboard.server.common.data.DeviceTransportType;
|
||||
import org.thingsboard.server.common.data.StringUtils;
|
||||
import org.thingsboard.server.common.data.TransportPayloadType;
|
||||
import org.thingsboard.server.common.data.device.profile.MqttDeviceProfileTransportConfiguration;
|
||||
import org.thingsboard.server.common.data.device.profile.MqttTopics;
|
||||
import org.thingsboard.server.common.data.id.DeviceId;
|
||||
import org.thingsboard.server.common.data.id.OtaPackageId;
|
||||
@ -979,7 +980,11 @@ public class MqttTransportHandler extends ChannelInboundHandlerAdapter implement
|
||||
}
|
||||
|
||||
private void checkSparkPlugSession(SessionMetaData sessionMetaData, MqttConnectMessage connectMessage) {
|
||||
if (deviceSessionCtx.isSparkplug()) {
|
||||
if (((MqttDeviceProfileTransportConfiguration) deviceSessionCtx
|
||||
.getDeviceProfile()
|
||||
.getProfileData()
|
||||
.getTransportConfiguration())
|
||||
.isSparkPlug()) {
|
||||
TransportDeviceInfo device = deviceSessionCtx.getDeviceInfo();
|
||||
try {
|
||||
JsonNode infoNode = context.getMapper().readTree(device.getAdditionalInfo());
|
||||
|
||||
@ -255,8 +255,4 @@ public class DeviceSessionCtx extends MqttDeviceAwareSessionContext {
|
||||
return Collections.unmodifiableCollection(msgQueue);
|
||||
}
|
||||
|
||||
public boolean isSparkplug () {
|
||||
return ((MqttDeviceProfileTransportConfiguration) this.getDeviceProfile().getProfileData().getTransportConfiguration()).isSparkPlug();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -15,12 +15,6 @@
|
||||
*/
|
||||
syntax = "proto3";
|
||||
|
||||
//
|
||||
// To compile:
|
||||
// cd client_libraries/java
|
||||
// protoc --proto_path=../../ --java_out=src/main/java ../../sparkplug_b.proto
|
||||
//
|
||||
//package com.cirruslink.sparkplug.protobuf;
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user