-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The write_area method in S7Comm sends data in a single request without checking if the request fits within the negotiated PDU size. If the data is too large, the PLC will reject the request or the behavior will be undefined.
Current Behavior
write_area creates a VariableWriteRequest and sends it without validating the total packet size against pdu_length.
Expected Behavior
Before sending, write_area should:
- Calculate the total request size (header + parameter + data)
- Compare against self.pdu_length
- Raise WriteDataTooLargeException (or similar) if request exceeds PDU size
additional context
Users should use write_area_multiple() for data exceeding PDU size
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels