etherlab/runtime_etherlab.py
changeset 2703 32ffdb32b14e
parent 2643 b98d9e08231f
child 3750 f62625418bff
equal deleted inserted replaced
2702:f0a70f0246da 2703:32ffdb32b14e
   112                         "3": "CRITICAL"}.get(lvl, "DEBUG")],
   112                         "3": "CRITICAL"}.get(lvl, "DEBUG")],
   113                     msg)
   113                     msg)
   114         time.sleep(0.5)
   114         time.sleep(0.5)
   115 
   115 
   116 
   116 
       
   117 # TODO : rename to match _runtime_{location}_extname_init() format
   117 def _runtime_etherlab_init():
   118 def _runtime_etherlab_init():
   118     global KMSGPollThread, StopKMSGThread
   119     global KMSGPollThread, StopKMSGThread
   119     StopKMSGThread = False
   120     StopKMSGThread = False
   120     KMSGPollThread = Thread(target=KMSGPollThreadProc)
   121     KMSGPollThread = Thread(target=KMSGPollThreadProc)
   121     KMSGPollThread.start()
   122     KMSGPollThread.start()
   122 
   123 
   123 
   124 
       
   125 # TODO : rename to match _runtime_{location}_extname_cleanup() format
   124 def _runtime_etherlab_cleanup():
   126 def _runtime_etherlab_cleanup():
   125     global KMSGPollThread, StopKMSGThread, SDOThread
   127     global KMSGPollThread, StopKMSGThread, SDOThread
   126     try:
   128     try:
   127         os.kill(SDOProc.pid, signal.SIGTERM)
   129         os.kill(SDOProc.pid, signal.SIGTERM)
   128     except Exception:
   130     except Exception: