Skip to content

Commit

Permalink
fixes #70
Browse files Browse the repository at this point in the history
  • Loading branch information
Galen Collins committed Jan 5, 2015
1 parent b13c89d commit 11b10c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pymodbus/server/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,10 @@ def StartUdpServer(context=None, identity=None, address=None, **kwargs):
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param address: An optional (interface, port) to bind to.
:param framer: The framer to operate with (default ModbusSocketFramer)
:param ignore_missing_slaves: True to not send errors on a request to a missing slave
'''
framer = ModbusSocketFramer
framer = kwargs.pop('framer', ModbusSocketFramer)
server = ModbusUdpServer(context, framer, identity, address, **kwargs)
server.serve_forever()

Expand All @@ -448,6 +449,7 @@ def StartSerialServer(context=None, identity=None, **kwargs):
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param framer: The framer to operate with (default ModbusAsciiFramer)
:param port: The serial port to attach to
:param stopbits: The number of stop bits to use
:param bytesize: The bytesize of the serial messages
Expand All @@ -456,7 +458,7 @@ def StartSerialServer(context=None, identity=None, **kwargs):
:param timeout: The timeout to use for the serial device
:param ignore_missing_slaves: True to not send errors on a request to a missing slave
'''
framer = ModbusAsciiFramer
framer = kwargs.pop('framer', ModbusAsciiFramer)
server = ModbusSerialServer(context, framer, identity, **kwargs)
server.serve_forever()

Expand Down

0 comments on commit 11b10c3

Please sign in to comment.