#emc-devel | Logs for 2006-01-17

Back
[03:12:59] <SWPadnos__> SWPadnos__ is now known as SWPadnos
[03:39:49] <jtr> jtr is now known as jtr_away
[04:28:07] <SWPadnos> SWPadnos is now known as SWP_Away
[21:17:45] <SWP_Away> SWP_Away is now known as SWPadnos
[21:32:23] <SWPadnos> SWPadnos is now known as SWP_Away
[22:20:27] <SWP_Away> SWP_Away is now known as SWPadnos
[22:26:41] <rayh_> I've been trying to get halcmd to "open" in a tcl bidirectional pipe but it isn't having any.
[22:27:22] <SWPadnos> how is this normally done in tcl?
[22:27:24] <cradek> can you do that with any other program?
[22:27:31] <SWPadnos> (or is it normally done in tcl? :) )
[22:27:38] <rayh_> I've got a model built upon bc
[22:27:44] <rayh_> the unix calculator.
[22:27:53] <SWPadnos> ok -and that works
[22:27:56] <SWPadnos> ?
[22:27:59] <rayh_> yes
[22:28:13] <rayh_> send it 2+2 and it returns 4
[22:28:27] <SWPadnos> ok. what halcmd options are you using?
[22:28:34] <rayh_> but bc has not prompt like halcmd:
[22:28:47] <SWPadnos> use "-skf"
[22:28:55] <SWPadnos> script mode has no prompt
[22:28:56] <rayh_> okay.
[22:29:04] <rayh_> I'll try. Thanks.
[22:29:15] <SWPadnos> (k=keep going if there's an error, f=use a file)
[22:29:15] <rayh_> I thought that was a bearing company.
[22:29:20] <SWPadnos> so it is ;)
[22:29:29] <rayh_> I was using -kf
[22:30:09] <rayh_> * rayh_ brb testing.
[22:30:11] <SWPadnos> ok - the -s will prevent the prompt - I put it in for just this situation
[22:38:34] <rayh_> still dies. it does pass the first command like newsig MySig1 bit.
[22:38:57] <rayh_> but hangs after that now.
[22:40:31] <SWPadnos> hang as in more stuff in = nothing out?
[22:53:14] <rayh_> I set the channel for writing "w" rather than "r+" and it seems to be working.
[22:53:23] <SWPadnos> ah -good deal
[22:53:31] <rayh_> I do get a response back to standard out
[22:53:48] <rayh_> Just have to get it to where it needs to be.
[22:53:57] <SWPadnos> errors only, or other stuff as well?
[22:54:00] <rayh_> Thanks
[22:54:13] <SWPadnos> does "rw" work?
[23:00:01] <alex_joni> -rw :D
[23:02:14] <SWPadnos> CD or DVD?
[23:06:36] <rayh_> I'll try that.
[23:08:23] <alex_joni> or blue ray
[23:08:24] <rayh_> No. The possibles are "r" "r+" "w" and "w+"
[23:08:25] <alex_joni> :D
[23:08:36] <SWPadnos> hm
[23:08:38] <alex_joni> how fit..
[23:08:59] <rayh_> w is the only one that works.
[23:09:28] <rayh_> and that returns to the terminal running the program.
[23:09:43] <rayh_> Seems like it is darn close.
[23:09:58] <SWPadnos> there should be some way of opening two pipes then, one for command output and one for response input
[23:11:58] <SWPadnos> are you using "flush"?
[23:13:24] <SWPadnos> you can try using fconfigure to turn off buffering as well
[23:13:46] <SWPadnos> (according to a tcl 8.5 help page at http://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html )
[23:32:47] <alex_joni> night all
[23:32:53] <SWPadnos> good night
[23:36:47] <rayh> that was fun!
[23:37:02] <SWPadnos> I was just going to ask - that wasn't a crash was it?
[23:37:27] <rayh> Nah that was a switch box that went astray.
[23:37:33] <SWPadnos> ah - phew
[23:38:01] <rayh> what was that tcl link again.
[23:38:15] <SWPadnos> http://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html
[23:38:20] <rayh> tnx
[23:38:23] <SWPadnos> sure
[23:38:32] <SWPadnos> the buffering looks like a likely candidate for problems
[23:40:08] <rayh> Right. halcmd does NOT buffer?
[23:40:25] <rayh> or does it buffer by line
[23:40:32] <SWPadnos> no - it's in tcl file handling (or the kernel - not sure)
[23:40:52] <SWPadnos> you can turn it off in tcl (8.5 at least)
[23:42:27] <rayh> buffering may be the problem with the open xxx "r+" version.
[23:42:41] <SWPadnos> it looks like you can issue something like "fconfigure pipe_name -buffering line" to put into line buffer mode (or use none for no buffering)
[23:46:02] <rayh> phone
[23:46:09] <SWPadnos> line buffering is probably best for this application, since there's always a newline after every command or response
[23:46:11] <SWPadnos> ok