Skip to content

feat(plc4j/eip): Report the information if the tag address is invalid - #2706

Open
andvasp wants to merge 1 commit into
apache:developfrom
andvasp:feat/plc4j-eip-inform-invalid_address
Open

feat(plc4j/eip): Report the information if the tag address is invalid#2706
andvasp wants to merge 1 commit into
apache:developfrom
andvasp:feat/plc4j-eip-inform-invalid_address

Conversation

@andvasp

@andvasp andvasp commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Hi @chrisdutz!

This is a simple PR to report tag INVALID_ADDRESS.

I discover this when analysing a problem where I am trying to read a valid tag address but the PLC does not recognize it. I am investigating it and probability I will create an issue.

@andvasp

andvasp commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

HI @chrisdutz.

Do you believe it can be merged before release 1.0.0?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates EIP read handling to report invalid tag addresses more accurately.

Changes:

  • Centralizes CIP read-response conversion.
  • Maps relevant CIP errors to INVALID_ADDRESS.
  • Reuses response extraction for unconnected reads.
Suppressed comments (1)

plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java:1110

  • The new status translation is the core behavior of this PR, but none of the EIP unit or driver tests exercises these error statuses. Add regression cases for 0x03, 0x04, and 0x05, including the forced-unconnected CipConnectedResponse shape and a normal CipReadResponse; this would catch the response-type regression above.
        if (status == CIPStatus.PathDestinationUnknown.getValue() ||
            status == CIPStatus.PathSegmentError.getValue() ||
            status == CIPStatus.InvalidParameterValue.getValue()) {
            return PlcResponseCode.INVALID_ADDRESS;

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andvasp

andvasp commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Hi @chrisdutz !

What about this PR. Can you review it?

@chrisdutz

Copy link
Copy Markdown
Contributor

I'll look into this as soon as I manage to free a few seconds of time ... I'm sort of working my butt off in preparing PLC4X for 1.0.0 and the release ... your PRs always claim to be simple, but when looking at them the reformatting you keep on doing makes them all but simple to spot the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants