[ns] global array

manoop talasila mt57 at njit.edu
Mon Nov 2 06:44:01 PST 2009


Hi Javed,

In present implementation, I created 6 mobile nodes (requirement is to have
10m transmitting range for all nodes.) and assumed node_0 as CA (central
authority). So, all nodes communicate with node_0. And node_0 stores all the
data and global values for calculations. Now, if nodes are mobile, then all
nodes may not be in 10m transmission range to node_0 (acting as CA). Then
how to send packets to CA for storing.
Any other way to do this for storing the global data? please advise.

On Mon, Nov 2, 2009 at 1:29 AM, manoop talasila <mt57 at njit.edu> wrote:

> I tried the second suggestion and it worked. Declared & initialized gloabl
> array in header file. accessed this array in one function. And this function
> is used by only one node when it recieves some packets. This node acts as CA
> now.
>
> Thanks Javed for the suggestion.
>
>   On Thu, Oct 29, 2009 at 9:03 AM, Basim Javed <basimjaved at gmail.com>wrote:
>
>> hi
>>
>> what I can see are two ways:
>>
>> 1. create an agent, and then attach to a node of your choice to act as CA
>> 2. make this array as part of some suitable function, so that all nodes
>> created will have this array...but simply dont use for all of them, except
>> the one u declare as CA.
>>
>> I would be interested to know how you do it, and results :)
>> regards
>> Basim
>>
>>   On Thu, Oct 29, 2009 at 2:49 PM, manoop talasila <mt57 at njit.edu> wrote:
>>
>>> Hi Basim,
>>>
>>> Thanks for the reply.
>>> In my design I need to store this global info in Central Authority(CA).
>>> So, may be I can create a new node in my TCL script which will act as CA.
>>>
>>>    1. But, how do I specify this array for a single node (CA)?
>>>       - Do I need to create a new agent with the Array & access
>>>       functions.
>>>       - And then attach this agent to the CA node?
>>>
>>> Please let me know if my understanding is right.
>>>
>>>
>>> On Thu, Oct 29, 2009 at 12:08 AM, Basim Javed <basimjaved at gmail.com>wrote:
>>>
>>>
>>>> hi Manoop
>>>>
>>>> since u want to use the info reported by the wireless nodes, hence i
>>>> suggest to declare some class/object in the MAC layer...but then in which
>>>> node's mac layer... the answer to this question comes from your
>>>> design...where u would store this info in a real wireless network?
>>>>
>>>> rdgs
>>>> basim
>>>>
>>>>
>>>>
>>>   On Wed, Oct 28, 2009 at 6:40 PM, manoop talasila <mt57 at njit.edu>wrote:
>>>
>>>
>>>> Hi NSusers,
>>>>
>>>> I am trying to use a global array to store some info that is reported by
>>>> each wireless node and later will use this stored info for processing
>>>> some
>>>> data when any other node request for it.
>>>>
>>>> To implement this scenario, where do I declare the global array? so that
>>>> till the end of simulation any node can access the reported info from
>>>> this
>>>> array.
>>>>
>>>> --
>>>> Regards,
>>>> Manoop Talasila
>>>> Ph.D. student
>>>> CS Dept, NJIT
>>>> Phone: 732-789-7165
>>>> Email: mt57 at njit.edu
>>>>
>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Manoop Talasila
>>> Ph.D. student
>>> CS Dept, NJIT
>>> Phone: 732-789-7165
>>> Email: mt57 at njit.edu
>>>
>>>
>>
>>
>
>
> --
>  Regards,
> Manoop Talasila
> Ph.D. student
> CS Dept, NJIT
> Phone: 732-789-7165
> Email: mt57 at njit.edu
>



-- 
Regards,
Manoop Talasila
Ph.D. student
CS Dept, NJIT
Phone: 732-789-7165
Email: mt57 at njit.edu


More information about the Ns-users mailing list