[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about SRM implementation



SRM developers,

	I'm trying to use SRM as the transport protocol
to the application protocol I'm developing in my master's 
thesis. The problem is that I need group members to change
groups during the simulation. To join a group I use
the function start. As I didn't find any function
to leave a group in SRM, I decided to do a function
stop to reset what was set in start.
	
====> TCL code (that I added in srm.tcl)
Agent/SRM instproc stop {} {
	$self instvar node_ dst_	;# defined in Agent base class
	set dst_ [expr $dst_]		;# get rid of possibly leading 0x etc.
	$self cmd stop

	$node_ leave-group $self $dst_

	$self instvar ns_ session_ sessionFunction_
        $session_ delete
}

====>C++ code (added in srm.cc)
virtual void stop() {
	delete sip_;
	sip_ = new SRMinfo(-1);
	cleanup();
	delete siphash_;
	groupSize_ = 0;
}


	I don't think this is enough, because the list (sip_) on
the other members of the group will keep their old list with
the member that have just left the group. Does SRM have any message
to determine that a member is leaving the group? If not, is it
determined using timeout?
	Is there anything wrong with this approach? Any help
will be welcome.


Thanks,
Renata.

-- 
-----------------------------------------------------
Renata Cruz Teixeira - M.Sc. Student, PEE/COPPE/UFRJ
Research area: Distributed virtual reality
E-mail:[email protected]
-----------------------------------------------------