Browse Source

Module documentation finalised

master
Dirk Alders 3 years ago
parent
commit
a34195edf9
97 changed files with 21006 additions and 175 deletions
  1. 194
    175
      __init__.py
  2. 4
    0
      _docs_/.buildinfo
  3. 0
    0
      _docs_/_downloads/e4086ba3197d1869e430d0a75a9a48e9/unittest.pdf
  4. 23
    0
      _docs_/_sources/index.rst.txt
  5. 676
    0
      _docs_/_static/basic.css
  6. 1
    0
      _docs_/_static/css/badge_only.css
  7. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Bold.woff
  8. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Bold.woff2
  9. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Regular.woff
  10. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Regular.woff2
  11. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.eot
  12. 2671
    0
      _docs_/_static/css/fonts/fontawesome-webfont.svg
  13. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.ttf
  14. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.woff
  15. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.woff2
  16. BIN
      _docs_/_static/css/fonts/lato-bold-italic.woff
  17. BIN
      _docs_/_static/css/fonts/lato-bold-italic.woff2
  18. BIN
      _docs_/_static/css/fonts/lato-bold.woff
  19. BIN
      _docs_/_static/css/fonts/lato-bold.woff2
  20. BIN
      _docs_/_static/css/fonts/lato-normal-italic.woff
  21. BIN
      _docs_/_static/css/fonts/lato-normal-italic.woff2
  22. BIN
      _docs_/_static/css/fonts/lato-normal.woff
  23. BIN
      _docs_/_static/css/fonts/lato-normal.woff2
  24. 4
    0
      _docs_/_static/css/theme.css
  25. 315
    0
      _docs_/_static/doctools.js
  26. 10
    0
      _docs_/_static/documentation_options.js
  27. BIN
      _docs_/_static/file.png
  28. BIN
      _docs_/_static/fonts/FontAwesome.otf
  29. BIN
      _docs_/_static/fonts/Lato/lato-bold.eot
  30. BIN
      _docs_/_static/fonts/Lato/lato-bold.ttf
  31. BIN
      _docs_/_static/fonts/Lato/lato-bold.woff
  32. BIN
      _docs_/_static/fonts/Lato/lato-bold.woff2
  33. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.eot
  34. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.ttf
  35. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.woff
  36. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.woff2
  37. BIN
      _docs_/_static/fonts/Lato/lato-italic.eot
  38. BIN
      _docs_/_static/fonts/Lato/lato-italic.ttf
  39. BIN
      _docs_/_static/fonts/Lato/lato-italic.woff
  40. BIN
      _docs_/_static/fonts/Lato/lato-italic.woff2
  41. BIN
      _docs_/_static/fonts/Lato/lato-regular.eot
  42. BIN
      _docs_/_static/fonts/Lato/lato-regular.ttf
  43. BIN
      _docs_/_static/fonts/Lato/lato-regular.woff
  44. BIN
      _docs_/_static/fonts/Lato/lato-regular.woff2
  45. BIN
      _docs_/_static/fonts/Roboto-Slab-Bold.woff
  46. BIN
      _docs_/_static/fonts/Roboto-Slab-Bold.woff2
  47. BIN
      _docs_/_static/fonts/Roboto-Slab-Light.woff
  48. BIN
      _docs_/_static/fonts/Roboto-Slab-Light.woff2
  49. BIN
      _docs_/_static/fonts/Roboto-Slab-Regular.woff
  50. BIN
      _docs_/_static/fonts/Roboto-Slab-Regular.woff2
  51. BIN
      _docs_/_static/fonts/Roboto-Slab-Thin.woff
  52. BIN
      _docs_/_static/fonts/Roboto-Slab-Thin.woff2
  53. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
  54. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
  55. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
  56. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
  57. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
  58. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
  59. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
  60. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
  61. BIN
      _docs_/_static/fonts/fontawesome-webfont.eot
  62. 2671
    0
      _docs_/_static/fonts/fontawesome-webfont.svg
  63. BIN
      _docs_/_static/fonts/fontawesome-webfont.ttf
  64. BIN
      _docs_/_static/fonts/fontawesome-webfont.woff
  65. BIN
      _docs_/_static/fonts/fontawesome-webfont.woff2
  66. BIN
      _docs_/_static/fonts/lato-bold-italic.woff
  67. BIN
      _docs_/_static/fonts/lato-bold-italic.woff2
  68. BIN
      _docs_/_static/fonts/lato-bold.woff
  69. BIN
      _docs_/_static/fonts/lato-bold.woff2
  70. BIN
      _docs_/_static/fonts/lato-normal-italic.woff
  71. BIN
      _docs_/_static/fonts/lato-normal-italic.woff2
  72. BIN
      _docs_/_static/fonts/lato-normal.woff
  73. BIN
      _docs_/_static/fonts/lato-normal.woff2
  74. 10365
    0
      _docs_/_static/jquery.js
  75. 1
    0
      _docs_/_static/js/badge_only.js
  76. 4
    0
      _docs_/_static/js/html5shiv-printshiv.min.js
  77. 4
    0
      _docs_/_static/js/html5shiv.min.js
  78. 4
    0
      _docs_/_static/js/modernizr.min.js
  79. 1
    0
      _docs_/_static/js/theme.js
  80. 297
    0
      _docs_/_static/language_data.js
  81. BIN
      _docs_/_static/minus.png
  82. BIN
      _docs_/_static/plus.png
  83. 69
    0
      _docs_/_static/pygments.css
  84. 481
    0
      _docs_/_static/searchtools.js
  85. 1692
    0
      _docs_/_static/underscore.js
  86. 284
    0
      _docs_/genindex.html
  87. 708
    0
      _docs_/index.html
  88. BIN
      _docs_/objects.inv
  89. 216
    0
      _docs_/py-modindex.html
  90. 214
    0
      _docs_/search.html
  91. 1
    0
      _docs_/searchindex.js
  92. 16
    0
      _examples_/Makefile
  93. 16
    0
      _examples_/tcp_socket__stp_client.py
  94. 24
    0
      _examples_/tcp_socket__stp_server.py
  95. 16
    0
      _examples_/tcp_socket__tcp_client.py
  96. 24
    0
      _examples_/tcp_socket__tcp_server.py
  97. 0
    0
      _testresults_/unittest.pdf

+ 194
- 175
__init__.py View File

@@ -22,7 +22,10 @@ tcp_socket (TCP Socket)
22 22
 
23 23
 **Unittest:**
24 24
 
25
-        See also the :download:`unittest <../../tcp_socket/_testresults_/unittest.pdf>` documentation.
25
+        See also the :download:`unittest <tcp_socket/_testresults_/unittest.pdf>` documentation.
26
+
27
+**Module Documentation:**
28
+
26 29
 """
27 30
 __DEPENDENCIES__ = ['stringtools', 'task', ]
28 31
 
@@ -40,17 +43,23 @@ except ImportError:
40 43
 
41 44
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
42 45
 
46
+__DESCRIPTION__ = """The Module {\\tt %s} is designed to help with client / server tcp socket connections.
47
+For more Information read the documentation.""" % __name__.replace('_', '\_')
48
+"""The Module Description"""
49
+__INTERPRETER__ = (2, 3)
50
+"""The Tested Interpreter-Versions"""
51
+
43 52
 
44 53
 class tcp_base(object):
45 54
     """
55
+    This is the base class for other classes in this module.
56
+
46 57
     :param host: The host IP for the TCP socket functionality
47 58
     :type host: str
48 59
     :param port: The port for the TCP socket functionality
49 60
     :type port: int
50
-    :param rx_log_lvl: The log level to log incomming RX-data
51
-    :type rx_log_lvl: int
52
-
53
-    This is the base class for other classes in this module.
61
+    :param channel_name: The name for the logging channel
62
+    :type channel_name: str
54 63
 
55 64
     .. note:: This class is not designed for direct usage.
56 65
     """
@@ -60,10 +69,10 @@ class tcp_base(object):
60 69
     COM_TIMEOUT = 0.5
61 70
     IS_CLIENT = False
62 71
 
63
-    def __init__(self, host, port, rx_log_lvl=logging.INFO):
72
+    def __init__(self, host, port, channel_name=None):
64 73
         self.host = host
65 74
         self.port = port
66
-        self.init_channel_name()
75
+        self.init_channel_name(channel_name)
67 76
         self.__socket__ = None
68 77
         self.__data_available_callback__ = None
69 78
         self.__supress_data_available_callback__ = False
@@ -74,37 +83,102 @@ class tcp_base(object):
74 83
         self.__listening_message_displayed__ = False
75 84
         self.__client_address__ = None
76 85
         self.__queue__ = task.threaded_queue()
77
-        self.__queue__.enqueue(5, self.__receive_task__, rx_log_lvl)
86
+        self.__queue__.enqueue(5, self.__receive_task__)
78 87
         self.__queue__.run()
79 88
 
80
-    def init_channel_name(self, channel_name=None):
81
-        if channel_name is None:
82
-            self.logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__ + '.' + self.DEFAULT_CHANNEL_NAME)
83
-        else:
84
-            self.logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__ + '.' + channel_name)
89
+    def __call_data_available_callback__(self):
90
+        if len(self.__receive_buffer__) > 0 and not self.__supress_data_available_callback__ and self.__data_available_callback__ is not None:
91
+            self.__supress_data_available_callback__ = True
92
+            self.__data_available_callback__(self)
93
+            self.__supress_data_available_callback__ = False
85 94
 
86
-    def is_connected(self):
87
-        return self.__connection__ is not None
95
+    def __clean_receive_buffer__(self):
96
+        self.logger.debug("Cleaning up receive-buffer")
97
+        self.__receive_buffer__ = b''
98
+
99
+    def __connection_lost__(self):
100
+        self.__listening_message_displayed__ = False
101
+        self.__connection__.close()
102
+        self.__connection__ = None
103
+        self.__client_address__ = None
104
+        self.logger.info('Connection lost...')
105
+        if self.__disconnect_callback__ is not None:
106
+            self.__disconnect_callback__()
107
+
108
+    def __del__(self):
109
+        self.close()
110
+
111
+    def __receive_task__(self, queue_inst):
112
+        if self.__connection__ is not None:
113
+            try:
114
+                data = self.__connection__.recv(self.RX_LENGTH)
115
+            except socket.error as e:
116
+                if e.errno != 11:
117
+                    raise
118
+                else:
119
+                    time.sleep(.05)
120
+            else:
121
+                if len(data) > 0:
122
+                    self.logger.info('RX <- "%s"', stringtools.hexlify(data))
123
+                    self.__receive_buffer__ += data
124
+                else:
125
+                    self.__connection_lost__()
126
+            self.__call_data_available_callback__()
127
+        else:
128
+            self.__connect__()
129
+        queue_inst.enqueue(5, self.__receive_task__)
88 130
 
89 131
     def client_address(self):
90 132
         """
133
+        This method returns the address of the connected client.
134
+
91 135
         :return: The client address.
92 136
         :rtype: str
93
-
94
-        This method returns the address of the connected client.
95 137
         """
96 138
         return self.__client_address__[0]
97 139
 
140
+    def close(self):
141
+        """
142
+        This method closes the connected communication channel, if exists.
143
+        """
144
+        self.__queue__.stop()
145
+        self.__queue__.join()
146
+        if self.__connection__ is not None:
147
+            self.__connection_lost__()
148
+        if self.__socket__ is not None:
149
+            self.__socket__.close()
150
+
151
+    def init_channel_name(self, channel_name=None):
152
+        """
153
+        With this Method, the channel name for logging can be changed.
154
+
155
+        :param channel_name: The name for the logging channel
156
+        :type channel_name: str
157
+        """
158
+        if channel_name is None:
159
+            self.logger = logger.getChild(self.DEFAULT_CHANNEL_NAME)
160
+        else:
161
+            self.logger = logger.getChild(channel_name)
162
+
163
+    def is_connected(self):
164
+        """
165
+        With this Method the connection status can be identified.
166
+
167
+        :return: True, if a connection is established, otherwise False.
168
+        :rtype: bool
169
+        """
170
+        return self.__connection__ is not None
171
+
98 172
     def receive(self, timeout=1, num=None):
99 173
         """
174
+        This method returns received data.
175
+
100 176
         :param timeout: The timeout for receiving data (at least after the timeout the method returns data or None).
101 177
         :type timeout: float
102 178
         :param num: the number of bytes to receive (use None to get all available data).
103 179
         :type num: int
104 180
         :return: The received data.
105
-        :rtype: str
106
-
107
-        This method returns data received via the initiated communication channel.
181
+        :rtype: bytes
108 182
         """
109 183
         rv = None
110 184
         if self.__connection__ is not None:
@@ -124,18 +198,46 @@ class tcp_base(object):
124 198
                 self.__receive_buffer__ = self.__receive_buffer__[num:]
125 199
         return rv
126 200
 
201
+    def register_callback(self, callback):
202
+        """
203
+        This method stores the callback which is executed, if data is available. You need to execute :func:`receive` of this instance
204
+        given as first argument.
205
+
206
+        :param callback: The callback which will be executed, when data is available.
207
+        :type callback:
208
+        """
209
+        self.__data_available_callback__ = callback
210
+
211
+    def register_connect_callback(self, callback):
212
+        """
213
+        This method stores the callback which is executed, if a connection is established.
214
+
215
+        :param callback: The callback which will be executed, when a connection is established.
216
+        :type callback:
217
+        """
218
+        self.__connect_callback__ = callback
219
+
220
+    def register_disconnect_callback(self, callback):
221
+        """
222
+        This method stores the callback which is executed, after the connection is lost.
223
+
224
+        :param callback: The callback which will be executed, after the connection is lost.
225
+        :type callback:
226
+        """
227
+        self.__disconnect_callback__ = callback
228
+
127 229
     def send(self, data, timeout=1, log_lvl=logging.INFO):
128 230
         """
231
+        This method sends data via the initiated communication channel.
232
+
129 233
         :param data: The data to be send over the communication channel.
130
-        :type data: str
234
+        :type data: bytes
131 235
         :param timeout: The timeout for sending data (e.g. time to establish new connection).
132 236
         :type timeout: float
133
-        :param rx_log_lvl: The log level to log outgoing TX-data
134
-        :type rx_log_lvl: int
237
+        :param log_lvl: The log level to log outgoing TX-data
238
+        :type log_lvl: int
135 239
         :return: True if data had been sent, otherwise False.
136 240
         :rtype: bool
137
-
138
-        This method sends data via the initiated communication channel.
139 241
         """
140 242
         tm = time.time()
141 243
         while time.time() - tm < timeout:
@@ -156,110 +258,25 @@ class tcp_base(object):
156 258
         self.logger.warning('Cound NOT send -> "%s"', stringtools.hexlify(data))
157 259
         return False
158 260
 
159
-    def register_callback(self, callback):
160
-        """
161
-        :param callback: The callback which will be executed, when data is available.
162
-        :type callback: function
163
-
164
-        This method sets the callback which is executed, if data is available. You need to execute :func:`receive` of the instance
165
-        given with the first argument.
166
-
167
-        .. note:: The :func:`callback` is executed with these arguments:
168
-
169
-            :param self: This communication instance
170
-        """
171
-        self.__data_available_callback__ = callback
172
-
173
-    def register_connect_callback(self, callback):
174
-        """
175
-        :param callback: The callback which will be executed, when a connect is identified.
176
-        :type callback: function
177
-
178
-        This method sets the callback which is executed, if a connect is identified.
179
-        """
180
-        self.__connect_callback__ = callback
181
-
182
-    def register_disconnect_callback(self, callback):
183
-        """
184
-        :param callback: The callback which will be executed, when a disconnect is identified.
185
-        :type callback: function
186
-
187
-        This method sets the callback which is executed, if a disconnect is identified.
188
-        """
189
-        self.__disconnect_callback__ = callback
190
-
191
-    def __receive_task__(self, queue_inst, rx_log_lvl):
192
-        if self.__connection__ is not None:
193
-            try:
194
-                data = self.__connection__.recv(self.RX_LENGTH)
195
-            except socket.error as e:
196
-                if e.errno != 11:
197
-                    raise
198
-                else:
199
-                    time.sleep(.05)
200
-            else:
201
-                if len(data) > 0:
202
-                    self.logger.log(rx_log_lvl, 'RX <- "%s"', stringtools.hexlify(data))
203
-                    self.__receive_buffer__ += data
204
-                else:
205
-                    self.__connection_lost__()
206
-            self.__call_data_available_callback__()
207
-        else:
208
-            self.__connect__()
209
-        queue_inst.enqueue(5, self.__receive_task__, rx_log_lvl)
210
-
211
-    def __call_data_available_callback__(self):
212
-        if len(self.__receive_buffer__) > 0 and not self.__supress_data_available_callback__ and self.__data_available_callback__ is not None:
213
-            self.__supress_data_available_callback__ = True
214
-            self.__data_available_callback__(self)
215
-            self.__supress_data_available_callback__ = False
216
-
217
-    def __connection_lost__(self):
218
-        self.__listening_message_displayed__ = False
219
-        self.__connection__.close()
220
-        self.__connection__ = None
221
-        self.__client_address__ = None
222
-        self.logger.info('Connection lost...')
223
-        if self.__disconnect_callback__ is not None:
224
-            self.__disconnect_callback__()
225
-
226
-    def __clean_receive_buffer__(self):
227
-        self.logger.debug("Cleaning up receive-buffer")
228
-        self.__receive_buffer__ = ""
229
-
230
-    def close(self):
231
-        """
232
-        This method closes the active communication channel, if channel exists.
233
-        """
234
-        self.__queue__.stop()
235
-        self.__queue__.join()
236
-        if self.__connection__ is not None:
237
-            self.__connection_lost__()
238
-        if self.__socket__ is not None:
239
-            self.__socket__.close()
240
-
241
-    def __del__(self):
242
-        self.close()
243
-
244 261
 
245 262
 class tcp_server(tcp_base):
246 263
     """
264
+    This class creates a tcp-server for transfering a serial stream of bytes (characters). See also parent :class:`tcp_base`.
265
+
247 266
     :param host: The host IP for the TCP socket functionality
248 267
     :type host: str
249 268
     :param port: The port for the TCP socket functionality
250 269
     :type port: int
