Open ranganathanm opened 9 years ago
I see it the other way around. The sensor should reject the server's configuration if none (or one) of the bands is outside of its frequency range. The sensor's frequency range is "hard-wired" and can't be changed.
So in that case, the admin should get an error indicator (which will be shown on the sensor GUI) indicating that something has been misconfigured. How do we report that? Should the sensor have a API that it can call to report such an error?
Would it suffice for the sensor to send a SYS message as usual, with no data following? The server would check the COTSsensor.fLow and COTSsensor.fHigh in the SYS, detect the misconfiguration, and provide an error indicator on the admin page. Once the config has been corrected, the server could tear down the connection to the sensor, and the sensor would reestablish it and get the new, correct config.
POST is not a connection oriented HTTP method. i.e. the semantics of POST is to send a message and then disconnect (either end is free to tear down the connection -- the HTTP protocol is connection stateless). What could work is the following:
while (true)
- The client (sensor in this case) retrieves the configuration
- if configuration OK then
break;
else if configuration makes no sense:
if (no freq band in fLow,fHigh range):
- The send an error report (lets not overload the system message for this) using a
REST (http) API (to be defined). In the error report, send the fLow and fHigh. (We need to define error codes.)
else if ... // other cases here.
....
sleep(30 seconds)
From: msouryal notifications@github.com Sent: Wednesday, May 20, 2015 12:48 PM To: usnistgov/SpectrumBrowser Cc: Ranganathan, Mudumbai Subject: Re: [SpectrumBrowser] reject the system message if CotsSensor parameters do not include any frequency band. (#179)
Would it suffice for the sensor to send a SYS message as usual, with no data following? The server would check the COTSsensor.fLow and COTSsensor.fHigh in the SYS, detect the misconfiguration, and provide an error indicator on the admin page. Once the config has been corrected, the server could tear down the connection to the sensor, and the sensor would reestablish it and get the new, correct config.
Reply to this email directly or view it on GitHubhttps://github.com/usnistgov/SpectrumBrowser/issues/179#issuecomment-103956108.
Yes, you are correct. I was thinking of the connection in streaming mode. But what you propose applies to streaming configs, as well, since in either case the sensor starts with a post/response to get the config.
In the interest of catching configuration errors early:
Reject the system message if the range COTSSensor.fHigh , COTSSensor.fLow does not include any of the specified frequency bands of the sensor.