Re: Conversing with a tcl application...
- From: "slebetman@xxxxxxxxx" <slebetman@xxxxxxxxx>
- Date: 26 Mar 2006 16:17:28 -0800
jerry.levan@xxxxxxxxx wrote:
Hi,
I have written a small tcl app for my linux laptop that watches
/proc/interrupts. If the interrupt count for the keyboard, touchpad,
or mouse does not change within a specified ( currently hard coded)
interval, the program will do some house cleaning and then
"suspend" to memory. Subsequent keyboard or touchpad activity
will awake the computer from the sleep state. (If there was
an interrupt the "time to sleep" parameter is reset.)
The program is started at boot time and runs in the background.
It seems to work fine...
I would like to be able to control the "time to sleep" value from
an external program so I can do lengthy unattended operations without
worrying about the system going to sleep during the operation ie
burning a dvd.
The program wakes up every six seconds to check the counts and
take the appropriate action:
Reset the time to sleep ( an interrupt occurred since the last
check)
Suspend the computer ( no interrupts have occurred for the
specified time)
Decrease the time to sleep ( no interrupts have occurred and time
has not expired)
Any cool tclish way to have an external tcl/tk prog monitor and
modify the target app ( ie set the length of the max time to sleep
value)?
If you're using Tk you can use the send command. If you're only using
Tcl without Tk then just open a server socket. If you're worried about
people hacking into your box then don't accept connections from other
that 127.0.0.1.
.
- References:
- Conversing with a tcl application...
- From: jerry.levan@xxxxxxxxx
- Conversing with a tcl application...
- Prev by Date: Re: TCL multiple sockets communication
- Next by Date: TCL 8.5.0.0 beta not handling XBMs?
- Previous by thread: Re: Conversing with a tcl application...
- Next by thread: Re: Conversing with a tcl application...
- Index(es):
Relevant Pages
|