瀏覽代碼

Added explanation of file

Yentl Van Tendeloo 9 年之前
父節點
當前提交
77b9f14dbb
共有 1 個文件被更改,包括 13 次插入1 次删除
  1. 13 1
      src/python_sccd/python_sccd_runtime/socket2event.py

+ 13 - 1
src/python_sccd/python_sccd_runtime/socket2event.py

@@ -1,5 +1,17 @@
-import threading
+"""
+Socket 2 Event wrapper
+
+Author: Yentl Van Tendeloo
+
+This maps socket communication to events, and vice versa, allowing for a
+Statechart to use (blocking) sockets. It sends events to the socket_in port,
+and listens for commands on the socket_out port.  As this runs on its own
+thread, you will need to start the code by running
+"boot_translation_service(controller)" before using the ports.
+"""
+
 from sccd.runtime.statecharts_core import Event
+import threading
 import socket
 
 send_data_queues = {}