Skip to content
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

Missing Sample Rate (optional element) raises error #143

Open
anss-sis opened this issue Nov 19, 2021 · 1 comment
Open

Missing Sample Rate (optional element) raises error #143

anss-sis opened this issue Nov 19, 2021 · 1 comment

Comments

@anss-sis
Copy link

SampleRate element (under Channel) is optional. For pre-digital channels there is no sample rate so the SIS writer did not write out the SampleRate element. The IRIS validator failed with this error:

[2021-11-18 17:02:29] [SEVERE] edu.iris.dmc.Application exitWithError: edu.iris.dmc.station.conditions.SampleRateCondition.evaluate(SampleRateCondition.java:41)
edu.iris.dmc.station.rules.Rule.execute(Rule.java:44)
edu.iris.dmc.station.RuleEngineService.executeAllRules(RuleEngineService.java:160)
edu.iris.dmc.station.RuleEngineService.executeAllRules(RuleEngineService.java:142)
edu.iris.dmc.station.RuleEngineService.executeAllRules(RuleEngineService.java:108)
edu.iris.dmc.station.RuleEngineService.executeAllRules(RuleEngineService.java:47)
edu.iris.dmc.Application.run(Application.java:183)
edu.iris.dmc.Application.run(Application.java:168)
edu.iris.dmc.Application.run(Application.java:147)
edu.iris.dmc.Application.main(Application.java:118)

Putting an empty value or None value are invalid as per the xml schema rules. So the following options are not possible:
None and

That means the only way to write it out is not have the element in the xml. Please update the code to accept this case.

Thanks,
Prabha

@jcrummey
Copy link

jcrummey commented Dec 9, 2021

I created a new issue (#144) to address Rule 305 and using a value of 0 for Channel:SampleRate to characterize pre-digital channels. Using 0 seems preferred to omitting the Channel:SampleRate element. However, the validator should allow the omission (maybe with just a warning) since it is an optional element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants