You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2022/09/04 15:14:41 UTC

[plc4x] branch profinet created (now 50e6389b2)

This is an automated email from the ASF dual-hosted git repository.

hutcheb pushed a change to branch profinet
in repository https://gitbox.apache.org/repos/asf/plc4x.git


      at 50e6389b2 fix(plc4j/profinet): Fix to remove spaces from the generated connection string.

This branch includes the following new commits:

     new 50e6389b2 fix(plc4j/profinet): Fix to remove spaces from the generated connection string.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[plc4x] 01/01: fix(plc4j/profinet): Fix to remove spaces from the generated connection string.

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hutcheb pushed a commit to branch profinet
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 50e6389b2777355ca929fe5dda8817653fcac53c
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Sun Sep 4 09:14:24 2022 -0600

    fix(plc4j/profinet): Fix to remove spaces from the generated connection string.
---
 .../apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java
index 8df6bca59..5eb899bcc 100644
--- a/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java
+++ b/plc4j/drivers/profinet/src/main/java/org/apache/plc4x/java/profinet/discovery/ProfinetPlcDiscoverer.java
@@ -145,13 +145,13 @@ public class ProfinetPlcDiscoverer implements PlcDiscoverer {
                                                 String deviceTypeName = "unknown";
                                                 if (blocks.containsKey(DEVICE_TYPE_NAME)) {
                                                     PnDcp_Block_DevicePropertiesDeviceVendor block = (PnDcp_Block_DevicePropertiesDeviceVendor) blocks.get(DEVICE_TYPE_NAME);
-                                                    deviceTypeName = new String(block.getDeviceVendorValue());
+                                                    deviceTypeName = new String(block.getDeviceVendorValue()).replace(" ", "_");
                                                 }
 
                                                 String deviceName = "unknown";
                                                 if (blocks.containsKey(DEVICE_NAME_OF_STATION)) {
                                                     PnDcp_Block_DevicePropertiesNameOfStation block = (PnDcp_Block_DevicePropertiesNameOfStation) blocks.get(DEVICE_NAME_OF_STATION);
-                                                    deviceName = new String(block.getNameOfStation());
+                                                    deviceName = new String(block.getNameOfStation()).replace(" ", "_");
                                                 }
 
                                                 String role = "unknown";