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
|
60ce1c9d57
|
feat(15-logging): NLog structured logging — all output through NLog (v0.5 complete)
Phase 15 complete (2 plans):
- 15-01: NLog 5.2.8 + nlog.config (rolling file daily/7d + console); logger fields in
FanucMachine, HeidenhainMachine, SiemensMachine, MitsubishiMachine, Lsv2Client, Program.cs;
SetState event handler catches → _log.Warn; cleanup catches annotated; ISS-003/ISS-004 closed
- 15-02: All Console.Write/WriteLine in Program.cs replaced with _log.Info (103 calls);
nlog.config console target layout=${message}, levels=Info only — Warn/Error file-only;
operator console output identical; every interaction now timestamped in log file
Milestone v0.5 Operational Quality complete.
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-05-18 23:57:27 +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 |
|
dtrentin
|
39a9566858
|
feat(07-license-core): RSA offline license core
Phase 07 complete:
- IMachineFingerprint + ILicenseValidator interfaces
- MachineFingerprint: WMI CPU ProcessorID + BaseBoard SerialNumber
- LicenseValidator: RSACryptoServiceProvider + SHA256, injectable public key
- LicenseFile.TryRead: out-param bool, no exceptions from file I/O
- 6 NUnit tests (valid/wrong-machine/tampered/empty/not-base64/missing-file)
- 118 tests total, 116 pass, 2 Fanuc FOCAS ignored (Windows DLL)
- Fix: missing 'using System' in CncMachineFactoryTests.cs
- Fix: Dockerfile.test updated for NcProgramManager rename
PublicKeyXml = PLACEHOLDER until Phase 09 generates real key pair.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-17 22:58:14 +02:00 |
|
dtrentin
|
a5d73db69a
|
refactor(rename): FanucProgramManager → NcProgramManager
Phase 06 complete:
- Namespace renamed in 62 .cs files (namespace + using directives)
- AssemblyName + RootNamespace updated in csproj files
- FanucProgramManager.csproj → NcProgramManager.csproj
- FanucProgramManager.sln → NcProgramManager.sln
- FanucProgramManager.Tests/ → NcProgramManager.Tests/
- FANUCMachine.cs deleted (dead code, zero references)
Fanuc-prefixed class names kept (FanucMachine, FanucProgram,
IFanucMachine) — manufacturer identifiers, not project names.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-17 22:31:36 +02:00 |
|