#include <Blackboard.h>
Inherited by BasicModule.
Inheritance diagram for ImNotifiable:
Public Member Functions | |
virtual void | receiveBBItem (int category, const BBItem *details, int scopeModuleId)=0 |
virtual | ~ImNotifiable () |
Prevent compiler complaints, but its best not to use the destructor. |
Andreas Koepke
|
Called by the Blackboard whenever a change of a category occurs to which this client has subscribed. If your class is derived from a class that also is notifiable, make sure that you call it first thing you do. E.g. BaseClass : public ImNotifiable ... YourClass : public BaseClass ... YourClass::receiveBBItem(category, details, scopeModuleId) { BaseClass::receiveBBItem(category, details, scopeModuleId); switch(category) { ... } } This also implies that you should handle unknown categories gracefully -- maybe a subclass subscribed to them. This function is called from within publishBBItem, please pay attention to race conditions that can appear. If you want to schedule messages when this function of your module is called, you have to use the Enter_Method or the Enter_Method_Silent macro. Implemented in AlohaMacLayer, CSMAMacLayer, Mac80211, P2PPhyLayer, SnrEval, BasicModule, BasicSnrEval, and ChannelAccess. |