usnistgov / SpectrumBrowser

ITL
12 stars 11 forks source link

reject the system message if CotsSensor parameters do not include any frequency band. #179

Open ranganathanm opened 9 years ago

ranganathanm commented 9 years ago

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.

msouryal commented 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.

ranganathanm commented 9 years ago

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?

msouryal commented 9 years ago

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.

ranganathanm commented 9 years ago

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;

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.

msouryal commented 9 years ago

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.