@@ -288,7 +288,7 @@ def open_serial(self, port: str, device_id: int):
288288
289289 Args:
290290 port: Serial port, such as "COM1" or "/dev/ttyS1."
291- device_id: Device's serial ID, 0-255 , or 256 + to address all units
291+ device_id: Device's serial ID, 0-31 , or 32 + to address all units
292292 on the bus.
293293
294294 Raises:
@@ -319,7 +319,7 @@ def set_target_device_id(self, device_id: int):
319319 Only applies to RS-485 connections.
320320
321321 Args:
322- device_id: Target device ID, 0-255 , or 256 + to broadcast to all
322+ device_id: Target device ID, 0-31 , or 32 + to broadcast to all
323323 units on the bus.
324324
325325 Raises:
@@ -1517,22 +1517,17 @@ def serial_discovery(
15171517 self ,
15181518 port : str ,
15191519 first_id : int = 0 ,
1520- last_id : int = 255 ,
1520+ last_id : int = 31 ,
15211521 ) -> list [AbsSerialDiscoveryResult ]:
15221522 """Use RS-485 to discover ABSes on the bus.
15231523
15241524 This function requires that the ScpiClient *not* be connected over
15251525 serial! This will interfere with opening the serial port.
15261526
1527- Since this function operates by scanning all serial IDs in a range, it
1528- can take upwards of 15 seconds to scan the full address space. It's
1529- therefore recommended to limit the address range to the range you expect
1530- devices to be in.
1531-
15321527 Args:
15331528 port: Serial port to use, such as COM1 or /dev/ttyS0.
1534- first_id: First serial ID to check, 0-255 .
1535- last_id: Last serial ID to check (inclusive), 0-255 . Must not be
1529+ first_id: First serial ID to check, 0-31 .
1530+ last_id: Last serial ID to check (inclusive), 0-31 . Must not be
15361531 less than first_id.
15371532
15381533 Returns:
@@ -1541,7 +1536,7 @@ def serial_discovery(
15411536 Raises:
15421537 ScpiClientError: An error occurred during discovery.
15431538 """
1544- if last_id < 0 or last_id > 255 or first_id < 0 or first_id > 255 :
1539+ if last_id < 0 or last_id > 31 or first_id < 0 or first_id > 31 :
15451540 raise ValueError ("invalid ID" )
15461541 elif last_id < first_id :
15471542 raise ValueError ("last ID cannot be less than first ID" )
0 commit comments