Skip to content

Commit

Permalink
Clean old_framers.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Oct 4, 2024
1 parent 9ca9a7b commit 3c4edbf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
12 changes: 0 additions & 12 deletions pymodbus/framer/old_framer_rtu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""RTU framer."""
# pylint: disable=missing-type-doc
import time

from pymodbus.exceptions import ModbusIOException
Expand Down Expand Up @@ -87,17 +86,6 @@ def frameProcessIncomingPacket(self, _single, callback, slave, tid=None):
Log.debug("Frame advanced, resetting header!!")
callback(result) # defer or push to a thread?

def buildPacket(self, message):
"""Create a ready to send modbus packet.
:param message: The populated request/response to send
"""
packet = super().buildPacket(message)

# Ensure that transaction is actually the slave id for serial comms
message.transaction_id = 0
return packet

def sendPacket(self, message: bytes) -> int:
"""Send packets on the bus with 3.5char delay between frames.
Expand Down
6 changes: 0 additions & 6 deletions pymodbus/framer/old_framer_tls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""TLS framer."""
import struct
from time import sleep

from pymodbus.exceptions import (
ModbusIOException,
Expand Down Expand Up @@ -43,11 +42,6 @@ def decode_data(self, data):
return {"fcode": fcode}
return {}

def recvPacket(self, size):
"""Receive packet from the bus."""
sleep(0.5)
return super().recvPacket(size)

def frameProcessIncomingPacket(self, _single, callback, _slave, tid=None):
"""Process new packet pattern."""
# no slave id for Modbus Security Application Protocol
Expand Down

0 comments on commit 3c4edbf

Please sign in to comment.