swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] How to send a signal when ..


From: Paul Johnson
Subject: Re: [Swarm-Support] How to send a signal when ..
Date: Thu, 11 Dec 2003 13:18:33 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031018

Poornima wrote:

Hi,
        I am using Swarm software to solve the Maze problem. Right now my
problem is how to send signals like in C++ program. Ex: I want to get a
signal when ever an agent enters into to a particular cell in the Grid
(putObject). So that when ever I get that signal I can run some function.

Waiting for a solution.. Thanks a lot.. Poornima



Think of it in just the same way as C++. Create a "record keeper" object. Either have the agent take note of where it is and it sends another "record keeping" object a message indicating that something has happened, or rewrite the Grid2d implementation (override putObject) to add functionality that notifies a "record keeper" whenever someone gets in there. Then the record keeper object runs "some function", as you say.

--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700




reply via email to

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