You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/05/28 14:10:36 UTC

[plc4x] branch feature/c-code-generation updated: - Fixed a bug in the name generation (first letter was uppercase)

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

cdutz pushed a commit to branch feature/c-code-generation
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/feature/c-code-generation by this push:
     new 46e374a  - Fixed a bug in the name generation (first letter was uppercase)
46e374a is described below

commit 46e374a0c47708a1422b4042209a8b3e5a323462
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu May 28 16:10:29 2020 +0200

    - Fixed a bug in the name generation (first letter was uppercase)
---
 .../plc4x/language/c/CLanguageTemplateHelper.java   |  9 +++++----
 .../s7/includes/{Cotp_packet.h => cotp_packet.h}    |  2 +-
 ...n_request.h => cotp_packet_connection_request.h} |  4 ++--
 ...response.h => cotp_packet_connection_response.h} |  4 ++--
 .../{Cotp_packet_data.h => cotp_packet_data.h}      |  2 +-
 ...t_request.h => cotp_packet_disconnect_request.h} |  4 ++--
 ...response.h => cotp_packet_disconnect_response.h} |  2 +-
 ...packet_tpdu_error.h => cotp_packet_tpdu_error.h} |  2 +-
 .../includes/{Cotp_parameter.h => cotp_parameter.h} |  0
 ...r_called_tsap.h => cotp_parameter_called_tsap.h} |  0
 ...calling_tsap.h => cotp_parameter_calling_tsap.h} |  0
 ...rameter_checksum.h => cotp_parameter_checksum.h} |  0
 ...p_parameter_disconnect_additional_information.h} |  0
 ...meter_tpdu_size.h => cotp_parameter_tpdu_size.h} |  2 +-
 ...{Cotp_protocol_class.h => cotp_protocol_class.h} |  0
 .../includes/{Cotp_tpdu_size.h => cotp_tpdu_size.h} |  0
 .../s7/includes/{Tpkt_packet.h => tpkt_packet.h}    |  2 +-
 .../s7/src/Cotp_packet_disconnect_response.c        | 21 ---------------------
 .../s7/src/Cotp_parameter_called_tsap.c             | 21 ---------------------
 .../s7/src/Cotp_parameter_calling_tsap.c            | 21 ---------------------
 .../s7/src/Cotp_parameter_checksum.c                | 21 ---------------------
 ...tp_parameter_disconnect_additional_information.c | 21 ---------------------
 .../s7/src/Cotp_parameter_tpdu_size.c               | 21 ---------------------
 .../s7/src/{Tpkt_packet.c => cotp_packet.c}         |  2 +-
 ...t_request.c => cotp_packet_connection_request.c} |  2 +-
 ...response.c => cotp_packet_connection_response.c} |  2 +-
 .../src/{Cotp_packet_data.c => cotp_packet_data.c}  |  2 +-
 ...n_request.c => cotp_packet_disconnect_request.c} |  2 +-
 ...response.c => cotp_packet_disconnect_response.c} |  2 +-
 ...packet_tpdu_error.c => cotp_packet_tpdu_error.c} |  2 +-
 .../s7/src/{Cotp_parameter.c => cotp_parameter.c}   |  2 +-
 ...et_tpdu_error.c => cotp_parameter_called_tsap.c} |  2 +-
 ...t_tpdu_error.c => cotp_parameter_calling_tsap.c} |  2 +-
 ...acket_tpdu_error.c => cotp_parameter_checksum.c} |  2 +-
 ...p_parameter_disconnect_additional_information.c} |  2 +-
 ...cket_tpdu_error.c => cotp_parameter_tpdu_size.c} |  2 +-
 .../s7/src/{Cotp_packet.c => tpkt_packet.c}         |  2 +-
 37 files changed, 31 insertions(+), 156 deletions(-)

