MCPcopy Create free account
hub / github.com/AimRT/AimRT / Start

Method Start

src/examples/py/helloworld/helloworld_module.py:49–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 return True
48
49 def Start(self):
50 aimrt_py.info(self.logger, "Module start")
51
52 try:
53 # executor
54 def test_task():
55 aimrt_py.info(self.logger, "run test task.")
56
57 self.work_executor.Execute(test_task)
58 self.work_executor.ExecuteAfter(datetime.timedelta(seconds=1), test_task)
59 self.work_executor.ExecuteAt(datetime.datetime.now() + datetime.timedelta(seconds=2), test_task)
60
61 except Exception as e:
62 aimrt_py.error(self.logger, "Initialize failed. {}".format(e))
63 return False
64
65 return True
66
67 def Shutdown(self):
68 aimrt_py.info(self.logger, "Module shutdown")

Callers

nothing calls this directly

Calls 3

ExecuteAfterMethod · 0.80
ExecuteMethod · 0.45
ExecuteAtMethod · 0.45

Tested by

no test coverage detected