File: rtu_server.py

package info (click to toggle)
python-umodbus 1.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 456 kB
  • sloc: python: 1,944; makefile: 166; sh: 5
file content (14 lines) | stat: -rw-r--r-- 298 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from serial import serial_for_url

from umodbus import conf
from umodbus.server.serial import get_server
from umodbus.server.serial.rtu import RTUServer

from tests.system import route

conf.SIGNED_VALUES = True

s = serial_for_url('loop://')
app = get_server(RTUServer, s)

route.bind_routes(app)