mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 22:38:27 +08:00
Read TPKT/COTP packets / Read MaxPDU size from PLC
Read responses from the PLS using classes for TPKT and COPT. This makes the communication more robust. It will now handle empty COTP packets that SoftPLS and WinAC based PLCs send out. I use RFC names for functions and classes. Change logic to use COTP and S7Comm reponse codes instead of relying on packet sizes. Read Max PDU size from connection setup. Ref #21 Change logic to use MaxPDUSize when reading istead of hardcoded limit. I tried using MaxPDUSize when writing data but this failed when packet size is over 256 on snap7. So i decided to drop changes to write size. I have done some tests against WinAC cpu and it seems to handle bigger pdu's when writing if negotiated in the connection setup. This might just be a SNAP7 bug. Fix MaxPDUSize for readbytes Remove debug line Simplify byte copy. Remove unessesarry buffer
This commit is contained in:
@@ -77,9 +77,11 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Conversion.cs" />
|
||||
<Compile Include="COTP.cs" />
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="PLC.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TPKT.cs" />
|
||||
<Compile Include="Types\Bit.cs" />
|
||||
<Compile Include="Types\Boolean.cs" />
|
||||
<Compile Include="Types\Byte.cs" />
|
||||
|
||||
Reference in New Issue
Block a user