Browse Source

changed folder structure

FlorianPalm 11 years ago
parent
commit
5c3d5e28a1

+ 5 - 3
OPCUAServer/Makefile.am

@@ -1,5 +1,7 @@
 if HAVE_CHECK
-    SUBDIRS=src . tests
+    SUBS=src . tests .
 else 
-    SUBDIRS=src .
-endif	
+    SUBS=src .
+endif
+
+SUBDIRS = $(SUBS) examples/src	

+ 1 - 1
OPCUAServer/configure.ac

@@ -21,6 +21,6 @@ AM_COND_IF([TARGET_LINUX],
     AC_DEFINE([LINUX]))
 AC_PROG_LIBTOOL
 AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile)
+AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile examples/src/Makefile)
 AC_OUTPUT
 

+ 3 - 3
OPCUAServer/src/Makefile.am

@@ -20,8 +20,8 @@
 #					  opcua_transportLayer.h\
 #					  opcua_advancedDatatypes.h\
 #					  opcua_connectionHelper.h	
-lib_LTLIBRARIES = libOpen62541.la
-libOpen62541_la_SOURCES = 	opcua_builtInDatatypes.c\
+noinst_LTLIBRARIES =$(top_builddir)/bin/libOpen62541.la
+__top_builddir__bin_libOpen62541_la_SOURCES = 	opcua_builtInDatatypes.c\
 						opcua_binaryEncDec.c\
 						opcua_transportLayer.c\
 						opcua_encodingLayer.c\
@@ -36,5 +36,5 @@ libOpen62541_la_SOURCES = 	opcua_builtInDatatypes.c\
 
 #bin_PROGRAMS= $(top_builddir)/bin/open62541.out
 #__top_builddir__bin_libOpen62541_out_SOURCES = opcuaServer.c
-__top_builddir__bin_libOpen62541_out_LADD = libOpen62541.la		  										
+#libOpen62541_la_LIBADD = ../lib/libOpen62541.la		  										
 

+ 36 - 83
OPCUAServer/src/Makefile.in

