Skip to content

Commit

Permalink
fix annotation attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick committed Aug 1, 2024
1 parent 03c2009 commit 8401cb3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ public class AddressRange {
@ModuleConfigField(title = "Start Index",
description = "The Starting Index (Incl.) of the Address Range",
numberMin = 0,
numberMax = ModbusAdapterConfig.PORT_MAX)
numberMax = ModbusAdapterConfig.PORT_MAX,
required = true)
public final int startIdx;

@JsonProperty("endIdx")
@ModuleConfigField(title = "End Index",
description = "The Finishing Index (Excl.) of the Address Range",
numberMin = 1,
numberMax = ModbusAdapterConfig.PORT_MAX)
numberMax = ModbusAdapterConfig.PORT_MAX,
required = true)
public final int endIdx;

public AddressRange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public class ModbusAdapterConfig implements ProtocolAdapterConfig {
description = "Time (in milliseconds) to await a connection before the client gives up",
numberMin = 1000,
numberMax = 15000,
defaultValue = "5000",
required = true)
defaultValue = "5000")
private final int timeout;

@JsonProperty("publishChangedDataOnly")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ public class PollingContextImpl implements PollingContext {
@JsonCreator
public PollingContextImpl(
@JsonProperty(value = "destination", required = true) final @NotNull String destination,
@JsonProperty(value = "qos") final @Nullable Integer qos,
@JsonProperty(value = "messageHandlingOptions") final @Nullable MessageHandlingOptions messageHandlingOptions,
@JsonProperty(value = "includeTimestamp") final @Nullable Boolean includeTimestamp,
@JsonProperty(value = "includeTagNames") final @Nullable Boolean includeTagNames,
@JsonProperty("qos") final @Nullable Integer qos,
@JsonProperty("messageHandlingOptions") final @Nullable MessageHandlingOptions messageHandlingOptions,
@JsonProperty("includeTimestamp") final @Nullable Boolean includeTimestamp,
@JsonProperty("includeTagNames") final @Nullable Boolean includeTagNames,
@JsonProperty("userProperties") final @Nullable List<UserProperty> userProperties,
@JsonProperty("addressRange") final @NotNull AddressRange addressRange) {
@JsonProperty(value = "addressRange", required = true) final @NotNull AddressRange addressRange) {
this.destination = destination;
this.qos = requireNonNullElse(qos, 0);
this.messageHandlingOptions = requireNonNullElse(messageHandlingOptions, MQTTMessagePerSubscription);
Expand Down

0 comments on commit 8401cb3

Please sign in to comment.