-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sequencer tests for sample rate #518
Changes from 8 commits
3fd5933
021d95c
6df978b
9785a91
5683b8a
68d129b
ba51d2c
2b743b7
232bb2b
3693ee1
3c254d5
32b7cab
5678c05
ef707b1
8839e9c
e791362
0eee2d1
9f4dc18
4960dba
20ab63e
8fb9924
b51e42f
68bbc7a
8abab7f
554eb20
234173b
68c6eea
5b91c3a
1f1d63e
179507e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
TEST writeback_success_state noWriteback RESULT fail writeback_success_state timeout waiting for point filter_differential_pressure_setpoint to have value_state applied | ||
TEST writeback_success_apply noPointState RESULT pass writeback_success_apply Sequence complete | ||
TEST pointset_sample_rate fixedSampleRate=10 RESULT fail pointset_sample_rate Failed check that time period between successive pointset events is between 1 and 5 seconds |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -859,19 +859,22 @@ private void configHandler(Config config) { | |
|
||
private void processConfigUpdate(Config config) { | ||
final int actualInterval; | ||
final int useInterval; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can declare at point of use in this case since there is no branch involved. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed |
||
if (config != null) { | ||
deviceConfig = config; | ||
info(String.format("%s received config %s", getTimestamp(), isoConvert(config.timestamp))); | ||
deviceState.system.last_config = config.timestamp; | ||
actualInterval = updateSystemConfig(config.pointset); | ||
updatePointsetConfig(config.pointset); | ||
actualInterval = updatePointsetConfig(config.pointset); | ||
updatePointsetPointsConfig(config.pointset); | ||
updateDiscoveryConfig(config.discovery); | ||
extractEndpointBlobConfig(); | ||
} else { | ||
info(getTimestamp() + " defaulting empty config"); | ||
actualInterval = DEFAULT_REPORT_SEC * 1000; | ||
} | ||
maybeRestartExecutor(actualInterval); | ||
useInterval = configuration.options.fixedSampleRate == null | ||
? actualInterval : configuration.options.fixedSampleRate * 1000; | ||
maybeRestartExecutor(useInterval); | ||
} | ||
|
||
private void extractEndpointBlobConfig() { | ||
|
@@ -1266,7 +1269,7 @@ private String isoConvert(Date timestamp) { | |
} | ||
} | ||
|
||
private void updatePointsetConfig(PointsetConfig pointsetConfig) { | ||
private void updatePointsetPointsConfig(PointsetConfig pointsetConfig) { | ||
PointsetConfig useConfig = pointsetConfig != null ? pointsetConfig : new PointsetConfig(); | ||
Map<String, PointPointsetConfig> points = | ||
useConfig.points != null ? useConfig.points : new HashMap<>(); | ||
|
@@ -1283,9 +1286,11 @@ private void updatePointConfig(AbstractPoint point, PointPointsetConfig pointCon | |
updateState(point); | ||
} | ||
|
||
private int updateSystemConfig(PointsetConfig pointsetConfig) { | ||
private int updatePointsetConfig(PointsetConfig pointsetConfig) { | ||
final int actualInterval; | ||
boolean hasSampleRate = pointsetConfig != null && pointsetConfig.sample_rate_sec != null; | ||
boolean hasSampleLimit = pointsetConfig != null && pointsetConfig.sample_limit_sec != null; | ||
//if(hasSampleRate && hasSampleLimit && pointsetConfig.sample_rate_sec < ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. accidentally committed, removed |
||
int reportInterval = hasSampleRate ? pointsetConfig.sample_rate_sec : DEFAULT_REPORT_SEC; | ||
actualInterval = Integer.max(MIN_REPORT_MS, reportInterval * 1000); | ||
return actualInterval; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't leave dead code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental, was meant to be uncommented, thanks