251
-    :param rx_log_lvl: The log level to log incomming RX-data
252
-    :type rx_log_lvl: int
253
-
254
-    This class supports a tcp-server transfering a serial stream of bytes (characters).
270
+    :param channel_name: The name for the logging channel
271
+    :type channel_name: str
255 272
 
256 273
     .. note:: You need a :class:`tcp_client` to communicate with the server.
257 274
 
258 275
     **Example:**
259 276
 
260
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_server.py
277
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__tcp_server.py
261 278
 
262
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_server.log
279
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__tcp_server.log
263 280
     """
264 281
     def __connect__(self):
265 282
         if self.__socket__ is None:
@@ -292,22 +309,22 @@ class tcp_server(tcp_base):
292 309
 
293 310
 class tcp_client(tcp_base):
294 311
     """
312
+    This class creates a tcp-client for transfering a serial stream of bytes (characters). See also parent :class:`tcp_base`.
313
+
295 314
     :param host: The host IP for the TCP socket functionality
296 315
     :type host: str
297 316
     :param port: The port for the TCP socket functionality
298 317
     :type port: int
299
-    :param rx_log_lvl: The log level to log incomming RX-data
300
-    :type rx_log_lvl: int
318
+    :param channel_name: The name for the logging channel
319
+    :type channel_name: str
301 320
 
302
-    This class supports a tcp-client transfering a serial stream of bytes (characters).
303
-
304
-    .. note:: You need a running :class:`tcp_server` listening at the given IP and port to communicate.
321
+    .. note:: You need a running :class:`tcp_server` listening at the given IP and Port to be able to communicate.
305 322
 
306 323
     **Example:**
307 324
 
308
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_client.py
325
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__tcp_client.py
309 326
 
310
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_client.log
327
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__tcp_client.log
311 328
     """
312 329
     IS_CLIENT = True
313 330
 
@@ -344,34 +361,59 @@ class tcp_client(tcp_base):
344 361
 
345 362
 class tcp_base_stp(tcp_base):
346 363
     """
364
+    This is the base class for other classes in this module.  See also parent :class:`tcp_base`.
365
+
347 366
     :param host: The host IP for the TCP socket functionality
348 367
     :type host: str
349 368
     :param port: The port for the TCP socket functionality
350 369
     :type port: int
351
-    :param rx_log_lvl: The log level to log incomming RX-data
352
-    :type rx_log_lvl: int
353
-
354
-    This is the base class for other classes in this module.
370
+    :param channel_name: The name for the logging channel
371
+    :type channel_name: str
355 372
 
356 373
     .. note:: This class is not designed for direct usage.
357 374
     """
358 375
 
359
-    def __init__(self, host, port, rx_log_lvl=logging.INFO):
360
-        tcp_base.__init__(self, host, port, rx_log_lvl=rx_log_lvl)
376
+    def __init__(self, host, port, channel_name=None):
377
+        tcp_base.__init__(self, host, port, channel_name=channel_name)
361 378
         self.__stp__ = stringtools.stp.stp()
362 379
 
363 380
     def __clean_receive_buffer__(self):
364 381
         self.logger.debug("Cleaning up receive-buffer")
365 382
         self.__receive_buffer__ = []
366 383
 
384
+    def __receive_task__(self, queue_inst):
385
+        if self.__connection__ is not None:
386
+            try:
387
+                data = self.__connection__.recv(self.RX_LENGTH)
388
+            except socket.error as e:
389
+                if e.errno == 104:
390
+                    self.__connection_lost__()
391
+                elif e.errno != 11:
392
+                    raise
393
+                else:
394
+                    time.sleep(.05)
395
+            else:
396
+                if len(data) > 0:
397
+                    self.logger.debug('RX <- "%s"', stringtools.hexlify(data))
398
+                    content = self.__stp__.process(data)
399
+                    for msg in content:
400
+                        self.logger.info('RX  <- "%s"', stringtools.hexlify(msg))
401
+                        self.__receive_buffer__.append(msg)
402
+                else:
403
+                    self.__connection_lost__()
404
+            self.__call_data_available_callback__()
405
+        else:
406
+            self.__connect__()
407
+        queue_inst.enqueue(5, self.__receive_task__)
408
+
367 409
     def receive(self, timeout=1):
368 410
         """
411
+        This method returns one received messages via the initiated communication channel.
412
+
369 413
         :param timeout: The timeout for receiving data (at least after the timeout the method returns data or None).
370 414
         :type timeout: float
371 415
         :return: The received data.
372
-        :rtype: str
373
-
374
-        This method returns one received messages via the initiated communication channel.
416
+        :rtype: bytes
375 417
         """
376 418
         try:
377 419
             return tcp_base.receive(self, timeout=timeout, num=1)[0]
@@ -380,16 +422,16 @@ class tcp_base_stp(tcp_base):
380 422
 
381 423
     def send(self, data, timeout=1, log_lvl=logging.INFO):
382 424
         """
425
+        This method sends one stp message via the initiated communication channel.
426
+
383 427
         :param data: The message to be send over the communication channel.
384
-        :type data: str
428
+        :type data: bytes
385 429
         :param timeout: The timeout for sending data (e.g. time to establish new connection).
386 430
         :type timeout: float
387
-        :param rx_log_lvl: The log level to log outgoing TX-data
388
-        :type rx_log_lvl: int
431
+        :param log_lvl: The log level to log outgoing TX-data
432
+        :type log_lvl: int
389 433
         :return: True if data had been sent, otherwise False.
390 434
         :rtype: bool
391
-
392
-        This method sends one message via the initiated communication channel.
393 435
         """
394 436
         if tcp_base.send(self, stringtools.stp.build_frame(data), timeout=timeout, log_lvl=logging.DEBUG):
395 437
             self.logger.log(log_lvl, 'TX -> "%s"', stringtools.hexlify(data))
@@ -397,71 +439,48 @@ class tcp_base_stp(tcp_base):
397 439
         else:
398 440
             return False
399 441
 
400
-    def __receive_task__(self, queue_inst, rx_log_lvl):
401
-        if self.__connection__ is not None:
402
-            try:
403
-                data = self.__connection__.recv(self.RX_LENGTH)
404
-            except socket.error as e:
405
-                if e.errno == 104:
406
-                    self.__connection_lost__()
407
-                elif e.errno != 11:
408
-                    raise
409
-                else:
410
-                    time.sleep(.05)
411
-            else:
412
-                if len(data) > 0:
413
-                    self.logger.debug('-- <- "%s"', stringtools.hexlify(data))
414
-                    content = self.__stp__.process(data)
415
-                    for msg in content:
416
-                        self.logger.log(rx_log_lvl, 'RX  <- "%s"', stringtools.hexlify(msg))
417
-                        self.__receive_buffer__.append(msg)
418
-                else:
419
-                    self.__connection_lost__()
420
-            self.__call_data_available_callback__()
421
-        else:
422
-            self.__connect__()
423
-        queue_inst.enqueue(5, self.__receive_task__, rx_log_lvl)
424
-
425 442
 
426 443
 class tcp_server_stp(tcp_server, tcp_base_stp):
427 444
     """
445
+    This class creates a tcp-server for transfering a message. The bytes will be packed on send and unpacked on receive. See also parents :class:`tcp_server` and :class:`tcp_base_stp`.
446
+    See :mod:`stringtools.stp` for more information on packing and unpacking.
447
+
428 448
     :param host: The host IP for the TCP socket functionality
429 449
     :type host: str
430 450
     :param port: The port for the TCP socket functionality
431 451
     :type port: int
432
-    :param rx_log_lvl: The log level to log incomming RX-data
433
-    :type rx_log_lvl: int
434
-
435
-    This class supports a tcp-server transfering a string. The string will be packed on send and unpacked on receive.
436
-    See :mod:`stp` for more information on packing and unpacking.
452
+    :param channel_name: The name for the logging channel
453
+    :type channel_name: str
437 454
 
438 455
     .. note:: You need a :class:`tcp_client_stp` to communicate with the server.
439 456
 
440 457
     **Example:**
441 458
 
442
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_server_stp.py
459
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__stp_server.py
443 460
 
444
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_server_stp.log
461
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__stp_server.log
445 462
     """
446 463
     pass
447 464
 
448 465
 
449 466
 class tcp_client_stp(tcp_client, tcp_base_stp):
450 467
     """
468
+    This class creates a tcp-client for transfering a message. The bytes will be packed on send and unpacked on receive. See also parents :class:`tcp_client` and :class:`tcp_base_stp`.
469
+    See :mod:`stringtools.stp` for more information on packing and unpacking.
470
+
451 471
     :param host: The host IP for the TCP socket functionality
452 472
     :type host: str
453 473
     :param port: The port for the TCP socket functionality
454 474
     :type port: int
475
+    :param channel_name: The name for the logging channel
476
+    :type channel_name: str
455 477
 
456
-    This class supports a tcp-server transfering a string. The string will be packed on send and unpacked on receive.
457
-    See :mod:`stp` for more information on packing and unpacking.
458
-
459
-    .. note:: You need a running :class:`tcp_server_stp` listening at the given IP and port to communicate.
478
+    .. note:: You need a running :class:`tcp_server_stp` listening at the given IP and Port to be able to communicate.
460 479
 
461 480
     **Example:**
462 481
 
463
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_server_stp.py
482
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__stp_client.py
464 483
 
