MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / ModuleManager

Class ModuleManager

scenario_runner/no_rendering_mode.py:191–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189
190
191class ModuleManager(object):
192 def __init__(self):
193 self.modules = []
194
195 def register_module(self, module):
196 self.modules.append(module)
197
198 def clear_modules(self):
199 del self.modules[:]
200
201 def tick(self, clock):
202 # Update all the modules
203 for module in self.modules:
204 module.tick(clock)
205
206 def render(self, display):
207 display.fill(COLOR_ALUMINIUM_4)
208 for module in self.modules:
209 module.render(display)
210
211 def get_module(self, name):
212 for module in self.modules:
213 if module.name == name:
214 return module
215
216 def start_modules(self):
217 for module in self.modules:
218 module.start()
219
220
221# ==============================================================================

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected