nimbuscontrols / EIPScanner

Free implementation of EtherNet/IP in C++
https://eipscanner.readthedocs.io/en/latest/
MIT License
233 stars 93 forks source link

8bit support #56

Closed janandries closed 3 years ago

janandries commented 3 years ago

There are EthernetIP devices that do not support 16 bit path segments. The library does not support selecting the path segments width. In this pullrequest this is addressed.

A MessageRouter object can now be supplied a flag during construction that indicates that 8 bit path segments should be used. This MessageRouter can then be passed to the ConnectionManager and all EPaths will be converted to 8 bit path segments when a request is being composed.

jadamroth commented 3 years ago

Thanks for your pull request.

I was not aware that there were devices which used 8bit path segments. Out of curiosity, what is the end device you're testing

I briefly looked at the code. I will test later tonight

janandries commented 3 years ago

We have a Miller Autocontiuum 350 weld source, that only works with 8 bit path segments.

janandries commented 3 years ago

also the issue that was made by Eske a while ago spoke of a device that only supports 8 bit path segments, the yaskawa/mp3300iec which is included in the vendor specific folder

Originally posted by @Eske in https://github.com/nimbuscontrols/EIPScanner/issues/30#issuecomment-674241247

Eske added a custom code to support this, basically by rewriting the EPath, MessageRouter, and MessageRouterRequest.

jadamroth commented 3 years ago

Tested this on my EIP device, and everything looks good

Merging this into master and creating a new release. Thanks for submitting the pull request

If there're any issues that arise from this pull request, we'll create another pull request to fix