[openbeosnetteam] Re: Talking between modules [Was: Change of heart...]

  • From: "Graham Gilmore" <grahamg@xxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Tue, 05 Feb 2002 23:25:43 -0500

>
>Calling direct would be quicker but assumes a degree of knowledge of 
it's
>surrounding that it probablt won't/can't have.  I mean an ethernet 
module
>shouldn't really need to know anything beyond, it's from 
xx:xx:xx:xx:xx:xx
>and was sent to me (or a broad/multi-cast) and it's of type XXXX. 
That's all
>it needs to do it's job.
        
        All that's needed is a consistent interface to whatever you're going to 
call.  Each module would define the same entry point that the lower 
level can call, and the lower level module just has to store pointers to 
those entry points where it can easily look them up at its 
initialization time.  (I'm assuming that the lower level module knows/is 
told that "module foo wants to register with you").

        Graham





Other related posts: