Radio.h unneccessary variable and include

19 views
Skip to first unread message

Alessandro Pischedda

unread,
May 21, 2013, 9:50:56 AM5/21/13
to castalia-...@googlegroups.com
Hi,
I've notice that the Radio class has an unused member called *resMgrModule probably it refers to old code. Removing it you can remove even the inclusion of  ResourceManager.h .

Alessandro Pischedda

P.S. I look to the group and I cannot find any post about it, so if it is a replication of some post that I haven't seen  sorry about that.

Thanassis Boulis

unread,
May 21, 2013, 9:54:04 PM5/21/13
to castalia-...@googlegroups.com
Yes, you are right. Messages to resource manager are sent using the powerDrown method, which is defined in CastaliaModule.cc

The pointer resMgrModule is left there from earlier versions of the code, where the pointer was calculated once in the radio module and used directly from there. With the new design, any module can call powerDrawn without having to explicitly handle pointers or messages. I thought we had some checks so that only specific modules could draw power  (modules that are identified as hardware that spends energy) but I cannot find it now in the code.

--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castalia-simula...@googlegroups.com.
To post to this group, send email to castalia-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/castalia-simulator/ea1d1a51-4600-4185-bc46-c1f5a46a924a%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alessandro Pischedda

unread,
May 22, 2013, 4:31:53 AM5/22/13
to castalia-...@googlegroups.com
If I am right that check you talking about is made on powerDrawn() function in CastaliaModule.cc

Reply all
Reply to author
Forward
0 new messages