465
-    .. literalinclude:: ../../tcp_socket/_examples_/tcp_socket__tcp_server_stp.log
484
+    .. literalinclude:: tcp_socket/_examples_/tcp_socket__stp_client.log
466 485
     """
467 486
     pass

+ 4
- 0
_docs_/.buildinfo View File

@@ -0,0 +1,4 @@
1
+# Sphinx build info version 1
2
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
+config: 4e3e0dd799f44fbd283c75c6ea1a364d
4
+tags: 645f666f9bcd5a90fca523b33c5a78b7

+ 0
- 0
_docs_/_downloads/e4086ba3197d1869e430d0a75a9a48e9/unittest.pdf View File


+ 23
- 0
_docs_/_sources/index.rst.txt View File

@@ -0,0 +1,23 @@
1
+.. tcp_socket documentation master file, created by
2
+   sphinx-quickstart on Thu Jan  7 23:04:59 2021.
3
+   You can adapt this file completely to your liking, but it should at least
4
+   contain the root `toctree` directive.
5
+
6
+Welcome to tcp_socket's documentation!
7
+======================================
8
+
9
+.. automodule:: tcp_socket
10
+   :members:
11
+
12
+.. toctree::
13
+   :maxdepth: 2
14
+   :caption: Contents:
15
+
16
+
17
+
18
+Indices and tables
19
+==================
20
+
21
+* :ref:`genindex`
22
+* :ref:`modindex`
23
+* :ref:`search`

+ 676
- 0
_docs_/_static/basic.css View File

@@ -0,0 +1,676 @@
1
+/*
2
+ * basic.css
3
+ * ~~~~~~~~~
4
+ *
5
+ * Sphinx stylesheet -- basic theme.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/* -- main layout ----------------------------------------------------------- */
13
+
14
+div.clearer {
15
+    clear: both;
16
+}
17
+
18
+/* -- relbar ---------------------------------------------------------------- */
19
+
20
+div.related {
21
+    width: 100%;
22
+    font-size: 90%;
23
+}
24
+
25
+div.related h3 {
26
+    display: none;
27
+}
28
+
29
+div.related ul {
30
+    margin: 0;
31
+    padding: 0 0 0 10px;
32
+    list-style: none;
33
+}
34
+
35
+div.related li {
36
+    display: inline;
37
+}
38
+
39
+div.related li.right {
40
+    float: right;
41
+    margin-right: 5px;
42
+}
43
+
44
+/* -- sidebar --------------------------------------------------------------- */
45
+
46
+div.sphinxsidebarwrapper {
47
+    padding: 10px 5px 0 10px;
48
+}
49
+
50
+div.sphinxsidebar {
51
+    float: left;
52
+    width: 230px;
53
+    margin-left: -100%;
54
+    font-size: 90%;
55
+    word-wrap: break-word;
56
+    overflow-wrap : break-word;
57
+}
58
+
59
+div.sphinxsidebar ul {
60
+    list-style: none;
61
+}
62
+
63
+div.sphinxsidebar ul ul,
64
+div.sphinxsidebar ul.want-points {
65
+    margin-left: 20px;
66
+    list-style: square;
67
+}
68
+
69
+div.sphinxsidebar ul ul {
70
+    margin-top: 0;
71
+    margin-bottom: 0;
72
+}
73
+
74
+div.sphinxsidebar form {
75
+    margin-top: 10px;
76
+}
77
+
78
+div.sphinxsidebar input {
79
+    border: 1px solid #98dbcc;
80
+    font-family: sans-serif;
81
+    font-size: 1em;
82
+}
83
+
84
+div.sphinxsidebar #searchbox form.search {
85
+    overflow: hidden;
86
+}
87
+
88
+div.sphinxsidebar #searchbox input[type="text"] {
89
+    float: left;
90
+    width: 80%;
91
+    padding: 0.25em;
92
+    box-sizing: border-box;
93
+}
94
+
95
+div.sphinxsidebar #searchbox input[type="submit"] {
96
+    float: left;
97
+    width: 20%;
98
+    border-left: none;
99
+    padding: 0.25em;
100
+    box-sizing: border-box;
101
+}
102
+
103
+
104
+img {
105
+    border: 0;
106
+    max-width: 100%;
107
+}
108
+
109
+/* -- search page ----------------------------------------------------------- */
110
+
111
+ul.search {
112
+    margin: 10px 0 0 20px;
113
+    padding: 0;
114
+}
115
+
116
+ul.search li {
117
+    padding: 5px 0 5px 20px;
118
+    background-image: url(file.png);
119
+    background-repeat: no-repeat;
120
+    background-position: 0 7px;
121
+}
122
+
123
+ul.search li a {
124
+    font-weight: bold;
125
+}
126
+
127
+ul.search li div.context {
128
+    color: #888;
129
+    margin: 2px 0 0 30px;
130
+    text-align: left;
131
+}
132
+
133
+ul.keywordmatches li.goodmatch a {
134
+    font-weight: bold;
135
+}
136
+
137
+/* -- index page ------------------------------------------------------------ */
138
+
139
+table.contentstable {
140
+    width: 90%;
141
+    margin-left: auto;
142
+    margin-right: auto;
143
+}
144
+
145
+table.contentstable p.biglink {
146
+    line-height: 150%;
147
+}
148
+
149
+a.biglink {
150
+    font-size: 1.3em;
151
+}
152
+
153
+span.linkdescr {
154
+    font-style: italic;
155
+    padding-top: 5px;
156
+    font-size: 90%;
157
+}
158
+
159
+/* -- general index --------------------------------------------------------- */
160
+
161
+table.indextable {
162
+    width: 100%;
163
+}
164
+
165
+table.indextable td {
166
+    text-align: left;
167
+    vertical-align: top;
168
+}
169
+
170
+table.indextable ul {
171
+    margin-top: 0;
172
+    margin-bottom: 0;
173
+    list-style-type: none;
174
+}
175
+
176
+table.indextable > tbody > tr > td > ul {
177
+    padding-left: 0em;
178
+}
179
+
180
+table.indextable tr.pcap {
181
+    height: 10px;
182
+}
183
+
184
+table.indextable tr.cap {
185
+    margin-top: 10px;
186
+    background-color: #f2f2f2;
187
+}
188
+
189
+img.toggler {
190
+    margin-right: 3px;
191
+    margin-top: 3px;
192
+    cursor: pointer;
193
+}
194
+
195
+div.modindex-jumpbox {
196
+    border-top: 1px solid #ddd;
197
+    border-bottom: 1px solid #ddd;
198
+    margin: 1em 0 1em 0;
199
+    padding: 0.4em;
200
+}
201
+
202
+div.genindex-jumpbox {
203
+    border-top: 1px solid #ddd;
204
+    border-bottom: 1px solid #ddd;
205
+    margin: 1em 0 1em 0;
206
+    padding: 0.4em;
207
+}
208
+
209
+/* -- domain module index --------------------------------------------------- */
210
+
211
+table.modindextable td {
212
+    padding: 2px;
213
+    border-collapse: collapse;
214
+}
215
+
216
+/* -- general body styles --------------------------------------------------- */
217
+
218
+div.body {
219
+    min-width: 450px;
220
+    max-width: 800px;
221
+}
222
+
223
+div.body p, div.body dd, div.body li, div.body blockquote {
224
+    -moz-hyphens: auto;
225
+    -ms-hyphens: auto;
226
+    -webkit-hyphens: auto;
227
+    hyphens: auto;
228
+}
229
+
230
+a.headerlink {
231
+    visibility: hidden;
232
+}
233
+
234
+h1:hover > a.headerlink,
235
+h2:hover > a.headerlink,
236
+h3:hover > a.headerlink,
237
+h4:hover > a.headerlink,
238
+h5:hover > a.headerlink,
239
+h6:hover > a.headerlink,
240
+dt:hover > a.headerlink,
241
+caption:hover > a.headerlink,
242
+p.caption:hover > a.headerlink,
243
+div.code-block-caption:hover > a.headerlink {
244
+    visibility: visible;
245
+}
246
+
247
+div.body p.caption {
248
+    text-align: inherit;
249
+}
250
+
251
+div.body td {
252
+    text-align: left;
253
+}
254
+
255
+.first {
256
+    margin-top: 0 !important;
257
+}
258
+
259
+p.rubric {
260
+    margin-top: 30px;
261
+    font-weight: bold;
262
+}
263
+
264
+img.align-left, .figure.align-left, object.align-left {
265
+    clear: left;
266
+    float: left;
267
+    margin-right: 1em;
268
+}
269
+
270
+img.align-right, .figure.align-right, object.align-right {
271
+    clear: right;
272
+    float: right;
273
+    margin-left: 1em;
274
+}
275
+
276
+img.align-center, .figure.align-center, object.align-center {
277
+  display: block;
278
+  margin-left: auto;
279
+  margin-right: auto;
280
+}
281
+
282
+.align-left {
283
+    text-align: left;
284
+}
285
+
286
+.align-center {
287
+    text-align: center;
288
+}
289
+
290
+.align-right {
291
+    text-align: right;
292
+}
293
+
294
+/* -- sidebars -------------------------------------------------------------- */
295
+
296
+div.sidebar {
297
+    margin: 0 0 0.5em 1em;
298
+    border: 1px solid #ddb;
299
+    padding: 7px 7px 0 7px;
300
+    background-color: #ffe;
301
+    width: 40%;
302
+    float: right;
303
+}
304
+
305
+p.sidebar-title {
306
+    font-weight: bold;
307
+}
308
+
309
+/* -- topics ---------------------------------------------------------------- */
310
+
311
+div.topic {
312
+    border: 1px solid #ccc;
313
+    padding: 7px 7px 0 7px;
314
+    margin: 10px 0 10px 0;
315
+}
316
+
317
+p.topic-title {
318
+    font-size: 1.1em;
319
+    font-weight: bold;
320
+    margin-top: 10px;
321
+}
322
+
323
+/* -- admonitions ----------------------------------------------------------- */
324
+
325
+div.admonition {
326
+    margin-top: 10px;
327
+    margin-bottom: 10px;
328
+    padding: 7px;
329
+}
330
+
331
+div.admonition dt {
332
+    font-weight: bold;
333
+}
334
+
335
+div.admonition dl {
336
+    margin-bottom: 0;
337
+}
338
+
339
+p.admonition-title {
340
+    margin: 0px 10px 5px 0px;
341
+    font-weight: bold;
342
+}
343
+
344
+div.body p.centered {
345
+    text-align: center;
346
+    margin-top: 25px;
347
+}
348
+
349
+/* -- tables ---------------------------------------------------------------- */
350
+
351
+table.docutils {
352
+    border: 0;
353
+    border-collapse: collapse;
354
+}
355
+
356
+table.align-center {
357
+    margin-left: auto;
358
+    margin-right: auto;
359
+}
360
+
361
+table caption span.caption-number {
362
+    font-style: italic;
363
+}
364
+
365
+table caption span.caption-text {
366
+}
367
+
368
+table.docutils td, table.docutils th {
369
+    padding: 1px 8px 1px 5px;
370
+    border-top: 0;
371
+    border-left: 0;
372
+    border-right: 0;
373
+    border-bottom: 1px solid #aaa;
374
+}
375
+
376
+table.footnote td, table.footnote th {
377
+    border: 0 !important;
378
+}
379
+
380
+th {
381
+    text-align: left;
382
+    padding-right: 5px;
383
+}
384
+
385
+table.citation {
386
+    border-left: solid 1px gray;
387
+    margin-left: 1px;
388
+}
389
+
390
+table.citation td {
391
+    border-bottom: none;
392
+}
393
+
394
+/* -- figures --------------------------------------------------------------- */
395
+
396
+div.figure {
397
+    margin: 0.5em;
398
+    padding: 0.5em;
399
+}
400
+
401
+div.figure p.caption {
402
+    padding: 0.3em;
403
+}
404
+
405
+div.figure p.caption span.caption-number {
406
+    font-style: italic;
407
+}
408
+
409
+div.figure p.caption span.caption-text {
410
+}
411
+
412
+/* -- field list styles ----------------------------------------------------- */
413
+
414
+table.field-list td, table.field-list th {
415
+    border: 0 !important;
416
+}
417
+
418
+.field-list ul {
419
+    margin: 0;
420
+    padding-left: 1em;
421
+}
422
+
423
+.field-list p {
424
+    margin: 0;
425
+}
426
+
427
+.field-name {
428
+    -moz-hyphens: manual;
429
+    -ms-hyphens: manual;
430
+    -webkit-hyphens: manual;
431
+    hyphens: manual;
432
+}
433
+
434
+/* -- hlist styles ---------------------------------------------------------- */
435
+
436
+table.hlist td {
437
+    vertical-align: top;
438
+}
439
+
440
+
441
+/* -- other body styles ----------------------------------------------------- */
442
+
443
+ol.arabic {
444
+    list-style: decimal;
445
+}
446
+
447
+ol.loweralpha {
448
+    list-style: lower-alpha;
449
+}
450
+
451
+ol.upperalpha {
452
+    list-style: upper-alpha;
453
+}
454
+
455
+ol.lowerroman {
456
+    list-style: lower-roman;
457
+}
458
+
459
+ol.upperroman {
460
+    list-style: upper-roman;
461
+}
462
+
463
+dl {
464
+    margin-bottom: 15px;
465
+}
466
+
467
+dd p {
468
+    margin-top: 0px;
469
+}
470
+
471
+dd ul, dd table {
472
+    margin-bottom: 10px;
473
+}
474
+
475
+dd {
476
+    margin-top: 3px;
477
+    margin-bottom: 10px;
478
+    margin-left: 30px;
479
+}
480
+
481
+dt:target, span.highlighted {
482
+    background-color: #fbe54e;
483
+}
484
+
485
+rect.highlighted {
486
+    fill: #fbe54e;
487
+}
488
+
489
+dl.glossary dt {
490
+    font-weight: bold;
491
+    font-size: 1.1em;
492
+}
493
+
494
+.optional {
495
+    font-size: 1.3em;
496
+}
497
+
498
+.sig-paren {
499
+    font-size: larger;
500
+}
501
+
502
+.versionmodified {
503
+    font-style: italic;
504
+}
505
+
506
+.system-message {
507
+    background-color: #fda;
508
+    padding: 5px;
509
+    border: 3px solid red;
510
+}
511
+
512
+.footnote:target  {
513
+    background-color: #ffa;
514
+}
515
+
516
+.line-block {
517
+    display: block;
518
+    margin-top: 1em;
519
+    margin-bottom: 1em;
520
+}
521
+
522
+.line-block .line-block {
523
+    margin-top: 0;
524
+    margin-bottom: 0;
525
+    margin-left: 1.5em;
526
+}
527
+
528
+.guilabel, .menuselection {
529
+    font-family: sans-serif;
530
+}
531
+
532
+.accelerator {
533
+    text-decoration: underline;
534
+}
535
+
536
+.classifier {
537
+    font-style: oblique;
538
+}
539
+
540
+abbr, acronym {
541
+    border-bottom: dotted 1px;
542
+    cursor: help;
543
+}
544
+
545
+/* -- code displays --------------------------------------------------------- */
546
+
547
+pre {
548
+    overflow: auto;
549
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
550
+}
551
+
552
+span.pre {
553
+    -moz-hyphens: none;
554
+    -ms-hyphens: none;
555
+    -webkit-hyphens: none;
556
+    hyphens: none;
557
+}
558
+
559
+td.linenos pre {
560
+    padding: 5px 0px;
561
+    border: 0;
562
+    background-color: transparent;
563
+    color: #aaa;
564
+}
565
+
566
+table.highlighttable {
567
+    margin-left: 0.5em;
568
+}
569
+
570
+table.highlighttable td {
571
+    padding: 0 0.5em 0 0.5em;
572
+}
573
+
574
+div.code-block-caption {
575
+    padding: 2px 5px;
576
+    font-size: small;
577
+}
578
+
579
+div.code-block-caption code {
580
+    background-color: transparent;
581
+}
582
+
583
+div.code-block-caption + div > div.highlight > pre {
584
+    margin-top: 0;
585
+}
586
+
587
+div.code-block-caption span.caption-number {
588
+    padding: 0.1em 0.3em;
589
+    font-style: italic;
590
+}
591
+
592
+div.code-block-caption span.caption-text {
593
+}
594
+
595
+div.literal-block-wrapper {
596
+    padding: 1em 1em 0;
597
+}
598
+
599
+div.literal-block-wrapper div.highlight {
600
+    margin: 0;
601
+}
602
+
603
+code.descname {
604
+    background-color: transparent;
605
+    font-weight: bold;
606
+    font-size: 1.2em;
607
+}
608
+
609
+code.descclassname {
610
+    background-color: transparent;
611
+}
612
+
613
+code.xref, a code {
614
+    background-color: transparent;
615
+    font-weight: bold;
616
+}
617
+
618
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
619
+    background-color: transparent;
620
+}
621
+
622
+.viewcode-link {
623
+    float: right;
624
+}
625
+
626
+.viewcode-back {
627
+    float: right;
628
+    font-family: sans-serif;
629
+}
630
+
631
+div.viewcode-block:target {
632
+    margin: -1px -10px;
633
+    padding: 0 10px;
634
+}
635
+
636
+/* -- math display ---------------------------------------------------------- */
637
+
638
+img.math {
639
+    vertical-align: middle;
640
+}
641
+
642
+div.body div.math p {
643
+    text-align: center;
644
+}
645
+
646
+span.eqno {
647
+    float: right;
648
+}
649
+
650
+span.eqno a.headerlink {
651
+    position: relative;
652
+    left: 0px;
653
+    z-index: 1;
654
+}
655
+
656
+div.math:hover a.headerlink {
657
+    visibility: visible;
658
+}
659
+
660
+/* -- printout stylesheet --------------------------------------------------- */
661
+
662
+@media print {
663
+    div.document,
664
+    div.documentwrapper,
665
+    div.bodywrapper {
666
+        margin: 0 !important;
667
+        width: 100%;
668
+    }
669
+
670
+    div.sphinxsidebar,
671
+    div.related,
672
+    div.footer,
673
+    #top-link {
674
+        display: none;
675
+    }
676
+}

+ 1
- 0
_docs_/_static/css/badge_only.css View File

@@ -0,0 +1 @@
1
+.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

BIN
_docs_/_static/css/fonts/Roboto-Slab-Bold.woff View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Bold.woff2 View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Regular.woff View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Regular.woff2 View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.eot View File


+ 2671
- 0
_docs_/_static/css/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.ttf View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.woff View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.woff2 View File


BIN
_docs_/_static/css/fonts/lato-bold-italic.woff View File


BIN
_docs_/_static/css/fonts/lato-bold-italic.woff2 View File


BIN
_docs_/_static/css/fonts/lato-bold.woff View File


BIN
_docs_/_static/css/fonts/lato-bold.woff2 View File


BIN
_docs_/_static/css/fonts/lato-normal-italic.woff View File


BIN
_docs_/_static/css/fonts/lato-normal-italic.woff2 View File


BIN
_docs_/_static/css/fonts/lato-normal.woff View File


BIN
_docs_/_static/css/fonts/lato-normal.woff2 View File


+ 4
- 0
_docs_/_static/css/theme.css
File diff suppressed because it is too large
View File


+ 315
- 0
_docs_/_static/doctools.js View File

@@ -0,0 +1,315 @@
1
+/*
2
+ * doctools.js
3
+ * ~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for all documentation.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/**
13
+ * select a different prefix for underscore
14
+ */
15
+$u = _.noConflict();
16
+
17
+/**
18
+ * make the code below compatible with browsers without
19
+ * an installed firebug like debugger
20
+if (!window.console || !console.firebug) {
21
+  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22
+    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23
+    "profile", "profileEnd"];
24
+  window.console = {};
25
+  for (var i = 0; i < names.length; ++i)
26
+    window.console[names[i]] = function() {};
27
+}
28
+ */
29
+
30
+/**
31
+ * small helper function to urldecode strings
32
+ */
33
+jQuery.urldecode = function(x) {
34
+  return decodeURIComponent(x).replace(/\+/g, ' ');
35
+};
36
+
37
+/**
38
+ * small helper function to urlencode strings
39
+ */
40
+jQuery.urlencode = encodeURIComponent;
41
+
42
+/**
43
+ * This function returns the parsed url parameters of the
44
+ * current request. Multiple values per key are supported,
45
+ * it will always return arrays of strings for the value parts.
46
+ */
47
+jQuery.getQueryParameters = function(s) {
48
+  if (typeof s === 'undefined')
49
+    s = document.location.search;
50
+  var parts = s.substr(s.indexOf('?') + 1).split('&');
51
+  var result = {};
52
+  for (var i = 0; i < parts.length; i++) {
53
+    var tmp = parts[i].split('=', 2);
54
+    var key = jQuery.urldecode(tmp[0]);
55
+    var value = jQuery.urldecode(tmp[1]);
56
+    if (key in result)
57
+      result[key].push(value);
58
+    else
59
+      result[key] = [value];
60
+  }
61
+  return result;
62
+};
63
+
64
+/**
65
+ * highlight a given string on a jquery object by wrapping it in
66
+ * span elements with the given class name.
67
+ */
68
+jQuery.fn.highlightText = function(text, className) {
69
+  function highlight(node, addItems) {
70
+    if (node.nodeType === 3) {
71
+      var val = node.nodeValue;
72
+      var pos = val.toLowerCase().indexOf(text);
73
+      if (pos >= 0 &&
74
+          !jQuery(node.parentNode).hasClass(className) &&
75
+          !jQuery(node.parentNode).hasClass("nohighlight")) {
76
+        var span;
77
+        var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
78
+        if (isInSVG) {
79
+          span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
80
+        } else {
81
+          span = document.createElement("span");
82
+          span.className = className;
83
+        }
84
+        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
85
+        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
86
+          document.createTextNode(val.substr(pos + text.length)),
87
+          node.nextSibling));
88
+        node.nodeValue = val.substr(0, pos);
89
+        if (isInSVG) {
90
+          var bbox = span.getBBox();
91
+          var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
92
+       	  rect.x.baseVal.value = bbox.x;
93
+          rect.y.baseVal.value = bbox.y;
94
+          rect.width.baseVal.value = bbox.width;
95
+          rect.height.baseVal.value = bbox.height;
96
+          rect.setAttribute('class', className);
97
+          var parentOfText = node.parentNode.parentNode;
98
+          addItems.push({
99
+              "parent": node.parentNode,
100
+              "target": rect});
101
+        }
102
+      }
103
+    }
104
+    else if (!jQuery(node).is("button, select, textarea")) {
105
+      jQuery.each(node.childNodes, function() {
106
+        highlight(this, addItems);
107
+      });
108
+    }
109
+  }
110
+  var addItems = [];
111
+  var result = this.each(function() {
112
+    highlight(this, addItems);
113
+  });
114
+  for (var i = 0; i < addItems.length; ++i) {
115
+    jQuery(addItems[i].parent).before(addItems[i].target);
116
+  }
117
+  return result;
118
+};
119
+
120
+/*
121
+ * backward compatibility for jQuery.browser
122
+ * This will be supported until firefox bug is fixed.
123
+ */
124
+if (!jQuery.browser) {
125
+  jQuery.uaMatch = function(ua) {
126
+    ua = ua.toLowerCase();
127
+
128
+    var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
129
+      /(webkit)[ \/]([\w.]+)/.exec(ua) ||
130
+      /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
131
+      /(msie) ([\w.]+)/.exec(ua) ||
132
+      ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
133
+      [];
134
+
135
+    return {
136
+      browser: match[ 1 ] || "",
137
+      version: match[ 2 ] || "0"
138
+    };
139
+  };
140
+  jQuery.browser = {};
141
+  jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
142
+}
143
+
144
+/**
145
+ * Small JavaScript module for the documentation.
146
+ */
147
+var Documentation = {
148
+
149
+  init : function() {
150
+    this.fixFirefoxAnchorBug();
151
+    this.highlightSearchWords();
152
+    this.initIndexTable();
153
+    if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
154
+      this.initOnKeyListeners();
155
+    }
156
+  },
157
+
158
+  /**
159
+   * i18n support
160
+   */
161
+  TRANSLATIONS : {},
162
+  PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
163
+  LOCALE : 'unknown',
164
+
165
+  // gettext and ngettext don't access this so that the functions
166
+  // can safely bound to a different name (_ = Documentation.gettext)
167
+  gettext : function(string) {
168
+    var translated = Documentation.TRANSLATIONS[string];
169
+    if (typeof translated === 'undefined')
170
+      return string;
171
+    return (typeof translated === 'string') ? translated : translated[0];
172
+  },
173
+
174
+  ngettext : function(singular, plural, n) {
175
+    var translated = Documentation.TRANSLATIONS[singular];
176
+    if (typeof translated === 'undefined')
177
+      return (n == 1) ? singular : plural;
178
+    return translated[Documentation.PLURALEXPR(n)];
179
+  },
180
+
181
+  addTranslations : function(catalog) {
182
+    for (var key in catalog.messages)
183
+      this.TRANSLATIONS[key] = catalog.messages[key];
184
+    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
185
+    this.LOCALE = catalog.locale;
186
+  },
187
+
188
+  /**
189
+   * add context elements like header anchor links
190
+   */
191
+  addContextElements : function() {
192
+    $('div[id] > :header:first').each(function() {
193
+      $('<a class="headerlink">\u00B6</a>').
194
+      attr('href', '#' + this.id).
195
+      attr('title', _('Permalink to this headline')).
196
+      appendTo(this);
197
+    });
198
+    $('dt[id]').each(function() {
199
+      $('<a class="headerlink">\u00B6</a>').
200
+      attr('href', '#' + this.id).
201
+      attr('title', _('Permalink to this definition')).
202
+      appendTo(this);
203
+    });
204
+  },
205
+
206
+  /**
207
+   * workaround a firefox stupidity
208
+   * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
209
+   */
210
+  fixFirefoxAnchorBug : function() {
211
+    if (document.location.hash && $.browser.mozilla)
212
+      window.setTimeout(function() {
213
+        document.location.href += '';
214
+      }, 10);
215
+  },
216
+
217
+  /**
218
+   * highlight the search words provided in the url in the text
219
+   */
220
+  highlightSearchWords : function() {
221
+    var params = $.getQueryParameters();
222
+    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
223
+    if (terms.length) {
224
+      var body = $('div.body');
225
+      if (!body.length) {
226
+        body = $('body');
227
+      }
228
+      window.setTimeout(function() {
229
+        $.each(terms, function() {
230
+          body.highlightText(this.toLowerCase(), 'highlighted');
231
+        });
232
+      }, 10);
233
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
234
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
235
+          .appendTo($('#searchbox'));
236
+    }
237
+  },
238
+
239
+  /**
240
+   * init the domain index toggle buttons
241
+   */
242
+  initIndexTable : function() {
243
+    var togglers = $('img.toggler').click(function() {
244
+      var src = $(this).attr('src');
245
+      var idnum = $(this).attr('id').substr(7);
246
+      $('tr.cg-' + idnum).toggle();
247
+      if (src.substr(-9) === 'minus.png')
248
+        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
249
+      else
250
+        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
251
+    }).css('display', '');
252
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
253
+        togglers.click();
254
+    }
255
+  },
256
+
257
+  /**
258
+   * helper function to hide the search marks again
259
+   */
260
+  hideSearchWords : function() {
261
+    $('#searchbox .highlight-link').fadeOut(300);
262
+    $('span.highlighted').removeClass('highlighted');
263
+  },
264
+
265
+  /**
266
+   * make the url absolute
267
+   */
268
+  makeURL : function(relativeURL) {
269
+    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
270
+  },
271
+
272
+  /**
273
+   * get the current relative url
274
+   */
275
+  getCurrentURL : function() {
276
+    var path = document.location.pathname;
277
+    var parts = path.split(/\//);
278
+    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
279
+      if (this === '..')
280
+        parts.pop();
281
+    });
282
+    var url = parts.join('/');
283
+    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
284
+  },
285
+
286
+  initOnKeyListeners: function() {
287
+    $(document).keyup(function(event) {
288
+      var activeElementType = document.activeElement.tagName;
289
+      // don't navigate when in search box or textarea
290
+      if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
291
+        switch (event.keyCode) {
292
+          case 37: // left
293
+            var prevHref = $('link[rel="prev"]').prop('href');
294
+            if (prevHref) {
295
+              window.location.href = prevHref;
296
+              return false;
297
+            }
298
+          case 39: // right
299
+            var nextHref = $('link[rel="next"]').prop('href');
300
+            if (nextHref) {
301
+              window.location.href = nextHref;
302
+              return false;
303
+            }
304
+        }
305
+      }
306
+    });
307
+  }
308
+};
309
+
310
+// quick alias for translations
311
+_ = Documentation.gettext;
312
+
313
+$(document).ready(function() {
314
+  Documentation.init();
315
+});

+ 10
- 0
_docs_/_static/documentation_options.js View File

@@ -0,0 +1,10 @@
1
+var DOCUMENTATION_OPTIONS = {
2
+    URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3
+    VERSION: '',
4
+    LANGUAGE: 'None',
5
+    COLLAPSE_INDEX: false,
6
+    FILE_SUFFIX: '.html',
7
+    HAS_SOURCE: true,
8
+    SOURCELINK_SUFFIX: '.txt',
9
+    NAVIGATION_WITH_KEYS: false,
10
+};

BIN
_docs_/_static/file.png View File


BIN
_docs_/_static/fonts/FontAwesome.otf View File


BIN
_docs_/_static/fonts/Lato/lato-bold.eot View File


BIN
_docs_/_static/fonts/Lato/lato-bold.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-bold.woff View File


BIN
_docs_/_static/fonts/Lato/lato-bold.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.eot View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.woff View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-italic.eot View File


BIN
_docs_/_static/fonts/Lato/lato-italic.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-italic.woff View File


BIN
_docs_/_static/fonts/Lato/lato-italic.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-regular.eot View File


BIN
_docs_/_static/fonts/Lato/lato-regular.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-regular.woff View File


BIN
_docs_/_static/fonts/Lato/lato-regular.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Bold.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Bold.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Light.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Light.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Regular.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Regular.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Thin.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Thin.woff2 View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 View File


BIN
_docs_/_static/fonts/fontawesome-webfont.eot View File


+ 2671
- 0
_docs_/_static/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


BIN
_docs_/_static/fonts/fontawesome-webfont.ttf View File


BIN
_docs_/_static/fonts/fontawesome-webfont.woff View File


BIN
_docs_/_static/fonts/fontawesome-webfont.woff2 View File


BIN
_docs_/_static/fonts/lato-bold-italic.woff View File


BIN
_docs_/_static/fonts/lato-bold-italic.woff2 View File


BIN
_docs_/_static/fonts/lato-bold.woff View File


BIN
_docs_/_static/fonts/lato-bold.woff2 View File


BIN
_docs_/_static/fonts/lato-normal-italic.woff View File


BIN
_docs_/_static/fonts/lato-normal-italic.woff2 View File


BIN
_docs_/_static/fonts/lato-normal.woff View File


BIN
_docs_/_static/fonts/lato-normal.woff2 View File


+ 10365
- 0
_docs_/_static/jquery.js
File diff suppressed because it is too large
View File


+ 1
- 0
_docs_/_static/js/badge_only.js View File

@@ -0,0 +1 @@
1
+!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});

+ 4
- 0
_docs_/_static/js/html5shiv-printshiv.min.js View File

@@ -0,0 +1,4 @@
1
+/**
2
+* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+*/
4
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);

+ 4
- 0
_docs_/_static/js/html5shiv.min.js View File

@@ -0,0 +1,4 @@
1
+/**
2
+* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+*/
4
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);

+ 4
- 0
_docs_/_static/js/modernizr.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
_docs_/_static/js/theme.js View File

@@ -0,0 +1 @@
1
+!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n('<span class="toctree-expand"></span>'),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);

+ 297
- 0
_docs_/_static/language_data.js View File

@@ -0,0 +1,297 @@
1
+/*
2
+ * language_data.js
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * This script contains the language-specific data used by searchtools.js,
6
+ * namely the list of stopwords, stemmer, scorer and splitter.
7
+ *
8
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
9
+ * :license: BSD, see LICENSE for details.
10
+ *
11
+ */
12
+
13
+var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
14
+
15
+
16
+/* Non-minified version JS is _stemmer.js if file is provided */ 
17
+/**
18
+ * Porter Stemmer
19
+ */
20
+var Stemmer = function() {
21
+
22
+  var step2list = {
23
+    ational: 'ate',
24
+    tional: 'tion',
25
+    enci: 'ence',
26
+    anci: 'ance',
27
+    izer: 'ize',
28
+    bli: 'ble',
29
+    alli: 'al',
30
+    entli: 'ent',
31
+    eli: 'e',
32
+    ousli: 'ous',
33
+    ization: 'ize',
34
+    ation: 'ate',
35
+    ator: 'ate',
36
+    alism: 'al',
37
+    iveness: 'ive',
38
+    fulness: 'ful',
39
+    ousness: 'ous',
40
+    aliti: 'al',
41
+    iviti: 'ive',
42
+    biliti: 'ble',
43
+    logi: 'log'
44
+  };
45
+
46
+  var step3list = {
47
+    icate: 'ic',
48
+    ative: '',
49
+    alize: 'al',
50
+    iciti: 'ic',
51
+    ical: 'ic',
52
+    ful: '',
53
+    ness: ''
54
+  };
55
+
56
+  var c = "[^aeiou]";          // consonant
57
+  var v = "[aeiouy]";          // vowel
58
+  var C = c + "[^aeiouy]*";    // consonant sequence
59
+  var V = v + "[aeiou]*";      // vowel sequence
60
+
61
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
62
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
63
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
64
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
65
+
66
+  this.stemWord = function (w) {
67
+    var stem;
68
+    var suffix;
69
+    var firstch;
70
+    var origword = w;
71
+
72
+    if (w.length < 3)
73
+      return w;
74
+
75
+    var re;
76
+    var re2;
77
+    var re3;
78
+    var re4;
79
+
80
+    firstch = w.substr(0,1);
81
+    if (firstch == "y")
82
+      w = firstch.toUpperCase() + w.substr(1);
83
+
84
+    // Step 1a
85
+    re = /^(.+?)(ss|i)es$/;
86
+    re2 = /^(.+?)([^s])s$/;
87
+
88
+    if (re.test(w))
89
+      w = w.replace(re,"$1$2");
90
+    else if (re2.test(w))
91
+      w = w.replace(re2,"$1$2");
92
+
93
+    // Step 1b
94
+    re = /^(.+?)eed$/;
95
+    re2 = /^(.+?)(ed|ing)$/;
96
+    if (re.test(w)) {
97
+      var fp = re.exec(w);
98
+      re = new RegExp(mgr0);
99
+      if (re.test(fp[1])) {
100
+        re = /.$/;
101
+        w = w.replace(re,"");
102
+      }
103
+    }
104
+    else if (re2.test(w)) {
105
+      var fp = re2.exec(w);
106
+      stem = fp[1];
107
+      re2 = new RegExp(s_v);
108
+      if (re2.test(stem)) {
109
+        w = stem;
110
+        re2 = /(at|bl|iz)$/;
111
+        re3 = new RegExp("([^aeiouylsz])\\1$");
112
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
113
+        if (re2.test(w))
114
+          w = w + "e";
115
+        else if (re3.test(w)) {
116
+          re = /.$/;
117
+          w = w.replace(re,"");
118
+        }
119
+        else if (re4.test(w))
120
+          w = w + "e";
121
+      }
122
+    }
123
+
124
+    // Step 1c
125
+    re = /^(.+?)y$/;
126
+    if (re.test(w)) {
127
+      var fp = re.exec(w);
128
+      stem = fp[1];
129
+      re = new RegExp(s_v);
130
+      if (re.test(stem))
131
+        w = stem + "i";
132
+    }
133
+
134
+    // Step 2
135
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
136
+    if (re.test(w)) {
137
+      var fp = re.exec(w);
138
+      stem = fp[1];
139
+      suffix = fp[2];
140
+      re = new RegExp(mgr0);
141
+      if (re.test(stem))
142
+        w = stem + step2list[suffix];
143
+    }
144
+
145
+    // Step 3
146
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
147
+    if (re.test(w)) {
148
+      var fp = re.exec(w);
149
+      stem = fp[1];
150
+      suffix = fp[2];
151
+      re = new RegExp(mgr0);
152
+      if (re.test(stem))
153
+        w = stem + step3list[suffix];
154
+    }
155
+
156
+    // Step 4
157
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
158
+    re2 = /^(.+?)(s|t)(ion)$/;
159
+    if (re.test(w)) {
160
+      var fp = re.exec(w);
161
+      stem = fp[1];
162
+      re = new RegExp(mgr1);
163
+      if (re.test(stem))
164
+        w = stem;
165
+    }
166
+    else if (re2.test(w)) {
167
+      var fp = re2.exec(w);
168
+      stem = fp[1] + fp[2];
169
+      re2 = new RegExp(mgr1);
170
+      if (re2.test(stem))
171
+        w = stem;
172
+    }
173
+
174
+    // Step 5
175
+    re = /^(.+?)e$/;
176
+    if (re.test(w)) {
177
+      var fp = re.exec(w);
178
+      stem = fp[1];
179
+      re = new RegExp(mgr1);
180
+      re2 = new RegExp(meq1);
181
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
182
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
183
+        w = stem;
184
+    }
185
+    re = /ll$/;
186
+    re2 = new RegExp(mgr1);
187
+    if (re.test(w) && re2.test(w)) {
188
+      re = /.$/;
189
+      w = w.replace(re,"");
190
+    }
191
+
192
+    // and turn initial Y back to y
193
+    if (firstch == "y")
194
+      w = firstch.toLowerCase() + w.substr(1);
195
+    return w;
196
+  }
197
+}
198
+
199
+
200
+
201
+
202
+
203
+var splitChars = (function() {
204
+    var result = {};
205
+    var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
206
+         1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
207
+         2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
208
+         2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
209
+         3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
210
+         3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
211
+         4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
212
+         8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
213
+         11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
214
+         43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
215
+    var i, j, start, end;
216
+    for (i = 0; i < singles.length; i++) {
217
+        result[singles[i]] = true;
218
+    }
219
+    var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
220
+         [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
221
+         [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
222
+         [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
223
+         [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
224
+         [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
225
+         [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
226
+         [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
227
+         [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
228
+         [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
229
+         [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
230
+         [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
231
+         [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
232
+         [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
233
+         [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
234
+         [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
235
+         [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
236
+         [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
237
+         [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
238
+         [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
239
+         [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
240
+         [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
241
+         [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
242
+         [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
243
+         [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
244
+         [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
245
+         [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
246
+         [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
247
+         [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
248
+         [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
249
+         [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
250
+         [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
251
+         [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
252
+         [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
253
+         [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
254
+         [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
255
+         [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
256
+         [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
257
+         [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
258
+         [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
259
+         [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
260
+         [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
261
+         [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
262
+         [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
263
+         [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
264
+         [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
265
+         [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
266
+         [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
267
+         [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
268
+    for (i = 0; i < ranges.length; i++) {
269
+        start = ranges[i][0];
270
+        end = ranges[i][1];
271
+        for (j = start; j <= end; j++) {
272
+            result[j] = true;
273
+        }
274
+    }
275
+    return result;
276
+})();
277
+
278
+function splitQuery(query) {
279
+    var result = [];
280
+    var start = -1;
281
+    for (var i = 0; i < query.length; i++) {
282
+        if (splitChars[query.charCodeAt(i)]) {
283
+            if (start !== -1) {
284
+                result.push(query.slice(start, i));
285
+                start = -1;
286
+            }
287
+        } else if (start === -1) {
288
+            start = i;
289
+        }
290
+    }
291
+    if (start !== -1) {
292
+        result.push(query.slice(start));
293
+    }
294
+    return result;
295
+}
296
+
297
+

BIN
_docs_/_static/minus.png View File


BIN
_docs_/_static/plus.png View File


+ 69
- 0
_docs_/_static/pygments.css View File

@@ -0,0 +1,69 @@
1
+.highlight .hll { background-color: #ffffcc }
2
+.highlight  { background: #f8f8f8; }
3
+.highlight .c { color: #408080; font-style: italic } /* Comment */
4
+.highlight .err { border: 1px solid #FF0000 } /* Error */
5
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
6
+.highlight .o { color: #666666 } /* Operator */
7
+.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
8
+.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
9
+.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
10
+.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
11
+.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
12
+.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
13
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
14
+.highlight .ge { font-style: italic } /* Generic.Emph */
15
+.highlight .gr { color: #FF0000 } /* Generic.Error */
16
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
17
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
18
+.highlight .go { color: #888888 } /* Generic.Output */
19
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
20
+.highlight .gs { font-weight: bold } /* Generic.Strong */
21
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
22
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
23
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
24
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
25
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
26
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
27
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
28
+.highlight .kt { color: #B00040 } /* Keyword.Type */
29
+.highlight .m { color: #666666 } /* Literal.Number */
30
+.highlight .s { color: #BA2121 } /* Literal.String */
31
+.highlight .na { color: #7D9029 } /* Name.Attribute */
32
+.highlight .nb { color: #008000 } /* Name.Builtin */
33
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
34
+.highlight .no { color: #880000 } /* Name.Constant */
35
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
36
+.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
37
+.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
38
+.highlight .nf { color: #0000FF } /* Name.Function */
39
+.highlight .nl { color: #A0A000 } /* Name.Label */
40
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
41
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
42
+.highlight .nv { color: #19177C } /* Name.Variable */
43
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
44
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
45
+.highlight .mb { color: #666666 } /* Literal.Number.Bin */
46
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
47
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
48
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
49
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
50
+.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
51
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
52
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
53
+.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
54
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
55
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
56
+.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
57
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
58
+.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
59
+.highlight .sx { color: #008000 } /* Literal.String.Other */
60
+.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
61
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
62
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
63
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
64
+.highlight .fm { color: #0000FF } /* Name.Function.Magic */
65
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
66
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
67
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
68
+.highlight .vm { color: #19177C } /* Name.Variable.Magic */
69
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

+ 481
- 0
_docs_/_static/searchtools.js View File

@@ -0,0 +1,481 @@
1
+/*
2
+ * searchtools.js
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for the full-text search.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+if (!Scorer) {
13
+  /**
14
+   * Simple result scoring code.
15
+   */
16
+  var Scorer = {
17
+    // Implement the following function to further tweak the score for each result
18
+    // The function takes a result array [filename, title, anchor, descr, score]
19
+    // and returns the new score.
20
+    /*
21
+    score: function(result) {
22
+      return result[4];
23
+    },
24
+    */
25
+
26
+    // query matches the full name of an object
27
+    objNameMatch: 11,
28
+    // or matches in the last dotted part of the object name
29
+    objPartialMatch: 6,
30
+    // Additive scores depending on the priority of the object
31
+    objPrio: {0:  15,   // used to be importantResults
32
+              1:  5,   // used to be objectResults
33
+              2: -5},  // used to be unimportantResults
34
+    //  Used when the priority is not in the mapping.
35
+    objPrioDefault: 0,
36
+
37
+    // query found in title
38
+    title: 15,
39
+    // query found in terms
40
+    term: 5
41
+  };
42
+}
43
+
44
+if (!splitQuery) {
45
+  function splitQuery(query) {
46
+    return query.split(/\s+/);
47
+  }
48
+}
49
+
50
+/**
51
+ * Search Module
52
+ */
53
+var Search = {
54
+
55
+  _index : null,
56
+  _queued_query : null,
57
+  _pulse_status : -1,
58
+
59
+  init : function() {
60
+      var params = $.getQueryParameters();
61
+      if (params.q) {
62
+          var query = params.q[0];
63
+          $('input[name="q"]')[0].value = query;
64
+          this.performSearch(query);
65
+      }
66
+  },
67
+
68
+  loadIndex : function(url) {
69
+    $.ajax({type: "GET", url: url, data: null,
70
+            dataType: "script", cache: true,
71
+            complete: function(jqxhr, textstatus) {
72
+              if (textstatus != "success") {
73
+                document.getElementById("searchindexloader").src = url;
74
+              }
75
+            }});
76
+  },
77
+
78
+  setIndex : function(index) {
79
+    var q;
80
+    this._index = index;
81
+    if ((q = this._queued_query) !== null) {
82
+      this._queued_query = null;
83
+      Search.query(q);
84
+    }
85
+  },
86
+
87
+  hasIndex : function() {
88
+      return this._index !== null;
89
+  },
90
+
91
+  deferQuery : function(query) {
92
+      this._queued_query = query;
93
+  },
94
+
95
+  stopPulse : function() {
96
+      this._pulse_status = 0;
97
+  },
98
+
99
+  startPulse : function() {
100
+    if (this._pulse_status >= 0)
101
+        return;
102
+    function pulse() {
103
+      var i;
104
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
105
+      var dotString = '';
106
+      for (i = 0; i < Search._pulse_status; i++)
107
+        dotString += '.';
108
+      Search.dots.text(dotString);
109
+      if (Search._pulse_status > -1)
110
+        window.setTimeout(pulse, 500);
111
+    }
112
+    pulse();
113
+  },
114
+
115
+  /**
116
+   * perform a search for something (or wait until index is loaded)
117
+   */
118
+  performSearch : function(query) {
119
+    // create the required interface elements
120
+    this.out = $('#search-results');
121
+    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
122
+    this.dots = $('<span></span>').appendTo(this.title);
123
+    this.status = $('<p style="display: none"></p>').appendTo(this.out);
124
+    this.output = $('<ul class="search"/>').appendTo(this.out);
125
+
126
+    $('#search-progress').text(_('Preparing search...'));
127
+    this.startPulse();
128
+
129
+    // index already loaded, the browser was quick!
130
+    if (this.hasIndex())
131
+      this.query(query);
132
+    else
133
+      this.deferQuery(query);
134
+  },
135
+
136
+  /**
137
+   * execute search (requires search index to be loaded)
138
+   */
139
+  query : function(query) {
140
+    var i;
141
+
142
+    // stem the searchterms and add them to the correct list
143
+    var stemmer = new Stemmer();
144
+    var searchterms = [];
145
+    var excluded = [];
146
+    var hlterms = [];
147
+    var tmp = splitQuery(query);
148
+    var objectterms = [];
149
+    for (i = 0; i < tmp.length; i++) {
150
+      if (tmp[i] !== "") {
151
+          objectterms.push(tmp[i].toLowerCase());
152
+      }
153
+
154
+      if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
155
+          tmp[i] === "") {
156
+        // skip this "word"
157
+        continue;
158
+      }
159
+      // stem the word
160
+      var word = stemmer.stemWord(tmp[i].toLowerCase());
161
+      // prevent stemmer from cutting word smaller than two chars
162
+      if(word.length < 3 && tmp[i].length >= 3) {
163
+        word = tmp[i];
164
+      }
165
+      var toAppend;
166
+      // select the correct list
167
+      if (word[0] == '-') {
168
+        toAppend = excluded;
169
+        word = word.substr(1);
170
+      }
171
+      else {
172
+        toAppend = searchterms;
173
+        hlterms.push(tmp[i].toLowerCase());
174
+      }
175
+      // only add if not already in the list
176
+      if (!$u.contains(toAppend, word))
177
+        toAppend.push(word);
178
+    }
179
+    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
180
+
181
+    // console.debug('SEARCH: searching for:');
182
+    // console.info('required: ', searchterms);
183
+    // console.info('excluded: ', excluded);
184
+
185
+    // prepare search
186
+    var terms = this._index.terms;
187
+    var titleterms = this._index.titleterms;
188
+
189
+    // array of [filename, title, anchor, descr, score]
190
+    var results = [];
191
+    $('#search-progress').empty();
192
+
193
+    // lookup as object
194
+    for (i = 0; i < objectterms.length; i++) {
195
+      var others = [].concat(objectterms.slice(0, i),
196
+                             objectterms.slice(i+1, objectterms.length));
197
+      results = results.concat(this.performObjectSearch(objectterms[i], others));
198
+    }
199
+
200
+    // lookup as search terms in fulltext
201
+    results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
202
+
203
+    // let the scorer override scores with a custom scoring function
204
+    if (Scorer.score) {
205
+      for (i = 0; i < results.length; i++)
206
+        results[i][4] = Scorer.score(results[i]);
207
+    }
208
+
209
+    // now sort the results by score (in opposite order of appearance, since the
210
+    // display function below uses pop() to retrieve items) and then
211
+    // alphabetically
212
+    results.sort(function(a, b) {
213
+      var left = a[4];
214
+      var right = b[4];
215
+      if (left > right) {
216
+        return 1;
217
+      } else if (left < right) {
218
+        return -1;
219
+      } else {
220
+        // same score: sort alphabetically
221
+        left = a[1].toLowerCase();
222
+        right = b[1].toLowerCase();
223
+        return (left > right) ? -1 : ((left < right) ? 1 : 0);
224
+      }
225
+    });
226
+
227
+    // for debugging
228
+    //Search.lastresults = results.slice();  // a copy
229
+    //console.info('search results:', Search.lastresults);
230
+
231
+    // print the results
232
+    var resultCount = results.length;
233
+    function displayNextItem() {
234
+      // results left, load the summary and display it
235
+      if (results.length) {
236
+        var item = results.pop();
237
+        var listItem = $('<li style="display:none"></li>');
238
+        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
239
+          // dirhtml builder
240
+          var dirname = item[0] + '/';
241
+          if (dirname.match(/\/index\/$/)) {
242
+            dirname = dirname.substring(0, dirname.length-6);
243
+          } else if (dirname == 'index/') {
244
+            dirname = '';
245
+          }
246
+          listItem.append($('<a/>').attr('href',
247
+            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
248
+            highlightstring + item[2]).html(item[1]));
249
+        } else {
250
+          // normal html builders
251
+          listItem.append($('<a/>').attr('href',
252
+            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
253
+            highlightstring + item[2]).html(item[1]));
254
+        }
255
+        if (item[3]) {
256
+          listItem.append($('<span> (' + item[3] + ')</span>'));
257
+          Search.output.append(listItem);
258
+          listItem.slideDown(5, function() {
259
+            displayNextItem();
260
+          });
261
+        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
262
+          var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
263
+          if (suffix === undefined) {
264
+            suffix = '.txt';
265
+          }
266
+          $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
267
+                  dataType: "text",
268
+                  complete: function(jqxhr, textstatus) {
269
+                    var data = jqxhr.responseText;
270
+                    if (data !== '' && data !== undefined) {
271
+                      listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
272
+                    }
273
+                    Search.output.append(listItem);
274
+                    listItem.slideDown(5, function() {
275
+                      displayNextItem();
276
+                    });
277
+                  }});
278
+        } else {
279
+          // no source available, just display title
280
+          Search.output.append(listItem);
281
+          listItem.slideDown(5, function() {
282
+            displayNextItem();
283
+          });
284
+        }
285
+      }
286
+      // search finished, update title and status message
287
+      else {
288
+        Search.stopPulse();
289
+        Search.title.text(_('Search Results'));
290
+        if (!resultCount)
291
+          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
292
+        else
293
+            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
294
+        Search.status.fadeIn(500);
295
+      }
296
+    }
297
+    displayNextItem();
298
+  },
299
+
300
+  /**
301
+   * search for object names
302
+   */
303
+  performObjectSearch : function(object, otherterms) {
304
+    var filenames = this._index.filenames;
305
+    var docnames = this._index.docnames;
306
+    var objects = this._index.objects;
307
+    var objnames = this._index.objnames;
308
+    var titles = this._index.titles;
309
+
310
+    var i;
311
+    var results = [];
312
+
313
+    for (var prefix in objects) {
314
+      for (var name in objects[prefix]) {
315
+        var fullname = (prefix ? prefix + '.' : '') + name;
316
+        if (fullname.toLowerCase().indexOf(object) > -1) {
317
+          var score = 0;
318
+          var parts = fullname.split('.');
319
+          // check for different match types: exact matches of full name or
320
+          // "last name" (i.e. last dotted part)
321
+          if (fullname == object || parts[parts.length - 1] == object) {
322
+            score += Scorer.objNameMatch;
323
+          // matches in last name
324
+          } else if (parts[parts.length - 1].indexOf(object) > -1) {
325
+            score += Scorer.objPartialMatch;
326
+          }
327
+          var match = objects[prefix][name];
328
+          var objname = objnames[match[1]][2];
329
+          var title = titles[match[0]];
330
+          // If more than one term searched for, we require other words to be
331
+          // found in the name/title/description
332
+          if (otherterms.length > 0) {
333
+            var haystack = (prefix + ' ' + name + ' ' +
334
+                            objname + ' ' + title).toLowerCase();
335
+            var allfound = true;
336
+            for (i = 0; i < otherterms.length; i++) {
337
+              if (haystack.indexOf(otherterms[i]) == -1) {
338
+                allfound = false;
339
+                break;
340
+              }
341
+            }
342
+            if (!allfound) {
343
+              continue;
344
+            }
345
+          }
346
+          var descr = objname + _(', in ') + title;
347
+
348
+          var anchor = match[3];
349
+          if (anchor === '')
350
+            anchor = fullname;
351
+          else if (anchor == '-')
352
+            anchor = objnames[match[1]][1] + '-' + fullname;
353
+          // add custom score for some objects according to scorer
354
+          if (Scorer.objPrio.hasOwnProperty(match[2])) {
355
+            score += Scorer.objPrio[match[2]];
356
+          } else {
357
+            score += Scorer.objPrioDefault;
358
+          }
359
+          results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
360
+        }
361
+      }
362
+    }
363
+
364
+    return results;
365
+  },
366
+
367
+  /**
368
+   * search for full-text terms in the index
369
+   */
370
+  performTermsSearch : function(searchterms, excluded, terms, titleterms) {
371
+    var docnames = this._index.docnames;
372
+    var filenames = this._index.filenames;
373
+    var titles = this._index.titles;
374
+
375
+    var i, j, file;
376
+    var fileMap = {};
377
+    var scoreMap = {};
378
+    var results = [];
379
+
380
+    // perform the search on the required terms
381
+    for (i = 0; i < searchterms.length; i++) {
382
+      var word = searchterms[i];
383
+      var files = [];
384
+      var _o = [
385
+        {files: terms[word], score: Scorer.term},
386
+        {files: titleterms[word], score: Scorer.title}
387
+      ];
388
+
389
+      // no match but word was a required one
390
+      if ($u.every(_o, function(o){return o.files === undefined;})) {
391
+        break;
392
+      }
393
+      // found search word in contents
394
+      $u.each(_o, function(o) {
395
+        var _files = o.files;
396
+        if (_files === undefined)
397
+          return
398
+
399
+        if (_files.length === undefined)
400
+          _files = [_files];
401
+        files = files.concat(_files);
402
+
403
+        // set score for the word in each file to Scorer.term
404
+        for (j = 0; j < _files.length; j++) {
405
+          file = _files[j];
406
+          if (!(file in scoreMap))
407
+            scoreMap[file] = {}
408
+          scoreMap[file][word] = o.score;
409
+        }
410
+      });
411
+
412
+      // create the mapping
413
+      for (j = 0; j < files.length; j++) {
414
+        file = files[j];
415
+        if (file in fileMap)
416
+          fileMap[file].push(word);
417
+        else
418
+          fileMap[file] = [word];
419
+      }
420
+    }
421
+
422
+    // now check if the files don't contain excluded terms
423
+    for (file in fileMap) {
424
+      var valid = true;
425
+
426
+      // check if all requirements are matched
427
+      if (fileMap[file].length != searchterms.length)
428
+          continue;
429
+
430
+      // ensure that none of the excluded terms is in the search result
431
+      for (i = 0; i < excluded.length; i++) {
432
+        if (terms[excluded[i]] == file ||
433
+            titleterms[excluded[i]] == file ||
434
+            $u.contains(terms[excluded[i]] || [], file) ||
435
+            $u.contains(titleterms[excluded[i]] || [], file)) {
436
+          valid = false;
437
+          break;
438
+        }
439
+      }
440
+
441
+      // if we have still a valid result we can add it to the result list
442
+      if (valid) {
443
+        // select one (max) score for the file.
444
+        // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
445
+        var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
446
+        results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
447
+      }
448
+    }
449
+    return results;
450
+  },
451
+
452
+  /**
453
+   * helper function to return a node containing the
454
+   * search summary for a given text. keywords is a list
455
+   * of stemmed words, hlwords is the list of normal, unstemmed
456
+   * words. the first one is used to find the occurrence, the
457
+   * latter for highlighting it.
458
+   */
459
+  makeSearchSummary : function(text, keywords, hlwords) {
460
+    var textLower = text.toLowerCase();
461
+    var start = 0;
462
+    $.each(keywords, function() {
463
+      var i = textLower.indexOf(this.toLowerCase());
464
+      if (i > -1)
465
+        start = i;
466
+    });
467
+    start = Math.max(start - 120, 0);
468
+    var excerpt = ((start > 0) ? '...' : '') +
469
+      $.trim(text.substr(start, 240)) +
470
+      ((start + 240 - text.length) ? '...' : '');
471
+    var rv = $('<div class="context"></div>').text(excerpt);
472
+    $.each(hlwords, function() {
473
+      rv = rv.highlightText(this, 'highlighted');
474
+    });
475
+    return rv;
476
+  }
477
+};
478
+
479
+$(document).ready(function() {
480
+  Search.init();
481
+});

+ 1692
- 0
_docs_/_static/underscore.js
File diff suppressed because it is too large
View File


+ 284
- 0
_docs_/genindex.html View File

@@ -0,0 +1,284 @@
1
+
2
+
3
+
4
+<!DOCTYPE html>
5
+<html class="writer-html4" lang="en" >
6
+<head>
7
+  <meta charset="utf-8">
8
+  
9
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+  
11
+  <title>Index &mdash; tcp_socket  documentation</title>
12
+  
13
+
14
+  
15
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
16
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
17
+
18
+  
19
+  
20
+  
21
+  
22
+
23
+  
24
+  <!--[if lt IE 9]>
25
+    <script src="_static/js/html5shiv.min.js"></script>
26
+  <![endif]-->
27
+  
28
+    
29
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
30
+        <script type="text/javascript" src="_static/jquery.js"></script>
31
+        <script type="text/javascript" src="_static/underscore.js"></script>
32
+        <script type="text/javascript" src="_static/doctools.js"></script>
33
+        <script type="text/javascript" src="_static/language_data.js"></script>
34
+    
35
+    <script type="text/javascript" src="_static/js/theme.js"></script>
36
+
37
+    
38
+    <link rel="index" title="Index" href="#" />
39
+    <link rel="search" title="Search" href="search.html" /> 
40
+</head>
41
+
42
+<body class="wy-body-for-nav">
43
+
44
+   
45
+  <div class="wy-grid-for-nav">
46
+    
47
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
48
+      <div class="wy-side-scroll">
49
+        <div class="wy-side-nav-search" >
50
+          
51
+
52
+          
53
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> tcp_socket
54
+          
55
+
56
+          
57
+          </a>
58
+
59
+          
60
+            
61
+            
62
+          
63
+
64
+          
65
+<div role="search">
66
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
67
+    <input type="text" name="q" placeholder="Search docs" />
68
+    <input type="hidden" name="check_keywords" value="yes" />
69
+    <input type="hidden" name="area" value="default" />
70
+  </form>
71
+</div>
72
+
73
+          
74
+        </div>
75
+
76
+        
77
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
78
+          
79
+            
80
+            
81
+              
82
+            
83
+            
84
+              <!-- Local TOC -->
85
+              <div class="local-toc"></div>
86
+            
87
+          
88
+        </div>
89
+        
90
+      </div>
91
+    </nav>
92
+
93
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
94
+
95
+      
96
+      <nav class="wy-nav-top" aria-label="top navigation">
97
+        
98
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
99
+          <a href="index.html">tcp_socket</a>
100
+        
101
+      </nav>
102
+
103
+
104
+      <div class="wy-nav-content">
105
+        
106
+        <div class="rst-content">
107
+        
108
+          
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+<div role="navigation" aria-label="breadcrumbs navigation">
125
+
126
+  <ul class="wy-breadcrumbs">
127
+    
128
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
129
+        
130
+      <li>Index</li>
131
+    
132
+    
133
+      <li class="wy-breadcrumbs-aside">
134
+        
135
+            
136
+        
137
+      </li>
138
+    
139
+  </ul>
140
+
141
+  
142
+  <hr/>
143
+</div>
144
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
145
+           <div itemprop="articleBody">
146
+            
147
+
148
+<h1 id="index">Index</h1>
149
+
150
+<div class="genindex-jumpbox">
151
+ <a href="#C"><strong>C</strong></a>
152
+ | <a href="#I"><strong>I</strong></a>
153
+ | <a href="#R"><strong>R</strong></a>
154
+ | <a href="#S"><strong>S</strong></a>
155
+ | <a href="#T"><strong>T</strong></a>
156
+ 
157
+</div>
158
+<h2 id="C">C</h2>
159
+<table style="width: 100%" class="indextable genindextable"><tr>
160
+  <td style="width: 33%; vertical-align: top;"><ul>
161
+      <li><a href="index.html#tcp_socket.tcp_base.client_address">client_address() (tcp_socket.tcp_base method)</a>
162
+</li>
163
+  </ul></td>
164
+  <td style="width: 33%; vertical-align: top;"><ul>
165
+      <li><a href="index.html#tcp_socket.tcp_base.close">close() (tcp_socket.tcp_base method)</a>
166
+</li>
167
+  </ul></td>
168
+</tr></table>
169
+
170
+<h2 id="I">I</h2>
171
+<table style="width: 100%" class="indextable genindextable"><tr>
172
+  <td style="width: 33%; vertical-align: top;"><ul>
173
+      <li><a href="index.html#tcp_socket.tcp_base.init_channel_name">init_channel_name() (tcp_socket.tcp_base method)</a>
174
+</li>
175
+  </ul></td>
176
+  <td style="width: 33%; vertical-align: top;"><ul>
177
+      <li><a href="index.html#tcp_socket.tcp_base.is_connected">is_connected() (tcp_socket.tcp_base method)</a>
178
+</li>
179
+  </ul></td>
180
+</tr></table>
181
+
182
+<h2 id="R">R</h2>
183
+<table style="width: 100%" class="indextable genindextable"><tr>
184
+  <td style="width: 33%; vertical-align: top;"><ul>
185
+      <li><a href="index.html#tcp_socket.tcp_base.receive">receive() (tcp_socket.tcp_base method)</a>
186
+
187
+      <ul>
188
+        <li><a href="index.html#tcp_socket.tcp_base_stp.receive">(tcp_socket.tcp_base_stp method)</a>
189
+</li>
190
+      </ul></li>
191
+  </ul></td>
192
+  <td style="width: 33%; vertical-align: top;"><ul>
193
+      <li><a href="index.html#tcp_socket.tcp_base.register_callback">register_callback() (tcp_socket.tcp_base method)</a>
194
+</li>
195
+      <li><a href="index.html#tcp_socket.tcp_base.register_connect_callback">register_connect_callback() (tcp_socket.tcp_base method)</a>
196
+</li>
197
+      <li><a href="index.html#tcp_socket.tcp_base.register_disconnect_callback">register_disconnect_callback() (tcp_socket.tcp_base method)</a>
198
+</li>
199
+  </ul></td>
200
+</tr></table>
201
+
202
+<h2 id="S">S</h2>
203
+<table style="width: 100%" class="indextable genindextable"><tr>
204
+  <td style="width: 33%; vertical-align: top;"><ul>
205
+      <li><a href="index.html#tcp_socket.tcp_base.send">send() (tcp_socket.tcp_base method)</a>
206
+
207
+      <ul>
208
+        <li><a href="index.html#tcp_socket.tcp_base_stp.send">(tcp_socket.tcp_base_stp method)</a>
209
+</li>
210
+      </ul></li>
211
+  </ul></td>
212
+</tr></table>
213
+
214
+<h2 id="T">T</h2>
215
+<table style="width: 100%" class="indextable genindextable"><tr>
216
+  <td style="width: 33%; vertical-align: top;"><ul>
217
+      <li><a href="index.html#tcp_socket.tcp_base">tcp_base (class in tcp_socket)</a>
218
+</li>
219
+      <li><a href="index.html#tcp_socket.tcp_base_stp">tcp_base_stp (class in tcp_socket)</a>
220
+</li>
221
+      <li><a href="index.html#tcp_socket.tcp_client">tcp_client (class in tcp_socket)</a>
222
+</li>
223
+  </ul></td>
224
+  <td style="width: 33%; vertical-align: top;"><ul>
225
+      <li><a href="index.html#tcp_socket.tcp_client_stp">tcp_client_stp (class in tcp_socket)</a>
226
+</li>
227
+      <li><a href="index.html#tcp_socket.tcp_server">tcp_server (class in tcp_socket)</a>
228
+</li>
229
+      <li><a href="index.html#tcp_socket.tcp_server_stp">tcp_server_stp (class in tcp_socket)</a>
230
+</li>
231
+      <li><a href="index.html#module-tcp_socket">tcp_socket (module)</a>
232
+</li>
233
+  </ul></td>
234
+</tr></table>
235
+
236
+
237
+
238
+           </div>
239
+           
240
+          </div>
241
+          <footer>
242
+  
243
+
244
+  <hr/>
245
+
246
+  <div role="contentinfo">
247
+    <p>
248
+        
249
+        &copy; Copyright 2021, Dirk Alders
250
+
251
+    </p>
252
+  </div>
253
+    
254
+    
255
+    
256
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
257
+    
258
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
259
+    
260
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
261
+
262
+</footer>
263
+
264
+        </div>
265
+      </div>
266
+
267
+    </section>
268
+
269
+  </div>
270
+  
271
+
272
+  <script type="text/javascript">
273
+      jQuery(function () {
274
+          SphinxRtdTheme.Navigation.enable(true);
275
+      });
276
+  </script>
277
+
278
+  
279
+  
280
+    
281
+   
282
+
283
+</body>
284
+</html>

+ 708
- 0
_docs_/index.html View File

@@ -0,0 +1,708 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Welcome to tcp_socket’s documentation! &mdash; tcp_socket  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+  <!--[if lt IE 9]>
24
+    <script src="_static/js/html5shiv.min.js"></script>
25
+  <![endif]-->
26
+  
27
+    
28
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
29
+        <script type="text/javascript" src="_static/jquery.js"></script>
30
+        <script type="text/javascript" src="_static/underscore.js"></script>
31
+        <script type="text/javascript" src="_static/doctools.js"></script>
32
+        <script type="text/javascript" src="_static/language_data.js"></script>
33
+    
34
+    <script type="text/javascript" src="_static/js/theme.js"></script>
35
+
36
+    
37
+    <link rel="index" title="Index" href="genindex.html" />
38
+    <link rel="search" title="Search" href="search.html" /> 
39
+</head>
40
+
41
+<body class="wy-body-for-nav">
42
+
43
+   
44
+  <div class="wy-grid-for-nav">
45
+    
46
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
47
+      <div class="wy-side-scroll">
48
+        <div class="wy-side-nav-search" >
49
+          
50
+
51
+          
52
+            <a href="#" class="icon icon-home" alt="Documentation Home"> tcp_socket
53
+          
54
+
55
+          
56
+          </a>
57
+
58
+          
59
+            
60
+            
61
+          
62
+
63
+          
64
+<div role="search">
65
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
66
+    <input type="text" name="q" placeholder="Search docs" />
67
+    <input type="hidden" name="check_keywords" value="yes" />
68
+    <input type="hidden" name="area" value="default" />
69
+  </form>
70
+</div>
71
+
72
+          
73
+        </div>
74
+
75
+        
76
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
77
+          
78
+            
79
+            
80
+              
81
+            
82
+            
83
+              <!-- Local TOC -->
84
+              <div class="local-toc"><ul>
85
+<li><a class="reference internal" href="#">Welcome to tcp_socket’s documentation!</a><ul>
86
+<li><a class="reference internal" href="#tcp-socket-tcp-socket">tcp_socket (TCP Socket)</a></li>
87
+</ul>
88
+</li>
89
+<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
90
+</ul>
91
+</div>
92
+            
93
+          
94
+        </div>
95
+        
96
+      </div>
97
+    </nav>
98
+
99
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
100
+
101
+      
102
+      <nav class="wy-nav-top" aria-label="top navigation">
103
+        
104
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
105
+          <a href="#">tcp_socket</a>
106
+        
107
+      </nav>
108
+
109
+
110
+      <div class="wy-nav-content">
111
+        
112
+        <div class="rst-content">
113
+        
114
+          
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+<div role="navigation" aria-label="breadcrumbs navigation">
131
+
132
+  <ul class="wy-breadcrumbs">
133
+    
134
+      <li><a href="#" class="icon icon-home"></a> &raquo;</li>
135
+        
136
+      <li>Welcome to tcp_socket’s documentation!</li>
137
+    
138
+    
139
+      <li class="wy-breadcrumbs-aside">
140
+        
141
+            
142
+            <a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
143
+          
144
+        
145
+      </li>
146
+    
147
+  </ul>
148
+
149
+  
150
+  <hr/>
151
+</div>
152
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
153
+           <div itemprop="articleBody">
154
+            
155
+  <div class="section" id="module-tcp_socket">
156
+<span id="welcome-to-tcp-socket-s-documentation"></span><h1>Welcome to tcp_socket’s documentation!<a class="headerlink" href="#module-tcp_socket" title="Permalink to this headline">¶</a></h1>
157
+<div class="section" id="tcp-socket-tcp-socket">
158
+<h2>tcp_socket (TCP Socket)<a class="headerlink" href="#tcp-socket-tcp-socket" title="Permalink to this headline">¶</a></h2>
159
+<p><strong>Author:</strong></p>
160
+<ul class="simple">
161
+<li>Dirk Alders &lt;<a class="reference external" href="mailto:sudo-dirk&#37;&#52;&#48;mount-mockery&#46;de">sudo-dirk<span>&#64;</span>mount-mockery<span>&#46;</span>de</a>&gt;</li>
162
+</ul>
163
+<p><strong>Description:</strong></p>
164
+<blockquote>
165
+<div>This Module supports a client/ server tcp socket connection.</div></blockquote>
166
+<p><strong>Submodules:</strong></p>
167
+<ul class="simple">
168
+<li><a class="reference internal" href="#tcp_socket.tcp_client" title="tcp_socket.tcp_client"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_socket.tcp_client</span></code></a></li>
169
+<li><a class="reference internal" href="#tcp_socket.tcp_client_stp" title="tcp_socket.tcp_client_stp"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_socket.tcp_client_stp</span></code></a></li>
170
+<li><a class="reference internal" href="#tcp_socket.tcp_server" title="tcp_socket.tcp_server"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_socket.tcp_server</span></code></a></li>
171
+<li><a class="reference internal" href="#tcp_socket.tcp_server_stp" title="tcp_socket.tcp_server_stp"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_socket.tcp_server_stp</span></code></a></li>
172
+</ul>
173
+<p><strong>Unittest:</strong></p>
174
+<blockquote>
175
+<div>See also the <a class="reference download internal" download="" href="_downloads/e4086ba3197d1869e430d0a75a9a48e9/unittest.pdf"><code class="xref download docutils literal notranslate"><span class="pre">unittest</span></code></a> documentation.</div></blockquote>
176
+<p><strong>Module Documentation:</strong></p>
177
+<dl class="class">
178
+<dt id="tcp_socket.tcp_base">
179
+<em class="property">class </em><code class="descclassname">tcp_socket.</code><code class="descname">tcp_base</code><span class="sig-paren">(</span><em>host</em>, <em>port</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base" title="Permalink to this definition">¶</a></dt>
180
+<dd><p>This is the base class for other classes in this module.</p>
181
+<table class="docutils field-list" frame="void" rules="none">
182
+<col class="field-name" />
183
+<col class="field-body" />
184
+<tbody valign="top">
185
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
186
+<li><strong>host</strong> (<em>str</em>) – The host IP for the TCP socket functionality</li>
187
+<li><strong>port</strong> (<em>int</em>) – The port for the TCP socket functionality</li>
188
+<li><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</li>
189
+</ul>
190
+</td>
191
+</tr>
192
+</tbody>
193
+</table>
194
+<div class="admonition note">
195
+<p class="first admonition-title">Note</p>
196
+<p class="last">This class is not designed for direct usage.</p>
197
+</div>
198
+<dl class="method">
199
+<dt id="tcp_socket.tcp_base.client_address">
200
+<code class="descname">client_address</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.client_address" title="Permalink to this definition">¶</a></dt>
201
+<dd><p>This method returns the address of the connected client.</p>
202
+<table class="docutils field-list" frame="void" rules="none">
203
+<col class="field-name" />
204
+<col class="field-body" />
205
+<tbody valign="top">
206
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The client address.</td>
207
+</tr>
208
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
209
+</tr>
210
+</tbody>
211
+</table>
212
+</dd></dl>
213
+
214
+<dl class="method">
215
+<dt id="tcp_socket.tcp_base.close">
216
+<code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.close" title="Permalink to this definition">¶</a></dt>
217
+<dd><p>This method closes the connected communication channel, if exists.</p>
218
+</dd></dl>
219
+
220
+<dl class="method">
221
+<dt id="tcp_socket.tcp_base.init_channel_name">
222
+<code class="descname">init_channel_name</code><span class="sig-paren">(</span><em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.init_channel_name" title="Permalink to this definition">¶</a></dt>
223
+<dd><p>With this Method, the channel name for logging can be changed.</p>
224
+<table class="docutils field-list" frame="void" rules="none">
225
+<col class="field-name" />
226
+<col class="field-body" />
227
+<tbody valign="top">
228
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</td>
229
+</tr>
230
+</tbody>
231
+</table>
232
+</dd></dl>
233
+
234
+<dl class="method">
235
+<dt id="tcp_socket.tcp_base.is_connected">
236
+<code class="descname">is_connected</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.is_connected" title="Permalink to this definition">¶</a></dt>
237
+<dd><p>With this Method the connection status can be identified.</p>
238
+<table class="docutils field-list" frame="void" rules="none">
239
+<col class="field-name" />
240
+<col class="field-body" />
241
+<tbody valign="top">
242
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if a connection is established, otherwise False.</td>
243
+</tr>
244
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
245
+</tr>
246
+</tbody>
247
+</table>
248
+</dd></dl>
249
+
250
+<dl class="method">
251
+<dt id="tcp_socket.tcp_base.receive">
252
+<code class="descname">receive</code><span class="sig-paren">(</span><em>timeout=1</em>, <em>num=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.receive" title="Permalink to this definition">¶</a></dt>
253
+<dd><p>This method returns received data.</p>
254
+<table class="docutils field-list" frame="void" rules="none">
255
+<col class="field-name" />
256
+<col class="field-body" />
257
+<tbody valign="top">
258
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
259
+<li><strong>timeout</strong> (<em>float</em>) – The timeout for receiving data (at least after the timeout the method returns data or None).</li>
260
+<li><strong>num</strong> (<em>int</em>) – the number of bytes to receive (use None to get all available data).</li>
261
+</ul>
262
+</td>
263
+</tr>
264
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The received data.</p>
265
+</td>
266
+</tr>
267
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bytes</p>
268
+</td>
269
+</tr>
270
+</tbody>
271
+</table>
272
+</dd></dl>
273
+
274
+<dl class="method">
275
+<dt id="tcp_socket.tcp_base.register_callback">
276
+<code class="descname">register_callback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.register_callback" title="Permalink to this definition">¶</a></dt>
277
+<dd><p>This method stores the callback which is executed, if data is available. You need to execute <a class="reference internal" href="#tcp_socket.tcp_base.receive" title="tcp_socket.tcp_base.receive"><code class="xref py py-func docutils literal notranslate"><span class="pre">receive()</span></code></a> of this instance
278
+given as first argument.</p>
279
+<table class="docutils field-list" frame="void" rules="none">
280
+<col class="field-name" />
281
+<col class="field-body" />
282
+<tbody valign="top">
283
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback</strong> – The callback which will be executed, when data is available.</td>
284
+</tr>
285
+</tbody>
286
+</table>
287
+</dd></dl>
288
+
289
+<dl class="method">
290
+<dt id="tcp_socket.tcp_base.register_connect_callback">
291
+<code class="descname">register_connect_callback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.register_connect_callback" title="Permalink to this definition">¶</a></dt>
292
+<dd><p>This method stores the callback which is executed, if a connection is established.</p>
293
+<table class="docutils field-list" frame="void" rules="none">
294
+<col class="field-name" />
295
+<col class="field-body" />
296
+<tbody valign="top">
297
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback</strong> – The callback which will be executed, when a connection is established.</td>
298
+</tr>
299
+</tbody>
300
+</table>
301
+</dd></dl>
302
+
303
+<dl class="method">
304
+<dt id="tcp_socket.tcp_base.register_disconnect_callback">
305
+<code class="descname">register_disconnect_callback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.register_disconnect_callback" title="Permalink to this definition">¶</a></dt>
306
+<dd><p>This method stores the callback which is executed, after the connection is lost.</p>
307
+<table class="docutils field-list" frame="void" rules="none">
308
+<col class="field-name" />
309
+<col class="field-body" />
310
+<tbody valign="top">
311
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback</strong> – The callback which will be executed, after the connection is lost.</td>
312
+</tr>
313
+</tbody>
314
+</table>
315
+</dd></dl>
316
+
317
+<dl class="method">
318
+<dt id="tcp_socket.tcp_base.send">
319
+<code class="descname">send</code><span class="sig-paren">(</span><em>data</em>, <em>timeout=1</em>, <em>log_lvl=20</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base.send" title="Permalink to this definition">¶</a></dt>
320
+<dd><p>This method sends data via the initiated communication channel.</p>
321
+<table class="docutils field-list" frame="void" rules="none">
322
+<col class="field-name" />
323
+<col class="field-body" />
324
+<tbody valign="top">
325
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
326
+<li><strong>data</strong> (<em>bytes</em>) – The data to be send over the communication channel.</li>
327
+<li><strong>timeout</strong> (<em>float</em>) – The timeout for sending data (e.g. time to establish new connection).</li>
328
+<li><strong>log_lvl</strong> (<em>int</em>) – The log level to log outgoing TX-data</li>
329
+</ul>
330
+</td>
331
+</tr>
332
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if data had been sent, otherwise False.</p>
333
+</td>
334
+</tr>
335
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
336
+</td>
337
+</tr>
338
+</tbody>
339
+</table>
340
+</dd></dl>
341
+
342
+</dd></dl>
343
+
344
+<dl class="class">
345
+<dt id="tcp_socket.tcp_base_stp">
346
+<em class="property">class </em><code class="descclassname">tcp_socket.</code><code class="descname">tcp_base_stp</code><span class="sig-paren">(</span><em>host</em>, <em>port</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base_stp" title="Permalink to this definition">¶</a></dt>
347
+<dd><p>This is the base class for other classes in this module.  See also parent <a class="reference internal" href="#tcp_socket.tcp_base" title="tcp_socket.tcp_base"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_base</span></code></a>.</p>
348
+<table class="docutils field-list" frame="void" rules="none">
349
+<col class="field-name" />
350
+<col class="field-body" />
351
+<tbody valign="top">
352
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
353
+<li><strong>host</strong> (<em>str</em>) – The host IP for the TCP socket functionality</li>
354
+<li><strong>port</strong> (<em>int</em>) – The port for the TCP socket functionality</li>
355
+<li><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</li>
356
+</ul>
357
+</td>
358
+</tr>
359
+</tbody>
360
+</table>
361
+<div class="admonition note">
362
+<p class="first admonition-title">Note</p>
363
+<p class="last">This class is not designed for direct usage.</p>
364
+</div>
365
+<dl class="method">
366
+<dt id="tcp_socket.tcp_base_stp.receive">
367
+<code class="descname">receive</code><span class="sig-paren">(</span><em>timeout=1</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base_stp.receive" title="Permalink to this definition">¶</a></dt>
368
+<dd><p>This method returns one received messages via the initiated communication channel.</p>
369
+<table class="docutils field-list" frame="void" rules="none">
370
+<col class="field-name" />
371
+<col class="field-body" />
372
+<tbody valign="top">
373
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>timeout</strong> (<em>float</em>) – The timeout for receiving data (at least after the timeout the method returns data or None).</td>
374
+</tr>
375
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The received data.</td>
376
+</tr>
377
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bytes</td>
378
+</tr>
379
+</tbody>
380
+</table>
381
+</dd></dl>
382
+
383
+<dl class="method">
384
+<dt id="tcp_socket.tcp_base_stp.send">
385
+<code class="descname">send</code><span class="sig-paren">(</span><em>data</em>, <em>timeout=1</em>, <em>log_lvl=20</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_base_stp.send" title="Permalink to this definition">¶</a></dt>
386
+<dd><p>This method sends one stp message via the initiated communication channel.</p>
387
+<table class="docutils field-list" frame="void" rules="none">
388
+<col class="field-name" />
389
+<col class="field-body" />
390
+<tbody valign="top">
391
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
392
+<li><strong>data</strong> (<em>bytes</em>) – The message to be send over the communication channel.</li>
393
+<li><strong>timeout</strong> (<em>float</em>) – The timeout for sending data (e.g. time to establish new connection).</li>
394
+<li><strong>log_lvl</strong> (<em>int</em>) – The log level to log outgoing TX-data</li>
395
+</ul>
396
+</td>
397
+</tr>
398
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if data had been sent, otherwise False.</p>
399
+</td>
400
+</tr>
401
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
402
+</td>
403
+</tr>
404
+</tbody>
405
+</table>
406
+</dd></dl>
407
+
408
+</dd></dl>
409
+
410
+<dl class="class">
411
+<dt id="tcp_socket.tcp_client">
412
+<em class="property">class </em><code class="descclassname">tcp_socket.</code><code class="descname">tcp_client</code><span class="sig-paren">(</span><em>host</em>, <em>port</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_client" title="Permalink to this definition">¶</a></dt>
413
+<dd><p>This class creates a tcp-client for transfering a serial stream of bytes (characters). See also parent <a class="reference internal" href="#tcp_socket.tcp_base" title="tcp_socket.tcp_base"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_base</span></code></a>.</p>
414
+<table class="docutils field-list" frame="void" rules="none">
415
+<col class="field-name" />
416
+<col class="field-body" />
417
+<tbody valign="top">
418
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
419
+<li><strong>host</strong> (<em>str</em>) – The host IP for the TCP socket functionality</li>
420
+<li><strong>port</strong> (<em>int</em>) – The port for the TCP socket functionality</li>
421
+<li><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</li>
422
+</ul>
423
+</td>
424
+</tr>
425
+</tbody>
426
+</table>
427
+<div class="admonition note">
428
+<p class="first admonition-title">Note</p>
429
+<p class="last">You need a running <a class="reference internal" href="#tcp_socket.tcp_server" title="tcp_socket.tcp_server"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_server</span></code></a> listening at the given IP and Port to be able to communicate.</p>
430
+</div>
431
+<p><strong>Example:</strong></p>
432
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
433
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
434
+
435
+<span class="kn">import</span> <span class="nn">report</span>
436
+<span class="kn">import</span> <span class="nn">tcp_socket</span>
437
+<span class="kn">import</span> <span class="nn">time</span>
438
+
439
+
440
+<span class="k">def</span> <span class="nf">mirror_callback</span><span class="p">(</span><span class="n">data</span><span class="p">):</span>
441
+    <span class="k">return</span> <span class="n">data</span>
442
+
443
+
444
+<span class="n">report</span><span class="o">.</span><span class="n">stdoutLoggingConfigure</span><span class="p">(</span><span class="n">log_name_lvl</span><span class="o">=</span><span class="p">[(</span><span class="s1">&#39;root&#39;</span><span class="p">,</span> <span class="s1">&#39;DEBUG&#39;</span><span class="p">),</span> <span class="p">])</span>
445
+<span class="n">c</span> <span class="o">=</span> <span class="n">tcp_socket</span><span class="o">.</span><span class="n">tcp_client</span><span class="p">(</span><span class="s1">&#39;127.0.0.1&#39;</span><span class="p">,</span> <span class="mi">17000</span><span class="p">)</span>
446
+<span class="n">c</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="sa">b</span><span class="s1">&#39;abc&#39;</span><span class="p">)</span>
447
+<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;The Client received: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="nb">repr</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">receive</span><span class="p">()))</span>
448
+</pre></div>
449
+</div>
450
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">310</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
451
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">462</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Connection</span> <span class="n">to</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">17000</span> <span class="n">established</span>
452
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">462</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
453
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">511</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">TX</span> <span class="o">-&gt;</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
454
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">563</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">RX</span> <span class="o">&lt;-</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
455
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">612</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
456
+<span class="n">The</span> <span class="n">Client</span> <span class="n">received</span><span class="p">:</span> <span class="sa">b</span><span class="s1">&#39;abc&#39;</span>
457
+</pre></div>
458
+</div>
459
+</dd></dl>
460
+
461
+<dl class="class">
462
+<dt id="tcp_socket.tcp_client_stp">
463
+<em class="property">class </em><code class="descclassname">tcp_socket.</code><code class="descname">tcp_client_stp</code><span class="sig-paren">(</span><em>host</em>, <em>port</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_client_stp" title="Permalink to this definition">¶</a></dt>
464
+<dd><p>This class creates a tcp-client for transfering a message. The bytes will be packed on send and unpacked on receive. See also parents <a class="reference internal" href="#tcp_socket.tcp_client" title="tcp_socket.tcp_client"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_client</span></code></a> and <a class="reference internal" href="#tcp_socket.tcp_base_stp" title="tcp_socket.tcp_base_stp"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_base_stp</span></code></a>.
465
+See <code class="xref py py-mod docutils literal notranslate"><span class="pre">stringtools.stp</span></code> for more information on packing and unpacking.</p>
466
+<table class="docutils field-list" frame="void" rules="none">
467
+<col class="field-name" />
468
+<col class="field-body" />
469
+<tbody valign="top">
470
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
471
+<li><strong>host</strong> (<em>str</em>) – The host IP for the TCP socket functionality</li>
472
+<li><strong>port</strong> (<em>int</em>) – The port for the TCP socket functionality</li>
473
+<li><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</li>
474
+</ul>
475
+</td>
476
+</tr>
477
+</tbody>
478
+</table>
479
+<div class="admonition note">
480
+<p class="first admonition-title">Note</p>
481
+<p class="last">You need a running <a class="reference internal" href="#tcp_socket.tcp_server_stp" title="tcp_socket.tcp_server_stp"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_server_stp</span></code></a> listening at the given IP and Port to be able to communicate.</p>
482
+</div>
483
+<p><strong>Example:</strong></p>
484
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
485
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
486
+
487
+<span class="kn">import</span> <span class="nn">report</span>
488
+<span class="kn">import</span> <span class="nn">tcp_socket</span>
489
+<span class="kn">import</span> <span class="nn">time</span>
490
+
491
+
492
+<span class="k">def</span> <span class="nf">mirror_callback</span><span class="p">(</span><span class="n">data</span><span class="p">):</span>
493
+    <span class="k">return</span> <span class="n">data</span>
494
+
495
+
496
+<span class="n">report</span><span class="o">.</span><span class="n">stdoutLoggingConfigure</span><span class="p">(</span><span class="n">log_name_lvl</span><span class="o">=</span><span class="p">[(</span><span class="s1">&#39;root&#39;</span><span class="p">,</span> <span class="s1">&#39;DEBUG&#39;</span><span class="p">),</span> <span class="p">])</span>
497
+<span class="n">c</span> <span class="o">=</span> <span class="n">tcp_socket</span><span class="o">.</span><span class="n">tcp_client_stp</span><span class="p">(</span><span class="s1">&#39;127.0.0.1&#39;</span><span class="p">,</span> <span class="mi">17017</span><span class="p">)</span>
498
+<span class="n">c</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="sa">b</span><span class="s1">&#39;abc&#39;</span><span class="p">)</span>
499
+<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;The Client received: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="nb">repr</span><span class="p">(</span><span class="n">c</span><span class="o">.</span><span class="n">receive</span><span class="p">()))</span>
500
+</pre></div>
501
+</div>
502
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">904</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
503
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">055</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Connection</span> <span class="n">to</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">17017</span> <span class="n">established</span>
504
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">056</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
505
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">105</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">TX</span> <span class="o">-&gt;</span> <span class="s2">&quot;(7): 3a 3c 61 62 63 3a 3e&quot;</span>
506
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">105</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">TX</span> <span class="o">-&gt;</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
507
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">157</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">RX</span> <span class="o">&lt;-</span> <span class="s2">&quot;(7): 3a 3c 61 62 63 3a 3e&quot;</span>
508
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">157</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">data</span> <span class="n">sync</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_IDLE</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_ESCAPE_1</span>
509
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">157</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">start</span> <span class="n">pattern</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span> <span class="mi">3</span><span class="n">c</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_ESCAPE_1</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_STORE_DATA</span>
510
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">157</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">data</span> <span class="n">sync</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_STORE_DATA</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_ESCAPE_2</span>
511
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">157</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">end</span> <span class="n">pattern</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span> <span class="mi">3</span><span class="n">e</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">storing</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_ESCAPE_2</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_IDLE</span>
512
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">157</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">message</span> <span class="n">identified</span> <span class="o">-</span> <span class="p">(</span><span class="mi">3</span><span class="p">):</span> <span class="mi">61</span> <span class="mi">62</span> <span class="mi">63</span>
513
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">158</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">RX</span>  <span class="o">&lt;-</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
514
+<span class="n">The</span> <span class="n">Client</span> <span class="n">received</span><span class="p">:</span> <span class="sa">b</span><span class="s1">&#39;abc&#39;</span>
515
+</pre></div>
516
+</div>
517
+</dd></dl>
518
+
519
+<dl class="class">
520
+<dt id="tcp_socket.tcp_server">
521
+<em class="property">class </em><code class="descclassname">tcp_socket.</code><code class="descname">tcp_server</code><span class="sig-paren">(</span><em>host</em>, <em>port</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_server" title="Permalink to this definition">¶</a></dt>
522
+<dd><p>This class creates a tcp-server for transfering a serial stream of bytes (characters). See also parent <a class="reference internal" href="#tcp_socket.tcp_base" title="tcp_socket.tcp_base"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_base</span></code></a>.</p>
523
+<table class="docutils field-list" frame="void" rules="none">
524
+<col class="field-name" />
525
+<col class="field-body" />
526
+<tbody valign="top">
527
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
528
+<li><strong>host</strong> (<em>str</em>) – The host IP for the TCP socket functionality</li>
529
+<li><strong>port</strong> (<em>int</em>) – The port for the TCP socket functionality</li>
530
+<li><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</li>
531
+</ul>
532
+</td>
533
+</tr>
534
+</tbody>
535
+</table>
536
+<div class="admonition note">
537
+<p class="first admonition-title">Note</p>
538
+<p class="last">You need a <a class="reference internal" href="#tcp_socket.tcp_client" title="tcp_socket.tcp_client"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_client</span></code></a> to communicate with the server.</p>
539
+</div>
540
+<p><strong>Example:</strong></p>
541
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
542
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
543
+
544
+<span class="kn">import</span> <span class="nn">report</span>
545
+<span class="kn">import</span> <span class="nn">tcp_socket</span>
546
+<span class="kn">import</span> <span class="nn">time</span>
547
+
548
+<span class="k">def</span> <span class="nf">mirror_callback</span><span class="p">(</span><span class="n">tcp</span><span class="p">):</span>
549
+    <span class="n">tcp</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">tcp</span><span class="o">.</span><span class="n">receive</span><span class="p">())</span>
550
+
551
+
552
+<span class="n">report</span><span class="o">.</span><span class="n">stdoutLoggingConfigure</span><span class="p">(</span><span class="n">log_name_lvl</span><span class="o">=</span><span class="p">[(</span><span class="s1">&#39;root&#39;</span><span class="p">,</span> <span class="s1">&#39;DEBUG&#39;</span><span class="p">),</span> <span class="p">])</span>
553
+<span class="n">s</span> <span class="o">=</span> <span class="n">tcp_socket</span><span class="o">.</span><span class="n">tcp_server</span><span class="p">(</span><span class="s1">&#39;127.0.0.1&#39;</span><span class="p">,</span> <span class="mi">17000</span><span class="p">)</span>
554
+<span class="n">s</span><span class="o">.</span><span class="n">register_callback</span><span class="p">(</span><span class="n">mirror_callback</span><span class="p">)</span>
555
+
556
+<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
557
+<span class="k">while</span> <span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">is_connected</span><span class="p">()</span> <span class="ow">and</span> <span class="n">i</span> <span class="o">&lt;=</span> <span class="mi">10</span><span class="p">:</span>
558
+    <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
559
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="o">.</span><span class="mi">1</span><span class="p">)</span>  <span class="c1"># wait for a connection</span>
560
+
561
+<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
562
+<span class="k">while</span> <span class="n">s</span><span class="o">.</span><span class="n">is_connected</span><span class="p">()</span> <span class="ow">and</span> <span class="n">i</span> <span class="o">&lt;=</span> <span class="mi">10</span><span class="p">:</span>
563
+    <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
564
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="o">.</span><span class="mi">1</span><span class="p">)</span>  <span class="c1"># wait for disconnect</span>
565
+</pre></div>
566
+</div>
567
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">587</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
568
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">588</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Server</span> <span class="n">listening</span> <span class="n">to</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">17000</span>
569
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">638</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Connection</span> <span class="n">established</span><span class="o">...</span> <span class="p">(</span><span class="kn">from</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">)</span>
570
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">639</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
571
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">740</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">RX</span> <span class="o">&lt;-</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
572
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">740</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
573
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">741</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">TX</span> <span class="o">-&gt;</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
574
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">842</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Connection</span> <span class="n">lost</span><span class="o">...</span>
575
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">05</span><span class="p">,</span><span class="mi">842</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Server</span> <span class="n">listening</span> <span class="n">to</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">17000</span>
576
+</pre></div>
577
+</div>
578
+</dd></dl>
579
+
580
+<dl class="class">
581
+<dt id="tcp_socket.tcp_server_stp">
582
+<em class="property">class </em><code class="descclassname">tcp_socket.</code><code class="descname">tcp_server_stp</code><span class="sig-paren">(</span><em>host</em>, <em>port</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tcp_socket.tcp_server_stp" title="Permalink to this definition">¶</a></dt>
583
+<dd><p>This class creates a tcp-server for transfering a message. The bytes will be packed on send and unpacked on receive. See also parents <a class="reference internal" href="#tcp_socket.tcp_server" title="tcp_socket.tcp_server"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_server</span></code></a> and <a class="reference internal" href="#tcp_socket.tcp_base_stp" title="tcp_socket.tcp_base_stp"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_base_stp</span></code></a>.
584
+See <code class="xref py py-mod docutils literal notranslate"><span class="pre">stringtools.stp</span></code> for more information on packing and unpacking.</p>
585
+<table class="docutils field-list" frame="void" rules="none">
586
+<col class="field-name" />
587
+<col class="field-body" />
588
+<tbody valign="top">
589
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
590
+<li><strong>host</strong> (<em>str</em>) – The host IP for the TCP socket functionality</li>
591
+<li><strong>port</strong> (<em>int</em>) – The port for the TCP socket functionality</li>
592
+<li><strong>channel_name</strong> (<em>str</em>) – The name for the logging channel</li>
593
+</ul>
594
+</td>
595
+</tr>
596
+</tbody>
597
+</table>
598
+<div class="admonition note">
599
+<p class="first admonition-title">Note</p>
600
+<p class="last">You need a <a class="reference internal" href="#tcp_socket.tcp_client_stp" title="tcp_socket.tcp_client_stp"><code class="xref py py-class docutils literal notranslate"><span class="pre">tcp_client_stp</span></code></a> to communicate with the server.</p>
601
+</div>
602
+<p><strong>Example:</strong></p>
603
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
604
+<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../..&#39;</span><span class="p">)</span>
605
+
606
+<span class="kn">import</span> <span class="nn">report</span>
607
+<span class="kn">import</span> <span class="nn">tcp_socket</span>
608
+<span class="kn">import</span> <span class="nn">time</span>
609
+
610
+<span class="k">def</span> <span class="nf">mirror_callback</span><span class="p">(</span><span class="n">tcp</span><span class="p">):</span>
611
+    <span class="n">tcp</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">tcp</span><span class="o">.</span><span class="n">receive</span><span class="p">())</span>
612
+
613
+
614
+<span class="n">report</span><span class="o">.</span><span class="n">stdoutLoggingConfigure</span><span class="p">(</span><span class="n">log_name_lvl</span><span class="o">=</span><span class="p">[(</span><span class="s1">&#39;root&#39;</span><span class="p">,</span> <span class="s1">&#39;DEBUG&#39;</span><span class="p">),</span> <span class="p">])</span>
615
+<span class="n">s</span> <span class="o">=</span> <span class="n">tcp_socket</span><span class="o">.</span><span class="n">tcp_server_stp</span><span class="p">(</span><span class="s1">&#39;127.0.0.1&#39;</span><span class="p">,</span> <span class="mi">17017</span><span class="p">)</span>
616
+<span class="n">s</span><span class="o">.</span><span class="n">register_callback</span><span class="p">(</span><span class="n">mirror_callback</span><span class="p">)</span>
617
+
618
+<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
619
+<span class="k">while</span> <span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">is_connected</span><span class="p">()</span> <span class="ow">and</span> <span class="n">i</span> <span class="o">&lt;=</span> <span class="mi">10</span><span class="p">:</span>
620
+    <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
621
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="o">.</span><span class="mi">1</span><span class="p">)</span>  <span class="c1"># wait for a connection</span>
622
+
623
+<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
624
+<span class="k">while</span> <span class="n">s</span><span class="o">.</span><span class="n">is_connected</span><span class="p">()</span> <span class="ow">and</span> <span class="n">i</span> <span class="o">&lt;=</span> <span class="mi">10</span><span class="p">:</span>
625
+    <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
626
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="o">.</span><span class="mi">1</span><span class="p">)</span>  <span class="c1"># wait for disconnect</span>
627
+</pre></div>
628
+</div>
629
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">713</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
630
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">713</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Server</span> <span class="n">listening</span> <span class="n">to</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">17017</span>
631
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">814</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Connection</span> <span class="n">established</span><span class="o">...</span> <span class="p">(</span><span class="kn">from</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">)</span>
632
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">815</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">Cleaning</span> <span class="n">up</span> <span class="n">receive</span><span class="o">-</span><span class="n">buffer</span>
633
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">916</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">RX</span> <span class="o">&lt;-</span> <span class="s2">&quot;(7): 3a 3c 61 62 63 3a 3e&quot;</span>
634
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">916</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">data</span> <span class="n">sync</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_IDLE</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_ESCAPE_1</span>
635
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">916</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">start</span> <span class="n">pattern</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span> <span class="mi">3</span><span class="n">c</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_ESCAPE_1</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_STORE_DATA</span>
636
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">916</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">data</span> <span class="n">sync</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_STORE_DATA</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_ESCAPE_2</span>
637
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">916</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">end</span> <span class="n">pattern</span> <span class="p">(</span><span class="mi">3</span><span class="n">a</span> <span class="mi">3</span><span class="n">e</span><span class="p">)</span> <span class="n">received</span> <span class="o">=&gt;</span> <span class="n">storing</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">changing</span> <span class="n">state</span> <span class="n">STP_STATE_ESCAPE_2</span> <span class="o">-&gt;</span> <span class="n">STP_STATE_IDLE</span>
638
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">917</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">stringtools</span><span class="o">.</span><span class="n">stp</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">STP</span><span class="p">:</span> <span class="n">message</span> <span class="n">identified</span> <span class="o">-</span> <span class="p">(</span><span class="mi">3</span><span class="p">):</span> <span class="mi">61</span> <span class="mi">62</span> <span class="mi">63</span>
639
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">917</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">RX</span>  <span class="o">&lt;-</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
640
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">917</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">DEBUG</span> <span class="o">-</span> <span class="n">TX</span> <span class="o">-&gt;</span> <span class="s2">&quot;(7): 3a 3c 61 62 63 3a 3e&quot;</span>
641
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">06</span><span class="p">,</span><span class="mi">917</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">TX</span> <span class="o">-&gt;</span> <span class="s2">&quot;(3): 61 62 63&quot;</span>
642
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">07</span><span class="p">,</span><span class="mi">069</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Connection</span> <span class="n">lost</span><span class="o">...</span>
643
+<span class="mi">2021</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">08</span> <span class="mi">02</span><span class="p">:</span><span class="mi">31</span><span class="p">:</span><span class="mi">07</span><span class="p">,</span><span class="mi">069</span><span class="p">:</span> <span class="n">root</span><span class="o">.</span><span class="n">tcp_socket</span><span class="o">.</span><span class="n">all_others</span> <span class="o">-</span> <span class="n">INFO</span> <span class="o">-</span> <span class="n">Server</span> <span class="n">listening</span> <span class="n">to</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">17017</span>
644
+</pre></div>
645
+</div>
646
+</dd></dl>
647
+
648
+</div>
649
+<div class="toctree-wrapper compound">
650
+</div>
651
+</div>
652
+<div class="section" id="indices-and-tables">
653
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
654
+<ul class="simple">
655
+<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
656
+<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
657
+<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
658
+</ul>
659
+</div>
660
+
661
+
662
+           </div>
663
+           
664
+          </div>
665
+          <footer>
666
+  
667
+
668
+  <hr/>
669
+
670
+  <div role="contentinfo">
671
+    <p>
672
+        
673
+        &copy; Copyright 2021, Dirk Alders
674
+
675
+    </p>
676
+  </div>
677
+    
678
+    
679
+    
680
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
681
+    
682
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
683
+    
684
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
685
+
686
+</footer>
687
+
688
+        </div>
689
+      </div>
690
+
691
+    </section>
692
+
693
+  </div>
694
+  
695
+
696
+  <script type="text/javascript">
697
+      jQuery(function () {
698
+          SphinxRtdTheme.Navigation.enable(true);
699
+      });
700
+  </script>
701
+
702
+  
703
+  
704
+    
705
+   
706
+
707
+</body>
708
+</html>

BIN
_docs_/objects.inv View File


+ 216
- 0
_docs_/py-modindex.html View File

@@ -0,0 +1,216 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Python Module Index &mdash; tcp_socket  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+  <!--[if lt IE 9]>
24
+    <script src="_static/js/html5shiv.min.js"></script>
25
+  <![endif]-->
26
+  
27
+    
28
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
29
+        <script type="text/javascript" src="_static/jquery.js"></script>
30
+        <script type="text/javascript" src="_static/underscore.js"></script>
31
+        <script type="text/javascript" src="_static/doctools.js"></script>
32
+        <script type="text/javascript" src="_static/language_data.js"></script>
33
+    
34
+    <script type="text/javascript" src="_static/js/theme.js"></script>
35
+
36
+    
37
+    <link rel="index" title="Index" href="genindex.html" />
38
+    <link rel="search" title="Search" href="search.html" />
39
+ 
40
+
41
+    <script type="text/javascript">
42
+      DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
43
+    </script>
44
+
45
+
46
+</head>
47
+
48
+<body class="wy-body-for-nav">
49
+
50
+   
51
+  <div class="wy-grid-for-nav">
52
+    
53
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
54
+      <div class="wy-side-scroll">
55
+        <div class="wy-side-nav-search" >
56
+          
57
+
58
+          
59
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> tcp_socket
60
+          
61
+
62
+          
63
+          </a>
64
+
65
+          
66
+            
67
+            
68
+          
69
+
70
+          
71
+<div role="search">
72
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
73
+    <input type="text" name="q" placeholder="Search docs" />
74
+    <input type="hidden" name="check_keywords" value="yes" />
75
+    <input type="hidden" name="area" value="default" />
76
+  </form>
77
+</div>
78
+
79
+          
80
+        </div>
81
+
82
+        
83
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
84
+          
85
+            
86
+            
87
+              
88
+            
89
+            
90
+              <!-- Local TOC -->
91
+              <div class="local-toc"></div>
92
+            
93
+          
94
+        </div>
95
+        
96
+      </div>
97
+    </nav>
98
+
99
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
100
+
101
+      
102
+      <nav class="wy-nav-top" aria-label="top navigation">
103
+        
104
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
105
+          <a href="index.html">tcp_socket</a>
106
+        
107
+      </nav>
108
+
109
+
110
+      <div class="wy-nav-content">
111
+        
112
+        <div class="rst-content">
113
+        
114
+          
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+<div role="navigation" aria-label="breadcrumbs navigation">
131
+
132
+  <ul class="wy-breadcrumbs">
133
+    
134
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
135
+        
136
+      <li>Python Module Index</li>
137
+    
138
+    
139
+      <li class="wy-breadcrumbs-aside">
140
+        
141
+      </li>
142
+    
143
+  </ul>
144
+
145
+  
146
+  <hr/>
147
+</div>
148
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
149
+           <div itemprop="articleBody">
150
+            
151
+
152
+   <h1>Python Module Index</h1>
153
+
154
+   <div class="modindex-jumpbox">
155
+   <a href="#cap-t"><strong>t</strong></a>
156
+   </div>
157
+
158
+   <table class="indextable modindextable">
159
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
160
+     <tr class="cap" id="cap-t"><td></td><td>
161
+       <strong>t</strong></td><td></td></tr>
162
+     <tr>
163
+       <td></td>
164
+       <td>
165
+       <a href="index.html#module-tcp_socket"><code class="xref">tcp_socket</code></a></td><td>
166
+       <em></em></td></tr>
167
+   </table>
168
+
169
+
170
+           </div>
171
+           
172
+          </div>
173
+          <footer>
174
+  
175
+
176
+  <hr/>
177
+
178
+  <div role="contentinfo">
179
+    <p>
180
+        
181
+        &copy; Copyright 2021, Dirk Alders
182
+
183
+    </p>
184
+  </div>
185
+    
186
+    
187
+    
188
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
189
+    
190
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
191
+    
192
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
193
+
194
+</footer>
195
+
196
+        </div>
197
+      </div>
198
+
199
+    </section>
200
+
201
+  </div>
202
+  
203
+
204
+  <script type="text/javascript">
205
+      jQuery(function () {
206
+          SphinxRtdTheme.Navigation.enable(true);
207
+      });
208
+  </script>
209
+
210
+  
211
+  
212
+    
213
+   
214
+
215
+</body>
216
+</html>

+ 214
- 0
_docs_/search.html View File

@@ -0,0 +1,214 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Search &mdash; tcp_socket  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+    
24
+  <!--[if lt IE 9]>
25
+    <script src="_static/js/html5shiv.min.js"></script>
26
+  <![endif]-->
27
+  
28
+    
29
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
30
+        <script type="text/javascript" src="_static/jquery.js"></script>
31
+        <script type="text/javascript" src="_static/underscore.js"></script>
32
+        <script type="text/javascript" src="_static/doctools.js"></script>
33
+        <script type="text/javascript" src="_static/language_data.js"></script>
34
+    
35
+    <script type="text/javascript" src="_static/js/theme.js"></script>
36
+
37
+    
38
+    <script type="text/javascript" src="_static/searchtools.js"></script>
39
+    <link rel="index" title="Index" href="genindex.html" />
40
+    <link rel="search" title="Search" href="#" /> 
41
+</head>
42
+
43
+<body class="wy-body-for-nav">
44
+
45
+   
46
+  <div class="wy-grid-for-nav">
47
+    
48
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
49
+      <div class="wy-side-scroll">
50
+        <div class="wy-side-nav-search" >
51
+          
52
+
53
+          
54
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> tcp_socket
55
+          
56
+
57
+          
58
+          </a>
59
+
60
+          
61
+            
62
+            
63
+          
64
+
65
+          
66
+<div role="search">
67
+  <form id="rtd-search-form" class="wy-form" action="#" method="get">
68
+    <input type="text" name="q" placeholder="Search docs" />
69
+    <input type="hidden" name="check_keywords" value="yes" />
70
+    <input type="hidden" name="area" value="default" />
71
+  </form>
72
+</div>
73
+
74
+          
75
+        </div>
76
+
77
+        
78
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
79
+          
80
+            
81
+            
82
+              
83
+            
84
+            
85
+              <!-- Local TOC -->
86
+              <div class="local-toc"></div>
87
+            
88
+          
89
+        </div>
90
+        
91
+      </div>
92
+    </nav>
93
+
94
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
95
+
96
+      
97
+      <nav class="wy-nav-top" aria-label="top navigation">
98
+        
99
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
100
+          <a href="index.html">tcp_socket</a>
101
+        
102
+      </nav>
103
+
104
+
105
+      <div class="wy-nav-content">
106
+        
107
+        <div class="rst-content">
108
+        
109
+          
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+<div role="navigation" aria-label="breadcrumbs navigation">
126
+
127
+  <ul class="wy-breadcrumbs">
128
+    
129
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
130
+        
131
+      <li>Search</li>
132
+    
133
+    
134
+      <li class="wy-breadcrumbs-aside">
135
+        
136
+            
137
+        
138
+      </li>
139
+    
140
+  </ul>
141
+
142
+  
143
+  <hr/>
144
+</div>
145
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
146
+           <div itemprop="articleBody">
147
+            
148
+  <noscript>
149
+  <div id="fallback" class="admonition warning">
150
+    <p class="last">
151
+      Please activate JavaScript to enable the search functionality.
152
+    </p>
153
+  </div>
154
+  </noscript>
155
+
156
+  
157
+  <div id="search-results">
158
+  
159
+  </div>
160
+
161
+           </div>
162
+           
163
+          </div>
164
+          <footer>
165
+  
166
+
167
+  <hr/>
168
+
169
+  <div role="contentinfo">
170
+    <p>
171
+        
172
+        &copy; Copyright 2021, Dirk Alders
173
+
174
+    </p>
175
+  </div>
176
+    
177
+    
178
+    
179
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
180
+    
181
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
182
+    
183
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
184
+
185
+</footer>
186
+
187
+        </div>
188
+      </div>
189
+
190
+    </section>
191
+
192
+  </div>
193
+  
194
+
195
+  <script type="text/javascript">
196
+      jQuery(function () {
197
+          SphinxRtdTheme.Navigation.enable(true);
198
+      });
199
+  </script>
200
+
201
+  
202
+  
203
+    
204
+  
205
+  <script type="text/javascript">
206
+    jQuery(function() { Search.loadIndex("searchindex.js"); });
207
+  </script>
208
+  
209
+  <script type="text/javascript" id="searchindexloader"></script>
210
+   
211
+
212
+
213
+</body>
214
+</html>

+ 1
- 0
_docs_/searchindex.js View File

@@ -0,0 +1 @@
1
+Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:55},filenames:["index.rst"],objects:{"":{tcp_socket:[0,0,0,"-"]},"tcp_socket.tcp_base":{client_address:[0,2,1,""],close:[0,2,1,""],init_channel_name:[0,2,1,""],is_connected:[0,2,1,""],receive:[0,2,1,""],register_callback:[0,2,1,""],register_connect_callback:[0,2,1,""],register_disconnect_callback:[0,2,1,""],send:[0,2,1,""]},"tcp_socket.tcp_base_stp":{receive:[0,2,1,""],send:[0,2,1,""]},tcp_socket:{tcp_base:[0,1,1,""],tcp_base_stp:[0,1,1,""],tcp_client:[0,1,1,""],tcp_client_stp:[0,1,1,""],tcp_server:[0,1,1,""],tcp_server_stp:[0,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},terms:{"byte":0,"class":0,"float":0,"function":0,"import":0,"int":0,"new":0,"return":0,"true":0,"while":0,The:0,With:0,abc:0,abl:0,address:0,after:0,alder:0,all:0,all_oth:0,also:0,append:0,argument:0,author:0,avail:0,base:0,been:0,bool:0,buffer:0,callback:0,can:0,chang:0,channel:0,channel_nam:0,charact:0,clean:0,client:0,client_address:0,close:0,commun:0,connect:0,creat:0,data:0,debug:0,def:0,descript:0,design:0,direct:0,dirk:0,disconnect:0,end:0,establish:0,exampl:0,execut:0,exist:0,fals:0,first:0,from:0,get:0,given:0,had:0,host:0,identifi:0,index:0,info:0,inform:0,init_channel_nam:0,initi:0,instanc:0,is_connect:0,least:0,level:0,listen:0,log:0,log_lvl:0,log_name_lvl:0,lost:0,messag:0,method:0,mirror_callback:0,mockeri:0,modul:0,more:0,mount:0,name:0,need:0,none:0,num:0,number:0,one:0,other:0,otherwis:0,outgo:0,over:0,pack:0,page:0,paramet:0,parent:0,path:0,pattern:0,port:0,print:0,receiv:0,register_callback:0,register_connect_callback:0,register_disconnect_callback:0,report:0,repr:0,root:0,run:0,search:0,see:0,send:0,sent:0,serial:0,server:0,sleep:0,start:0,state:0,statu:0,stdoutloggingconfigur:0,store:0,stp:0,stp_state_escape_1:0,stp_state_escape_2:0,stp_state_idl:0,stp_state_store_data:0,str:0,stream:0,stringtool:0,submodul:0,sudo:0,support:0,sync:0,sys:0,tcp_base:0,tcp_base_stp:0,tcp_client:0,tcp_client_stp:0,tcp_server:0,tcp_server_stp:0,thi:0,time:0,timeout:0,transfer:0,type:0,unittest:0,unpack:0,usag:0,use:0,via:0,wait:0,when:0,which:0,you:0},titles:["Welcome to tcp_socket\u2019s documentation!"],titleterms:{document:0,indic:0,socket:0,tabl:0,tcp:0,tcp_socket:0,welcom:0}})

+ 16
- 0
_examples_/Makefile View File

@@ -0,0 +1,16 @@
1
+EXAMPLES = $(wildcard *.py)
2
+LOGFILES = ${EXAMPLES:.py=.log}
3
+
4
+.PHONY: all
5
+all: $(LOGFILES)
6
+
7
+%server.log: %server.py
8
+	python3 $< > $@ &
9
+	python3 $(subst server,client,$<) 1> /dev/null
10
+
11
+%client.log: %client.py
12
+	python3 $(subst client,server,$<) 1> /dev/null&
13
+	python3 $< > $@
14
+
15
+clean:
16
+	rm -f $(LOGFILES)

+ 16
- 0
_examples_/tcp_socket__stp_client.py View File

@@ -0,0 +1,16 @@
1
+import sys
2
+sys.path.append('../..')
3
+
4
+import report
5
+import tcp_socket
6
+import time
7
+
8
+
9
+def mirror_callback(data):
10
+    return data
11
+
12
+
13
+report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
14
+c = tcp_socket.tcp_client_stp('127.0.0.1', 17017)
15
+c.send(b'abc')
16
+print('The Client received: %s' % repr(c.receive()))

+ 24
- 0
_examples_/tcp_socket__stp_server.py View File

@@ -0,0 +1,24 @@
1
+import sys
2
+sys.path.append('../..')
3
+
4
+import report
5
+import tcp_socket
6
+import time
7
+
8
+def mirror_callback(tcp):
9
+    tcp.send(tcp.receive())
10
+
11
+
12
+report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
13
+s = tcp_socket.tcp_server_stp('127.0.0.1', 17017)
14
+s.register_callback(mirror_callback)
15
+
16
+i = 0
17
+while not s.is_connected() and i <= 10:
18
+    i += 1
19
+    time.sleep(.1)  # wait for a connection
20
+
21
+i = 0
22
+while s.is_connected() and i <= 10:
23
+    i += 1
24
+    time.sleep(.1)  # wait for disconnect

+ 16
- 0
_examples_/tcp_socket__tcp_client.py View File

@@ -0,0 +1,16 @@
1
+import sys
2
+sys.path.append('../..')
3
+
4
+import report
5
+import tcp_socket
6
+import time
7
+
8
+
9
+def mirror_callback(data):
10
+    return data
11
+
12
+
13
+report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
14
+c = tcp_socket.tcp_client('127.0.0.1', 17000)
15
+c.send(b'abc')
16
+print('The Client received: %s' % repr(c.receive()))

+ 24
- 0
_examples_/tcp_socket__tcp_server.py View File

@@ -0,0 +1,24 @@
1
+import sys
2
+sys.path.append('../..')
3
+
4
+import report
5
+import tcp_socket
6
+import time
7
+
8
+def mirror_callback(tcp):
9
+    tcp.send(tcp.receive())
10
+
11
+
12
+report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
13
+s = tcp_socket.tcp_server('127.0.0.1', 17000)
14
+s.register_callback(mirror_callback)
15
+
16
+i = 0
17
+while not s.is_connected() and i <= 10:
18
+    i += 1
19
+    time.sleep(.1)  # wait for a connection
20
+
21
+i = 0
22
+while s.is_connected() and i <= 10:
23
+    i += 1
24
+    time.sleep(.1)  # wait for disconnect

+ 0
- 0
_testresults_/unittest.pdf View File


Loading…
Cancel
Save