At present the way CSMA callbacks are specified is via MACBase.Configure, providing callback methods as arguments for receive & neighbor change events. This is non-standard. It requires exactly one callback handler for each event type and makes it awkward (and inefficient) to allow zero or many callback handlers, something that is useful if there are separate listeners (such as a main protocol and a health monitor).
At present the way CSMA callbacks are specified is via MACBase.Configure, providing callback methods as arguments for receive & neighbor change events. This is non-standard. It requires exactly one callback handler for each event type and makes it awkward (and inefficient) to allow zero or many callback handlers, something that is useful if there are separate listeners (such as a main protocol and a health monitor).
I suggest obsoleting
and replacing it with
along with OnReceive and OnNeighborChange events that can be subscribed in the usual way.
This would be a modest change and would be backward-compatible.