Thanks - that definitely helps...I fiddled with it a long time and came up with this to kind of act as my 'subst':
import java.lang.reflect.*;
public void setVar(testObj obj, String name, int val) throws Exception {
Field field = obj.getClass().getDeclaredField(name);
field.setInt(obj...
I'm new to the Java world, and previously worked with Tcl...in TCL, there is a command called 'subst' which basically allowed for this:
proc setInfo {param val} {
set $param $val
return "Param $param was set to [subst $$param]"
}
setInfo name Bob
Param name was set to Bob...
Yeah...it was right there in front of me the whole time. I've been working with client/server sockets too(!)
I went ahead and added a piece to create a server socket in the tester constructor - when the generator script runs, I just have it connect as a client and send the OK. Works like a...
I feel like I'm missing something obvious here, but if anyone could help I'd appreciate it. Basically, I've got a TCL analyzer that captures packets. So that the capture can run at the same time as the generator, I spawn the generator as a new process using a standalone tcl script. This...
Hmm...how I'm actually thinking sockets might be the way to go for this...I'm thinking I can have the REPORT object open a server socket, and the DUT objects can just send the information that way. I kind of hit a snag there as well, but it's kind of a different topic so I'll start a new thread...
In my automated environment, I launch a 'DUT object' that is mapped to the device being tested...I communicate with the CLI, etc all through this object.
This object gets created whenever I launch a config using a proc called 'readTestConfig'...this reads the config file, and spawns the DUT...
I've got an automated telnet and login piece that works fine (prompts for username and then password), but there's another bit in the CLI I need to automate where you alter the login password, and it prompts you to confirm the password before continuing, and therein lies the problem.
I assumed...
Thanks - it did turn out to be related to tclsh, at the head of the script was the line #!/usr/bin/tcl and as fate would have it 8.4 no longer has tclx as a separate binary which seemed to get rid of the tcl executable. I replaced it with #!/usr/bin/env tclsh and that seemed to fix the problem...
I was previously running TCL 8.3 and there is a bit in our infrastructure here that basically execs another file. So, within a method, I have something like:
eval exec module1.tcl $args
Then inside module1.tcl it parses the args, etc and runs a series of commands.
This worked fine in tcl 8.3...
I understand that tclx is no longer a separate binary but was folded in as an extension in 8.4 - I've kind of inherited a system that was already in place and our packet generator is no longer working because it is looking for the tcl executable and can no longer find it. On the tcl site I saw...
That, combined with a little tweaking from the vbs guy working on the client app, seems to have done it. Thanks for the help, I got handed this and (clearly) didn't really even know where to start. We actually got a successful test to work where his side initiated the test over the socket, I...
Thanks for your responses - I see about the telnet...I just open a socket now and that part seems to work. Basically, I need his app to send mine commands and I will execute them in my environment and send back the results.
I use the command:
socket -server interp 5678
Where, just to test...
Thanks, that got me started...basically I have this test harness and I'm building an Interpreter to talk between the remote app and mine. In the Interpreter's constructor, I do this:
set socketName [socket -server interpret 5678]
'interpret' is a method that is part of the Interpreter...
Sorry if this is daft, but basically my situation is this:
I've written a protocol tester in ITCL that our TCL harness here utilizes via a series of test scripts. I'm working with someone else in another group who has come up with a test creator, and we want to make the two work together.
I...
I have a proc that converts hex IP address and hex mask into a broadcast address. This worked with TCL 8.3 but I'm hitting a problem with TCL 8.4
Basically, the proc does the following:
set hexIP 80010101
set hexMASK ffff0000
set IPM [expr ( $hexIP | $hexMASK ) ]
-2147352577
format "%08x"...
Sorry if this is a no-brainer but I'm having trouble tracking this down...I've got a class with a bunch of methods and when the object is created everything works fine. The problem is, I have another class object which I want to interact with the first one, and one of the things I want it to do...
Sorry if this is a simple question, but I just can't figure out how to do it (if there is actually even a way to do it). Here's what I'm trying to do:
Say I have a file:
DUT1.tcl
Within that file, I define a class:
itcl::class DUT1 { etc...
Within that class, I define a...
I have a proc that builds streams on a tester...it doesn't have too many arguments but I've got a suite of tests I'm writing that call for a ton of stream adds and deletes, so I'm looking to make it even simpler by creating a proc that, when fed a minimal number of arguments, will build the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.