@@ -56,40 +56,14 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(libdir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libOpen62541_la_LIBADD =
-am_libOpen62541_la_OBJECTS = opcua_builtInDatatypes.lo \
-	opcua_binaryEncDec.lo opcua_transportLayer.lo \
-	opcua_encodingLayer.lo
-libOpen62541_la_OBJECTS = $(am_libOpen62541_la_OBJECTS)
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+__top_builddir__bin_libOpen62541_la_LIBADD =
+am___top_builddir__bin_libOpen62541_la_OBJECTS =  \
+	opcua_builtInDatatypes.lo opcua_binaryEncDec.lo \
+	opcua_transportLayer.lo opcua_encodingLayer.lo
+__top_builddir__bin_libOpen62541_la_OBJECTS =  \
+	$(am___top_builddir__bin_libOpen62541_la_OBJECTS)
+am__dirstamp = $(am__leading_dot)dirstamp
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -103,8 +77,8 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-SOURCES = $(libOpen62541_la_SOURCES)
-DIST_SOURCES = $(libOpen62541_la_SOURCES)
+SOURCES = $(__top_builddir__bin_libOpen62541_la_SOURCES)
+DIST_SOURCES = $(__top_builddir__bin_libOpen62541_la_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -236,8 +210,8 @@ top_srcdir = @top_srcdir@
 #					  opcua_transportLayer.h\
 #					  opcua_advancedDatatypes.h\
 #					  opcua_connectionHelper.h	
-lib_LTLIBRARIES = libOpen62541.la
-libOpen62541_la_SOURCES = opcua_builtInDatatypes.c\
+noinst_LTLIBRARIES = $(top_builddir)/bin/libOpen62541.la
+__top_builddir__bin_libOpen62541_la_SOURCES = opcua_builtInDatatypes.c\
 						opcua_binaryEncDec.c\
 						opcua_transportLayer.c\
 						opcua_encodingLayer.c\
@@ -250,10 +224,6 @@ libOpen62541_la_SOURCES = opcua_builtInDatatypes.c\
 						opcua_encodingLayer.h\
 						tcp_layer.h
 
-
-#bin_PROGRAMS= $(top_builddir)/bin/open62541.out
-#__top_builddir__bin_libOpen62541_out_SOURCES = opcuaServer.c
-__top_builddir__bin_libOpen62541_out_LADD = libOpen62541.la		  										
 all: all-am
 
 .SUFFIXES:
@@ -288,39 +258,20 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-	}
-
-uninstall-libLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-	done
 
-clean-libLTLIBRARIES:
-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
 	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
 	  test "$$dir" != "$$p" || dir=.; \
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
-libOpen62541.la: $(libOpen62541_la_OBJECTS) $(libOpen62541_la_DEPENDENCIES) $(EXTRA_libOpen62541_la_DEPENDENCIES) 
-	$(LINK) -rpath $(libdir) $(libOpen62541_la_OBJECTS) $(libOpen62541_la_LIBADD) $(LIBS)
+$(top_builddir)/bin/$(am__dirstamp):
+	@$(MKDIR_P) $(top_builddir)/bin
+	@: > $(top_builddir)/bin/$(am__dirstamp)
+$(top_builddir)/bin/libOpen62541.la: $(__top_builddir__bin_libOpen62541_la_OBJECTS) $(__top_builddir__bin_libOpen62541_la_DEPENDENCIES) $(EXTRA___top_builddir__bin_libOpen62541_la_DEPENDENCIES) $(top_builddir)/bin/$(am__dirstamp)
+	$(LINK)  $(__top_builddir__bin_libOpen62541_la_OBJECTS) $(__top_builddir__bin_libOpen62541_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -358,6 +309,7 @@ mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
+	-rm -rf $(top_builddir)/bin/.libs $(top_builddir)/bin/_libs
 	-rm -rf .libs _libs
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -446,9 +398,6 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(LTLIBRARIES)
 installdirs:
-	for dir in "$(DESTDIR)$(libdir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -475,13 +424,14 @@ clean-generic:
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(top_builddir)/bin/$(am__dirstamp)" || rm -f $(top_builddir)/bin/$(am__dirstamp)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
@@ -508,7 +458,7 @@ install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am: install-libLTLIBRARIES
+install-exec-am:
 
 install-html: install-html-am
 
@@ -548,24 +498,27 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-libLTLIBRARIES
+uninstall-am:
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libLTLIBRARIES clean-libtool ctags distclean \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
 	install install-am install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-libLTLIBRARIES
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
+#bin_PROGRAMS= $(top_builddir)/bin/open62541.out
+#__top_builddir__bin_libOpen62541_out_SOURCES = opcuaServer.c
+#libOpen62541_la_LIBADD = ../lib/libOpen62541.la		  										
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

+ 0 - 153
OPCUAServer/src/opcuaServer.c

@@ -1,153 +0,0 @@
-/*
- ============================================================================
- Name        : opcuaServer.c
- Author      :
- Version     :
- Copyright   : Your copyright notice
- Description :
- ============================================================================
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-
-
-#include "opcua_binaryEncDec.h"
-#include "opcua_builtInDatatypes.h"
-#include "opcua_transportLayer.h"
-#include "opcua_types.h"
-
-#ifdef LINUX
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-void server_init();
-void server_run();
-
-#endif
-
-int main(void)
-{
-
-#ifdef LINUX
-	server_init();
-	server_run();
-#endif
-
-	return EXIT_SUCCESS;
-
-}
-
-#ifdef LINUX
-
-void server_init()
-{
-	puts("starting demo Server");
-	//call listen
-
-}
-void server_run()
-{
-	int server_state = 0;
-	int recv_data = 0;
-	int send_data = 1;
-	int new_client = 2;
-	int new_request = 3;
-	char buf[8192];
-	struct sockaddr_in self;
-	int sockfd;
-	int clientfd;
-
-	struct sockaddr_in client_addr;
-	int addrlen=sizeof(client_addr);
-
-	//---Create streaming socket---
-    if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0 )
-	{
-    	puts("socket error");
-	}
-	bzero(&self, sizeof(self));
-	self.sin_family = AF_INET;
-	self.sin_port = htons(4840);
-	self.sin_addr.s_addr = htonl(INADDR_ANY);
-
-	if( bind(sockfd,(struct sockaddr *)&self , sizeof(self)) < 0)
-	{
-
-
-	   //Fehler bei bind()
-	 }
-
-	//---Make it a "listening socket"---
-	if ( listen(sockfd, 1) != 0 )
-	{
-		puts("listen error");
-	}
-	clientfd = accept(sockfd, (struct sockaddr*)&client_addr, &addrlen);
-	server_state = 0;
-	while(1)
-	{
-		//call recv (nonblocking)
-
-		//call TL_getPacketType
-
-		//if newData
-		//
-		UA_connection connection;
-		AD_RawMessage *rawMessage;
-		rawMessage->message = buf;
-		rawMessage->length = 0;
-		switch(server_state)
-		{
-
-			recv_data :
-			{
-
-				//call receive function
-				rawMessage->length = recv(sockfd,buf,8192,0);
-				if(rawMessage->length > 0)
-				{
-					server_state = new_client;
-				}
-				break;
-			}
-			send_data :
-			{
-				//call send function
-				break;
-			}
-			new_client :
-			{
-				if(connection.transportLayer.connectionState != connectionState_ESTABLISHED)
-				{
-					TL_open(connection,rawMessage);
-				}
-//			else
-//				{
-//					SL_open(connection,rawMessage);
-//
-//				}
-
-			}
-			new_request :
-			{
-
-
-				break;
-			}
-
-		}
-		//if newClient
-
-
-		//TL_processHELMessage(&connection,);
-
-		//--------
-		//call listen
-	}
-
-}
-
-#endif

+ 1 - 1
OPCUAServer/tests/Makefile.am

@@ -5,4 +5,4 @@ check_stack_SOURCES = check_stack.c $(top_builddir)/src/opcua_transportLayer.h\
 						$(top_builddir)/src/opcua_connectionHelper.h
 
 check_stack_CFLAGS = @CHECK_CFLAGS@
-check_stack_LDADD = $(top_builddir)/src/libOpen62541.la @CHECK_LIBS@
+check_stack_LDADD = $(top_builddir)/bin/libOpen62541.la @CHECK_LIBS@