diff --git a/build-utils/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java b/build-utils/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
index 4eaeee7..55b1506 100644
--- a/build-utils/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
+++ b/build-utils/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
@@ -107,20 +107,21 @@ public class CLanguageTemplateHelper implements FreemarkerLanguageTemplateHelper
         StringBuilder snakeCase = new StringBuilder();
         final char[] chars = camelCase.toCharArray();
         for(int i = 0; i < chars.length; i++) {
+            String lowerCaseChar = String.valueOf(chars[i]).toLowerCase();
             // If the previous letter is a lowercase letter and this one is uppercase, create a new snake-segment.
             if ((i > 0) && !Character.isUpperCase(chars[i - 1]) && Character.isUpperCase(chars[i])) {
-                snakeCase.append('_').append(String.valueOf(chars[i]).toLowerCase());
+                snakeCase.append('_').append(lowerCaseChar);
             }
             else if((i < (chars.length - 2)) && Character.isUpperCase(chars[i]) && !Character.isUpperCase(chars[i + 1])) {
-                snakeCase.append('_').append(String.valueOf(chars[i]).toLowerCase());
+                snakeCase.append('_').append(lowerCaseChar);
             }
             // If this is uppercase and the previous one is too ... just make this letter lowercase.
             else if ((i > 0) && Character.isUpperCase(chars[i - 1]) && Character.isUpperCase(chars[i])) {
-                snakeCase.append(String.valueOf(chars[i]).toLowerCase());
+                snakeCase.append(lowerCaseChar);
             } else if (chars[i] == '-') {
                 snakeCase.append("_");
             } else {
-                snakeCase.append(chars[i]);
+                snakeCase.append(lowerCaseChar);
             }
         }
         // If the first letter was a capital letter, the string will start with a "_".
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet.h
similarity index 97%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet.h
index ebeb6cb..82559bb 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet.h
@@ -25,7 +25,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
 
 struct plc4c_s7_read_write_cotp_packet {
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_connection_request.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_connection_request.h
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_connection_request.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet_connection_request.h
index 7606630..90b012e 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_connection_request.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_connection_request.h
@@ -25,9 +25,9 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
-#include "Cotp_protocol_class.h"
+#include "cotp_protocol_class.h"
 
 struct plc4c_s7_read_write_cotp_packet_connection_request {
   plc4c_list parameters;
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_connection_response.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_connection_response.h
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_connection_response.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet_connection_response.h
index 0af3c1e..907c748 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_connection_response.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_connection_response.h
@@ -25,9 +25,9 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
-#include "Cotp_protocol_class.h"
+#include "cotp_protocol_class.h"
 
 struct plc4c_s7_read_write_cotp_packet_connection_response {
   plc4c_list parameters;
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_data.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_data.h
similarity index 97%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_data.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet_data.h
index 132084e..206c2f7 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_data.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_data.h
@@ -25,7 +25,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
 
 struct plc4c_s7_read_write_cotp_packet_data {
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_disconnect_request.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_disconnect_request.h
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_disconnect_request.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet_disconnect_request.h
index 42b70d8..1e06a01 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_disconnect_request.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_disconnect_request.h
@@ -25,9 +25,9 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
-#include "Cotp_protocol_class.h"
+#include "cotp_protocol_class.h"
 
 struct plc4c_s7_read_write_cotp_packet_disconnect_request {
   plc4c_list parameters;
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_disconnect_response.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_disconnect_response.h
similarity index 98%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_disconnect_response.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet_disconnect_response.h
index 9fde9cd..ca3aeb8 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_disconnect_response.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_disconnect_response.h
@@ -25,7 +25,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
 
 struct plc4c_s7_read_write_cotp_packet_disconnect_response {
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_tpdu_error.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_tpdu_error.h
similarity index 98%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_tpdu_error.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_packet_tpdu_error.h
index 90b37e8..fe29df5 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_packet_tpdu_error.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_packet_tpdu_error.h
@@ -25,7 +25,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 #include "s7_message.h"
 
 struct plc4c_s7_read_write_cotp_packet_tpdu_error {
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_parameter.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_called_tsap.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_called_tsap.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_called_tsap.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_called_tsap.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_calling_tsap.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_calling_tsap.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_calling_tsap.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_calling_tsap.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_checksum.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_checksum.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_checksum.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_checksum.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_disconnect_additional_information.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_disconnect_additional_information.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_disconnect_additional_information.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_disconnect_additional_information.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_tpdu_size.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_tpdu_size.h
similarity index 97%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_tpdu_size.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_tpdu_size.h
index 8834a5a..5c709d5 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Cotp_parameter_tpdu_size.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/cotp_parameter_tpdu_size.h
@@ -25,7 +25,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_tpdu_size.h"
+#include "cotp_tpdu_size.h"
 
 struct plc4c_s7_read_write_cotp_parameter_tpdu_size {
   plc4c_s7_read_write_cotp_tpdu_size tpdu_size;
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_protocol_class.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_protocol_class.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_protocol_class.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_protocol_class.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Cotp_tpdu_size.h b/sandbox/plc4c/generated-sources/s7/includes/cotp_tpdu_size.h
similarity index 100%
rename from sandbox/plc4c/generated-sources/s7/includes/Cotp_tpdu_size.h
rename to sandbox/plc4c/generated-sources/s7/includes/cotp_tpdu_size.h
diff --git a/sandbox/plc4c/generated-sources/s7/includes/Tpkt_packet.h b/sandbox/plc4c/generated-sources/s7/includes/tpkt_packet.h
similarity index 98%
rename from sandbox/plc4c/generated-sources/s7/includes/Tpkt_packet.h
rename to sandbox/plc4c/generated-sources/s7/includes/tpkt_packet.h
index 25f6e27..7037796 100644
--- a/sandbox/plc4c/generated-sources/s7/includes/Tpkt_packet.h
+++ b/sandbox/plc4c/generated-sources/s7/includes/tpkt_packet.h
@@ -25,7 +25,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdint.h>
 #include <plc4c/utils/list.h>
-#include "Cotp_packet.h"
+#include "cotp_packet.h"
 
 struct plc4c_s7_read_write_tpkt_packet {
   plc4c_s7_read_write_cotp_packet payload;
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_disconnect_response.c b/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_disconnect_response.c
deleted file mode 100644
index e4b3afe..0000000
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_disconnect_response.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-*/
-
-#include "Cotp_packet_disconnect_response.h"
-
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_called_tsap.c b/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_called_tsap.c
deleted file mode 100644
index cf8dbc1..0000000
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_called_tsap.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-*/
-
-#include "Cotp_parameter_called_tsap.h"
-
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_calling_tsap.c b/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_calling_tsap.c
deleted file mode 100644
index 1d26ee8..0000000
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_calling_tsap.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-*/
-
-#include "Cotp_parameter_calling_tsap.h"
-
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_checksum.c b/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_checksum.c
deleted file mode 100644
index 0cfbe42..0000000
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_checksum.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-*/
-
-#include "Cotp_parameter_checksum.h"
-
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_disconnect_additional_information.c b/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_disconnect_additional_information.c
deleted file mode 100644
index e0224a4..0000000
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_disconnect_additional_information.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-*/
-
-#include "Cotp_parameter_disconnect_additional_information.h"
-
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_tpdu_size.c b/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_tpdu_size.c
deleted file mode 100644
index eca4486..0000000
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter_tpdu_size.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-*/
-
-#include "Cotp_parameter_tpdu_size.h"
-
diff --git a/sandbox/plc4c/generated-sources/s7/src/Tpkt_packet.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet.c
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/src/Tpkt_packet.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_packet.c
index 7cbb2d2..b6c30e5 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Tpkt_packet.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Tpkt_packet.h"
+#include "cotp_packet.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_disconnect_request.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_connection_request.c
similarity index 94%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_disconnect_request.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_packet_connection_request.c
index 6760fdd..a2e1d41 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_disconnect_request.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_connection_request.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_disconnect_request.h"
+#include "cotp_packet_connection_request.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_connection_response.c
similarity index 94%
copy from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c
copy to sandbox/plc4c/generated-sources/s7/src/cotp_packet_connection_response.c
index d9f3a5b..ef5cc2f 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_connection_response.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_connection_response.h"
+#include "cotp_packet_connection_response.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_data.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_data.c
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_data.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_packet_data.c
index 6d4cac2..672adad 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_data.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_data.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_data.h"
+#include "cotp_packet_data.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_request.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_disconnect_request.c
similarity index 94%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_request.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_packet_disconnect_request.c
index 07fe07c..84edb56 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_request.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_disconnect_request.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_connection_request.h"
+#include "cotp_packet_disconnect_request.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_disconnect_response.c
similarity index 94%
copy from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c
copy to sandbox/plc4c/generated-sources/s7/src/cotp_packet_disconnect_response.c
index d9f3a5b..9cbae13 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_disconnect_response.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_connection_response.h"
+#include "cotp_packet_disconnect_response.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_tpdu_error.c
similarity index 95%
copy from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
copy to sandbox/plc4c/generated-sources/s7/src/cotp_packet_tpdu_error.c
index bb3aacc..0980d1c 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_packet_tpdu_error.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_tpdu_error.h"
+#include "cotp_packet_tpdu_error.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter.c b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter.c
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_parameter.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_parameter.c
index 3e185ce..c51bd35 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_parameter.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_parameter.h"
+#include "cotp_parameter.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_called_tsap.c
similarity index 95%
copy from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
copy to sandbox/plc4c/generated-sources/s7/src/cotp_parameter_called_tsap.c
index bb3aacc..f365666 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_called_tsap.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_tpdu_error.h"
+#include "cotp_parameter_called_tsap.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_calling_tsap.c
similarity index 95%
copy from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
copy to sandbox/plc4c/generated-sources/s7/src/cotp_parameter_calling_tsap.c
index bb3aacc..216f1c8 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_calling_tsap.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_tpdu_error.h"
+#include "cotp_parameter_calling_tsap.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_checksum.c
similarity index 95%
copy from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
copy to sandbox/plc4c/generated-sources/s7/src/cotp_parameter_checksum.c
index bb3aacc..ee31356 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_checksum.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_tpdu_error.h"
+#include "cotp_parameter_checksum.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_disconnect_additional_information.c
similarity index 92%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_parameter_disconnect_additional_information.c
index d9f3a5b..354e39d 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_connection_response.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_disconnect_additional_information.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_connection_response.h"
+#include "cotp_parameter_disconnect_additional_information.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_tpdu_size.c
similarity index 95%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
rename to sandbox/plc4c/generated-sources/s7/src/cotp_parameter_tpdu_size.c
index bb3aacc..4badf5a 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet_tpdu_error.c
+++ b/sandbox/plc4c/generated-sources/s7/src/cotp_parameter_tpdu_size.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet_tpdu_error.h"
+#include "cotp_parameter_tpdu_size.h"
 
diff --git a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet.c b/sandbox/plc4c/generated-sources/s7/src/tpkt_packet.c
similarity index 96%
rename from sandbox/plc4c/generated-sources/s7/src/Cotp_packet.c
rename to sandbox/plc4c/generated-sources/s7/src/tpkt_packet.c
index 296b2db..7da6d5f 100644
--- a/sandbox/plc4c/generated-sources/s7/src/Cotp_packet.c
+++ b/sandbox/plc4c/generated-sources/s7/src/tpkt_packet.c
@@ -17,5 +17,5 @@
   under the License.
 */
 
-#include "Cotp_packet.h"
+#include "tpkt_packet.h"