Builds a modern, testable API for the Prologix GPIB-ETHERNET controller (GPIB-USB structurally supported but untested, no hardware available): Transport abstraction (Ethernet now, serial later), GpibController for the full "++" command set, a clean-room netfinder discovery client that fixes a real chr()/struct-format bug present in vendortools/nfutil.py, and a CLI (discover/config/info/terminal). vendortools/, pty-gpib-emulator/, sampledata.txt and the manual PDF are kept untouched as reference material. Depends on the sibling bits package (editable, not yet pinned -- see its own commit) for MAC formatting and IEEE-488.2 status-byte bit access. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
23 lines
584 B
Python
23 lines
584 B
Python
class ProgpibError(Exception):
|
|
"""Base class for all progpib errors."""
|
|
|
|
|
|
class TransportError(ProgpibError):
|
|
"""A transport-level connect or I/O failure."""
|
|
|
|
|
|
class TransportTimeout(TransportError):
|
|
"""A read timed out with no data available."""
|
|
|
|
|
|
class TransportClosed(TransportError):
|
|
"""The peer closed the connection (EOF)."""
|
|
|
|
|
|
class CommandError(ProgpibError):
|
|
"""The controller rejected a command, or it isn't valid in the current mode."""
|
|
|
|
|
|
class DiscoveryError(ProgpibError):
|
|
"""A netfinder discovery/configuration request failed or got no reply."""
|