Commit graph

3 commits

Author SHA1 Message Date
dtrentin
19da0e598e feat(mazak): add Mazak CNC support via FTP (EIA/ISO)
New Cnc/Mazak/ machine integration mirroring the Fagor/Mitsubishi FTP
pattern: MazakConnectionConfig, IMazakFtpClient, MazakFtpClient,
MazakMachine (ICncMachine). Transfers EIA/ISO G-code text over FTP to
Smooth-family controllers. Mazatrol CMT (proprietary binary) out of scope.

Design (verified against Mazak Matrix EIA manual + field reports):
- Filenames preserved verbatim; no O#### rename, no extension append.
- Symmetric ResolvePath for Read/Write/Delete (avoids ISS-020 class;
  Delete resolved too, unlike copied Mitsubishi source).
- Validator = full passthrough for Mazak (EIA permits ';' EOB, '[ ]',
  '#'; restrictive Fanuc checks would false-reject valid programs).
- Port 21 default, -porta=23 for Smooth Ai IIS variant.
- ProgramDirectory site-specific, no default.

Wiring: CncManufacturer.Mazak, ArgParser 'mazak' token, CncMachineFactory.
Tests: MazakMachineTests (unit), MazakMachineIntegrationTests (FTP-stub
roundtrip + symmetry guard), Mazak cases in validator/factory tests.
Docs: README Controller Mazak section + table row; ISS-021 (constraints,
EIA-option requirement), ISS-022 (Mitsubishi delete asymmetry logged).

NOT build-verified (no .NET toolchain in build env) — verify on Windows.

Projects: NcProgramManager, NcProgramManager.Tests

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 19:12:07 +02:00
dtrentin
b3d7402498 feat(16-fagor): Fagor CNC FTP support + validator gating
Phase 16 (v0.6 milestone) — supporto Fagor CNC via FTP, riuso pattern
Siemens/Mitsubishi (FtpWebRequest + ASCII).

Modelli supportati: 8060/8065/8070 (FTP nativo), 8055 (con opzione
Ethernet). Modelli 8025-8050 esclusi (solo RS232).

Code:
- Cnc/Fagor/* — FagorConnectionConfig, IFagorFtpClient, FagorFtpClient,
  FagorMachine. ProgramExtension configurabile (default .nc),
  ProgramDirectory /Users/Prg/.
- Cnc/Models/CncManufacturer.cs — enum + Fagor.
- Cnc/CncMachineFactory.cs — case Fagor, porta default 21.
- Cnc/NcProgramValidator.cs — refactor IsRestrictiveDialect():
  block-80/no-tab/no-lowercase/nested-parens/comment-32 ora applicati
  solo a Fanuc+Mitsubishi (Heidenhain/Siemens/Fagor esenti). Fagor name
  rules: max 24 char, no ñ (escape ñ per safety codepage), stem
  alphanumerico + spazi (estensione separata).
- ArgParser.cs — case "fagor".
- Program.cs — help text manufacturer/username/password.

Tests:
- FagorMachineTests — 12 unit (10 mock + 2 validator reale).
- FagorMachineIntegrationTests — 5 stub-based (riusa FtpServerStub) + 1
  hardware skip via FAGOR_TEST_IP env var.
- NcProgramValidatorTests — 12 nuovi Fagor (8 + 4 extension coverage), 6
  lock Siemens/Heidenhain exemption, 3 esistenti Siemens→Fanuc.
- CncMachineFactoryTests — Create_Fagor_ReturnsFagorMachine.

Docs:
- README.md — sezione "Controller Fagor" italiano: modelli supportati/
  non supportati, regole nome, env var test.

Build:
- *.csproj — 4 Compile Include main + 2 test.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 20:27:18 +02:00
dtrentin
bd17ea46e5 feat(11-refactor): extract ArgParser, fix error handling, remove dead code
Phase 11 complete:
- ArgParser.cs: CLI parsing extracted from Program.cs (pure static method)
- Program.cs: no static state; Scarica/Invia take explicit InputArgs param
- Program.cs: try/finally with connected flag — fixes connection leak on exception
- Program.cs: PrintErrors helper surfaces CncResult.Errors on every failure
- AesCrypt.cs: deleted (dead code, zero references)
- NcProgramManager.csproj: AesCrypt.cs → ArgParser.cs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 00:01:32 +02:00