Переглянути джерело

cleaning and simplifying the codebase.
removed empty headers/longtime-unused source files.

Julius Pfrommer 11 роки тому
батько
коміт
e1aa54a4ee

+ 0 - 7
include/UA_abbr.h

@@ -1,7 +0,0 @@
-#ifndef UA_ABBR_H_
-#define UA_ABBR_H_
-
-
-
-#endif /* UA_ABBR_H_ */
-

+ 0 - 12
include/UA_config.h

@@ -1,12 +0,0 @@
-#ifndef UA_CONFIG_H_
-#define UA_CONFIG_H_
-
-//TODO: include all other header files
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "opcua.h"
-#include "UA_abbr.h"
-
-
-#endif /* UA_CONFIG_H_ */

+ 0 - 7
src/UA_connection.h

@@ -1,10 +1,3 @@
-/*
- * opcua_connectionHelper.h
- *
- *  Created on: Jan 13, 2014
- *      Author: opcua
- */
-
 #ifndef OPCUA_CONNECTIONHELPER_H_
 #define OPCUA_CONNECTIONHELPER_H_
 #include "opcua.h"

+ 0 - 9
src/UA_stack.c

@@ -1,10 +1,3 @@
-/*c
- * UA_stack.c
- *
- *  Created on: 04.04.2014
- *      Author: mrt
- */
-
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -29,8 +22,6 @@ UA_TL_Description UA_TransportLayerDescriptorTcpBinary  = {
 // TODO: do we really need a variable global to the module?
 UA_TL_data theTL;
 
-
-
 /** the tcp reader thread **/
 void* UA_TL_TCP_reader(void *p) {
 	UA_TL_connection* c = (UA_TL_connection*) p;

+ 1 - 8
src/UA_stackInternalTypes.c

@@ -1,12 +1,5 @@
-/*
- * opcua_stackInternalTypes.c
- *
- *  Created on: Mar 24, 2014
- *      Author: opcua
- */
-
-
 #include "UA_stackInternalTypes.h"
+
 UA_Int32 UA_MessageType_calcSize(UA_MessageType const * ptr){
 	if(ptr==UA_NULL){return sizeof(UA_MessageType);}
 	return 0

+ 6 - 18
src/UA_stackInternalTypes.h

@@ -1,36 +1,25 @@
-/*
- * opcua_stackInternalTypes.h
- *
- *  Created on: Mar 24, 2014
- *      Author: opcua
- */
-
-
 #ifndef OPCUA_STACKINTERNALTYPES_H_
 #define OPCUA_STACKINTERNALTYPES_H_
 
-#include "UA_config.h"
 #include "opcua.h"
 
-
 static const UA_Int32 SL_HEADER_LENGTH = 0;
+
 /* Enums */
-typedef enum
-{
+typedef enum {
 	UA_SECURITYTOKEN_ISSUE = 0,
 	UA_SECURITYTOKEN_RENEW = 1
-}SecurityTokenRequestType;
+} SecurityTokenRequestType;
 
-typedef enum
-{
+typedef enum {
 	UA_SECURITYMODE_INVALID = 0,
 	UA_SECURITYMODE_SIGN = 1,
 	UA_SECURITYMODE_SIGNANDENCRYPT = 2
 
 } securityMode;
+
 /* Structures */
-typedef struct T_SL_Response
-{
+typedef struct T_SL_Response {
 	UA_UInt32 serverProtocolVersion;
 	UA_ChannelSecurityToken securityToken;
 	UA_String serverNonce;
@@ -154,5 +143,4 @@ UA_Int32 UA_SecureConversationMessageAbortBody_decode(UA_Byte const * src, UA_In
 UA_Int32 UA_SecureConversationMessageAbortBody_delete(UA_SecureConversationMessageAbortBody* p);
 UA_Int32 UA_SecureConversationMessageAbortBody_deleteMembers(UA_SecureConversationMessageAbortBody* p);
 
-
 #endif

+ 0 - 8
src/opcua_basictypes.c

@@ -1,16 +1,9 @@
-/*
- * opcua_basictypes.c
- *
- *  Created on: 13.03.2014
- *      Author: mrt
- */
 #include <stdio.h>	// printf
 #include <stdlib.h>	// alloc, free
 #include <string.h>
 #include "opcua.h"
 #include "opcua_basictypes.h"
 
-
 UA_Int32 UA_encode(void* const data, UA_Int32 *pos, UA_Int32 type, UA_Byte* dst) {
 	return UA_[type].encode(data,pos,dst);
 }
@@ -24,7 +17,6 @@ UA_Int32 UA_calcSize(void* const data, UA_UInt32 type) {
 }
 
 UA_Int32 UA_Array_calcSize(UA_Int32 nElements, UA_Int32 type, void const ** const data) {
-
 	int length = sizeof(UA_Int32);
 	int i;
 

+ 0 - 25
src/opcua_linkedList.h

@@ -1,25 +0,0 @@
-/*
- * opcua_linkedList.h
- *
- *  Created on: Feb 5, 2014
- *      Author: opcua
- */
-
-#ifndef OPCUA_LINKEDLIST_H_
-#define OPCUA_LINKEDLIST_H_
-
-#include "opcua_advancedDatatypes.h";
-#include "opcua_types.h"
-#include "opcua_builtInDatatypes.h";
-
-typedef struct T_element
-{
-   UA_ByteString *binaryData;
-   int(*serviceImplementation)(UA_ByteString *data, UA_ByteString *response);
-   struct T_linkedList * next;
-};
-
-typedef struct T_element element;
-
-#endif /* OPCUA_LINKEDLIST_H_ */
-

+ 0 - 7
src/opcua_secureLayer.c

@@ -1,9 +1,3 @@
-/*
- * opcua_secureChannelLayer.c
- *
- *  Created on: Jan 13, 2014
- *      Author: opcua
- */
 #include <stdio.h>
 #include <memory.h> // memcpy
 #include "opcua.h"
@@ -14,7 +8,6 @@
 #define SIZE_SECURECHANNEL_HEADER 12
 #define SIZE_SEQHEADER_HEADER 8
 
-
 UA_Int32 SL_send(UA_SL_Channel* channel, UA_ByteString const * responseMessage, UA_Int32 type) {
 	UA_UInt32 sequenceNumber;
 	UA_UInt32 requestId;

+ 2 - 21
src/opcua_secureLayer.h

@@ -1,32 +1,13 @@
-/*
- * opcua_secureChannelLayer.h
- *
- *  Created on: Dec 19, 2013
- *      Author: opcua
- */
 #ifndef OPCUA_SECURECHANNELLAYER_H_
 #define OPCUA_SECURECHANNELLAYER_H_
 #include "opcua.h"
 #include "UA_connection.h"
-#include "../include/UA_config.h"
 #include "UA_stackInternalTypes.h"
-/*
-*
-* @param connection
-* @return
-*/
-UA_Int32 SL_initConnectionObject(UA_SL_Channel *connection);
 
-/**
-*
-* @param connection
-* @param response
-* @param sizeInOut
-* @return
-*/
+UA_Int32 SL_initConnectionObject(UA_SL_Channel *connection);
 UA_Int32 SL_openSecureChannel_responseMessage_get(UA_SL_Channel *connection,
 UA_SL_Response *response, UA_Int32* sizeInOut);
-
 UA_Int32 UA_SL_process(UA_SL_Channel* channel, UA_ByteString* msg, UA_Int32* pos);
 UA_Int32 UA_SL_Channel_new(UA_TL_connection *connection, UA_ByteString* msg, UA_Int32* pos);
+
 #endif /* OPCUA_SECURECHANNELLAYER_H_ */

+ 0 - 19
src/opcua_serializationLayer.c

@@ -1,19 +0,0 @@
-/*
- * opcua_serializationLayer.c
- *
- *  Created on: Feb 5, 2014
- *      Author: opcua
- */
-#include "opcua_serializationLayer.h"
-
-serviceManager_registerServiceImplementation()
-{
-
-}
-serviceManager(UA_Int32 serviceRequest)
-{
-	if(serviceManager_serviceAvailable(serviceRequest))
-	{
-
-	}
-}

+ 0 - 13
src/opcua_serializationLayer.h

@@ -1,13 +0,0 @@
-/*
- * opcua_serializationLayer.h
- *
- *  Created on: Dec 19, 2013
- *      Author: opcua
- */
-
-#ifndef OPCUA_SERIALIZATIONLAYER_H_
-#define OPCUA_SERIALIZATIONLAYER_H_
-
-
-
-#endif /* OPCUA_SERIALIZATIONLAYER_H_ */

+ 0 - 28
src/opcua_serverAPI.h

@@ -1,28 +0,0 @@
-/*
- * opcua_serverAPI.h
- *
- *  Created on: Jan 10, 2014
- *      Author: opcua
- */
-
-#ifndef OPCUA_SERVERAPI_H_
-#define OPCUA_SERVERAPI_H_
-
-// startServer(parameters)
-
-// stopServer(parameters)
-
-
-
-
-// registerServiceCallback(NodeTypeIde,)
-// sessionId = AcceptSecureChannel()
-
-// serviceRequest = receiveServiceRequest(sessionId)
-
-// sendServiceResponse(sessionId, serviceResponse)
-
-// closeSecureChannel(sessionId)
-
-
-#endif /* OPCUA_SERVERAPI_H_ */

+ 0 - 6
src/opcua_transportLayer.c

@@ -1,9 +1,3 @@
-/*
- * opcua_transportLayer.c
- *
- *  Created on: Dec 19, 2013
- *      Author: opcua
- */
 #include <memory.h> // memset, memcpy
 #include "UA_stack.h"
 #include "UA_connection.h"

+ 0 - 2
src/opcua_transportLayer.h

@@ -14,8 +14,6 @@
 #include "UA_connection.h"
 #include "UA_stackInternalTypes.h"
 
-//TODO : Implement this interface
-#include "tcp_layer.h"
 /*------------------Defined Error Codes------------------*/
 //transport errors begin at 1000
 #define UA_ERROR_MULTIPLE_HEL 1000

+ 0 - 11
src/tcp_layer.c

@@ -1,11 +0,0 @@
-/*
- * tcp_layer.c
- *
- *  Created on: Feb 18, 2014
- *      Author: opcua
- */
-
-
-#include "tcp_layer.h"
-
-

+ 0 - 25
src/tcp_layer.h

@@ -1,25 +0,0 @@
-/*
- * tcp_layer.h
- *
- *  Created on: Jan 10, 2014
- *      Author: opcua
- */
-
-#ifndef TCP_LAYER_H_
-#define TCP_LAYER_H_
-#include "UA_connection.h"
-#ifdef LINUX
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <sys/socketvar.h>
-
-#endif
-/*
- * returns the length of read bytes
- */
-
-
-
-#endif /* TCP_LAYER_H_ */

+ 0 - 1
src/util/UA_indexedList.c

@@ -1,4 +1,3 @@
-#include "UA_config.h"
 #include "UA_indexedList.h"
 
 void UA_indexedList_defaultFreer(void* payload){

+ 0 - 1
src/util/UA_list.c

@@ -1,4 +1,3 @@
-#include "UA_config.h"
 #include "UA_list.h"
 
 void UA_list_defaultFreer(void* payload){