Operator-facing README covering CLI args, license setup, supported controllers, and NC validation. PAUL phase 10 complete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 KiB
Project State
Project Reference
See: .paul/PROJECT.md (updated 2026-05-17)
Core value: Machinists transfer CNC programs to/from any controller without manual steps or internet Current focus: All phases complete — project fully documented
Current Position
Milestone: v0.2 NcProgramManager — COMPLETE Phase: 10 (readme-docs) — Complete Plan: 10-01 complete Status: All phases done. Project complete. Last activity: 2026-05-17 — Italian READMEs written for both repos
Progress:
- Milestone v0.1: [██████████] 100% (complete)
- Milestone v0.2: [██████████] 100% (complete)
- Phase 10 (readme-docs): [██████████] 100% (complete)
Loop Position
PLAN ──▶ APPLY ──▶ UNIFY
✓ ✓ ✓ [Loop complete — project fully documented]
What Was Built (v0.1 Multi-CN Release)
Phase 1 — CNC Abstraction
- Namespace:
Fanuc_integration.Cnc.*→FanucProgramManager.Cnc.*(29 files) IFocasDialectextended:UploadStart/DownloadStartacceptshort fileTypeIFanucMachinecreated: extendsICncMachinewith tool offset + work zero R/WCncManufacturerenum: Fanuc, Heidenhain, Siemens, Mitsubishi- All 29
Cnc/**/*.csfiles added to csproj
Phase 2 — Heidenhain LSV2
HeidenhainConnectionConfig— IP, port 19000, credentials, timeoutLsv2Client— TCP framing, CRC-16/CCITT, login (SELECT+LOG_IN), ReceiveFile/SendFileHeidenhainMachine : ICncMachine— RunGuardedAsync pattern, state machine
Phase 3 — Siemens + Mitsubishi FTP
SiemensConnectionConfig/SiemensFtpClient/SiemensMachine : ICncMachineMitsubishiConnectionConfig/MitsubishiFtpClient/MitsubishiMachine : ICncMachine
Phase 4 — Wiring
CncMachineFactory— creates rightICncMachinefromInputArgsInputArgs— addedmanufacturer,username,passwordfieldsProgram.cs— full rewrite usingICncMachine; Fanuc 3-file viaIFanucMachinecast
Phase 5 — NC Validator
ValidationSeverity/ValidationError/ValidationResultmodel typesINcProgramValidator+NcProgramValidator(5 universal + per-manufacturer rules)- Validator injected into all 4 machine classes; upload blocked on Error severity
NcProgramValidatorTests— 30+ NUnit tests
Test Infrastructure
NcProgramManager.Tests/— NUnit 3.13.3 + Moq 4.18.4, .NET 4.7.2FtpServerStub+Lsv2ServerStub— in-process TCP stubs- Unit + integration tests; Fanuc FOCAS tests
[Ignore]d (Windows-only DLL)
What Was Built (v0.2 NcProgramManager — complete)
Phase 06 — Rename Cleanup
- Namespace:
FanucProgramManager.*→NcProgramManager.*(all files) - Project renamed, test folder renamed, dead
FANUCMachine.csdeleted
Phase 07 — License Core
IMachineFingerprint/ILicenseValidatorinterfacesMachineFingerprint— WMI CPU/BIOS fingerprintLicenseFile.TryRead— reads.licfile, returns base64 signatureLicenseValidator.Validate— RSA-SHA256 verifyLicenseValidatorTests— 6 unit tests (testable via internal ctor injection)
Phase 08 — License Integration
Program.cs— RSA check wired at startup;checkLicensedeleted;license.licnext to EXEInputArgs.cs—-chiave=field removed
Phase 09 — License Generator
LicenseGeneratorstandalone console tool (separate repo:ssh://git@3nt-git.duckdns.org:222/davide.trentin/license-generator.git)- Commands:
keygen(RSA 2048-bit pair),fingerprint(WMI, Windows),sign(RSA-SHA256 → .lic) - Real public key embedded in
Licensing/LicenseValidator.cs(PLACEHOLDER removed) private.key.xmlat~/Documents/mine/c#/LicenseGenerator/(gitignored — keep secure)
Phase 10 — README Docs
README.mdin NcProgramManager root — Italian, operator-facing: CLI args, license setup, examples, controllers tableREADME.mdin LicenseGenerator repo — Italian, vendor-facing: keygen first-run, 4-step license issuance workflow, commands table, security
CLI Args (current)
-manufacturer=fanuc|heidenhain|siemens|mitsubishi(default: fanuc)-azione=— action (Scarica/Invia/etc.)-ip=— CNC IP-porta=— port-username=(Heidenhain/Siemens/Mitsubishi)-password=(Heidenhain/Siemens/Mitsubishi)- License: place
license.licnext to the EXE (no CLI arg)
Accumulated Context
Decisions
- .NET 4.7.2 locked — max compatibility
- RSA asymmetric offline licensing: private key vendor-only, public key embedded in binary
license.licalways atAppDomain.CurrentDomain.BaseDirectory— no CLI overrideRSACryptoServiceProvider+SHA256CryptoServiceProvider(not HashAlgorithmName) — .NET 4.7.2 compat- Constructor injection pattern: internal ctor accepts key XML — testable without Windows WMI
- LicenseGenerator: standalone separate repo — vendor tool, never shipped to customers
- Heidenhain: LSV2 port 19000, needs real hardware testing
- Siemens: FTP
/_N_MPF_DIR/, needs Sinumerik FTP option enabled on machine #= Warning in Fanuc/Mitsubishi — macro variable indicator
Deferred Issues
AesCrypt.csdead code — remove in future cleanup phase- Heidenhain:
ReadActiveProgramAsync/SelectMainProgramnot implemented - Siemens: same as Heidenhain
- Build + integration not verifiable on Linux (fwlib32 Windows-only)
- MachineFingerprint WMI + full license flow — needs real Windows hardware test
private.key.xmlowned by root — runsudo chown $USER ~/Documents/mine/c#/LicenseGenerator/private.key.xml
Blockers/Concerns
None — project complete.
Git State
Last commit (NcProgramManager): see git log --oneline
LicenseGenerator repo: commit 2ef68dd — feat: initial LicenseGenerator
Branch: main
Session Continuity
Last session: 2026-05-17 Stopped at: Phase 10 complete — all phases done Next action: git commit docs(10-readme-docs), then project is fully shipped Resume file: .paul/phases/10-readme-docs/10-01-SUMMARY.md
STATE.md — Updated after every significant action