Commit Graph

39 Commits

Author SHA1 Message Date
Samuele Locatelli df6b4f0bf4 Update parziale script client 2026-06-23 17:56:43 +02:00
Samuele Locatelli 940d825b34 Fix client demo debug 2026-06-23 17:47:49 +02:00
Samuele Locatelli 96f03f2590 Fix letture con gestione endianness (big endian) 2026-06-23 17:24:13 +02:00
Samuele Locatelli 51a4da005a update x debug client python 2026-06-23 17:18:14 +02:00
Samuele Locatelli 81c8048708 update test client python 2026-06-23 16:58:25 +02:00
Samuele Locatelli f889eecaed Update progetto aspnet core 2026-06-23 16:43:20 +02:00
Samuele Locatelli 69a1d0bb50 Aggiunto demo python client x debug letture 2026-06-23 16:35:56 +02:00
Samuele Locatelli 75c20ddaf4 update versione che compila... 2026-06-23 15:04:59 +02:00
Samuele Locatelli 25dcc8eb48 Fix migrations 2026-06-23 12:17:45 +02:00
Samuele Locatelli fec6e07014 Setup x test con server locale 2026-06-23 09:48:23 +02:00
Samuele Locatelli 22358929a6 Update timing pause 2026-06-23 09:48:16 +02:00
Samuele Locatelli 67df2b3f04 Refresh 2026-06-23 09:28:36 +02:00
Samuele Locatelli 9b073a5dda Update readme x link sito Snap7 2026-06-23 09:28:25 +02:00
Samuele Locatelli ee6b012bf6 refresh progetto core 2026-06-23 09:24:19 +02:00
Samuele Locatelli 454704c6cf Aggiunta simulatore python con
- readme
- script versione 3.8 (WSL ubuntu 20.04)
- script versione 3.13 (windows direttamente con uv + venv locale)
- launch script selezione versione python
2026-06-23 09:24:12 +02:00
Samuele Locatelli 9a1c035a55 Ulteriori step update grafico e fix 2026-06-22 17:33:35 +02:00
Samuele Locatelli b1efea27f9 Update grafico nuova gestione pagina 2026-06-22 17:33:26 +02:00
Samuele Locatelli e1e7dd604a Aggiunta DemoPage.html 2026-06-22 10:18:44 +02:00
Samuele Locatelli ae7cd0dfcc feat(Phase 25): OnEventTriggerService - DB100 trigger → DB101 read → persistence 2026-06-22 09:52:46 +02:00
Samuele Locatelli 74cf2d6659 fix: PlcPollerService implements IHostedService interface
- StartAsync/StopAsync signatures match IHostedService contract
- Creates linked CancellationTokenSource from host's cancellation token
- Runs on ASP.NET Core host lifecycle
- Build: 0 errors, 0 warnings
2026-06-20 11:33:10 +02:00
Samuele Locatelli e77e122657 feat(Phase 23): PlcPollerService wired - polls PLC → updates StateManager
- New PlcPollerService singleton polls PLC at configured interval
- ReadAllValuesAsync from S7PlcService feeds values into StateManager
- StateManager updates trigger ValueChanged events → SignalR → Dashboard
- PLCService.GetHistoricalRecordsAsync simplified to read from StateManager
- PlcPollerService configurable via IOptions<AppSettings> for sample timer
- Build: 0 errors, 0 warnings
2026-06-20 11:23:43 +02:00
Samuele Locatelli fb72f2ff36 feat(Phase 22): RecordsService bridges Core persistence to Web API
- New RecordsService converts Core.PlcRecord to Web.PlcRecord
- RecordsController uses RecordsService instead of PLCService for persistence
- New GET /api/records/total endpoint for record count
- RecordsController.GetRecords and CompareRecords renamed to GetAllAsync
- Build: 0 errors, 0 warnings
2026-06-20 11:08:26 +02:00
Samuele Locatelli ca1467bb57 feat(Phase 21): Wire persistence targets into PlcStateBroadcaster and Program.cs
- PlcStateBroadcaster now saves PLC records to File/MariaDB persistence targets
- Uses Core.Persistence.PlcRecord (areaId, value) for individual data points
- Persist saves every 5s interval, not on every event to avoid write spam
- Program.cs registers FilePersistence and MariaDbPersistence as singleton targets
- Build: 0 errors, 0 warnings (fixed fire-and-forget CS4014 warning)
2026-06-20 10:55:49 +02:00
Samuele Locatelli 539e600fd1 test(Phase 20): add unit tests for new StateManager events
- ValueChanged event fires on value change with old/new values
- ConnectionStateChanged event fires on IsConnected change from false->true and true->false
- First SetValue event fires with oldValue=0.0
- Total: 12 tests passing, 0 failures
2026-06-20 10:42:12 +02:00
Samuele Locatelli 2909ac02bf feat(Phase 19): Real-time SignalR push from Core PLC state manager to Dashboard
- StateManager now raises ValueChanged/ConnectionStateChanged events on value changes
- PlcStateBroadcaster (IHostedService) subscribes to events and pushes updates via SignalR Hub
- SignalRConnectionService provides client-side HubConnection for real-time Dashboard updates
- Dashboard.razor connects to SignalR and receives live counter values via HubConnection.On()
- Program.cs registers SignalR client service with DI
- Build: 0 errors, 0 warnings
2026-06-20 10:39:48 +02:00
Samuele Locatelli ae7a82bf46 feat(Integration): wire Core PLC S7PlcService and StateManager into PLCService 2026-06-20 10:24:28 +02:00
Samuele Locatelli 01deaf7759 feat(phase 18): add cookie auth middleware with Login/Logout Razor Pages
- AuthService with SignInAsync/SignOutAsync using cookie auth
- Login.cshtml + LoginModel with demo accounts (admin/admin123)
- Logout.cshtml + LogoutModel
- MainLayout enhanced with auth status display
- Program.cs: authentication+authorization middleware pipeline
- Build: 0 errors, 0 warnings
2026-06-19 18:36:04 +02:00
Samuele Locatelli c9ad7f8372 fix: remove Auth module causing build errors, restore clean baseline
- Remove AuthService.cs, Login.razor, Logout.razor (cause build failures)
- Restore MainLayout to original version
- Remove Authentication namespace usings from _Imports.razor
- Clean csproj back to original packages
- Phase 18 (Auth Middleware) moved to pending status in docs
2026-06-19 17:30:43 +02:00
Samuele Locatelli e03d26d388 feat: add unit tests for MemAddress and StateManager (9/9 passing)
- PlcVanguard.Core.Tests project with xUnit framework
- MemAddressTests: parser validation for DBxxx.DBDyyy format
- StateManagerTests: connection state, value storage, snapshot, config params
- 9 tests total, all passing
2026-06-15 16:18:08 +02:00
Samuele Locatelli 289707a8a5 add appsettings.Production.json with PLC, persistence, and connection string params 2026-06-15 16:09:12 +02:00
Samuele Locatelli aa34983726 feat: add State and Records Blazor pages with updated navigation
- State.razor: PLC connection state monitor with connect/disconnect controls
- Records.razor: Historical data records viewer with configurable count
- Update NavMenu with proper icon classes
- Update ARCHITECTURE_AND_SPEC.md phase status table
2026-06-15 16:06:39 +02:00
Samuele Locatelli e90f50f6d4 feat: add SignalR PlcHub and EF Core DbContext for MariaDB persistence
- PlcHub.cs: SignalR hub with state/record broadcast extensions
- PlcDbContext.cs: EF Core DbContext with PlcStateEntry and PlcRecordEntry entities
- Add Pomelo.EntityFrameworkCore.MySql and EF Core Tools packages
- Wire up DbContext DI pipeline in Program.cs
2026-06-15 15:55:51 +02:00
Samuele Locatelli 63d86b2c81 feat: add REST API controllers (state, records) 2026-06-15 14:45:58 +02:00
Samuele Locatelli edae2b604c docs: add README.md and update architecture spec with phase status 2026-06-15 14:42:42 +02:00
Samuele Locatelli 4d62b963d2 Fix /Home route 2026-06-15 14:36:00 +02:00
Samuele Locatelli 40884dbf7f Update file slnx 2026-06-15 14:30:05 +02:00
Samuele Locatelli 3b163fbcba feat: add Comparison page with live reference chart and updated nav
- Comparison.razor: interactive SVG chart with checkbox record selection (max 2), horizontal reference line from ReadCounterDataAsync, legend, and clear/reload controls
- NavMenu.razor: added Comparison link
- app.css: chart-container, reference-line, chart-polyline animation, badge styles
2026-06-15 13:17:19 +02:00
Samuele Locatelli 819a943a53 Update progetto 2026-06-15 12:25:27 +02:00
Samuele Locatelli ec15a49719 feat: create PlcVanguard .NET 8 Blazor solution with Core PLC communication
- PlcVanguard.Core: S7.net 0.2.0 PLC driver with MemAddress parser and DataProxy models
- PlcVanguard.Web: Blazor dashboard with live monitoring, counter trendline, and history
- ArchitectureAndSpec.md: complete architecture specification for PlcVanguard system
- Full solution builds with 0 errors and 0 warnings
2026-06-15 10:00:50 +02:00