Example #1
0
 def inputInit(self):
     self.peds = []
     self.responses = []
     self.lock = thread.allocate_lock() #TODO: refactor to LockingInput
     self.sensors = []
     self.initPedestrians(self['NumPeds'], self['Velocity'], self['MaxX'])
     self.initSensors()
     self.dirPeds = SynchDirPeds({})
     self.sensNetLoc = SynchSenseNetLoc({'SensorSpacing':45})
 def inputInit(self):
     HOST = ''  # Symbolic name meaning all available interfaces
     PORT = self.argDict['Port']  # Arbitrary non-privileged port
     self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
     self.sock.bind((HOST, PORT))
     self.dirPeds = SynchDirPeds({})
     self.sensNetLoc = SynchSenseNetLoc({
         'SensorSpacing': 45,
         'Mode': 'SensorNetwork',
         'IPIndexTable': self['IPIndexTable']
     })