Skip to content

Commit d500968

Browse files
committed
RAD-5921 Disable the hourly scan for BACnet discovery, instead implement on-demand scan.
1 parent 488af19 commit d500968

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pubber/src/main/java/udmi/lib/client/manager/DiscoveryManager.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*/
4343
public interface DiscoveryManager extends SubBlockManager {
4444

45-
int SCAN_DURATION_SEC = 10;
45+
int SCAN_DURATION_SEC = 60;
4646

4747
/**
4848
* Determines whether enumeration to a specific depth level is required.
@@ -247,6 +247,12 @@ default int getScanInterval(String family) {
247247
catchToNull(() -> getFamilyDiscoveryConfig(family).scan_interval_sec)).orElse(0);
248248
}
249249

250+
default int getScanDuration(String family) {
251+
return ofNullable(
252+
catchToNull(() -> getFamilyDiscoveryConfig(family).scan_duration_sec)
253+
).orElse(SCAN_DURATION_SEC);
254+
}
255+
250256
default boolean shouldEnumerate(String family) {
251257
return shouldEnumerateTo(getFamilyDiscoveryConfig(family).depth);
252258
}

0 commit comments

Comments
 (0)