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 2023/02/11 07:22:00 UTC

[plc4x] branch develop updated: fix(plc4x/opcua): remove annoying debug messages in xslt files

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 99e234f99f fix(plc4x/opcua): remove annoying debug messages in xslt files
99e234f99f is described below

commit 99e234f99ff0fa299691b0a7861b1044728703a6
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Sat Feb 11 08:18:31 2023 +0100

    fix(plc4x/opcua): remove annoying debug messages in xslt files
---
 protocols/opcua/src/main/xslt/opc-common.xsl | 14 --------------
 protocols/opcua/src/main/xslt/opc-manual.xsl |  1 -
 2 files changed, 15 deletions(-)

diff --git a/protocols/opcua/src/main/xslt/opc-common.xsl b/protocols/opcua/src/main/xslt/opc-common.xsl
index 89e31ee5f7..b4898480dd 100644
--- a/protocols/opcua/src/main/xslt/opc-common.xsl
+++ b/protocols/opcua/src/main/xslt/opc-common.xsl
@@ -67,7 +67,6 @@
             <xsl:when test="$originaldoc/opc:TypeDictionary/opc:StructuredType[@Name=$browseName] != ''"><xsl:text>
         </xsl:text>['"<xsl:value-of select="number(substring(@NodeId,3)) + 2"/><xsl:text>"' </xsl:text><xsl:value-of select='$objectTypeId'/><xsl:text>
             </xsl:text>
-                <xsl:message><xsl:value-of select="serialize($originaldoc/opc:TypeDictionary/opc:StructuredType[@Name=$browseName])"/></xsl:message>
                 <xsl:call-template name="plc4x:parseFields">
                     <xsl:with-param name="baseNode" select="$originaldoc/opc:TypeDictionary/opc:StructuredType[@Name=$browseName]"/>
                     <xsl:with-param name="servicesRoot" select="$servicesRoot"/>
@@ -268,7 +267,6 @@
         <xsl:param name="datatype"/>
         <xsl:param name="name"/>
         <xsl:param name="switchField"/>
-        <xsl:message>[INFO] Getting Mspec type for <xsl:value-of select="$name"/>></xsl:message>
         <xsl:choose>
             <xsl:when test="starts-with($name, 'reserved')">reserved</xsl:when>
             <xsl:when test="$switchField != ''">optional</xsl:when>
@@ -355,7 +353,6 @@
     <xsl:function name="plc4x:getDataTypeLength" as="xs:integer">
         <xsl:param name="lengthMap" as="map(xs:string, xs:int)"/>
         <xsl:param name="datatype"/>
-        <xsl:message>[DEBUG] Getting length of <xsl:value-of select="xs:string($datatype/[@TypeName])"/></xsl:message>
         <xsl:choose>
             <xsl:when test="map:contains($lengthMap, xs:string($datatype/[@TypeName]))">
                 <xsl:message>[DEBUG] Bit Length <xsl:value-of select="$lengthMap(xs:string($datatype/[@TypeName]))"/></xsl:message>
@@ -380,18 +377,11 @@
         <xsl:param name="currentNodePosition" as="xs:int"/>
         <xsl:param name="currentBitPosition" as="xs:int"/>
         <xsl:param name="currentBytePosition" as="xs:int"/>
-        <xsl:message>[DEBUG] Recursively rearranging bit order in nodes,  Position - <xsl:value-of select="$currentNodePosition"/>, Bit Position - <xsl:value-of select="$currentBitPosition"/>, Byte Position - <xsl:value-of select="$currentBytePosition"/></xsl:message>
-        <xsl:for-each select="$baseNode/opc:Field">
-            <xsl:message>[DEBUG] <xsl:value-of select="position()"/> - <xsl:value-of select="@TypeName"/></xsl:message>
-        </xsl:for-each>
         <xsl:choose>
             <xsl:when test="$currentNodePosition > count($baseNode/opc:Field)">
-                <xsl:message>Node Position - <xsl:value-of select="$currentNodePosition"/></xsl:message>
-                <xsl:message>Bit Position - <xsl:value-of select="$currentBitPosition"/></xsl:message>
                 <xsl:choose>
                     <xsl:when test="$currentBitPosition != 0">
                         <!-- Add a reserved field if we are halfway through a Byte.  -->
-                        <xsl:message>[DEBUG] Adding a reserved field</xsl:message>
                         <xsl:call-template name="plc4x:parseFields">
                             <xsl:with-param name="baseNode">
                                 <xsl:copy-of select="$baseNode/opc:Field[position() lt ($currentNodePosition - $currentBytePosition)]"/>
@@ -428,7 +418,6 @@
                         <xsl:choose>
                             <xsl:when test="$currentBitPosition=0">
                                 <!-- Put node into current position -->
-                                <xsl:message>[DEBUG] First Bit in Byte</xsl:message>
                                 <xsl:call-template name="plc4x:parseFields">
                                     <xsl:with-param name="baseNode">
                                         <xsl:copy-of select="$baseNode/opc:Field"/>
@@ -447,7 +436,6 @@
                             </xsl:when>
                             <xsl:otherwise>
                                 <!-- Put node into correct position based on bit and byte position -->
-                                <xsl:message>[DEBUG] Additional Bit in Byte</xsl:message>
                                 <xsl:call-template name="plc4x:parseFields">
                                     <xsl:with-param name="baseNode">
                                         <xsl:copy-of select="$baseNode/opc:Field[position() lt ($currentNodePosition - $currentBytePosition)]"/>
@@ -473,7 +461,6 @@
                         <xsl:choose>
                             <xsl:when test="$currentBitPosition != 0 and $currentBitPosition lt 8">
                                 <!-- Add a reserved field if we are halfway through a Byte.  -->
-                                <xsl:message>[DEBUG] Adding a reserved field</xsl:message>
                                 <xsl:call-template name="plc4x:parseFields">
                                     <xsl:with-param name="baseNode">
                                         <xsl:copy-of select="$baseNode/opc:Field[position() lt ($currentNodePosition - $currentBytePosition)]"/>
@@ -498,7 +485,6 @@
                             </xsl:when>
                             <xsl:otherwise>
                                 <!-- Put node into current position -->
-                                <xsl:message>[DEBUG] not a bit data type, just leave it in it's place</xsl:message>
                                 <xsl:call-template name="plc4x:parseFields">
                                     <xsl:with-param name="baseNode">
                                         <xsl:copy-of select="$baseNode/opc:Field"/>
diff --git a/protocols/opcua/src/main/xslt/opc-manual.xsl b/protocols/opcua/src/main/xslt/opc-manual.xsl
index 4df879dcb9..cbccf7f90f 100644
--- a/protocols/opcua/src/main/xslt/opc-manual.xsl
+++ b/protocols/opcua/src/main/xslt/opc-manual.xsl
@@ -177,7 +177,6 @@
         ]
 
         <xsl:for-each select="/opc:TypeDictionary/opc:StructuredType[(@BaseType = 'ua:ExtensionObject') and not(@Name = 'UserIdentityToken') and not(@Name = 'PublishedDataSetDataType') and not(@Name = 'DataSetReaderDataType')]">
-            <xsl:message><xsl:value-of select="@Name"/></xsl:message>
             <xsl:variable name="extensionName" select="@Name"/>
             <xsl:apply-templates select="$file/node:UANodeSet/node:UADataType[@BrowseName=$extensionName]"/>
         </xsl:for-each>