@@ -28,6 +28,7 @@ class BaseModbusAsyncClientProtocol(AsyncModbusClientMixin):
2828 async def execute (self , request = None ):
2929 """
3030 Executes requests asynchronously
31+
3132 :param request:
3233 :return:
3334 """
@@ -40,6 +41,7 @@ def connection_made(self, transport):
4041 Called when a connection is made.
4142
4243 The transport argument is the transport representing the connection.
44+
4345 :param transport:
4446 :return:
4547 """
@@ -54,6 +56,7 @@ def connection_lost(self, reason):
5456 Called when the connection is lost or closed.
5557
5658 The argument is either an exception object or None
59+
5760 :param reason:
5861 :return:
5962 """
@@ -67,6 +70,7 @@ def data_received(self, data):
6770 """
6871 Called when some data is received.
6972 data is a non-empty bytes object containing the incoming data.
73+
7074 :param data:
7175 :return:
7276 """
@@ -75,13 +79,15 @@ def data_received(self, data):
7579 def create_future (self ):
7680 """
7781 Helper function to create asyncio Future object
82+
7883 :return:
7984 """
8085 return asyncio .Future ()
8186
8287 def resolve_future (self , f , result ):
8388 """
8489 Resolves the completed future and sets the result
90+
8591 :param f:
8692 :param result:
8793 :return:
@@ -92,6 +98,7 @@ def resolve_future(self, f, result):
9298 def raise_future (self , f , exc ):
9399 """
94100 Sets exception of a future if not done
101+
95102 :param f:
96103 :param exc:
97104 :return:
@@ -198,6 +205,7 @@ def data_received(self, data):
198205 """
199206 Called when some data is received.
200207 data is a non-empty bytes object containing the incoming data.
208+
201209 :param data:
202210 :return:
203211 """
@@ -237,6 +245,7 @@ class ReconnectingAsyncioModbusTcpClient(object):
237245 def __init__ (self , protocol_class = None , loop = None , ** kwargs ):
238246 """
239247 Initialize ReconnectingAsyncioModbusTcpClient
248+
240249 :param protocol_class: Protocol used to talk to modbus device.
241250 :param loop: Event loop to use
242251 """
@@ -263,6 +272,7 @@ def reset_delay(self):
263272 def start (self , host , port = 502 ):
264273 """
265274 Initiates connection to start client
275+
266276 :param host:
267277 :param port:
268278 :return:
@@ -278,6 +288,7 @@ def start(self, host, port=502):
278288 def stop (self ):
279289 """
280290 Stops client
291+
281292 :return:
282293 """
283294 # prevent reconnect:
@@ -354,6 +365,7 @@ class AsyncioModbusTcpClient(object):
354365 def __init__ (self , host = None , port = 502 , protocol_class = None , loop = None , ** kwargs ):
355366 """
356367 Initializes Asyncio Modbus Tcp Client
368+
357369 :param host: Host IP address
358370 :param port: Port to connect
359371 :param protocol_class: Protocol used to talk to modbus device.
@@ -444,6 +456,7 @@ class ReconnectingAsyncioModbusTlsClient(ReconnectingAsyncioModbusTcpClient):
444456 def __init__ (self , protocol_class = None , loop = None , framer = None , ** kwargs ):
445457 """
446458 Initialize ReconnectingAsyncioModbusTcpClient
459+
447460 :param protocol_class: Protocol used to talk to modbus device.
448461 :param loop: Event loop to use
449462 """
@@ -454,6 +467,7 @@ def __init__(self, protocol_class=None, loop=None, framer=None, **kwargs):
454467 def start (self , host , port = 802 , sslctx = None , server_hostname = None ):
455468 """
456469 Initiates connection to start client
470+
457471 :param host:
458472 :param port:
459473 :param sslctx:
@@ -511,6 +525,7 @@ class ReconnectingAsyncioModbusUdpClient(object):
511525 def __init__ (self , protocol_class = None , loop = None , ** kwargs ):
512526 """
513527 Initializes ReconnectingAsyncioModbusUdpClient
528+
514529 :param protocol_class: Protocol used to talk to modbus device.
515530 :param loop: Asyncio Event loop
516531 """
@@ -538,6 +553,7 @@ def reset_delay(self):
538553 def start (self , host , port = 502 ):
539554 """
540555 Start reconnecting asynchronous udp client
556+
541557 :param host: Host IP to connect
542558 :param port: Host port to connect
543559 :return:
@@ -561,6 +577,7 @@ def start(self, host, port=502):
561577 def stop (self ):
562578 """
563579 Stops connection and prevents reconnect
580+
564581 :return:
565582 """
566583 # prevent reconnect:
@@ -643,6 +660,7 @@ class AsyncioModbusUdpClient(object):
643660 def __init__ (self , host = None , port = 502 , protocol_class = None , loop = None , ** kwargs ):
644661 """
645662 Initializes Asyncio Modbus UDP Client
663+
646664 :param host: Host IP address
647665 :param port: Port to connect
648666 :param protocol_class: Protocol used to talk to modbus device.
@@ -664,6 +682,7 @@ def __init__(self, host=None, port=502, protocol_class=None, loop=None, **kwargs
664682 def stop (self ):
665683 """
666684 Stops connection
685+
667686 :return:
668687 """
669688 # prevent reconnect:
@@ -745,6 +764,7 @@ def __init__(self, port, protocol_class=None, framer=None, loop=None,
745764 baudrate = 9600 , bytesize = 8 , parity = 'N' , stopbits = 1 , ** serial_kwargs ):
746765 """
747766 Initializes Asyncio Modbus Serial Client
767+
748768 :param port: Port to connect
749769 :param protocol_class: Protocol used to talk to modbus device.
750770 :param framer: Framer to use
@@ -768,6 +788,7 @@ def __init__(self, port, protocol_class=None, framer=None, loop=None,
768788 def stop (self ):
769789 """
770790 Stops connection
791+
771792 :return:
772793 """
773794 if self ._connected :
@@ -788,6 +809,7 @@ def _connected(self):
788809 def connect (self ):
789810 """
790811 Connect Async client
812+
791813 :return:
792814 """
793815 _logger .debug ('Connecting.' )
@@ -838,6 +860,7 @@ def protocol_lost_connection(self, protocol):
838860def init_tcp_client (proto_cls , loop , host , port , ** kwargs ):
839861 """
840862 Helper function to initialize tcp client
863+
841864 :param proto_cls:
842865 :param loop:
843866 :param host:
@@ -856,6 +879,7 @@ def init_tls_client(proto_cls, loop, host, port, sslctx=None,
856879 server_hostname = None , framer = None , ** kwargs ):
857880 """
858881 Helper function to initialize tcp client
882+
859883 :param proto_cls:
860884 :param loop:
861885 :param host:
@@ -877,6 +901,7 @@ def init_tls_client(proto_cls, loop, host, port, sslctx=None,
877901def init_udp_client (proto_cls , loop , host , port , ** kwargs ):
878902 """
879903 Helper function to initialize UDP client
904+
880905 :param proto_cls:
881906 :param loop:
882907 :param host:
0 commit comments