Esempio n. 1
0
 def __init__(self, up, uid_1, uid_2, network_name, pathloss=None) :
     Event.__init__(self)
     self._up = up
     self._uid_1 = uid_1
     self._uid_2 = uid_2
     self._network_name = network_name
     self._pathloss = pathloss
Esempio n. 2
0
 def __init__(self, entity, lat, long, agl, forward_vel=None, lin_vel=None) :
     Event.__init__(self)
     self._entity_uid = entity.get_uid()
     self._entity_type = entity.__class__.__name__
     self._entity_agents = map(lambda a : a.__class__.__name__, entity.get_agents())
     self._lat = lat
     self._long = long
     self._agl = agl
     self._forward_vel = forward_vel
     self._lin_vel = lin_vel
Esempio n. 3
0
 def _process(self, data) :
     event_inst = Event.from_pickle(data)
     keys = filter(lambda e : isinstance(event_inst, e), self._subscriptions.keys())
     if self._subscriptions.has_key(All) :
         keys.append(All)
     if len(keys) > 0 :
         for cb in self._subscriptions[keys[0]] :
             if len(cb[1]) > 0 :
                 cb[0](event_inst, cb[1])
             else :
                 cb[0](event_inst)
Esempio n. 4
0
 def __init__(self, owner_uid) :
     Event.__init__(self)
     self._owner_uid = owner_uid
Esempio n. 5
0
 def __init__(self, lat, lon, threatened_uid) :
     Event.__init__(self)
     self._threat_lat = lat
     self._threat_lon = lon
     self._threatened_uid = threatened_uid
Esempio n. 6
0
 def __init__(self,node_uid, north_west, south_east):
     Event.__init__(self)
     self._node_uid = node_uid
     self._north_west = north_west
     self._south_east = south_east
Esempio n. 7
0
 def __init__(self, points) :
     Event.__init__(self)
     self._waypoints = points
Esempio n. 8
0
 def __init__(self, src_agent_uid, message_inst, network) :
     Event.__init__(self)
     self._src_agent_uid = src_agent_uid
     self._message = message_inst
     self._network = network
Esempio n. 9
0
 def __init__(self) :
     Event.__init__(self)
Esempio n. 10
0
 def __init__(self, world) :
     Event.__init__(self)
     self._world = world
Esempio n. 11
0
 def __init__(self, entity_mapping) :
     Event.__init__(self)
     self._entity_mapping = entity_mapping
Esempio n. 12
0
 def __init__(self, daemon_id) :
     Event.__init__(self)
     self._daemon_id = daemon_id
Esempio n. 13
0
 def __init__(self, point1_lat, point1_lon, point2_lat, point2_lon, ais_uid) :
     Event.__init__(self)
     self._point1 = (point1_lat, point1_lon)
     self._point2 = (point2_lat, point2_lon)
     self._ais_uid = ais_uid
Esempio n. 14
0
 def __init__(self, location, rate) :
     Event.__init__(self)
     self._location = location
     self._rate = rate       # rate is in km per seconds