File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -99,37 +99,6 @@ def send_exception(self, exception_code: int) -> None:
9999 self .function ,
100100 exception_code )
101101
102- """
103- def data_as_bits(self) -> List[int]:
104- bits = []
105-
106- for byte in self.data:
107- for i in range(0, 8):
108- bits.append((byte >> i) & 1)
109-
110- if len(bits) == self.quantity:
111- return bits
112- """
113-
114- '''
115- def data_as_registers(self, signed: bool = True) -> bytes:
116- """
117- Convert bytes to tuple of integer values
118-
119- :param byte_array: The byte array
120- :type byte_array: bytes
121- :param signed: Indicates if signed
122- :type signed: bool
123-
124- :returns: Integer representation
125- :rtype: bytes
126- """
127- qty = self.quantity if (self.quantity is not None) else 1
128- fmt = ('h' if signed else 'H') * qty
129-
130- return struct.unpack('>' + fmt, self.data)
131- '''
132-
133102
134103class ModbusException (Exception ):
135104 """Exception for signaling modbus errors"""
You can’t perform that action at this time.
0 commit comments