swarm-support
[Top][All Lists]
Advanced

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

Re: probes


From: Sven N. Thommesen
Subject: Re: probes
Date: Mon, 29 Jan 2001 16:02:28 -0600


Thanks, Rick! That seems to do it.

Cheers,
Sven

At 02:16 PM 1/29/01, you wrote:

Sven, maybe i'm missing the point of your question,
but anyway...

Another approach to this is already provided, via
the setObjectToNotify: method.
For obj = object being probed, you can:

  aprobe = [probeLibrary getProbeForVariable: "actMethod"
                    inClass: [self class]];
  [probeMap addProbe: aprobe];
  [aprobe setObjectToNotify: obj];

and then define something like this in the class for obj:

- eventOccurredOn: (id) anObject
              via: (id) aProbe
    withProbeType: (const char *)aProbeType
               on: (const char *)probedElement
           ofType: (char)dataType
         withData: (void *)data
{

    if ( strcmp( probedElement, "actMethod" ) == 0 ) {
         ...whatever...
    }

    ...
}

We've used this to allow the model to know when
the user has changed a parameter, and to act accordingly.

- r


Rick Riolo                           address@hidden
Center for Study of Complex Systems (CSCS)
4477 Randall Lab
University of Michigan         Ann Arbor MI 48109-1120
Phone: 734 763 3323                  Fax: 734 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html

On Mon, 29 Jan 2001, Sven N. Thommesen wrote:

> Date: Mon, 29 Jan 2001 14:00:36 -0600
> From: Sven N. Thommesen <address@hidden>
> Reply-To: address@hidden
> To: address@hidden
> Subject: probes
>
>
> Would it be a  major deal to add functionality to VarProbes so that the
> user program may ask (a) whether the data content of any of the probed
> values has been changed; (b) whether the content of a specific variable has
> changed? It would require the ability of the user program to reset the
> flags indicating such changes.
>
> I have had people ask me why it is that they can stop a sim, change
> parameter values in probe windows, and restart, but the program does not
> seem to take account of the new values.
>
> The above functionality would seem to bring us closer to a solution to that
> problem.
>
> 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.


                 ==================================
  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]