Browse Source

harmonized nameing styles, see issue #67

Leon Urbas 10 years ago
parent
commit
20307ed095

+ 1 - 1
examples/src/networklayer.c

@@ -162,7 +162,7 @@ void* NL_TCP_readerThread(NL_Connection *c) {
 #endif
 
 /** write message provided in the gather buffers to a tcp transport layer connection */
-UA_Int32 NL_TCP_writer(struct TL_Connection_T const * c, UA_ByteString const * const * gather_buf, UA_UInt32 gather_len) {
+UA_Int32 NL_TCP_writer(struct TL_Connection const * c, UA_ByteString const * const * gather_buf, UA_UInt32 gather_len) {
 
 	struct iovec iov[gather_len];
 	UA_UInt32 total_len = 0;

+ 6 - 6
examples/src/networklayer.h

@@ -24,7 +24,7 @@ enum NL_CONNECTIONTYPE_enum {
 	NL_CONNECTIONTYPE_TCPV6 = 1,
 };
 
-typedef struct T_NL_Description {
+typedef struct NL_Description {
 	UA_Int32 encoding;
 	UA_Int32 connectionType;
 	UA_Int32 maxConnections;
@@ -33,7 +33,7 @@ typedef struct T_NL_Description {
 
 extern NL_Description NL_Description_TcpBinary;
 
-typedef struct T_NL_data {
+typedef struct NL_data {
 	NL_Description* tld;
 	UA_String endpointUrl;
 	UA_list_List connections;
@@ -41,9 +41,9 @@ typedef struct T_NL_data {
 	int maxReaderHandle;
 } NL_data;
 
-struct NL_Connection_T;
-typedef void* (*NL_Reader)(struct NL_Connection_T *c);
-typedef struct NL_Connection_T {
+struct NL_Connection;
+typedef void* (*NL_Reader)(struct NL_Connection *c);
+typedef struct NL_Connection {
 	TL_Connection connection;
 	NL_Reader reader;
 #ifdef MULTITHREADING
@@ -54,6 +54,6 @@ typedef struct NL_Connection_T {
 
 NL_data* NL_init(NL_Description* tlDesc, UA_Int32 port);
 UA_Int32 NL_msgLoop(NL_data* nl, struct timeval* tv,UA_Int32 (*timeoutCallBack)(void*),void *arg);
-UA_Int32 NL_TCP_writer(struct TL_Connection_T const * c, UA_ByteString const * const * gather_buf, UA_UInt32 gather_len);
+UA_Int32 NL_TCP_writer(struct TL_Connection const * c, UA_ByteString const * const * gather_buf, UA_UInt32 gather_len);
 
 #endif /* NETWORKLAYER_H_ */

+ 1 - 1
examples/src/opcuaServerMini.c

@@ -216,7 +216,7 @@ UA_Int32 myProcess(TL_Connection* connection, const UA_ByteString* msg) {
 }
 
 /** write message provided in the gather buffers to a tcp transport layer connection */
-UA_Int32 myWriter(struct TL_Connection_T const * c, UA_ByteString const * const * gather_buf, UA_UInt32 gather_len) {
+UA_Int32 myWriter(struct TL_Connection const * c, UA_ByteString const * const * gather_buf, UA_UInt32 gather_len) {
 
 	struct iovec iov[gather_len];
 	UA_UInt32 total_len = 0;

+ 59 - 59
examples/src/xml2ns0.c

@@ -16,12 +16,12 @@
 #include "ua_namespace.h"
 
 // some typedefs for typical arguments in this module
-typedef char const * const XML_Attr_t;
-typedef char const * cstring_t;
+typedef char const * const XML_Attr;
+typedef char const * cstring;
 
 // FIXME: We might want to have these classes and their methods defined in opcua.h
 /** NodeSetAlias - a readable shortcut for References */
-typedef struct UA_NodeSetAlias_T {
+typedef struct UA_NodeSetAlias {
 	UA_String alias;
 	UA_String value;
 } UA_NodeSetAlias;
@@ -36,7 +36,7 @@ UA_Int32 UA_NodeSetAlias_new(UA_NodeSetAlias** p) {
 	return UA_SUCCESS;
 }
 /* References */
-typedef struct UA_NodeSetReferences_T {
+typedef struct UA_NodeSetReferences {
 	UA_Int32 size;
 	UA_ReferenceNode** references;
 } UA_NodeSetReferences;
@@ -50,7 +50,7 @@ UA_Int32 UA_NodeSetReferences_new(UA_NodeSetReferences** p) {
 	UA_NodeSetReferences_init(*p);
 	return UA_SUCCESS;
 }
-UA_Int32 UA_ReferenceNode_println(cstring_t label, UA_ReferenceNode *a) {
+UA_Int32 UA_ReferenceNode_println(cstring label, UA_ReferenceNode *a) {
 	printf("%s{referenceType=%d, target=%d, isInverse=%d}\n",
 			label,
 			a->referenceTypeId.identifier.numeric,
@@ -58,7 +58,7 @@ UA_Int32 UA_ReferenceNode_println(cstring_t label, UA_ReferenceNode *a) {
 			a->isInverse);
 	return UA_SUCCESS;
 }
-UA_Int32 UA_NodeSetReferences_println(cstring_t label, UA_NodeSetReferences *p) {
+UA_Int32 UA_NodeSetReferences_println(cstring label, UA_NodeSetReferences *p) {
 	UA_Int32 i;
 	for (i = 0; i < p->size; i++) {
 		UA_ReferenceNode* a = p->references[i];
@@ -72,7 +72,7 @@ UA_Int32 UA_NodeSetReferences_println(cstring_t label, UA_NodeSetReferences *p)
 }
 
 /* The current set of aliases */
-typedef struct UA_NodeSetAliases_T {
+typedef struct UA_NodeSetAliases {
 	UA_Int32 size;
 	UA_NodeSetAlias** aliases;
 } UA_NodeSetAliases;
@@ -86,7 +86,7 @@ UA_Int32 UA_NodeSetAliases_new(UA_NodeSetAliases** p) {
 	UA_NodeSetAliases_init(*p);
 	return UA_SUCCESS;
 }
-UA_Int32 UA_NodeSetAliases_println(cstring_t label, UA_NodeSetAliases *p) {
+UA_Int32 UA_NodeSetAliases_println(cstring label, UA_NodeSetAliases *p) {
 	UA_Int32 i;
 	for (i = 0; i < p->size; i++) {
 		UA_NodeSetAlias* a = p->aliases[i];
@@ -115,7 +115,7 @@ UA_Int32 UA_NodeSet_new(UA_NodeSet** p) {
 	UA_NodeSet_init(*p);
 	return UA_SUCCESS;
 }
-UA_Int32 UA_NodeId_copycstring(cstring_t src, UA_NodeId* dst, UA_NodeSetAliases* aliases) {
+UA_Int32 UA_NodeId_copycstring(cstring src, UA_NodeId* dst, UA_NodeSetAliases* aliases) {
 	dst->encodingByte = UA_NODEIDTYPE_FOURBYTE;
 	dst->namespace = 0;
 	dst->identifier.numeric = 0;
@@ -136,7 +136,7 @@ UA_Int32 UA_NodeId_copycstring(cstring_t src, UA_NodeId* dst, UA_NodeSetAliases*
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_ExpandedNodeId_copycstring(cstring_t src, UA_ExpandedNodeId* dst, UA_NodeSetAliases* aliases) {
+UA_Int32 UA_ExpandedNodeId_copycstring(cstring src, UA_ExpandedNodeId* dst, UA_NodeSetAliases* aliases) {
 	dst->nodeId.encodingByte = UA_NODEIDTYPE_FOURBYTE;
 	dst->nodeId.namespace = 0;
 	dst->nodeId.identifier.numeric = 0;
@@ -150,30 +150,30 @@ UA_Int32 UA_ExpandedNodeId_copycstring(cstring_t src, UA_ExpandedNodeId* dst, UA
 #define XML_STACK_MAX_DEPTH 10
 #define XML_STACK_MAX_CHILDREN 40
 struct XML_Stack;
-typedef UA_Int32 (*XML_decoder)(struct XML_Stack* s, XML_Attr_t* attr, void* dst, _Bool isStart);
+typedef UA_Int32 (*XML_decoder)(struct XML_Stack* s, XML_Attr* attr, void* dst, _Bool isStart);
 typedef struct XML_child {
-	cstring_t name;
+	cstring name;
 	UA_Int32 type;
 	XML_decoder elementHandler;
 	void* obj;
-} XML_child_t;
+} XML_child;
 
 typedef struct XML_Parent {
-	cstring_t name;
+	cstring name;
 	int textAttribIdx; // -1 - not set
-	cstring_t textAttrib;
+	cstring textAttrib;
 	int activeChild; // -1 - no active child
 	int len; // -1 - empty set
-	XML_child_t children[XML_STACK_MAX_CHILDREN];
-} XML_Parent_t;
+	XML_child children[XML_STACK_MAX_CHILDREN];
+} XML_Parent;
 
 typedef struct XML_Stack {
 	int depth;
-	XML_Parent_t parent[XML_STACK_MAX_DEPTH];
+	XML_Parent parent[XML_STACK_MAX_DEPTH];
 	UA_NodeSetAliases* aliases; // shall point to the aliases of the NodeSet after reading
-} XML_Stack_t;
+} XML_Stack;
 
-void XML_Stack_init(XML_Stack_t* p, cstring_t name) {
+void XML_Stack_init(XML_Stack* p, cstring name) {
 	unsigned int i, j;
 	p->depth = 0;
 	for (i = 0; i < XML_STACK_MAX_DEPTH; i++) {
@@ -192,7 +192,7 @@ void XML_Stack_init(XML_Stack_t* p, cstring_t name) {
 	p->parent[0].name = name;
 }
 
-void XML_Stack_print(XML_Stack_t* s) {
+void XML_Stack_print(XML_Stack* s) {
 	UA_Int32 i;
 	for (i = 0; i <= s->depth; i++) {
 		printf("%s.", s->parent[i].name);
@@ -200,12 +200,12 @@ void XML_Stack_print(XML_Stack_t* s) {
 }
 
 // FIXME: we might want to calculate textAttribIdx
-void XML_Stack_handleTextAsElementOf(XML_Stack_t* p, cstring_t textAttrib, unsigned int textAttribIdx) {
+void XML_Stack_handleTextAsElementOf(XML_Stack* p, cstring textAttrib, unsigned int textAttribIdx) {
 	p->parent[p->depth].textAttrib = textAttrib;
 	p->parent[p->depth].textAttribIdx = textAttribIdx;
 }
 
-void XML_Stack_addChildHandler(XML_Stack_t* p, cstring_t name, XML_decoder handler, UA_Int32 type, void* dst) {
+void XML_Stack_addChildHandler(XML_Stack* p, cstring name, XML_decoder handler, UA_Int32 type, void* dst) {
 	unsigned int len = p->parent[p->depth].len;
 	p->parent[p->depth].children[len].name = name;
 	p->parent[p->depth].children[len].elementHandler = handler;
@@ -214,26 +214,26 @@ void XML_Stack_addChildHandler(XML_Stack_t* p, cstring_t name, XML_decoder handl
 	p->parent[p->depth].len++;
 }
 
-UA_Int32 UA_Array_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, void* dst, _Bool isStart) {
+UA_Int32 UA_Array_decodeXML(XML_Stack* s, XML_Attr* attr, void* dst, _Bool isStart) {
 	// FIXME: Implement
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_Boolean_copycstring(cstring_t src, UA_Boolean* dst) {
+UA_Int32 UA_Boolean_copycstring(cstring src, UA_Boolean* dst) {
 	*dst = UA_FALSE;
 	if (0 == strncmp(src, "true", 4) || 0 == strncmp(src, "TRUE", 4)) {
 		*dst = UA_TRUE;
 	}
 	return UA_SUCCESS;
 }
-UA_Int32 UA_Boolean_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Boolean* dst, _Bool isStart) {
+UA_Int32 UA_Boolean_decodeXML(XML_Stack* s, XML_Attr* attr, UA_Boolean* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_Boolean entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		if (dst == UA_NULL) {
 			UA_Boolean_new(&dst);
 			s->parent[s->depth - 1].children[s->parent[s->depth - 1].activeChild].obj = (void*) dst;
 		}
-		UA_Boolean_copycstring((cstring_t) attr[1], dst);
+		UA_Boolean_copycstring((cstring) attr[1], dst);
 	} else {
 		// TODO: It is a design flaw that we need to do this here, isn't it?
 		s->parent[s->depth - 1].children[s->parent[s->depth - 1].activeChild].obj =
@@ -242,22 +242,22 @@ UA_Int32 UA_Boolean_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Boolean* dst,
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_Int16_copycstring(cstring_t src, UA_Int16* dst) {
+UA_Int32 UA_Int16_copycstring(cstring src, UA_Int16* dst) {
 	*dst = atoi(src);
 	return UA_SUCCESS;
 }
-UA_Int32 UA_UInt16_copycstring(cstring_t src, UA_UInt16* dst) {
+UA_Int32 UA_UInt16_copycstring(cstring src, UA_UInt16* dst) {
 	*dst = atoi(src);
 	return UA_SUCCESS;
 }
-UA_Int32 UA_Int16_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Int16* dst, _Bool isStart) {
+UA_Int32 UA_Int16_decodeXML(XML_Stack* s, XML_Attr* attr, UA_Int16* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_Int32 entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		if (dst == UA_NULL) {
 			UA_Int16_new(&dst);
 			s->parent[s->depth - 1].children[s->parent[s->depth - 1].activeChild].obj = (void*) dst;
 		}
-		UA_Int16_copycstring((cstring_t) attr[1], dst);
+		UA_Int16_copycstring((cstring) attr[1], dst);
 	} else {
 		// TODO: It is a design flaw that we need to do this here, isn't it?
 		s->parent[s->depth - 1].children[s->parent[s->depth - 1].activeChild].obj =
@@ -266,7 +266,7 @@ UA_Int32 UA_Int16_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Int16* dst, _Bo
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_Int32_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Int32* dst, _Bool isStart) {
+UA_Int32 UA_Int32_decodeXML(XML_Stack* s, XML_Attr* attr, UA_Int32* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_Int32 entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		if (dst == UA_NULL) {
@@ -282,7 +282,7 @@ UA_Int32 UA_Int32_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Int32* dst, _Bo
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_String_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_String* dst, _Bool isStart) {
+UA_Int32 UA_String_decodeXML(XML_Stack* s, XML_Attr* attr, UA_String* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_String entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 	if (isStart) {
@@ -313,7 +313,7 @@ UA_Int32 UA_String_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_String* dst, _
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_NodeId_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeId* dst, _Bool isStart) {
+UA_Int32 UA_NodeId_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeId* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_NodeId entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 	if (isStart) {
@@ -341,7 +341,7 @@ UA_Int32 UA_NodeId_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeId* dst, _
 	} else {
 		switch (s->parent[s->depth - 1].activeChild) {
 		case 2:
-			UA_NodeId_copycstring((cstring_t)((UA_String*)attr)->data,dst,s->aliases);
+			UA_NodeId_copycstring((cstring)((UA_String*)attr)->data,dst,s->aliases);
 			break;
 		default:
 			break;
@@ -354,7 +354,7 @@ UA_Int32 UA_NodeId_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeId* dst, _
 	}
 	return UA_SUCCESS;
 }
-UA_Int32 UA_ExpandedNodeId_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_ExpandedNodeId* dst, _Bool isStart) {
+UA_Int32 UA_ExpandedNodeId_decodeXML(XML_Stack* s, XML_Attr* attr, UA_ExpandedNodeId* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_ExpandedNodeId entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 	if (isStart) {
@@ -373,11 +373,11 @@ UA_Int32 UA_ExpandedNodeId_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Expand
 		// set attributes
 		for (i = 0; attr[i]; i += 2) {
 			if (0 == strncmp("Namespace", attr[i], strlen("Namespace"))) {
-				UA_UInt16_copycstring((cstring_t) attr[i + 1], &(dst->nodeId.namespace));
+				UA_UInt16_copycstring((cstring) attr[i + 1], &(dst->nodeId.namespace));
 			} else if (0 == strncmp("Numeric", attr[i], strlen("Numeric"))) {
-				UA_NodeId_copycstring((cstring_t) attr[i + 1], &(dst->nodeId), s->aliases);
+				UA_NodeId_copycstring((cstring) attr[i + 1], &(dst->nodeId), s->aliases);
 			} else if (0 == strncmp("NodeId", attr[i], strlen("NodeId"))) {
-				UA_NodeId_copycstring((cstring_t) attr[i + 1], &(dst->nodeId), s->aliases);
+				UA_NodeId_copycstring((cstring) attr[i + 1], &(dst->nodeId), s->aliases);
 			} else {
 				printf("UA_ExpandedNodeId_decodeXML - unknown attribute name=%s, value=%s\n", attr[i], attr[i+1]);
 			}
@@ -392,7 +392,7 @@ UA_Int32 UA_ExpandedNodeId_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Expand
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_LocalizedText_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_LocalizedText* dst, _Bool isStart) {
+UA_Int32 UA_LocalizedText_decodeXML(XML_Stack* s, XML_Attr* attr, UA_LocalizedText* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_LocalizedText entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 	if (isStart) {
@@ -437,7 +437,7 @@ UA_Int32 UA_LocalizedText_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Localiz
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_QualifiedName_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_QualifiedName* dst, _Bool isStart) {
+UA_Int32 UA_QualifiedName_decodeXML(XML_Stack* s, XML_Attr* attr, UA_QualifiedName* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_QualifiedName entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 	if (isStart) {
@@ -471,7 +471,7 @@ UA_Int32 UA_QualifiedName_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Qualifi
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_ReferenceNode_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_ReferenceNode* dst, _Bool isStart) {
+UA_Int32 UA_ReferenceNode_decodeXML(XML_Stack* s, XML_Attr* attr, UA_ReferenceNode* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_ReferenceNode_decodeXML entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		// create if necessary
@@ -511,7 +511,7 @@ UA_Int32 UA_ReferenceNode_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Referen
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_NodeSetReferences_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSetReferences* dst, _Bool isStart) {
+UA_Int32 UA_NodeSetReferences_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetReferences* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_NodeSetReferences entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		if (dst == UA_NULL) {
@@ -548,7 +548,7 @@ UA_Int32 UA_NodeSetReferences_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_Nod
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_DataTypeNode_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_DataTypeNode* dst, _Bool isStart) {
+UA_Int32 UA_DataTypeNode_decodeXML(XML_Stack* s, XML_Attr* attr, UA_DataTypeNode* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_DataTypeNode entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 
@@ -613,7 +613,7 @@ UA_Int32 UA_DataTypeNode_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_DataType
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_VariableNode_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_VariableNode* dst, _Bool isStart) {
+UA_Int32 UA_VariableNode_decodeXML(XML_Stack* s, XML_Attr* attr, UA_VariableNode* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_VariableNode entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	UA_UInt32 i;
 
@@ -720,7 +720,7 @@ void print_node(UA_Node const * node) {
 	}
 }
 
-UA_Int32 UA_NodeSetAlias_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSetAlias* dst, _Bool isStart) {
+UA_Int32 UA_NodeSetAlias_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAlias* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_NodeSetAlias entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		// create if necessary
@@ -756,7 +756,7 @@ UA_Int32 UA_NodeSetAlias_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSetA
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_NodeSetAliases_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSetAliases* dst, _Bool isStart) {
+UA_Int32 UA_NodeSetAliases_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAliases* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_NodeSetALiases entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		if (dst == UA_NULL) {
@@ -793,7 +793,7 @@ UA_Int32 UA_NodeSetAliases_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSe
 	return UA_SUCCESS;
 }
 
-UA_Int32 UA_NodeSet_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSet* dst, _Bool isStart) {
+UA_Int32 UA_NodeSet_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSet* dst, _Bool isStart) {
 	DBG_VERBOSE(printf("UA_NodeSet entered with dst=%p,isStart=%d\n", (void* ) dst, isStart));
 	if (isStart) {
 		if (dst == UA_NULL) {
@@ -838,11 +838,11 @@ UA_Int32 UA_NodeSet_decodeXML(XML_Stack_t* s, XML_Attr_t* attr, UA_NodeSet* dst,
 
 /** lookup if element is a known child of parent, if yes go for it otherwise ignore */
 void XML_Stack_startElement(void * data, const char *el, const char **attr) {
-	XML_Stack_t* s = (XML_Stack_t*) data;
+	XML_Stack* s = (XML_Stack*) data;
 	int i;
 
 // scan expected children
-	XML_Parent_t* cp = &s->parent[s->depth];
+	XML_Parent* cp = &s->parent[s->depth];
 	for (i = 0; i < cp->len; i++) {
 		if (0 == strncmp(cp->children[i].name, el, strlen(cp->children[i].name))) {
 			DBG_VERBOSE(XML_Stack_print(s));
@@ -871,7 +871,7 @@ void XML_Stack_startElement(void * data, const char *el, const char **attr) {
 	s->parent[s->depth].len = 0;
 }
 
-UA_Int32 XML_isSpace(cstring_t s, int len) {
+UA_Int32 XML_isSpace(cstring s, int len) {
 	int i;
 	for (i = 0; i < len; i++) {
 		if (!isspace(s[i])) {
@@ -883,17 +883,17 @@ UA_Int32 XML_isSpace(cstring_t s, int len) {
 
 /* simulates startElement, endElement behaviour */
 void XML_Stack_handleText(void * data, const char *txt, int len) {
-	XML_Stack_t* s = (XML_Stack_t*) data;
+	XML_Stack* s = (XML_Stack*) data;
 
 	if (len > 0 && !XML_isSpace(txt, len)) {
-		XML_Parent_t* cp = &(s->parent[s->depth]);
+		XML_Parent* cp = &(s->parent[s->depth]);
 		if (cp->textAttribIdx >= 0) {
 			cp->activeChild = cp->textAttribIdx;
 			char* buf; // need to copy txt to add 0 as string terminator
 			UA_alloc((void** )&buf, len + 1);
 			strncpy(buf, txt, len);
 			buf[len] = 0;
-			XML_Attr_t attr[3] = { cp->textAttrib, buf, UA_NULL };
+			XML_Attr attr[3] = { cp->textAttrib, buf, UA_NULL };
 			DBG_VERBOSE(
 					printf("handleText calls start elementHandler %s with dst=%p, attr=%p\n",
 							cp->children[cp->activeChild].name, cp->children[cp->activeChild].obj, (void* ) attr));
@@ -911,19 +911,19 @@ void XML_Stack_handleText(void * data, const char *txt, int len) {
 
 /** if we are an activeChild of a parent we call the child-handler */
 void XML_Stack_endElement(void *data, const char *el) {
-	XML_Stack_t* s = (XML_Stack_t*) data;
+	XML_Stack* s = (XML_Stack*) data;
 
 // the parent of the parent of the element knows the elementHandler, therefore depth-2!
 	if (s->depth > 1) {
 		// inform parents elementHandler that everything is done
-		XML_Parent_t* cp = &(s->parent[s->depth - 1]);
-		XML_Parent_t* cpp = &(s->parent[s->depth - 2]);
+		XML_Parent* cp = &(s->parent[s->depth - 1]);
+		XML_Parent* cpp = &(s->parent[s->depth - 2]);
 		if (cpp->activeChild >= 0 && cp->activeChild >= 0) {
 			DBG_VERBOSE(XML_Stack_print(s));
 			DBG_VERBOSE(
 					printf(" - inform pop %s, arg=%p\n", cpp->children[cpp->activeChild].name,
 							(void* ) cp->children[cp->activeChild].obj));
-			cpp->children[cpp->activeChild].elementHandler(s, (XML_Attr_t*) cp->children[cp->activeChild].obj,
+			cpp->children[cpp->activeChild].elementHandler(s, (XML_Attr*) cp->children[cp->activeChild].obj,
 					cpp->children[cpp->activeChild].obj, FALSE);
 		}
 		// reset
@@ -935,7 +935,7 @@ void XML_Stack_endElement(void *data, const char *el) {
 int main() {
 	char buf[1024];
 	int len; /* len is the number of bytes in the current bufferful of data */
-	XML_Stack_t s;
+	XML_Stack s;
 	XML_Stack_init(&s, "ROOT");
 	UA_NodeSet n;
 	UA_NodeSet_init(&n);

+ 14 - 14
include/ua_basictypes.h

@@ -37,7 +37,7 @@ typedef uint64_t UA_UInt64;
 typedef float UA_Float;
 typedef double UA_Double;
 /* ByteString - Part: 6, Chapter: 5.2.2.7, Page: 17 */
-typedef struct T_UA_ByteString
+typedef struct UA_ByteString
 {
 	UA_Int32 	length;
 	UA_Byte*	data;
@@ -210,7 +210,7 @@ UA_TYPE_METHOD_PROTOTYPES (UA_StatusCode)
 typedef float UA_IntegerId;
 UA_TYPE_METHOD_PROTOTYPES (UA_IntegerId)
 
-typedef struct T_UA_VTable {
+typedef struct UA_VTable {
 	UA_UInt32 ns0Id;
 	UA_Int32 (*calcSize)(void const * ptr);
 	UA_Int32 (*decodeBinary)(UA_ByteString const * src, UA_Int32* pos, void* dst);
@@ -230,7 +230,7 @@ enum UA_VARIANT_ENCODINGMASKTYPE_enum
 	UA_VARIANT_ENCODINGMASKTYPE_ARRAY = ( 0x01 << 7) // bit 7
 };
 
-typedef struct T_UA_Variant {
+typedef struct UA_Variant {
 	UA_VTable* vt;		// internal entry into vTable
 	UA_Byte encodingMask; 	// Type of UA_Variant_EncodingMaskType_enum
 	UA_Int32 arrayLength;	// total number of elements
@@ -241,7 +241,7 @@ typedef struct T_UA_Variant {
 UA_TYPE_METHOD_PROTOTYPES (UA_Variant)
 
 /* String - Part: 6, Chapter: 5.2.2.4, Page: 16 */
-typedef struct T_UA_String
+typedef struct UA_String
 {
 	UA_Int32 	length;
 	UA_Byte*	data;
@@ -269,7 +269,7 @@ enum UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_enum
 	UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_LOCALE = 0x01,
 	UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_TEXT = 0x02
 };
-typedef struct T_UA_LocalizedText
+typedef struct UA_LocalizedText
 {
 	UA_Byte encodingMask;
 	UA_String locale;
@@ -284,7 +284,7 @@ void UA_ByteString_printx(char* label, const UA_ByteString* string);
 void UA_ByteString_printx_hex(char* label, const UA_ByteString* string);
 
 /* GuidType - Part: 6, Chapter: 5.2.2.6 Page: 17 */
-typedef struct T_UA_Guid
+typedef struct UA_Guid
 {
 	UA_UInt32 data1;
 	UA_UInt16 data2;
@@ -299,7 +299,7 @@ typedef UA_Int64 UA_DateTime; //100 nanosecond resolution
 UA_TYPE_METHOD_PROTOTYPES (UA_DateTime)
 
 UA_DateTime UA_DateTime_now();
-typedef struct T_UA_DateTimeStruct
+typedef struct UA_DateTimeStruct
 {
 	UA_Int16 nanoSec;
 	UA_Int16 microSec;
@@ -315,7 +315,7 @@ UA_DateTimeStruct UA_DateTime_toStruct(UA_DateTime time);
 UA_Int32 UA_DateTime_toString(UA_DateTime time, UA_String* timeString);
 
 
-typedef struct T_UA_NodeId
+typedef struct UA_NodeId
 {
 	UA_Byte   encodingByte; //enum BID_NodeIdEncodingValuesType
 	UA_UInt16 namespace;
@@ -335,7 +335,7 @@ UA_Int32 UA_NodeId_compare(const UA_NodeId *n1, const UA_NodeId *n2);
 void UA_NodeId_printf(char* label, const UA_NodeId* node);
 
 /** XmlElement - Part: 6, Chapter: 5.2.2.8, Page: 17 */
-typedef struct T_UA_XmlElement
+typedef struct UA_XmlElement
 {
 	//TODO Überlegung ob man es direkt als ByteString speichert oder als String
 	UA_ByteString data;
@@ -348,7 +348,7 @@ UA_TYPE_METHOD_PROTOTYPES (UA_XmlElement)
 #define UA_NODEIDTYPE_NAMESPACE_URI_FLAG 0x80
 #define UA_NODEIDTYPE_SERVERINDEX_FLAG   0x40
 #define UA_NODEIDTYPE_MASK (~(UA_NODEIDTYPE_NAMESPACE_URI_FLAG | UA_NODEIDTYPE_SERVERINDEX_FLAG))
-typedef struct T_UA_ExpandedNodeId
+typedef struct UA_ExpandedNodeId
 {
 	UA_NodeId nodeId;
 	UA_String namespaceUri;
@@ -363,7 +363,7 @@ UA_TYPE_METHOD_PROTOTYPES(UA_IdentifierType)
 
 
 /* ExtensionObjectBinaryEncoding - Part: 6, Chapter: 5.2.2.15, Page: 21 */
-typedef struct T_UA_ExtensionObject {
+typedef struct UA_ExtensionObject {
 	UA_NodeId typeId;
 	UA_Byte encoding; //Type of the enum UA_ExtensionObjectEncodingMaskType
 	UA_ByteString body;
@@ -378,7 +378,7 @@ enum UA_ExtensionObject_EncodingMaskType_enum
 };
 
 /* QualifiedNameBinaryEncoding - Part: 6, Chapter: 5.2.2.13, Page: 20 */
-typedef struct T_UA_QualifiedName {
+typedef struct UA_QualifiedName {
 	UA_UInt16 namespaceIndex;
 	UA_UInt16 reserved;
 	UA_String name;
@@ -409,7 +409,7 @@ enum UA_DATAVALUE_ENCODINGMASKTYPE_enum
 };
 
 /* DiagnosticInfo - Part: 6, Chapter: 5.2.2.12, Page: 20 */
-typedef struct T_UA_DiagnosticInfo {
+typedef struct UA_DiagnosticInfo {
 	UA_Byte encodingMask; //Type of the Enum UA_DIAGNOSTICINFO_ENCODINGMASKTYPE
 	UA_Int32 symbolicId;
 	UA_Int32 namespaceUri;
@@ -417,7 +417,7 @@ typedef struct T_UA_DiagnosticInfo {
 	UA_Int32 locale;
 	UA_String additionalInfo;
 	UA_StatusCode innerStatusCode;
-	struct T_UA_DiagnosticInfo* innerDiagnosticInfo;
+	struct UA_DiagnosticInfo* innerDiagnosticInfo;
 } UA_DiagnosticInfo;
 UA_TYPE_METHOD_PROTOTYPES(UA_DiagnosticInfo)
 

+ 1 - 1
src/ua_application.h

@@ -5,7 +5,7 @@
 #include "ua_namespace.h"
 #include "ua_indexedList.h"
 
-typedef struct Application_T {
+typedef struct Application {
 	UA_ApplicationDescription *description;
 	UA_indexedList_List *namespaces; // each entry is a namespace
 } Application;

+ 2 - 2
src/ua_namespace.h

@@ -32,14 +32,14 @@ UA_Int32 Namespace_TransactionContext_init(Namespace_TransactionContext * tc);
 
 /* Each namespace is a hash-map of NodeIds to Nodes. Every entry in the hashmap consists of a
    pointer to a read-write lock and a pointer to the Node. */
-typedef struct Namespace_Entry_T {
+typedef struct Namespace_Entry {
 #ifdef MULTITHREADING
 	Namespace_Lock *lock;	/* locks are heap-allocated */
 #endif
 	UA_Node *node;
 } Namespace_Entry;
 
-typedef struct Namespace_T {
+typedef struct Namespace {
 	UA_Int32 namespaceId;
 	UA_String namespaceUri;
 	Namespace_Entry *entries;

+ 10 - 10
src/ua_transport.h

@@ -13,7 +13,7 @@ enum ConnectionState {
 	CONNECTIONSTATE_CLOSE
 };
 
-typedef struct Session_T {
+typedef struct Session {
 	UA_Int32 sessionId;
 	Application *application;
 } Session;
@@ -48,7 +48,7 @@ void UA_MessageType_printf(char *label, UA_MessageType* p);
 
 /** @name UA_UA_OPCUATcpMessageHeader */
 /** @brief TCP Header */
-typedef struct UA_OPCUATcpMessageHeader_T {
+typedef struct UA_OPCUATcpMessageHeader {
 	UA_MessageType messageType; // MessageType instead of UInt32
 	UA_Byte isFinal;
 	UA_UInt32 messageSize;
@@ -63,7 +63,7 @@ UA_Int32 UA_OPCUATcpMessageHeader_new(UA_OPCUATcpMessageHeader ** p);
 
 /** @name UA_UA_OPCUATcpHelloMessage */
 /** @brief Hello Message */
-typedef struct UA_OPCUATcpHelloMessage_T {
+typedef struct UA_OPCUATcpHelloMessage {
 	UA_UInt32 protocolVersion;
 	UA_UInt32 receiveBufferSize;
 	UA_UInt32 sendBufferSize;
@@ -81,7 +81,7 @@ UA_Int32 UA_OPCUATcpHelloMessage_new(UA_OPCUATcpHelloMessage ** p);
 
 /** @name UA_UA_OPCUATcpAcknowledgeMessage */
 /** @brief Acknowledge Message */
-typedef struct UA_OPCUATcpAcknowledgeMessage_T {
+typedef struct UA_OPCUATcpAcknowledgeMessage {
 	UA_UInt32 protocolVersion;
 	UA_UInt32 receiveBufferSize;
 	UA_UInt32 sendBufferSize;
@@ -98,7 +98,7 @@ UA_Int32 UA_OPCUATcpAcknowledgeMessage_new(UA_OPCUATcpAcknowledgeMessage ** p);
 
 /** @name UA_UA_SecureConversationMessageHeader */
 /** @brief Secure Layer Sequence Header */
-typedef struct UA_SecureConversationMessageHeader_T {
+typedef struct UA_SecureConversationMessageHeader {
 	// UA_OPCUATcpMessageHeader messageHeader; // Treated with custom code
 	UA_UInt32 secureChannelId;
 } UA_SecureConversationMessageHeader;
@@ -112,7 +112,7 @@ UA_Int32 UA_SecureConversationMessageHeader_new(UA_SecureConversationMessageHead
 
 /** @name UA_UA_AsymmetricAlgorithmSecurityHeader */
 /** @brief Security Header> */
-typedef struct UA_AsymmetricAlgorithmSecurityHeader_T {
+typedef struct UA_AsymmetricAlgorithmSecurityHeader {
 	UA_ByteString securityPolicyUri;
 	UA_ByteString senderCertificate;
 	UA_ByteString receiverCertificateThumbprint;
@@ -128,7 +128,7 @@ UA_Int32 UA_AsymmetricAlgorithmSecurityHeader_new(UA_AsymmetricAlgorithmSecurity
 
 /** @name UA_UA_SymmetricAlgorithmSecurityHeader */
 /** @brief Secure Layer Symmetric Algorithm Header */
-typedef struct UA_SymmetricAlgorithmSecurityHeader_T {
+typedef struct UA_SymmetricAlgorithmSecurityHeader {
 	UA_UInt32 tokenId;
 } UA_SymmetricAlgorithmSecurityHeader;
 UA_Int32 UA_SymmetricAlgorithmSecurityHeader_calcSize(UA_SymmetricAlgorithmSecurityHeader const* ptr);
@@ -141,7 +141,7 @@ UA_Int32 UA_SymmetricAlgorithmSecurityHeader_new(UA_SymmetricAlgorithmSecurityHe
 
 /** @name UA_UA_SequenceHeader */
 /** @brief Secure Layer Sequence Header */
-typedef struct UA_SequenceHeader_T {
+typedef struct UA_SequenceHeader {
 	UA_UInt32 sequenceNumber;
 	UA_UInt32 requestId;
 } UA_SequenceHeader;
@@ -155,7 +155,7 @@ UA_Int32 UA_SequenceHeader_new(UA_SequenceHeader ** p);
 
 /** @name UA_UA_SecureConversationMessageFooter */
 /** @brief Secure Conversation Message Footer */
-typedef struct UA_SecureConversationMessageFooter_T {
+typedef struct UA_SecureConversationMessageFooter {
 	UA_Int32 paddingSize;
 	UA_Byte** padding;
 	UA_Byte signature;
@@ -170,7 +170,7 @@ UA_Int32 UA_SecureConversationMessageFooter_new(UA_SecureConversationMessageFoot
 
 /** @name UA_UA_SecureConversationMessageAbortBody */
 /** @brief Secure Conversation Message Abort Body */
-typedef struct UA_SecureConversationMessageAbortBody_T {
+typedef struct UA_SecureConversationMessageAbortBody {
 	UA_UInt32 error;
 	UA_String reason;
 } UA_SecureConversationMessageAbortBody;

+ 5 - 5
src/ua_transport_binary.h

@@ -14,7 +14,7 @@
 #define TL_SERVER_MAX_CHUNK_COUNT 1
 #define TL_SERVER_MAX_MESSAGE_SIZE  8192
 
-typedef struct {
+typedef struct TL_Buffer {
 	UA_UInt32 protocolVersion;
 	UA_UInt32 sendBufferSize;
 	UA_UInt32 recvBufferSize;
@@ -23,10 +23,10 @@ typedef struct {
 } TL_Buffer;
 
 /* Transport Layer Connection */
-struct TL_Connection_T; // forward declaration
-typedef UA_Int32 (*TL_Writer)(struct TL_Connection_T* connection, const UA_ByteString** gather_bufs, UA_Int32 gather_len); // send mutiple buffer concatenated into one msg (zero copy)
+struct TL_Connection; // forward declaration
+typedef UA_Int32 (*TL_Writer)(struct TL_Connection* connection, const UA_ByteString** gather_bufs, UA_Int32 gather_len); // send mutiple buffer concatenated into one msg (zero copy)
 
-typedef struct TL_Connection_T {
+typedef struct TL_Connection {
 	UA_Int32 connectionHandle;
 	UA_UInt32 connectionState;
 	TL_Buffer localConf;
@@ -34,7 +34,7 @@ typedef struct TL_Connection_T {
 	TL_Writer writerCallback;
 	UA_String localEndpointUrl;
 	UA_String remoteEndpointUrl;
-	struct SL_Channel_T* secureChannel;
+	struct SL_Channel* secureChannel;
 } TL_Connection;
 
 UA_Int32 TL_Send(TL_Connection* connection, const UA_ByteString** gather_buf, UA_UInt32 gather_len);

+ 1 - 1
src/ua_transport_binary_secure.h

@@ -12,7 +12,7 @@ typedef struct {
 	UA_Int32 revisedLifetime;
 } SL_ChannelSecurityToken;
 
-typedef struct SL_Channel_T {
+typedef struct SL_Channel {
 	UA_String secureChannelId;
 	TL_Connection* tlConnection;
 	Session *session; // equals UA_Null iff no session is active

+ 1 - 1
tools/generate_builtin.py

@@ -122,7 +122,7 @@ def createStructured(element):
     #    print ("type " + name + " is new Request_Base with "),
     # else:
     #    print ("type " + name + " is new UA_Builtin with "),
-    print("typedef struct " + name + "_T {", end='\n', file=fh)
+    print("typedef struct " + name + " {", end='\n', file=fh)
     if len(valuemap) == 0:
         typename = stripTypename(element.get("BaseType"))
         childname = camlCase2CCase(typename)