Преглед на файлове

Cleanup: Removed some trace output, ciptypes.h compiles standalone for Posix

Removed trace output from cipdlr.c and cipethernetlink.c that printed the
current get_bit_mask during a GetAttribute request. Now the getAttribute
message is printed as expected from cipethernetlink.c again.

Adding the include file <netinet/in.h> in POSIX/platform_network_includes.h
lets us include ciptypes.h alone in a C source module because it doesn't
lack the declaration for struct sockaddr and struct sockaddr_in any more.

Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Stefan Mätje преди 6 години
родител
ревизия
b6a9710675
променени са 3 файла, в които са добавени 2 реда и са изтрити 5 реда
  1. 0 2
      source/src/cip/cipdlr.c
  2. 1 2
      source/src/cip/cipethernetlink.c
  3. 1 1
      source/src/ports/POSIX/platform_network_includes.h

+ 0 - 2
source/src/cip/cipdlr.c

@@ -131,8 +131,6 @@ static EipStatus GetAttributeSingleDlr(
                                                                  attribute_number)
                       ]);
     }
-    OPENER_TRACE_INFO ("Service %" PRIu8 ", get_bit_mask=%02" PRIX8 "\n",
-                       message_router_request->service, get_bit_mask);
     if ( 0 != ( get_bit_mask & ( 1 << (attribute_number % 8) ) ) ) {
       /* create a reply message containing the data*/
       bool use_common_handler;

+ 1 - 2
source/src/cip/cipethernetlink.c

@@ -395,8 +395,6 @@ EipStatus GetAttributeSingleEthernetLink(
                                                                  attribute_number)
                       ]);
     }
-    OPENER_TRACE_INFO ("Service %" PRIu8 ", get_bit_mask=%02" PRIX8 "\n",
-                       message_router_request->service, get_bit_mask);
     if ( 0 != ( get_bit_mask & ( 1 << (attribute_number % 8) ) ) ) {
 
       /* create a reply message containing the data*/
@@ -407,6 +405,7 @@ EipStatus GetAttributeSingleEthernetLink(
       case 6: /* fall through */
       case 11:
         use_common_handler = false;
+        OPENER_TRACE_INFO("getAttribute %d\n", attribute_number);
         break;
       default:
         use_common_handler = true;

+ 1 - 1
source/src/ports/POSIX/platform_network_includes.h

@@ -3,4 +3,4 @@
  * All rights reserved.
  *
  ******************************************************************************/
-
+#include <netinet/in.h>