This website requires JavaScript.
Explore
Help
Register
Sign In
dohertj2
/
lmxopcua
Watch
1
Star
0
Fork
0
You've already forked lmxopcua
Code
Issues
Pull Requests
1
Actions
Packages
Projects
Releases
Wiki
Activity
Files
0444cb699d294685da1a50cb980cb842b25d0912
lmxopcua
/
tests
/
ZB.MOM.WW.OtOpcUa.Driver.S7.Tests
History
Joseph Doherty
baf1d65875
Auto: s7-d3 — instance-DB / FB parameter resolution
...
Closes
#301
2026-04-26 07:04:40 -04:00
..
SymbolImport
Auto: s7-d3 — instance-DB / FB parameter resolution
2026-04-26 07:04:40 -04:00
S7AddressParserTests.cs
Auto: s7-a5 — LOGO!/S7-200 V-memory parser
2026-04-25 16:58:34 -04:00
S7BlockCoalescingPlannerTests.cs
Auto: s7-b2 — block-read coalescing for contiguous DBs
2026-04-25 21:23:06 -04:00
S7DateTimeCodecTests.cs
Auto: s7-a3 — DTL/DT/S5TIME/TIME/TOD/DATE codecs
2026-04-25 16:37:39 -04:00
S7DeadbandTests.cs
Auto: s7-c4 — deadband / on-change with thresholds
2026-04-26 01:14:59 -04:00
S7DiscoveryAndSubscribeTests.cs
Auto: s7-a1 — 64-bit scalar types
2026-04-25 16:16:23 -04:00
S7DriverArrayTests.cs
Auto: s7-a4 — array tags (ValueRank=1)
2026-04-25 16:49:02 -04:00
S7DriverDiagnosticsTests.cs
Auto: s7-c1 — surface negotiated PDU size via DriverHealth.Diagnostics
2026-04-26 00:35:49 -04:00
S7DriverReadWriteTests.cs
Phase 3 PR 64 -- S7 IReadable + IWritable via S7.Net string-based Plc.ReadAsync/WriteAsync. Adds IReadable + IWritable capability interfaces to S7Driver, routing reads/writes through S7netplus's string-address API (Plc.ReadAsync(string, ct) / Plc.WriteAsync(string, object, ct)). All operations serialize on the class's SemaphoreSlim Gate because S7netplus mandates one Plc connection per PLC with client-side serialization -- parallel reads against a single S7 CPU queue wire-side anyway and just eat connection-resource budget. Supported data types in this PR: Bool, Byte, Int16, UInt16, Int32, UInt32, Float32. S7.Net's string-based read returns UNSIGNED boxed values (DBX=bool, DBB=byte, DBW=ushort, DBD=uint); the driver reinterprets them into the requested S7DataType via the (DataType, Size, raw) switch: unchecked short-cast for Int16, unchecked int-cast for Int32, BitConverter.UInt32BitsToSingle for Float32. Writes inverse the conversion -- Int16 -> unchecked ushort cast, Int32 -> unchecked uint cast, Float32 -> BitConverter.SingleToUInt32Bits -- before handing to S7.Net's WriteAsync. This avoids a second PLC round-trip that a typed ReadAsync(DataType, db, offset, VarType, ...) overload would need. Int64, UInt64, Float64, String, DateTime throw NotSupportedException (-> BadNotSupported StatusCode); S7 STRING has non-trivial header semantics + LReal/DateTime need typed S7.Net API paths, both land in a follow-up PR when scope demands. InitializeAsync now parses every tag's Address string via S7AddressParser at init time. Bad addresses throw FormatException and flip health to Faulted -- callers can't register a broken driver. The parsed form goes into _parsedByName so Read/Write can consult Size/BitOffset without re-parsing per operation. StatusCode mapping in catch chain: unknown tag name -> BadNodeIdUnknown (0x80340000), unsupported data type -> BadNotSupported (0x803D0000), read-only tag write attempt -> BadNotWritable (0x803B0000), S7.Net PlcException (carries PUT/GET-disabled signal on S7-1200/1500) -> BadDeviceFailure (0x80550000) so operators see a TIA-Portal config problem rather than a transient-fault false flag per driver-specs.md \u00A75, any other runtime exception on read -> BadCommunicationError (0x80050000) to distinguish socket/timeout from tag-level faults. Write generic-exception path stays BadInternalError because write failures can legitimately be driver-side value-range problems. Unit tests (S7DriverReadWriteTests, 3 facts): Initialize_rejects_invalid_tag_address_and_fails_fast -- Tags with a malformed address must throw at InitializeAsync rather than producing a half-healthy driver; ReadAsync_without_initialize_throws_InvalidOperationException + WriteAsync_without_initialize_throws_InvalidOperationException -- pre-init calls hit RequirePlc and throw the uniform 'not initialized' message. Wire-level round-trip coverage (integration test against a live S7-1500 or a mock S7 server) is deferred -- S7.Net doesn't ship an in-process fake and a conformant mock is non-trivial. 53/53 Modbus.Driver.S7.Tests pass (50 parser + 3 read/write). dotnet build clean.
2026-04-19 00:10:41 -04:00
S7DriverScaffoldTests.cs
…
S7PreflightTests.cs
Auto: s7-c5 — pre-flight PUT/GET enablement test
2026-04-26 01:31:48 -04:00
S7ReadPackerTests.cs
Auto: s7-b1 — multi-variable PDU packing
2026-04-25 21:04:32 -04:00
S7ScanGroupPartitioningTests.cs
Auto: s7-c3 — per-tag scan group / publish rate
2026-04-26 01:03:00 -04:00
S7StringCodecTests.cs
Auto: s7-a2 — STRING/WSTRING/CHAR/WCHAR
2026-04-25 16:26:05 -04:00
S7TsapModeTests.cs
Auto: s7-c2 — TSAP / Connection Type selector
2026-04-26 00:49:10 -04:00
S7UdtFanOutTests.cs
Auto: s7-d2 — UDT / STRUCT / nested-DB fan-out
2026-04-26 06:50:26 -04:00
ZB.MOM.WW.OtOpcUa.Driver.S7.Tests.csproj
…