nc_program_manager/.paul/phases/16-fagor-ftp/16-01-PLAN.md
dtrentin 68c5a555f3 chore(paul): close v0.6 Fagor Support milestone, log ISS-012..017
PAUL bookkeeping per chiusura milestone v0.6 (Phase 16: 16-01 + 16-02):
- STATE.md — sezione v0.6 + Phase 16-01 + 16-02 fixup post-review.
- ROADMAP.md — Milestone v0.6 + Phase 16 (2 plans).
- paul.json — version 0.6.0, milestone Fagor Support, phase 16
  fagor-ftp.
- phases/16-fagor-ftp/ — 16-01-PLAN.md + 16-01-SUMMARY.md (impl
  iniziale), 16-02-PLAN.md + 16-02-SUMMARY.md (fix post-review).
- ISSUES.md — ISS-012..ISS-017 derivati da code review v0.6:
  - ISS-012: Fagor ReadActiveProgramAsync/SelectMainProgram non impl
  - ISS-013: Program.Invia accoppia FanucProgram a tutti i produttori
  - ISS-014: ResolvePath null-folder NRE pattern (Siemens/Mitsubishi/Fagor)
  - ISS-015: encoding source-file rischio codepage Windows non-UTF8
  - ISS-016: WriteProgramAsync validator riceve path se Name null
  - ISS-017: FagorFtpClient.Ping swallow senza log

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 20:27:44 +02:00

60 lines
2.4 KiB
Markdown

# Phase 16-01 — Fagor FTP Support
## Goal
Aggiungere supporto Fagor CNC via FTP a `NcProgramManager`. Riusare pattern Siemens/Mitsubishi (FtpWebRequest + ASCII). Refactor validator per gating per-produttore dei check generic (block 80, no tab, no lowercase, nested parens, comment 32) — applicati ora solo a Fanuc+Mitsubishi (Fagor esente). Estendere CLI con `-manufacturer=fagor`.
## Modelli supportati
| Modello | Supporto | Note |
|---------|----------|------|
| 8055 | Solo con opzione Ethernet | Richiede attivazione server FTP via parametri macchina |
| 8060 | Sì | FTP nativo (Windows-based) |
| 8065 | Sì | FTP nativo (Windows-based) |
| 8070 | Sì | FTP nativo (Windows embedded) |
## Modelli non supportati
| Modello | Motivo |
|---------|--------|
| 8055 base (senza Ethernet) | Solo RS232; protocollo seriale non implementato |
| 8025 / 8030 / 8040 / 8050 | Legacy, esclusivamente RS232 |
## Files creati
- `Cnc/Fagor/FagorConnectionConfig.cs`
- `Cnc/Fagor/IFagorFtpClient.cs`
- `Cnc/Fagor/FagorFtpClient.cs`
- `Cnc/Fagor/FagorMachine.cs`
- `NcProgramManager.Tests/Unit/FagorMachineTests.cs`
- `NcProgramManager.Tests/Integration/FagorMachineIntegrationTests.cs`
## Files modificati
- `Cnc/Models/CncManufacturer.cs` — enum aggiunto `Fagor`
- `Cnc/CncMachineFactory.cs` — case `Fagor`
- `Cnc/NcProgramValidator.cs` — refactor gating + case Fagor
- `ArgParser.cs` — case `"fagor"`
- `Program.cs` — help text
- `NcProgramManager.csproj` — 4 `<Compile Include>`
- `NcProgramManager.Tests/NcProgramManager.Tests.csproj` — 2 `<Compile Include>`
- `NcProgramManager.Tests/Unit/NcProgramValidatorTests.cs` — 3 test esistenti spostati Siemens → Fanuc, 8 nuovi Fagor
- `README.md` — sezione Controller Fagor
## Regole validatore Fagor
- Nome programma: max 24 caratteri, no `ñ`, solo lettere/cifre/spazi
- Contenuto programma: nessuna restrizione (Fagor permette ISO + linguaggio alto livello)
- Check generic (block 80, tab, lowercase, nested parens, comment 32) NON applicati a Fagor
## Funzioni non supportate via FTP
- `ReadActiveProgramAsync` — richiede DNC/OPC-UA
- `SelectMainProgramAsync` — richiede DNC
- `ReadAsync` ritorna `MachineSnapshot` con valori `Unknown`
## Variabili d'ambiente test integration
- `FAGOR_TEST_IP` — indirizzo IP macchina (test skippato se assente)
- `FAGOR_USER` — username FTP (default `user`)
- `FAGOR_PASS` — password FTP (default `pass`)