Commit Graph

16 Commits

Author SHA1 Message Date
0a8d7e5c69 Add instrument interface protocols 2025-07-19 14:08:46 +00:00
ece1803c10 Fix linting: use builtin OSError and TimeoutError instead of socket aliases 2025-07-15 11:15:17 +00:00
4db50421b3 Add PSU and DMM drivers 2025-07-08 09:45:40 +00:00
10e1da198e Add thermal chamber driver 2025-07-04 18:14:37 +00:00
8fe97047d1 Add driver base class 2025-06-30 15:04:21 +00:00
95961cd26f Refactor Transport from Protocol to ABC for explicit interface implementation 2025-06-25 19:25:42 +00:00
d38c40d52d Add transport layer tests 2025-06-19 15:55:38 +00:00
936ed5a279 Implement TCP transport 2025-06-16 13:30:35 +00:00
284793df69 Add transport protocol definition 2025-06-14 20:48:34 +00:00
e38f514153 Fix linting and type errors for CI
- Use X | None syntax instead of Optional[X] (UP045)
- Sort imports in dashboard app (I001)
- Remove unnecessary UTF-8 encoding argument (UP012)
- Add 'from err' to exception re-raises (B904)
- Remove unused imports in integration tests (F401)
- Fix useless expression in test (B018)
- Cast **1.5 result to float in LDO model (mypy no-any-return)
- Use functools.partial instead of lambda in server (mypy misc)
2025-06-12 22:05:46 +00:00
cfe8dab7a8 Move InstrumentServer to instruments/transport
InstrumentServer is a general-purpose SCPI-over-TCP server that can
host any device implementing the SCPIDevice protocol (process method).
Moving it from simulation/ to instruments/transport/ reflects this:
- simulation package now depends on instruments package
- InstrumentServer can host both virtual and real instrument adapters
- Added SCPIDevice Protocol for type-safe device registration
2025-06-07 15:15:56 +00:00
510e1ba683 Add SCPI parser tests
Comprehensive test suite for SCPI command parsing:
- SCPICommand dataclass tests (creation, keyword property)
- Parser tests for queries, commands, arguments
- IEEE 488.2 common command tests (*IDN?, *RST, etc.)
- Edge cases (whitespace, empty strings)
- Instrument-specific command tests

Also fixed bug where is_query was determined from command string
ending rather than header ending (handles queries with arguments).
2025-04-21 13:10:50 +00:00
5e69085875 Implement SCPI parser
Adds SCPIParser class with parse() method that handles:
- IEEE 488.2 common commands (*IDN?, *RST, etc.)
- Query commands (ending with '?')
- Commands with comma-separated arguments
- Whitespace stripping
2025-04-21 12:03:55 +00:00
5053399851 Add SCPI command dataclass
Defines SCPICommand dataclass for parsed SCPI commands with:
- header: command header (e.g., "TEMP:SETPOINT")
- arguments: list of command arguments
- is_query: whether command is a query
- keyword property: header without trailing '?'
2025-04-16 23:08:32 +00:00
85024f8670 Restructure package for domain-driven design
Reorganise package structure to improve separation of concerns:
- instruments/ - SCPI, transport, drivers, interfaces, factory
- simulation/ - physics engine, virtual instruments, server
- framework/ - test runner, logger, limits, context
- tests/ - thermal/, electrical/ (DVT test implementations)
- data/ - repository, models
- reporting/ - generator, templates
- app/ - CLI, config, dashboard

This structure enables:
- Reusable instruments package for other test suites
- Clear separation of simulation (dev) vs production code
- Domain-focused package organisation

Updated documentation to reflect new paths.
2025-02-10 12:06:22 +00:00
088e8b1f0c Add package directory structure 2025-02-01 17:28:37 +00:00