nimbuscontrols / EIPScanner

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

Add option to use 8 bit segments #78

Open contradict opened 2 years ago

contradict commented 2 years ago

ConnectionManager passes through to the underlying MessageRouter.

JohannesKauffmann commented 1 year ago

Hi, looking at this PR, I'm not sure I'd want to integrate this change.

If you need 8 bit segments when using a ConnectionManager for implicit requests, you can already construct a MessageRouter yourself, using the appropriate constructor. Although, it is shorter to type true than make_shared<MessageRouter>(true).

And then there is the question of encapsulation. The option to use 8bit segments is currently passed to and stored in the MessageRouter, but also passed to and stored in a MessageRouterRequest. Adding the option here would add to the maintenance overhead; e.g.: should the option ever be renamed, or should the MessageRouter change it's constructor.

JohannesKauffmann commented 1 year ago

@Broekman Do you have any strong opinions?