Package topo :: Package base :: Module simulation :: Class EPConnectionEvent
[hide private]
[frames] | no frames]

Class EPConnectionEvent

source code


An Event for delivery to an EPConnection.

Provides access to a data field, which can be used for anything the src wants to provide, and a link to the connection over which it has arrived, so that the dest can determine what to do with the data.

By default, the data is deepcopied before being added to this instance for safety (e.g. so that future changes to data structures do not affect messages arriving from the past). However, if you can ensure that the copying is not necessary (e.g. if you deepcoy before sending a set of identical messages), then you can pass deep_copy=False to avoid the copy.

Instance Methods [hide private]
 
__init__(self, time, conn, data=None, deep_copy=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, sim)
Cause some computation to be performed, deliver a message, etc., as appropriate for each subtype of Event.
source code
 
__repr__(self)
x.__repr__() <==> repr(x)
source code

Inherited from Event: __cmp__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, time, conn, data=None, deep_copy=True)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__call__(self, sim)
(Call operator)

source code 
Cause some computation to be performed, deliver a message, etc., as appropriate for each subtype of Event. Should be passed the simulation object, to allow access to .time() etc.
Overrides: Event.__call__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
x.__repr__() <==> repr(x)
Overrides: object.__repr__
(inherited documentation)