File Overlay/Broose/OverlayBroose.ned

Contains:

//
// Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//

import
	"BrooseBucket",
	"Broose";
//
// Implementation of the Broose overlay as described in
// "Broose: A Practical Distributed Hashtable based on the
// De-Bruijn Topology" by A. Gai and L. Viennot.
//
// @author Jochen Schenk
//
module OverlayBroose

	parameters:
		keyLength: numeric,
		localPort: numeric,
		debugOutput: bool,

                lookupNumberNextHops : numeric,
                lookupParallelPaths : numeric,
                lookupParallelRpcs : numeric,
                lookupSecure : bool,
                lookupMerge : bool,

		shiftingBits : numeric,

		hopCountMax: numeric,
		measureNetwInitPhase: bool,
		drawOverlayTopology: bool;

	gates:
        	in: from_udp;
        	out: to_udp;
		in: from_app;
		out: to_app;

	submodules:
		rBucket : BrooseBucket[2^shiftingBits];
			display: "i=block/table";
		lBucket : BrooseBucket;
			display: "p=360,60;i=block/table";
		bBucket : BrooseBucket;
			display: "p=420,60;i=block/table";

	
        	broose: Broose;
			parameters: 
				    keyLength = keyLength,
				    localPort = localPort,
				    debugOutput = debugOutput,
                                    shiftingBits = shiftingBits,
                                    lookupNumberNextHops = lookupNumberNextHops,
                                    lookupParallelPaths = lookupParallelPaths,
                                    lookupParallelRpcs = lookupParallelRpcs,
                                    lookupSecure = lookupSecure,
                                    lookupMerge = lookupMerge,
				    hopCountMax = hopCountMax,
				    measureNetwInitPhase = measureNetwInitPhase,
				    drawOverlayTopology = drawOverlayTopology;
            		display: "p=60,60;i=block/circle";


	connections:
		from_udp --> broose.from_udp++;
		to_udp <-- broose.to_udp++;
		from_app --> broose.from_app;
		to_app <-- broose.to_app;

endmodule