sruehl commented on a change in pull request #241:
URL: https://github.com/apache/plc4x/pull/241#discussion_r616418042



##########
File path: 
plc4j/drivers/canopen/src/main/java/org/apache/plc4x/java/canopen/CANOpenPlcDriver.java
##########
@@ -111,8 +112,8 @@ protected BaseOptimizer getOptimizer() {
     }
 
     @Override
-    protected ProtocolStackConfigurer<CANOpenFrame> getStackConfigurer() {
-        return SingleProtocolStackConfigurer.builder(CANOpenFrame.class, 
CANOpenSocketCANFrameIO.class)
+    protected ProtocolStackConfigurer<CANOpenFrame> 
getStackConfigurer(Configuration configuration, Transport transport) {
+        return SingleProtocolStackConfigurer.builder(CANOpenFrame.class, 
CANOpenSocketCANFrameIO.class, configuration)
             .withProtocol(CANOpenProtocolLogic.class)

Review comment:
       @splatch Wouldn't it have been easier to add 2 new methods here instead 
of refactoring the whole spi?
   like:
   ```suggestion
               .withProtocol(CANOpenProtocolLogic.class)
               .withConfiguration(configuration)
               .withTransport(transport)
   ```
   
   what is confusing to me is that you changed the SPI for CanOpen but you 
don't make use of it here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to