Tools
ARM Research Tools
WeightGate
Download: WeightGate.exe
(C) 2006 ARM Research Labs, LLC.
This program is distributed AS-IS, with no warranty of any kind. You are welcome to use this program on your own systems or those that you directly support. Please do not redistribute this program except as noted above, however feel free to recommend this program to others if you wish and direct them to our web site where they can download it for themselves. Thanks!
This program is most commonly used to control the activation of external test programs from within Declude (www.declude.com) based on the weight that has been calculated thus far for a given message.
As an added feature, if you rename this program to ShowMe.exe then it will emit all of the command line arguments as it sees them to a file called c:\ShowMe.log so that you can use it as a debugging aid.
If you are seeing this message, you have used this program incorrectly. The correct invocation for this program is:
WeightGate <low> <weight> <high> <program> <arg 1>, <arg 2>,... <arg n>
Where:
<low> = a number representing the lowest weight to run <program>.
<weight> = a number representing the actual weight to evaluate.
<high> = a number representing the highest weight to run <program>.
<program> = the program to be activated if <weight> is in range.
<arg 1>, <arg 2>, ... <arg n> = arguments for <program>.If <weight> is in the range [<low>,<high>] then WeightGate will run <program> and pass all of <arg 1>, <arg 2>,... <arg n> to it. Then WeightGate will collect the exit code of <program> and return it as WeightGate's exit code.
If WeightGate gets the wrong number of parameters it will display this message and return FAIL_SAFE (zero) as it's exit code.
If <weight> is not in range (less than <low> or greater than <high>) then WeightGate will NOT launch <program> and will return FAIL_SAFE (zero) as it's exit code.
As a deubgging aid, I was called with the following arguments:
arg[0] <me> = WeightGate
Scenerio:
Suppose you wanted to use it in Declude to skip running SNF if your weight was already ridiculously low (perhaps white listed) or already so high that you want to save the extra cycles. Then you might do something like this:
SNF external nonzero "c:\tool\WeightGate.exe -50 %WEIGHT% 30 c:\SNF\sniffer.exe authenticationxx" 10 0
To test this concept out you might first create a copy of WeightGate.exe callled ShowMe.exe (case matters!) and then do something like this:
SNF external nonzero "c:\tool\ShowMe.exe -50 %WEIGHT% 30 c:\SNF\sniffer.exe authenticationxx" 10 0
The result of that would be the creation of a file c:\ShowMe.log that contained all of the parameters ShowMe.exe was called with -- that way you wouldn't have to guess if it was correct. ShowMe.exe ALWAYS returns zero, so this _should_ be safe ;-)
If you run WeightGate on the command line without parameters it will tell you all about itself and its alter ego ShowMe.exe.
