From: Steve-Kai V. <st...@vy...> - 2006-08-16 23:34:33
|
Hallo again, Since my LCD is now working (thanks to Michael), I now have a new Probel. I want the LCD-display to show different stuff according to some parameters. I.E.Normaly the display should show: Row1: Time / Uptime Row2: Ram / CPU Row3: DiscSpace Row4: i don't know :-) something If an ISDN-Call is now comming in, the display should change to Row1: Time / Uptime Row2: CH1 Incomming net phone Row3: Throughput ISDN Row4: i don't know :-) something My first Idea was to write serveral cascades using the Evaluator but this is very confusing. The second Idea was to use the timer-widget, but an the hole page there is no example how this thing works, and what it does. The onlything i fond is, that it was placed under the Layout section and that there must be a widget xxxx with the name to call, but how can I place it or how it realy wors is not described (either in german or in english). Is the timer-widget the thing I am searching for, or is there another way to solve my idea? BTW: Is there somewhere discribed, if anybody is writing an plugin? I'm thinking of writing one to check if there are SMB or NFS connects on the System and to display them, but I have nerer used C befor, so it will be lot of trial and error to see how it works :-) Steve |
From: C. M. <cm...@fr...> - 2006-08-17 00:20:32
|
On Thu, Aug 17, 2006 at 01:34:20AM +0200, Steve-Kai Vyska waxed: > Hallo again, > > Since my LCD is now working (thanks to Michael), I now have a new Probel. I > want the LCD-display to show different stuff according to some parameters. > > I.E.Normaly the display should show: > > Row1: Time / Uptime > Row2: Ram / CPU > Row3: DiscSpace > Row4: i don't know :-) something > > If an ISDN-Call is now comming in, the display should change to > > Row1: Time / Uptime > Row2: CH1 Incomming net phone > Row3: Throughput ISDN > Row4: i don't know :-) something You could accomplish this with a combination of the update command and the file::readline expression recently added to CVS. For the line(s) that need to display dynamic information, setup a script to write that information to a file when the state changes (incoming call), and then have the file::readline pull that information periodically (like 100 ms) Widget dynamicline1 { class 'Text' expression file::readline('/tmp/somefile_updated_on_call_state_change',1) update 100 } A more elegant solution would be to allow dynamic Layout changes triggered by timers and other plugin specific callbacks, but that isn't implemented yet. HTH, -- Chris Maj Pronunciation Guide: Maj == May |
From: Steve-Kai V. <st...@vy...> - 2006-08-17 00:26:16
|
Hi, > You could accomplish this with a combination of the update > command and the file::readline expression recently added to > CVS. For the line(s) that need to display dynamic > information, setup a script to write that information to a > file when the state changes (incoming call), and then have > the file::readline pull that information periodically (like > 100 ms) > > Widget dynamicline1 { > class 'Text' > expression > file::readline('/tmp/somefile_updated_on_call_state_change',1) update 100 > } > jup I have done this by now, but 2 Problems: 1. it takes extra CPU for creating the file (which has to be done erver xxx Seconds to be uptodate) and you can not change the class i.E from text -> bar > A more elegant solution would be to allow dynamic Layout > changes triggered by timers and other plugin specific > callbacks, but that isn't implemented yet. yes this would be fine :-) Steve |
From: C. M. <cm...@fr...> - 2006-08-17 00:42:25
|
On Thu, Aug 17, 2006 at 02:26:03AM +0200, Steve-Kai Vyska waxed: > Hi, > > > You could accomplish this with a combination of the update > > command and the file::readline expression recently added to > > CVS. For the line(s) that need to display dynamic > > information, setup a script to write that information to a > > file when the state changes (incoming call), and then have > > the file::readline pull that information periodically (like > > 100 ms) > > > > Widget dynamicline1 { > > class 'Text' > > expression > > file::readline('/tmp/somefile_updated_on_call_state_change',1) update 100 > > } > > > > jup I have done this by now, but 2 Problems: > 1. it takes extra CPU for creating the file (which has to be done erver xxx Writing and reading a one line file is taking up significant CPU ? Are you running lcd4linux on a wristwatch ? -- Chris Maj Pronunciation Guide: Maj == May |
From: Steve-Kai V. <st...@vy...> - 2006-08-17 00:51:24
|
Am Donnerstag, 17. August 2006 02:42 schrieb C. Maj: > On Thu, Aug 17, 2006 at 02:26:03AM +0200, Steve-Kai Vyska waxed: > > Hi, > > > > > You could accomplish this with a combination of the update > > > command and the file::readline expression recently added to > > > CVS. For the line(s) that need to display dynamic > > > information, setup a script to write that information to a > > > file when the state changes (incoming call), and then have > > > the file::readline pull that information periodically (like > > > 100 ms) > > > > > > Widget dynamicline1 { > > > class 'Text' > > > expression > > > file::readline('/tmp/somefile_updated_on_call_state_change',1) update > > > 100 } > > > > jup I have done this by now, but 2 Problems: > > 1. it takes extra CPU for creating the file (which has to be done erver > > xxx > > Writing and reading a one line file is taking up significant CPU ? > Are you running lcd4linux on a wristwatch ? No no, the problem is, that first I need 4 Lines, and as said it solves only a part of the problem, since i'm not able to change the class |
From: Michael R. <re...@eu...> - 2006-08-18 20:52:19
|
Hi Steve, > I.E.Normaly the display should show: > > Row1: Time / Uptime > Row2: Ram / CPU > Row3: DiscSpace > Row4: i don't know :-) something > > If an ISDN-Call is now comming in, the display should change to > > Row1: Time / Uptime > Row2: CH1 Incomming net phone > Row3: Throughput ISDN > Row4: i don't know :-) something I'm afraid this is not yet possible. But I'm working on the "virtual rows" stuff. At the moment there's a generic Layout-to-display transfer function, but there's no way to modify it. I'm thinking about a plugin that will handle this. It will work the following way: You can have a layout larger than your display (e.g. 6 rows for a 4x20 displays), and you can somehow "scroll" some of the rows. so stay tuned! bye, Michael -- Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: C. M. <cm...@fr...> - 2006-08-18 23:34:29
|
On Fri, Aug 18, 2006 at 10:51:59PM +0200, Michael Reinelt waxed: > Hi Steve, > > > I.E.Normaly the display should show: > > > > Row1: Time / Uptime > > Row2: Ram / CPU > > Row3: DiscSpace > > Row4: i don't know :-) something > > > > If an ISDN-Call is now comming in, the display should change to > > > > Row1: Time / Uptime > > Row2: CH1 Incomming net phone > > Row3: Throughput ISDN > > Row4: i don't know :-) something > > I'm afraid this is not yet possible. But I'm working on the "virtual > rows" stuff. At the moment there's a generic Layout-to-display transfer > function, but there's no way to modify it. I'm thinking about a plugin > that will handle this. I was poking a little at this yesterday. I think multiple layout support requires that each widget keep track of it's layout in widget.c, then each widget needs a new method "show" (like draw, quit, etc.) as well as possibly "hide" -- Chris Maj Pronunciation Guide: Maj == May |
From: Steve-Kai V. <st...@vy...> - 2006-08-19 00:37:26
|
Hi, > I was poking a little at this yesterday. I think multiple > layout support requires that each widget keep track of it's > layout in widget.c, then each widget needs a new method > "show" (like draw, quit, etc.) as well as possibly "hide" either this, or there must be a mehtode that zou can saz if this happens don not use me but use that widget instead. Steve |
From: Michael R. <re...@eu...> - 2006-08-20 07:37:34
|
Hi, > I was poking a little at this yesterday. I think multiple > layout support requires that each widget keep track of it's > layout in widget.c, then each widget needs a new method > "show" (like draw, quit, etc.) as well as possibly "hide" No, I don't think I will implement it this way. What you're talking about is already there, but it's called 'layers'. Changing the layout will require the current layout to be destroyed (and destroying all widgets, too) and create the new layout from scratch. bye, Michael -- Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |