Samraksh / eMote

eMote OS -- Multiple Ports (using .NET MF v4.3)
0 stars 0 forks source link

Simple mods to CSMA dll #367

Open mukundansridharan opened 8 years ago

mukundansridharan commented 8 years ago

The request comes from the WWF project folks. Currently we have a liveliness parameter (which is a time delay) which is configurable from the dll, but the beaconing interval is set in (native) source code. We need to add a parameter to CSMA dll called "DiscoveryInterval" which should set the beaconing interval on the native side. The liveliness parameter should become a factor of the DiscoveryInternal and not an actual time. The default for the liveliness should be 3. A value of less than 1 is not acceptable and should default to 3 again.

AnanthAtSamraksh commented 8 years ago

but the beaconing interval is set in (native) source code.

Just for reference, this value is set in csmaMAC.cpp's csmaMAC::Initialize. The value at present is 5 secs. The corresponding line is

if(VirtTimer_SetOrChangeTimer(VIRT_TIMER_MAC_BEACON, 0, 5000000, FALSE, TRUE, beaconScheduler) != TimerSupported)

@MukundanAtSamraksh can you please explain this line (with an example perhaps)? For instance, if DiscoveryInternal is 5 secs, then liveness has to be 15 secs and above (and cannot be 5 secs)?

The liveliness parameter should become a factor of the DiscoveryInternal and not an actual time.

Will the user still have control over liveness (I guess not)?

mukundansridharan commented 8 years ago

User will have control over liveliness, for example they can set it to 2, and if they set discovery interval to 10sec, then the liveliness interval becomes 20secs. What I meant is that they cannot directly set it to 20secs, they will set the multiplication factor.

ChrisAtSamraksh commented 8 years ago

What if the DiscoveryInterval automatically updates the NeighborLivenessDelay to be 3 times the DiscoveryInterval but the user can just change NeighborLivenessDelay to be anything they want greater than the DiscoveryInterval?

So if I want DiscoveryInterval to be 5, it automatically sets NeighborLivenessDelay to be 15, then I set NeighborLivenessDelay to be 14 if I want (I think it is cleaner if they are both in seconds instead of one in seconds and the other a factor of the first).

ChrisAtSamraksh commented 8 years ago

I started work on this recently but one thing I am confused about is that it seems as if a lot of functions are not hooked up at all. There is a function SetNeighborLivelinessDelay() which calls Reconfigure() which calls InternalReConfigure() (all of that is within the dll) which calls the driver Samraksh_emote_net driver function InternalReConfigure() which does nothing.

So I'm hooking up a lot of the reconfigure functionality.

AnanthAtSamraksh commented 8 years ago

I have added the missing radio driver functionalities in this commit 26e16a7. Can you please review and cherry-pick this commit as well?

WilliamAtSamraksh commented 8 years ago

Shouldn't that be Liveness? Liveliness should have been deprecated.