I want that people keep track of design of SK in a file. <br>
I have put a file DESIGN_DISCUSS( should be renamed to DESIGN) . Please
keep track of design(to be implemented) ideas in that file.<br>
<br>
I have put some sensor specific ideas into that. It follows here.<br>
Please comment.<br>
<br>
* Sensors derived classes needs to be made singleton. Why do we need 2
cpusensor object? When values returned by them would be the same?<br>
&nbsp; Exceptions:- The sensors, which need some parameter setting, would need to be instantiated by meters, which need them.<br>
<br>
*Update Interval:- All Sensors dont need to set update interval at all.
The sensors like tasksensor, dont even need to update in fact.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
They would update data, only when system indicates that a task is
changed.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
In fact, those sensors need update interval, whose data change is not
signaled by system. So they need to obtain<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
current data at specific interval.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
But things like tasksensor, changing after certain interval of actual
change by system, would look very odd.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
So they would change when system indicates.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CPUSensor Will have default values for update. If the theme writer
specifies any meter update interval, meter would<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
set the update interval to be minimum of all meters connected.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Meters would refresh only when they want, although they will always
have the updated data.<br>
<br>
* A Look at all sensors:-<br>
<br>
&nbsp;&nbsp;&nbsp; CPUsensor:-&nbsp; discussed already about updateInterval . needs singleton pattern. No parameters needed.<br>
&nbsp;&nbsp;&nbsp; DiskSensor:- UpdateInterval just like CPUSensor.
needs singleton pattern. MOUNTPOINT parameter not needed. It will
return values of<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all partition/mountpoint.<br>
&nbsp;&nbsp;&nbsp; MemorySensor:- Just like cpusensor.<br>
&nbsp;&nbsp;&nbsp; NetworkSensor:- updateInterval like CPU. Device parameter not needed. Need to be singleton.<br>
&nbsp;&nbsp;&nbsp; NoAtun:- Singleton, no update needed. It will update only when Noatun changes (through signal)<br>
&nbsp;&nbsp;&nbsp; Program:- Non Singleton because of PROGRAM and other&nbsp; parameters. UpdateInterval has no meaning.<br>
&nbsp;&nbsp;&nbsp; Sensor:- just like cpusensor<br>
&nbsp;&nbsp;&nbsp; Textfile:- non-singletom. No update interval.
Updates if textfile changes(through may be FAM possibly, or when meter
wants)<br>
&nbsp;&nbsp;&nbsp; Time:- cpusensor like.<br>
&nbsp;&nbsp;&nbsp; uptime:- cpusensor like.<br>
&nbsp;&nbsp;&nbsp; Xmms:- noatun like.<br>
<br>
Sometimes mailing lists becomes inefficient because of difference in time of world zones :(<br>
Someone sends a mail to list in daytime, which is my night time. and then vice-versa.<br>
So if a topic requre 5 mail exchanges, it would require 5 days! very bad. Slows down efficiency drastically.<br>
<br>
Vinay Khaitan<br>