Bug 2816 - Split MAC in abstract class and concrete class
Split MAC in abstract class and concrete class
Status: PATCH PENDING
Product: ns-3
Classification: Unclassified
Component: lr-wpan
ns-3-dev
All All
: P3 enhancement
Assigned To: Tom Henderson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-05 20:33 EST by Tommaso Pecorella
Modified: 2017-11-13 19:08 EST (History)
1 user (show)

See Also:


Attachments
changeset (15.54 KB, patch)
2017-11-05 20:33 EST, Tommaso Pecorella
Details | Diff
correct changeset (17.45 KB, patch)
2017-11-11 19:18 EST, Tommaso Pecorella
Details | Diff
changeset + doc (21.62 KB, patch)
2017-11-13 19:08 EST, Tommaso Pecorella
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2017-11-05 20:33:18 EST
Created attachment 2948 [details]
changeset

I'm taking over the old GSoC work of Vishwesh Rege (ContikiMAC for LrWpan).

It needs still some work and validation, but this patch is simple enough to be applied.
It splits the MAC into two entities: one abstract (LrWpanMac) and one concrete (LrWpanNullMac).

The other patches will require some more work and are:
1) ContikiMac, and
2) Energy consumption for ContikiMac.

There will be NO support for energy consumption in NullMAC, simply because NullMAC is not energy-friendly.

All the tests are passing, of course.
Comment 1 Tommaso Pecorella 2017-11-11 19:18:09 EST
Created attachment 2952 [details]
correct changeset
Comment 2 Tom Henderson 2017-11-11 21:23:09 EST
Can you please update the .rst with the new design architecture, and the class documentation?  This patch doesn't seem to make LrWpanMac abstract, only to introduce a new intermediate base class.  Is the NullMac supposed to model the Contiki NullMac?  If so, can you state this in the class documentation?
Comment 3 Tommaso Pecorella 2017-11-12 08:25:34 EST
"NullMac" is the Contiki definition of the existing MAC. We can opt for a different name, of course, but I have a very short imagination.

The LrWpanMac is abstract thanks to this function:
 virtual void SetLrWpanMacState (LrWpanMacState macState) = 0;
actually, it's the only one that is required to be changed between NullMac (or whatever name we want to use) and ContikiMac (I'm reviewing it).

Documentation... I'm on it.



(In reply to Tom Henderson from comment #2)
> Can you please update the .rst with the new design architecture, and the
> class documentation?  This patch doesn't seem to make LrWpanMac abstract,
> only to introduce a new intermediate base class.  Is the NullMac supposed to
> model the Contiki NullMac?  If so, can you state this in the class
> documentation?
Comment 4 Tommaso Pecorella 2017-11-13 19:08:50 EST
Created attachment 2954 [details]
changeset + doc