swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: swarm-1.2 and Drone


From: Sven N. Thommesen
Subject: Re: swarm-1.2 and Drone
Date: Wed, 26 Aug 1998 14:43:14 -0500

Marcus,

some more on the subject:

I installed swarm-1.3 and swarmapps.
I modified Arguments.m by adding the line:

{"drone-params", 'D', "PARAM", 0, "Parameter from Drone", 4},

to the base_options[] struct.

Saying "./heatbugs --usage" or "./heatbugs --help" now shows that the new
option has been added.

Unfortunately, however,

"./heatbugs -b -D 33" or "./heatbugs -b --drone-params=33"

both fail. So I thought, nuts, more code needed to be added.

HOWEVER,

"./heatbugs -b -m Mode1" and "./heatbugs -b --mode=Mode1" also fail.

So is there possibly a bug in Arguments.m, or somewhere in all that fun
stuff in /src/misc ?

As I said before, all I need is for Arguments to

   a) make available Argc and Argv from the command line, unchanged;
        (do -getArgc and -getArgv provide this?)

   b) NOT abort when it encounters an unknown command line option, but
rather silently pass over it. 

Would it be possible to add a command line option (say, -e or
--expert-mode) that would let Arguments operate this way? 

I should note that Drone emits command line arguments of the form
<prefix><paramName>=<value>. In my case, <prefix> = "-D:" but that can be
changed. What doesn't change is the "<paramName>=<value>" part. So it seems
that to use Arguments as is, I'd have to define a new parameter
"-D<paramName>" for each possible parameter Drone might pass to my program,
as well as a method to extract each parameter value from Arguments.
However, like Ginger I have a large number of possible such parameters. So
a simple pass-through seems the easiest, given that I already have code
that parses and applies those parameters.

--Sven


At 12:36 AM 8/26/1998 -0500, you wrote:
>
>I just tried to run a set of experiments with an app (recently ported to
>1.2) with the aid of Ted Belding's Drone. 
>
>Drone passes runtime arguments to the app in this form:
>
>-D:<argument-name>=<value>
>
>This no longer seems to work, in that the app terminates with the error
>message "Invalid option -- D". Possibly related to the new Argument object
>that parses the command line.
>
>Where do I go from here? My app has its own parser, so in principle I just
>need for Argument to pass these strings through untouched. 
>
>(If Swarm must be changed, I was going to beg for its inclusion in 1.3 --
>but I see you beat me to it! :-)
>
>Sven
>
>
>                  ==================================
>   Swarm-Support is for discussion of the technical details of the day
>   to day usage of Swarm.  For list administration needs (esp.
>   [un]subscribing), please send a message to <address@hidden>
>   with "help" in the body of the message.
>                  ==================================
>

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]