Bläddra i källkod

more changes to datatypes (datatype -> UA_datatype)

FlorianPalm 11 år sedan
förälder
incheckning
de332184dc

+ 10 - 10
include/UA_indexedList.h

@@ -10,7 +10,7 @@
  */
 typedef struct T_UA_indexedList_Element {
 	struct T_UA_list_Element* father;
-	Int32 index;
+	UA_Int32 index;
 	void* payload;
 }UA_indexedList_Element;
 
@@ -19,22 +19,22 @@ typedef UA_list_PayloadVisitor UA_indexedList_PayloadVisitor;
 
 void UA_indexedList_defaultFreer(void* payload);
 
-Int32 UA_indexedList_init(UA_indexedList_List* const list);
+UA_Int32 UA_indexedList_init(UA_indexedList_List* const list);
 
-Int32 UA_indexedList_destroy(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor);
+UA_Int32 UA_indexedList_destroy(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor);
 
-Int32 UA_indexedList_initElement(UA_indexedList_Element* const elem);
+UA_Int32 UA_indexedList_initElement(UA_indexedList_Element* const elem);
 
-Int32 UA_indexedList_addValue(UA_indexedList_List* const list, Int32 index, void* payload);
+UA_Int32 UA_indexedList_addValue(UA_indexedList_List* const list, UA_Int32 index, void* payload);
 
-Int32 UA_indexedList_addValueToFront(UA_indexedList_List* const list, Int32 index, void* payload);
+UA_Int32 UA_indexedList_addValueToFront(UA_indexedList_List* const list, UA_Int32 index, void* payload);
 
-UA_indexedList_Element* UA_indexedList_find(UA_indexedList_List* const list, Int32 index);
+UA_indexedList_Element* UA_indexedList_find(UA_indexedList_List* const list, UA_Int32 index);
 
-void* UA_indexedList_findValue(UA_indexedList_List* const list, Int32 index);
+void* UA_indexedList_findValue(UA_indexedList_List* const list, UA_Int32 index);
 
-Int32 UA_indexedList_iterateValues(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor);
+UA_Int32 UA_indexedList_iterateValues(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor);
 
-Int32 UA_indexedList_removeElement(UA_indexedList_List* const list, UA_indexedList_Element* elem, UA_indexedList_PayloadVisitor visitor);
+UA_Int32 UA_indexedList_removeElement(UA_indexedList_List* const list, UA_indexedList_Element* elem, UA_indexedList_PayloadVisitor visitor);
 
 #endif /* UA_INDEXEDLIST_H_ */

+ 13 - 13
include/UA_list.h

@@ -19,7 +19,7 @@ typedef struct T_UA_list_Element {
 typedef struct T_UA_list_List {
    struct T_UA_list_Element* first;
    struct T_UA_list_Element* last;
-   Int32 size;
+   UA_Int32 size;
 }UA_list_List;
 
 typedef void (*UA_list_ElementVisitor)(UA_list_Element* payload);
@@ -28,29 +28,29 @@ typedef Boolean (*UA_list_PayloadMatcher)(void* payload);
 
 void UA_list_defaultFreer(void* payload);
 
-Int32 UA_list_initElement(UA_list_Element* const element);
+UA_Int32 UA_list_initElement(UA_list_Element* const element);
 
-Int32 UA_list_init(UA_list_List* const list);
+UA_Int32 UA_list_init(UA_list_List* const list);
 
-Int32 UA_list_addElementToFront(UA_list_List* const list, UA_list_Element* const element);
+UA_Int32 UA_list_addElementToFront(UA_list_List* const list, UA_list_Element* const element);
 
-Int32 UA_list_addPayloadToFront(UA_list_List* const list, void* const payload);
+UA_Int32 UA_list_addPayloadToFront(UA_list_List* const list, void* const payload);
 
-Int32 UA_list_addElementToBack(UA_list_List* const list, UA_list_Element* const element);
+UA_Int32 UA_list_addElementToBack(UA_list_List* const list, UA_list_Element* const element);
 
-Int32 UA_list_addPayloadToBack(UA_list_List* const list, void* const payload);
+UA_Int32 UA_list_addPayloadToBack(UA_list_List* const list, void* const payload);
 
-Int32 UA_list_removeFirst(UA_list_List* const list, UA_list_PayloadVisitor visitor);
+UA_Int32 UA_list_removeFirst(UA_list_List* const list, UA_list_PayloadVisitor visitor);
 
-Int32 UA_list_removeLast(UA_list_List* const list, UA_list_PayloadVisitor visitor);
+UA_Int32 UA_list_removeLast(UA_list_List* const list, UA_list_PayloadVisitor visitor);
 
-Int32 UA_list_removeElement(UA_list_Element* const elem, UA_list_PayloadVisitor visitor);
+UA_Int32 UA_list_removeElement(UA_list_Element* const elem, UA_list_PayloadVisitor visitor);
 
-Int32 UA_list_destroy(UA_list_List* const list, UA_list_PayloadVisitor visitor);
+UA_Int32 UA_list_destroy(UA_list_List* const list, UA_list_PayloadVisitor visitor);
 
-Int32 UA_list_iterateElement(UA_list_List* const list, UA_list_ElementVisitor visitor);
+UA_Int32 UA_list_iterateElement(UA_list_List* const list, UA_list_ElementVisitor visitor);
 
-Int32 UA_list_iteratePayload(UA_list_List* const list, UA_list_PayloadVisitor visitor);
+UA_Int32 UA_list_iteratePayload(UA_list_List* const list, UA_list_PayloadVisitor visitor);
 
 UA_list_Element* UA_list_find(UA_list_List* const list, UA_list_PayloadMatcher matcher);
 

+ 6 - 6
src/opcua_advancedDatatypes.h

@@ -133,10 +133,10 @@ struct BED_DataValue
 struct BED_DiagnosticInfo
 {
 //ToDo	struct ???? identifier;				//ToDo: what kind of strcuture?
-	Int32 namespaceUri;
-	Int32 symbolicId;
-	Int32 locale;
-	Int32 localizesText;
+	UA_Int32 namespaceUri;
+	UA_Int32 symbolicId;
+	UA_Int32 locale;
+	UA_Int32 localizesText;
 	UA_String additionalInfo;
 	UA_StatusCode innerStatusCode;
 	struct BED_DiagnosticInfo *innerDiagnosticInfo;
@@ -410,7 +410,7 @@ struct BED_VariableAttributes
 //	struct UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value				//ToDo
 //	struct UA_NodeId dataType;
-	Int32 valueRank;
+	UA_Int32 valueRank;
 //	UInt32 arrayDimensions[];
 	UA_Byte accessLevel;
 	UA_Byte userAccesLevel;
@@ -469,7 +469,7 @@ struct BED_VariableTypeAttributes
 //	struct UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value			//ToDo
 //	struct UA_NodeId dataType;
-	Int32 valueRank;
+	UA_Int32 valueRank;
 //	UInt32 arrayDimesions[];
 	Boolean isAbstract;
 	UA_UInt32 writeMask;

+ 33 - 33
src/opcua_binaryEncDec.c

@@ -25,7 +25,7 @@ UA_Int32 encoder_encodeBuiltInDatatype(void *data, UA_Int32 type, UA_Int32 *pos,
 		encodeByte((*(UA_Byte*) data), pos, dstBuf);
 		break;
 	case INT16:
-		encodeInt16((*(Int16*) data), pos, dstBuf);
+		encodeInt16((*(UA_Int16*) data), pos, dstBuf);
 		break;
 	case UINT16:
 		encodeUInt16((*(UInt16*) data), pos, dstBuf);
@@ -105,13 +105,13 @@ UA_Int32 decoder_decodeBuiltInDatatype(char const * srcBuf, UA_Int32 type, UA_In
 
 		break;
 	case SBYTE:
-		decodeSByte(srcBuf, pos, (SByte*) dstStructure);
+		decodeSByte(srcBuf, pos, (UA_SByte*) dstStructure);
 		break;
 	case BYTE:
 		decodeByte(srcBuf, pos, (UA_Byte*) dstStructure);
 		break;
 	case INT16:
-		decodeInt16(srcBuf, pos, (Int16*) dstStructure);
+		decodeInt16(srcBuf, pos, (UA_Int16*) dstStructure);
 		break;
 	case UINT16:
 		decodeUInt16(srcBuf, pos, (UInt16*) dstStructure);
@@ -455,16 +455,16 @@ UA_Int32 encoder_encodeBuiltInDatatypeArray(void **data, UA_Int32 size, UA_Int32
 			pElement = (Boolean*)pElement + 1;
 			break;
 		case SBYTE:
-			encoder_encodeBuiltInDatatype((SByte*)pElement, type, pos, dstBuf);
-			pElement = (SByte*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_SByte*)pElement, type, pos, dstBuf);
+			pElement = (UA_SByte*)pElement + 1;
 			break;
 		case BYTE:
 			encoder_encodeBuiltInDatatype((UA_Byte*)pElement, type, pos, dstBuf);
 			pElement = (UA_Byte*)pElement + 1;
 			break;
 		case INT16:
-			encoder_encodeBuiltInDatatype((Int16*)pElement, type, pos, dstBuf);
-			pElement = (Int16*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_Int16*)pElement, type, pos, dstBuf);
+			pElement = (UA_Int16*)pElement + 1;
 			break;
 		case UINT16:
 			encoder_encodeBuiltInDatatype((UInt16*)pElement, type, pos, dstBuf);
@@ -566,14 +566,14 @@ void encodeBoolean(Boolean value, UA_Int32 *pos, char *dstBuf) {
 	memcpy(&(dstBuf[*pos]), &tmpBool, sizeof(Boolean));
 }
 
-UA_Int32 decodeSByte(char const * buf, UA_Int32 *pos, SByte *dst) {
+UA_Int32 decodeSByte(char const * buf, UA_Int32 *pos, UA_SByte *dst) {
 	*pos = (*pos) + 1;
-	*dst = (SByte) buf[(*pos) - 1];
+	*dst = (UA_SByte) buf[(*pos) - 1];
 	return UA_NO_ERROR;
 
 }
-void encodeSByte(SByte value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(SByte));
+void encodeSByte(UA_SByte value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_SByte));
 	*pos = (*pos) + 1;
 
 }
@@ -600,23 +600,23 @@ void encodeUInt16(UInt16 value, UA_Int32 *pos, char* dstBuf) {
 	*pos = (*pos) + sizeof(UInt16);
 }
 
-UA_Int32 decodeInt16(char const * buf, UA_Int32 *pos, Int16 *dst) {
-	Int16 t1 = (Int16) (((SByte) (buf[*pos]) & 0xFF));
-	Int16 t2 = (Int16) (((SByte) (buf[*pos + 1]) & 0xFF) << 8);
+UA_Int32 decodeInt16(char const * buf, UA_Int32 *pos, UA_Int16 *dst) {
+	UA_Int16 t1 = (UA_Int16) (((UA_SByte) (buf[*pos]) & 0xFF));
+	UA_Int16 t2 = (UA_Int16) (((UA_SByte) (buf[*pos + 1]) & 0xFF) << 8);
 	*pos += 2;
 	*dst = t1 + t2;
 	return UA_NO_ERROR;
 }
-void encodeInt16(Int16 value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(Int16));
-	*pos = (*pos) + sizeof(Int16);
+void encodeInt16(UA_Int16 value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_Int16));
+	*pos = (*pos) + sizeof(UA_Int16);
 }
 
 UA_Int32 decodeInt32(char const * buf, UA_Int32 *pos, UA_Int32 *dst) {
-	UA_Int32 t1 = (UA_Int32) (((SByte) (buf[*pos]) & 0xFF));
-	UA_Int32 t2 = (UA_Int32) (((SByte) (buf[*pos + 1]) & 0xFF) << 8);
-	UA_Int32 t3 = (UA_Int32) (((SByte) (buf[*pos + 2]) & 0xFF) << 16);
-	UA_Int32 t4 = (UA_Int32) (((SByte) (buf[*pos + 3]) & 0xFF) << 24);
+	UA_Int32 t1 = (UA_Int32) (((UA_SByte) (buf[*pos]) & 0xFF));
+	UA_Int32 t2 = (UA_Int32) (((UA_SByte) (buf[*pos + 1]) & 0xFF) << 8);
+	UA_Int32 t3 = (UA_Int32) (((UA_SByte) (buf[*pos + 2]) & 0xFF) << 16);
+	UA_Int32 t4 = (UA_Int32) (((UA_SByte) (buf[*pos + 3]) & 0xFF) << 24);
 	*pos += sizeof(UA_Int32);
 	*dst = t1 + t2 + t3 + t4;
 	return UA_NO_ERROR;
@@ -643,7 +643,7 @@ void encodeUInt32(UA_UInt32 value, UA_Int32 *pos, char *dstBuf) {
 
 UA_Int32 decodeInt64(char const * buf, UA_Int32 *pos, UA_Int64 *dst) {
 
-	SByte t1 = buf[*pos];
+	UA_SByte t1 = buf[*pos];
 	UA_Int64 t2 = (UA_Int64) buf[*pos + 1] << 8;
 	UA_Int64 t3 = (UA_Int64) buf[*pos + 2] << 16;
 	UA_Int64 t4 = (UA_Int64) buf[*pos + 3] << 24;
@@ -1479,12 +1479,12 @@ UA_Int32 diagnosticInfo_calcSize(UA_DiagnosticInfo *diagnosticInfo) {
  * Page: 132
  */
 /** \copydoc decodeRequestHeader */
-Int32 decodeRequestHeader(const AD_RawMessage *srcRaw, Int32 *pos,
+UA_Int32 decodeRequestHeader(const AD_RawMessage *srcRaw, UA_Int32 *pos,
 		UA_AD_RequestHeader *dstRequestHeader) {
 	return decoder_decodeRequestHeader(srcRaw->message, pos, dstRequestHeader);
 }
 
-Int32 decoder_decodeRequestHeader(char const * message, Int32 *pos,
+UA_Int32 decoder_decodeRequestHeader(char const * message, UA_Int32 *pos,
 		UA_AD_RequestHeader *dstRequestHeader) {
 	// 62541-4 §5.5.2.2 OpenSecureChannelServiceParameters
 	// requestHeader - common request parameters. The authenticationToken is always omitted
@@ -1514,8 +1514,8 @@ Int32 decoder_decodeRequestHeader(char const * message, Int32 *pos,
  * Page: 133
  */
 /** \copydoc encodeResponseHeader */
-Int32 encodeResponseHeader(UA_AD_ResponseHeader const * responseHeader,
-		Int32 *pos, UA_ByteString *dstBuf) {
+UA_Int32 encodeResponseHeader(UA_AD_ResponseHeader const * responseHeader,
+		UA_Int32 *pos, UA_ByteString *dstBuf) {
 	encodeUADateTime(responseHeader->timestamp, pos, dstBuf->Data);
 	encodeIntegerId(responseHeader->requestHandle, pos, dstBuf->Data);
 	encodeUInt32(responseHeader->serviceResult, pos, dstBuf->Data);
@@ -1530,11 +1530,11 @@ Int32 encodeResponseHeader(UA_AD_ResponseHeader const * responseHeader,
 
 	return 0;
 }
-Int32 extensionObject_calcSize(UA_ExtensionObject *extensionObject) {
-	Int32 length = 0;
+UA_Int32 extensionObject_calcSize(UA_ExtensionObject *extensionObject) {
+	UA_Int32 length = 0;
 
 	length += nodeId_calcSize(&(extensionObject->TypeId));
-	length += sizeof(Byte); //The EncodingMask Byte
+	length += sizeof(UA_Byte); //The EncodingMask Byte
 
 	if (extensionObject->Encoding == BODY_IS_BYTE_STRING
 			|| extensionObject->Encoding == BODY_IS_XML_ELEMENT) {
@@ -1543,9 +1543,9 @@ Int32 extensionObject_calcSize(UA_ExtensionObject *extensionObject) {
 	return length;
 }
 
-Int32 responseHeader_calcSize(UA_AD_ResponseHeader *responseHeader) {
-	Int32 i;
-	Int32 length = 0;
+UA_Int32 responseHeader_calcSize(UA_AD_ResponseHeader *responseHeader) {
+	UA_Int32 i;
+	UA_Int32 length = 0;
 
 	// UtcTime timestamp	8
 	length += sizeof(UA_DateTime);
@@ -1560,7 +1560,7 @@ Int32 responseHeader_calcSize(UA_AD_ResponseHeader *responseHeader) {
 	length += diagnosticInfo_calcSize(responseHeader->serviceDiagnostics);
 
 	// String stringTable[], see 62541-6 § 5.2.4
-	length += sizeof(Int32); // Length of Stringtable always
+	length += sizeof(UA_Int32); // Length of Stringtable always
 	if (responseHeader->noOfStringTable > 0) {
 		for (i = 0; i < responseHeader->noOfStringTable; i++) {
 			length += UAString_calcSize(responseHeader->stringTable[i]);

+ 4 - 4
src/opcua_binaryEncDec.h

@@ -74,14 +74,14 @@ void encodeBoolean(Boolean value, UA_Int32 *pos, char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeSByte(char const * buf, UA_Int32 *pos, SByte *dst);
+UA_Int32 decodeSByte(char const * buf, UA_Int32 *pos, UA_SByte *dst);
 /**
  *
  * @param value
  * @param pos
  * @param dstBuf
  */
-void encodeSByte(SByte value, UA_Int32 *pos, char *dstBuf);
+void encodeSByte(UA_SByte value, UA_Int32 *pos, char *dstBuf);
 /**
  *
  * @param buf
@@ -118,14 +118,14 @@ void encodeUInt16(UInt16 value, UA_Int32 *pos, char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeInt16(char const * buf, UA_Int32 *pos, Int16 *dst);
+UA_Int32 decodeInt16(char const * buf, UA_Int32 *pos, UA_Int16 *dst);
 /**
  *
  * @param value
  * @param pos
  * @param dstBuf
  */
-void encodeInt16(Int16 value, UA_Int32 *pos, char *dstBuf);
+void encodeInt16(UA_Int16 value, UA_Int32 *pos, char *dstBuf);
 /**
  *
  * @param buf

+ 3 - 3
src/opcua_builtInDatatypes.c

@@ -10,8 +10,8 @@
 UA_ExtensionObject the_empty_UA_ExtensionObject = { { NIEVT_TWO_BYTE, 0 }, NO_BODY_IS_ENCODED};
 UA_DiagnosticInfo the_empty_UA_DiagnosticInfo = { 0x00 };
 
-Int32 UA_String_compare(UA_String *string1, UA_String *string2) {
-	Int32 i;
+UA_Int32 UA_String_compare(UA_String *string1, UA_String *string2) {
+	UA_Int32 i;
 	Boolean equal;
 
 	if (string1->Length == string2->Length&&
@@ -32,7 +32,7 @@ else
 	return UA_EQUAL;
 }
 
-Int32 UA_ByteString_compare(UA_ByteString *string1, UA_ByteString *string2) {
+UA_Int32 UA_ByteString_compare(UA_ByteString *string1, UA_ByteString *string2) {
 	return UA_String_compare((UA_String*) string1, (UA_String*) string2);
 }
 

+ 14 - 14
src/opcua_builtInDatatypes.h

@@ -127,21 +127,21 @@ UA_BuiltInDataTypes_Matrix;
 */
 typedef _Bool Boolean;
 
-typedef int8_t SByte;
+typedef int8_t UA_SByte;
 
-typedef uint8_t Byte;
+typedef uint8_t UA_Byte;
 
-typedef int16_t Int16;
+typedef int16_t UA_Int16;
 
 typedef uint16_t UInt16;
 
-typedef int32_t Int32;
+typedef int32_t UA_Int32;
 
-typedef uint32_t UInt32;
+typedef uint32_t UA_UInt32;
 
-typedef int64_t Int64;
+typedef int64_t UA_Int64;
 
-typedef uint64_t UInt64;
+typedef uint64_t UA_UInt64;
 
 typedef float Float;
 
@@ -434,9 +434,9 @@ typedef struct UA_DataValue
 	UA_Variant Value;
 	UA_StatusCode Status;
 	UA_DateTime SourceTimestamp;
-	Int16 SourcePicoseconds;
+	UA_Int16 SourcePicoseconds;
 	UA_DateTime ServerTimestamp;
-	Int16 ServerPicoseconds;
+	UA_Int16 ServerPicoseconds;
 }
 UA_DataValue;
 
@@ -457,7 +457,7 @@ typedef struct Int32_Array
 // Array types of builtInDatatypes
 typedef struct SBYte_Array
 {
-	SByte *data;
+	UA_SByte *data;
 	UA_Int32 arrayLength;
 	IntegerString dimensions;
 }SBYte_Array;
@@ -471,7 +471,7 @@ typedef struct Boolean_Array
 
 typedef struct
 {
-	SByte *data;
+	UA_SByte *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }SByte_Array;
@@ -485,7 +485,7 @@ typedef struct Byte_Array
 
 typedef struct Int16_Array
 {
-	Int16 *data;
+	UA_Int16 *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }Int16_Array;
@@ -683,9 +683,9 @@ UA_VariantMatrixValue;
 union UA_VariantUnion
 {
     Boolean Boolean;
-    SByte SByte;
+    UA_SByte SByte;
     UA_Byte Byte;
-    Int16 Int16;
+    UA_Int16 Int16;
     UInt16 UInt16;
     UA_Int32 Int32;
     UA_UInt32 UInt32;

+ 12 - 12
src/opcua_secureChannelLayer.h

@@ -12,7 +12,7 @@
 #include "opcua_encodingLayer.h"
 #include "opcua_connectionHelper.h"
 
-static const Int32 SL_HEADER_LENGTH = 0;
+static const UA_Int32 SL_HEADER_LENGTH = 0;
 #define TOKEN_LIFETIME 30000
 typedef enum
 {
@@ -87,7 +87,7 @@ typedef struct _SL_ResponseHeader
  * @param connection
  * @return
  */
-Int32 SL_initConnectionObject(UA_connection *connection);
+UA_Int32 SL_initConnectionObject(UA_connection *connection);
 
 /**
  *
@@ -96,8 +96,8 @@ Int32 SL_initConnectionObject(UA_connection *connection);
  * @param sizeInOut
  * @return
  */
-Int32 SL_openSecureChannel_responseMessage_get(UA_connection *connection,
-		SL_Response *response, Int32* sizeInOut);
+UA_Int32 SL_openSecureChannel_responseMessage_get(UA_connection *connection,
+		SL_Response *response, UA_Int32* sizeInOut);
 
 /**
  *
@@ -107,7 +107,7 @@ Int32 SL_openSecureChannel_responseMessage_get(UA_connection *connection,
  * @param SC_Header
  * @return
  */
-Int32 decodeSCMHeader(UA_ByteString *rawMessage,Int32 *pos,
+UA_Int32 decodeSCMHeader(UA_ByteString *rawMessage,UA_Int32 *pos,
 		SL_SecureConversationMessageHeader* SC_Header);
 
 /**
@@ -117,8 +117,8 @@ Int32 decodeSCMHeader(UA_ByteString *rawMessage,Int32 *pos,
  * @param rawMessage
  * @return
  */
-Int32 encodeSCMHeader(SL_SecureConversationMessageHeader *SC_Header,
-	 Int32 *pos,AD_RawMessage *rawMessage);
+UA_Int32 encodeSCMHeader(SL_SecureConversationMessageHeader *SC_Header,
+	 UA_Int32 *pos,AD_RawMessage *rawMessage);
 
 /**
  *
@@ -127,7 +127,7 @@ Int32 encodeSCMHeader(SL_SecureConversationMessageHeader *SC_Header,
  * @param SequenceHeader
  * @return
  */
-Int32 decodeSequenceHeader(UA_ByteString *rawMessage, Int32 *pos,
+UA_Int32 decodeSequenceHeader(UA_ByteString *rawMessage, UA_Int32 *pos,
 		SL_SequenceHeader *sequenceHeader);
 /**
  *
@@ -136,7 +136,7 @@ Int32 decodeSequenceHeader(UA_ByteString *rawMessage, Int32 *pos,
  * @param dstRawMessage
  * @return
  */
-Int32 encodeSequenceHeader(SL_SequenceHeader *sequenceHeader,Int32 *pos,
+UA_Int32 encodeSequenceHeader(SL_SequenceHeader *sequenceHeader,UA_Int32 *pos,
 		AD_RawMessage *dstRawMessage);
 /**
  *
@@ -145,7 +145,7 @@ Int32 encodeSequenceHeader(SL_SequenceHeader *sequenceHeader,Int32 *pos,
  * @param AAS_Header
  * @return
  */
-Int32 decodeAASHeader(UA_ByteString *rawMessage, Int32 *pos,
+UA_Int32 decodeAASHeader(UA_ByteString *rawMessage, UA_Int32 *pos,
 	SL_AsymmetricAlgorithmSecurityHeader* AAS_Header);
 
 /**
@@ -155,8 +155,8 @@ Int32 decodeAASHeader(UA_ByteString *rawMessage, Int32 *pos,
  * @param dstRawMessage
  * @return
  */
-Int32 encodeAASHeader(SL_AsymmetricAlgorithmSecurityHeader *AAS_Header,
-		Int32 *pos, AD_RawMessage* dstRawMessage);
+UA_Int32 encodeAASHeader(SL_AsymmetricAlgorithmSecurityHeader *AAS_Header,
+		UA_Int32 *pos, AD_RawMessage* dstRawMessage);
 
 /**
  *

+ 1 - 1
src/opcua_serializationLayer.c

@@ -10,7 +10,7 @@ serviceManager_registerServiceImplementation()
 {
 
 }
-serviceManager(Int32 serviceRequest)
+serviceManager(UA_Int32 serviceRequest)
 {
 	if(serviceManager_serviceAvailable(serviceRequest))
 	{

+ 4 - 4
src/opcua_transportLayer.h

@@ -90,15 +90,15 @@ struct TL_messageBodyERR
  * @param TL_message
  * @return
  */
-Int32 TL_check(UA_connection *connection);
+UA_Int32 TL_check(UA_connection *connection);
 /**
  *
  * @param connection
  * @param TL_message
  */
-Int32 TL_receive(UA_connection *connection,UA_ByteString *packet);
-Int32 TL_send(UA_connection *connection, UA_ByteString *packet);
-Int32 TL_getPacketType(UA_ByteString *packet, Int32 *pos);
+UA_Int32 TL_receive(UA_connection *connection,UA_ByteString *packet);
+UA_Int32 TL_send(UA_connection *connection, UA_ByteString *packet);
+UA_Int32 TL_getPacketType(UA_ByteString *packet, UA_Int32 *pos);
 
 
 #endif /* OPCUA_TRANSPORTLAYER_H_ */

+ 7 - 7
src/opcua_types.h

@@ -166,10 +166,10 @@ typedef struct UA_AD_DataValue
 typedef struct
 {
 	//ToDo	struct ???? identifier;	identifier is only needed for encoding????
-	Int32 namespaceUri;
-	Int32 symbolicId;
-	Int32 locale;
-	Int32 localizesText;
+	UA_Int32 namespaceUri;
+	UA_Int32 symbolicId;
+	UA_Int32 locale;
+	UA_Int32 localizesText;
 	UA_String additionalInfo;
 	UA_StatusCode innerStatusCode;
 	struct _UA_DiagnosticInfo* innerDiagnosticInfo;
@@ -479,7 +479,7 @@ typedef struct
 	UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value				//ToDo
 	UA_NodeId dataType;
-	Int32 valueRank;
+	UA_Int32 valueRank;
 	UInt16 noOfArrayDimensions;
 	UA_UInt32* arrayDimensions;
 	UA_Byte accessLevel;
@@ -542,7 +542,7 @@ typedef struct
 	UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value			//ToDo
 	UA_NodeId dataType;
-	Int32 valueRank;
+	UA_Int32 valueRank;
 	UInt16 noOfArrayDimensions;
 	UA_UInt32* arrayDimesions;
 	Boolean isAbstract;
@@ -806,7 +806,7 @@ typedef struct UA_AD_ResponseHeader
 	UA_AD_IntegerId requestHandle;
 	UA_StatusCode serviceResult;
 	UA_DiagnosticInfo *serviceDiagnostics;
-	Int16 noOfStringTable;		// Unsigned: -1 == Empty Array
+	UA_Int16 noOfStringTable;		// Unsigned: -1 == Empty Array
 	UA_String** stringTable;	//  this is an array of strings, i.e. String** or String* ... []
 	UA_ExtensionObject *additionalHeader;
 }

+ 9 - 9
src/util/UA_indexedList.c

@@ -5,12 +5,12 @@ void UA_indexedList_defaultFreer(void* payload){
 	UA_list_defaultFreer(payload);
 }
 
-Int32 UA_indexedList_init(UA_indexedList_List* const list){
+UA_Int32 UA_indexedList_init(UA_indexedList_List* const list){
 	if(list==NULL)return UA_ERROR;
 	return UA_list_init((UA_list_List*)list);
 }
 
-Int32 UA_indexedList_destroy(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor){
+UA_Int32 UA_indexedList_destroy(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* current = NULL;
 	current=list->first;
@@ -30,7 +30,7 @@ Int32 UA_indexedList_destroy(UA_indexedList_List* const list, UA_indexedList_Pay
 	return UA_NO_ERROR;
 }
 
-Int32 UA_indexedList_initElement(UA_indexedList_Element* const elem){
+UA_Int32 UA_indexedList_initElement(UA_indexedList_Element* const elem){
 	if(elem==NULL)return UA_ERROR;
 	elem->father = NULL;
 	elem->index = -1;
@@ -38,7 +38,7 @@ Int32 UA_indexedList_initElement(UA_indexedList_Element* const elem){
 	return UA_NO_ERROR;
 }
 
-Int32 UA_indexedList_addValue(UA_indexedList_List* const list, Int32 index, void* payload){
+UA_Int32 UA_indexedList_addValue(UA_indexedList_List* const list, UA_Int32 index, void* payload){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* dllElem = (UA_list_Element*)malloc(sizeof(*dllElem));
 	UA_list_initElement(dllElem);
@@ -51,7 +51,7 @@ Int32 UA_indexedList_addValue(UA_indexedList_List* const list, Int32 index, void
 	return UA_list_addElementToBack((UA_list_List*)list, dllElem);
 }
 
-Int32 UA_indexedList_addValueToFront(UA_indexedList_List* const list, Int32 index, void* payload){
+UA_Int32 UA_indexedList_addValueToFront(UA_indexedList_List* const list, UA_Int32 index, void* payload){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* dllElem = (UA_list_Element*)malloc(sizeof(*dllElem));
 	UA_list_initElement(dllElem);
@@ -64,7 +64,7 @@ Int32 UA_indexedList_addValueToFront(UA_indexedList_List* const list, Int32 inde
 	return UA_list_addElementToFront((UA_list_List*)list, dllElem);
 }
 
-UA_indexedList_Element* UA_indexedList_find(UA_indexedList_List* const list, Int32 index){
+UA_indexedList_Element* UA_indexedList_find(UA_indexedList_List* const list, UA_Int32 index){
 	if(list==NULL)return NULL;
 	UA_list_Element* current = list->first;
 	while(current){
@@ -79,7 +79,7 @@ UA_indexedList_Element* UA_indexedList_find(UA_indexedList_List* const list, Int
 	return NULL;
 }
 
-void* UA_indexedList_findValue(UA_indexedList_List* const list, Int32 index){
+void* UA_indexedList_findValue(UA_indexedList_List* const list, UA_Int32 index){
 	if(list==NULL)return NULL;
 	UA_indexedList_Element* iilElem = UA_indexedList_find(list, index);
 	if(iilElem){
@@ -88,7 +88,7 @@ void* UA_indexedList_findValue(UA_indexedList_List* const list, Int32 index){
 	return NULL;
 }
 
-Int32 UA_indexedList_iterateValues(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor){
+UA_Int32 UA_indexedList_iterateValues(UA_indexedList_List* const list, UA_indexedList_PayloadVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* current = list->first;
 	while(current){
@@ -104,7 +104,7 @@ Int32 UA_indexedList_iterateValues(UA_indexedList_List* const list, UA_indexedLi
 	return UA_NO_ERROR;
 }
 
-Int32 UA_indexedList_removeElement(UA_indexedList_List* const list, UA_indexedList_Element* elem, UA_indexedList_PayloadVisitor visitor){
+UA_Int32 UA_indexedList_removeElement(UA_indexedList_List* const list, UA_indexedList_Element* elem, UA_indexedList_PayloadVisitor visitor){
 	if(list==NULL || elem==NULL)return UA_ERROR;
 	if(visitor){
 		(*visitor)(elem->payload);

+ 12 - 12
src/util/UA_list.c

@@ -7,7 +7,7 @@ void UA_list_defaultFreer(void* payload){
 	}
 }
 
-Int32 UA_list_initElement(UA_list_Element* const element){
+UA_Int32 UA_list_initElement(UA_list_Element* const element){
 	if(element==NULL)return UA_ERROR;
 	element->next=NULL;
 	element->prev=NULL;
@@ -16,7 +16,7 @@ Int32 UA_list_initElement(UA_list_Element* const element){
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_init(UA_list_List* const list){
+UA_Int32 UA_list_init(UA_list_List* const list){
 	if(list==NULL)return UA_ERROR;
 	list->first = NULL;
 	list->last = NULL;
@@ -24,7 +24,7 @@ Int32 UA_list_init(UA_list_List* const list){
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_addElementToFront(UA_list_List* const list, UA_list_Element* const element){
+UA_Int32 UA_list_addElementToFront(UA_list_List* const list, UA_list_Element* const element){
 	if(list==NULL || element==NULL)return UA_ERROR;
 	UA_list_Element* second = NULL;
 	second = list->first;
@@ -42,7 +42,7 @@ Int32 UA_list_addElementToFront(UA_list_List* const list, UA_list_Element* const
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_addPayloadToFront(UA_list_List* const list, void* const payload){
+UA_Int32 UA_list_addPayloadToFront(UA_list_List* const list, void* const payload){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* elem = (UA_list_Element*)opcua_malloc(sizeof(*elem));
 	UA_list_initElement(elem);
@@ -51,7 +51,7 @@ Int32 UA_list_addPayloadToFront(UA_list_List* const list, void* const payload){
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_addElementToBack(UA_list_List* const list, UA_list_Element* const element){
+UA_Int32 UA_list_addElementToBack(UA_list_List* const list, UA_list_Element* const element){
 	if(list==NULL || element == NULL)return UA_ERROR;
 	UA_list_Element* secondLast = NULL;
 	secondLast = list->last;
@@ -69,7 +69,7 @@ Int32 UA_list_addElementToBack(UA_list_List* const list, UA_list_Element* const
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_addPayloadToBack(UA_list_List* const list, void* const payload){
+UA_Int32 UA_list_addPayloadToBack(UA_list_List* const list, void* const payload){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* elem = (UA_list_Element*)opcua_malloc(sizeof(*elem));
 	UA_list_initElement(elem);
@@ -78,7 +78,7 @@ Int32 UA_list_addPayloadToBack(UA_list_List* const list, void* const payload){
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_removeFirst(UA_list_List* const list, UA_list_PayloadVisitor visitor){
+UA_Int32 UA_list_removeFirst(UA_list_List* const list, UA_list_PayloadVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* temp = NULL;
 	if(list->first){
@@ -98,7 +98,7 @@ Int32 UA_list_removeFirst(UA_list_List* const list, UA_list_PayloadVisitor visit
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_removeLast(UA_list_List* const list, UA_list_PayloadVisitor visitor){
+UA_Int32 UA_list_removeLast(UA_list_List* const list, UA_list_PayloadVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* temp = NULL;
 	if(list->last){
@@ -119,7 +119,7 @@ Int32 UA_list_removeLast(UA_list_List* const list, UA_list_PayloadVisitor visito
 }
 
 
-Int32 UA_list_removeElement(UA_list_Element* const elem, UA_list_PayloadVisitor visitor){
+UA_Int32 UA_list_removeElement(UA_list_Element* const elem, UA_list_PayloadVisitor visitor){
 	if(elem==NULL)return UA_ERROR;
 	if(elem==elem->father->first){
 		return UA_list_removeFirst(elem->father, visitor);
@@ -139,7 +139,7 @@ Int32 UA_list_removeElement(UA_list_Element* const elem, UA_list_PayloadVisitor
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_destroy(UA_list_List* const list, UA_list_PayloadVisitor visitor){
+UA_Int32 UA_list_destroy(UA_list_List* const list, UA_list_PayloadVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* current = NULL;
 	current=list->first;
@@ -155,7 +155,7 @@ Int32 UA_list_destroy(UA_list_List* const list, UA_list_PayloadVisitor visitor){
 	return UA_NO_ERROR;
 }
 
-Int32 UA_list_iterateElement(UA_list_List* const list, UA_list_ElementVisitor visitor){
+UA_Int32 UA_list_iterateElement(UA_list_List* const list, UA_list_ElementVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* current = list->first;
 	while(current){
@@ -178,7 +178,7 @@ Int32 UA_list_iterateElement(UA_list_List* const list, UA_list_ElementVisitor vi
 	return UA_NO_ERROR;
 }*/
 /** ANSI C forbids function nesting - reworked ugly version **/
-Int32 UA_list_iteratePayload(UA_list_List* const list, UA_list_PayloadVisitor visitor){
+UA_Int32 UA_list_iteratePayload(UA_list_List* const list, UA_list_PayloadVisitor visitor){
 	if(list==NULL)return UA_ERROR;
 	UA_list_Element* current = list->first;
 	while(current){

+ 8 - 8
tests/check_indexedList.c

@@ -4,8 +4,8 @@
 #include "check.h"
 
 /* global test counters */
-Int32 visit_count = 0;
-Int32 free_count = 0;
+UA_Int32 visit_count = 0;
+UA_Int32 free_count = 0;
 
 void visitor(void* payload){
 	visit_count++;
@@ -22,7 +22,7 @@ Boolean matcher(void* payload){
 	if(payload == NULL){
 		return FALSE;
 	}
-	if(*((Int32*)payload) == 42){
+	if(*((UA_Int32*)payload) == 42){
 		return TRUE;
 	}
 	return FALSE;
@@ -36,13 +36,13 @@ START_TEST(linkedList_test_basic)
 
 	ck_assert_int_eq(list.size, 0);
 
-	Int32* payload = (Int32*)malloc(sizeof(*payload));
+	UA_Int32* payload = (UA_Int32*)malloc(sizeof(*payload));
 	*payload = 10;
 	UA_indexedList_addValue(&list, 1, payload);
-	payload = (Int32*)malloc(sizeof(*payload));
+	payload = (UA_Int32*)malloc(sizeof(*payload));
 	*payload = 20;
 	UA_indexedList_addValueToFront(&list, 2, payload);
-	payload = (Int32*)malloc(sizeof(*payload));
+	payload = (UA_Int32*)malloc(sizeof(*payload));
 	*payload = 30;
 	UA_indexedList_addValue(&list, 3, payload);
 
@@ -52,7 +52,7 @@ START_TEST(linkedList_test_basic)
 	ck_assert_int_eq(visit_count, 3);
 	visit_count = 0;
 
-	payload = (Int32*)UA_indexedList_findValue(&list, 2);
+	payload = (UA_Int32*)UA_indexedList_findValue(&list, 2);
 	if(payload){
 		ck_assert_int_eq(*payload, 20);
 	}else{
@@ -64,7 +64,7 @@ START_TEST(linkedList_test_basic)
 	free_count=0;
 	ck_assert_int_eq(list.size, 2);
 
-	payload = (Int32*)UA_indexedList_findValue(&list, 2);
+	payload = (UA_Int32*)UA_indexedList_findValue(&list, 2);
 	if(payload){
 		fail("Previously removed element 20 found");
 	}

+ 7 - 7
tests/check_list.c

@@ -4,8 +4,8 @@
 #include "check.h"
 
 /* global test counters */
-Int32 visit_count = 0;
-Int32 free_count = 0;
+UA_Int32 visit_count = 0;
+UA_Int32 free_count = 0;
 
 void visitor(void* payload){
 	visit_count++;
@@ -22,7 +22,7 @@ Boolean matcher(void* payload){
 	if(payload == NULL){
 		return FALSE;
 	}
-	if(*((Int32*)payload) == 42){
+	if(*((UA_Int32*)payload) == 42){
 		return TRUE;
 	}
 	return FALSE;
@@ -36,13 +36,13 @@ START_TEST(list_test_basic)
 
 	ck_assert_int_eq(list.size, 0);
 
-	Int32* payload = (Int32*)opcua_malloc(sizeof(*payload));
+	UA_Int32* payload = (UA_Int32*)opcua_malloc(sizeof(*payload));
 	*payload = 42;
 	UA_list_addPayloadToFront(&list, payload);
-	payload = (Int32*)opcua_malloc(sizeof(*payload));
+	payload = (UA_Int32*)opcua_malloc(sizeof(*payload));
 	*payload = 24;
 	UA_list_addPayloadToFront(&list, payload);
-	payload = (Int32*)opcua_malloc(sizeof(*payload));
+	payload = (UA_Int32*)opcua_malloc(sizeof(*payload));
 	*payload = 1;
 	UA_list_addPayloadToBack(&list, payload);
 
@@ -55,7 +55,7 @@ START_TEST(list_test_basic)
 	UA_list_Element* elem = NULL;
 	elem = UA_list_find(&list, matcher);
 	if(elem){
-		ck_assert_int_eq((*((Int32*)elem->payload)), 42);
+		ck_assert_int_eq((*((UA_Int32*)elem->payload)), 42);
 		UA_list_removeElement(elem, freer);
 		ck_assert_int_eq(free_count, 1);
 		free_count = 0; //reset free counter

+ 3 - 3
tests/check_stack.c

@@ -104,7 +104,7 @@ END_TEST
 START_TEST(decodeInt16_test_positives)
 {
 	UA_Int32 p = 0;
-	Int16 val;
+	UA_Int16 val;
 	AD_RawMessage rawMessage;
 	char mem[] = {
 			0x00,0x00,	// 0
@@ -130,7 +130,7 @@ END_TEST
 START_TEST(decodeInt16_test_negatives)
 {
 	UA_Int32 p = 0;
-	Int16 val;
+	UA_Int16 val;
 	AD_RawMessage rawMessage;
 	char mem[] = {
 			0xFF,0xFF,	// -1
@@ -165,7 +165,7 @@ START_TEST(encodeInt16_test)
 
 	ck_assert_int_eq(position, 2);
 	UA_Int32 p = 0;
-	Int16 val;
+	UA_Int16 val;
 	decoder_decodeBuiltInDatatype(rawMessage.message, INT16, &p, &val);
 	ck_assert_int_eq(val,testUInt16);
 	//ck_assert_int_eq(rawMessage.message[0], 0xAB);

+ 48 - 48
tool/opcua_basictypes.c

@@ -129,8 +129,8 @@ UA_Int32 UA_UInt16_encode(UA_UInt16 const *src, UA_Int32* pos, char * dst) {
 	return UA_SUCCESS;
 }
 UA_Int32 UA_UInt16_decode(char const * src, UA_Int32* pos, UA_UInt16* dst) {
-	Byte t1 = src[(*pos)++];
-	UInt16 t2 = (UInt16) (src[(*pos)++] << 8);
+	UA_Byte t1 = src[(*pos)++];
+	UA_UInt16 t2 = (UA_UInt16) (src[(*pos)++] << 8);
 	*dst = t1 + t2;
 	return UA_SUCCESS;
 }
@@ -144,8 +144,8 @@ UA_Int32 UA_Int16_encode(UA_Int16 const * src, UA_Int32* pos, char* dst) {
 	return UA_SUCCESS;
 }
 UA_Int32 UA_Int16_decode(char const * src, UA_Int32* pos, UA_Int16 *dst) {
-	Int16 t1 = (Int16) (((SByte) (src[(*pos)++]) & 0xFF));
-	Int16 t2 = (Int16) (((SByte) (src[(*pos)++]) & 0xFF) << 8);
+	UA_Int16 t1 = (UA_Int16) (((UA_SByte) (src[(*pos)++]) & 0xFF));
+	UA_Int16 t2 = (UA_Int16) (((UA_SByte) (src[(*pos)++]) & 0xFF) << 8);
 	*dst = t1 + t2;
 	return UA_SUCCESS;
 }
@@ -159,10 +159,10 @@ UA_Int32 UA_Int32_encode(UA_Int32 const * src, UA_Int32* pos, char *dst) {
 	return UA_SUCCESS;
 }
 UA_Int32 UA_Int32_decode(char const * src, UA_Int32* pos, UA_Int32* dst) {
-	UA_Int32 t1 = (UA_Int32) (((SByte) (src[(*pos)++]) & 0xFF));
-	UA_Int32 t2 = (UA_Int32) (((SByte) (src[(*pos)++]) & 0xFF) << 8);
-	UA_Int32 t3 = (UA_Int32) (((SByte) (src[(*pos)++]) & 0xFF) << 16);
-	UA_Int32 t4 = (UA_Int32) (((SByte) (src[(*pos)++]) & 0xFF) << 24);
+	UA_Int32 t1 = (UA_Int32) (((UA_SByte) (src[(*pos)++]) & 0xFF));
+	UA_Int32 t2 = (UA_Int32) (((UA_SByte) (src[(*pos)++]) & 0xFF) << 8);
+	UA_Int32 t3 = (UA_Int32) (((UA_SByte) (src[(*pos)++]) & 0xFF) << 16);
+	UA_Int32 t4 = (UA_Int32) (((UA_SByte) (src[(*pos)++]) & 0xFF) << 24);
 	*dst = t1 + t2 + t3 + t4;
 	return UA_SUCCESS;
 }
@@ -176,10 +176,10 @@ UA_Int32 UA_UInt32_encode(UA_UInt32 const * src, UA_Int32* pos, char *dst) {
 	return UA_SUCCESS;
 }
 UA_Int32 UA_UInt32_decode(char const * src, UA_Int32* pos, UA_UInt32 *dst) {
-	UInt32 t1 = (UInt32) src[(*pos)++];
-	UInt32 t2 = (UInt32) src[(*pos)++] << 8;
-	UInt32 t3 = (UInt32) src[(*pos)++] << 16;
-	UInt32 t4 = (UInt32) src[(*pos)++] << 24;
+	UA_UInt32 t1 = (UA_UInt32) src[(*pos)++];
+	UA_UInt32 t2 = (UA_UInt32) src[(*pos)++] << 8;
+	UA_UInt32 t3 = (UA_UInt32) src[(*pos)++] << 16;
+	UA_UInt32 t4 = (UA_UInt32) src[(*pos)++] << 24;
 	*dst = t1 + t2 + t3 + t4;
 	return UA_SUCCESS;
 }
@@ -193,14 +193,14 @@ UA_Int32 UA_Int64_encode(UA_Int64 const * src, UA_Int32* pos, char *dst) {
 	return UA_SUCCESS;
 }
 UA_Int32 UA_Int64_decode(char const * src, UA_Int32* pos, UA_Int64* dst) {
-	Int64 t1 = (Int64) src[(*pos)++];
-	Int64 t2 = (Int64) src[(*pos)++] << 8;
-	Int64 t3 = (Int64) src[(*pos)++] << 16;
-	Int64 t4 = (Int64) src[(*pos)++] << 24;
-	Int64 t5 = (Int64) src[(*pos)++] << 32;
-	Int64 t6 = (Int64) src[(*pos)++] << 40;
-	Int64 t7 = (Int64) src[(*pos)++] << 48;
-	Int64 t8 = (Int64) src[(*pos)++] << 56;
+	UA_Int64 t1 = (UA_Int64) src[(*pos)++];
+	UA_Int64 t2 = (UA_Int64) src[(*pos)++] << 8;
+	UA_Int64 t3 = (UA_Int64) src[(*pos)++] << 16;
+	UA_Int64 t4 = (UA_Int64) src[(*pos)++] << 24;
+	UA_Int64 t5 = (UA_Int64) src[(*pos)++] << 32;
+	UA_Int64 t6 = (UA_Int64) src[(*pos)++] << 40;
+	UA_Int64 t7 = (UA_Int64) src[(*pos)++] << 48;
+	UA_Int64 t8 = (UA_Int64) src[(*pos)++] << 56;
 	*dst = t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8;
 	return UA_SUCCESS;
 }
@@ -210,18 +210,18 @@ UA_TYPE_METHOD_DELETEMEMBERS_NOACTION(UA_Int64)
 UA_TYPE_METHOD_CALCSIZE_SIZEOF(UA_UInt64)
 UA_Int32 UA_UInt64_encode(UA_UInt64 const * src , UA_Int32* pos, char * dst) {
 	memcpy(&(dst[*pos]), src, sizeof(UA_UInt64));
-	*pos += sizeof(UInt64);
+	*pos += sizeof(UA_UInt64);
 	return UA_SUCCESS;
 }
 UA_Int32 UA_UInt64_decode(char const * src, UA_Int32* pos, UA_UInt64* dst) {
-	UInt64 t1 = (UInt64) src[(*pos)++];
-	UInt64 t2 = (UInt64) src[(*pos)++] << 8;
-	UInt64 t3 = (UInt64) src[(*pos)++] << 16;
-	UInt64 t4 = (UInt64) src[(*pos)++] << 24;
-	UInt64 t5 = (UInt64) src[(*pos)++] << 32;
-	UInt64 t6 = (UInt64) src[(*pos)++] << 40;
-	UInt64 t7 = (UInt64) src[(*pos)++] << 48;
-	UInt64 t8 = (UInt64) src[(*pos)++] << 56;
+	UA_UInt64 t1 = (UA_UInt64) src[(*pos)++];
+	UA_UInt64 t2 = (UA_UInt64) src[(*pos)++] << 8;
+	UA_UInt64 t3 = (UA_UInt64) src[(*pos)++] << 16;
+	UA_UInt64 t4 = (UA_UInt64) src[(*pos)++] << 24;
+	UA_UInt64 t5 = (UA_UInt64) src[(*pos)++] << 32;
+	UA_UInt64 t6 = (UA_UInt64) src[(*pos)++] << 40;
+	UA_UInt64 t7 = (UA_UInt64) src[(*pos)++] << 48;
+	UA_UInt64 t8 = (UA_UInt64) src[(*pos)++] << 56;
 	*dst = t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8;
 	return UA_SUCCESS;
 }
@@ -247,8 +247,8 @@ UA_TYPE_METHOD_DELETEMEMBERS_NOACTION(UA_Float)
 UA_TYPE_METHOD_CALCSIZE_SIZEOF(UA_Double)
 UA_Int32 UA_Double_decode(char const * src, UA_Int32* pos, UA_Double * dst) {
 	// TODO: not yet implemented
-	Double tmpDouble;
-	tmpDouble = (Double) (src[*pos]);
+	UA_Double tmpDouble;
+	tmpDouble = (UA_Double) (src[*pos]);
 	*pos += sizeof(UA_Double);
 	*dst = tmpDouble;
 	return UA_SUCCESS;
@@ -418,7 +418,7 @@ UA_Int32 UA_NodeId_calcSize(UA_NodeId const *p) {
 			length += 4 * sizeof(UA_Byte);
 			break;
 		case UA_NodeIdType_Numeric:
-			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + sizeof(UInt32);
+			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + sizeof(UA_UInt32);
 			break;
 		case UA_NodeIdType_String:
 			length += sizeof(UA_Byte) + sizeof(UA_UInt16) + UA_String_calcSize(&(p->identifier.string));
@@ -550,7 +550,7 @@ UA_Int32 UA_ExpandedNodeId_calcSize(UA_ExpandedNodeId const * p) {
 	return length;
 }
 UA_Int32 UA_ExpandedNodeId_encode(UA_ExpandedNodeId const * src, UA_Int32* pos, char *dst) {
-	UInt32 retval = UA_SUCCESS;
+	UA_UInt32 retval = UA_SUCCESS;
 	retval |= UA_NodeId_encode(&(src->nodeId),pos,dst);
 	if (src->nodeId.encodingByte & NIEVT_NAMESPACE_URI_FLAG) {
 		retval |= UA_String_encode(&(src->namespaceUri),pos,dst);
@@ -562,7 +562,7 @@ UA_Int32 UA_ExpandedNodeId_encode(UA_ExpandedNodeId const * src, UA_Int32* pos,
 }
 UA_Int32 UA_ExpandedNodeId_decode(char const * src, UA_Int32* pos,
 		UA_ExpandedNodeId *dst) {
-	UInt32 retval = UA_SUCCESS;
+	UA_UInt32 retval = UA_SUCCESS;
 	retval |= UA_NodeId_decode(src,pos,&(dst->nodeId));
 	if (dst->nodeId.encodingByte & NIEVT_NAMESPACE_URI_FLAG) {
 		dst->nodeId.namespace = 0;
@@ -590,7 +590,7 @@ UA_Int32 UA_ExtensionObject_calcSize(UA_ExtensionObject const * p) {
 		length = sizeof(UA_ExtensionObject);
 	} else {
 		length += UA_NodeId_calcSize(&(p->typeId));
-		length += sizeof(Byte); //p->encoding
+		length += sizeof(UA_Byte); //p->encoding
 		switch (p->encoding) {
 		case 0x00:
 			length += sizeof(UA_Int32); //p->body.length
@@ -724,8 +724,8 @@ UA_Int32 UA_DiagnosticInfo_calcSize(UA_DiagnosticInfo const * ptr) {
 	if (ptr == UA_NULL) {
 		length = sizeof(UA_DiagnosticInfo);
 	} else {
-		Byte mask;
-		length += sizeof(Byte);	// EncodingMask
+		UA_Byte mask;
+		length += sizeof(UA_Byte);	// EncodingMask
 
 		for (mask = 0x01; mask <= 0x40; mask *= 2) {
 			switch (mask & (ptr->encodingMask)) {
@@ -795,8 +795,8 @@ UA_TYPE_METHOD_DELETEMEMBERS_AS(UA_StatusCode, UA_UInt32)
 
 UA_Int32 UA_QualifiedName_calcSize(UA_QualifiedName const * p) {
 	UA_Int32 length = 0;
-	length += sizeof(UInt16); //qualifiedName->namespaceIndex
-	length += sizeof(UInt16); //qualifiedName->reserved
+	length += sizeof(UA_UInt16); //qualifiedName->namespaceIndex
+	length += sizeof(UA_UInt16); //qualifiedName->reserved
 	length += UA_String_calcSize(&(p->name)); //qualifiedName->name
 	return length;
 }
@@ -821,8 +821,8 @@ UA_Int32 UA_QualifiedName_encode(UA_QualifiedName const *src, UA_Int32* pos,
 UA_Int32 UA_Variant_calcSize(UA_Variant const * p) {
 	UA_Int32 length = 0;
 	UA_Int32 ns0Id = p->encodingMask & 0x1F; // Bits 1-5
-	Boolean isArray = p->encodingMask & (0x01 << 7); // Bit 7
-	Boolean hasDimensions = p->encodingMask & (0x01 << 6); // Bit 6
+	UA_Boolean isArray = p->encodingMask & (0x01 << 7); // Bit 7
+	UA_Boolean hasDimensions = p->encodingMask & (0x01 << 6); // Bit 6
 	int i;
 
 	if (p->vt == UA_NULL || ( p->encodingMask & 0x1F) != p->vt->Id) {
@@ -977,19 +977,19 @@ UA_Int32 UA_DataValue_calcSize(UA_DataValue const * p) {
 			length += UA_Variant_calcSize(&(p->value));
 		}
 		if (p->encodingMask & 0x02) {
-			length += sizeof(UInt32); //dataValue->status
+			length += sizeof(UA_UInt32); //dataValue->status
 		}
 		if (p->encodingMask & 0x04) {
-			length += sizeof(Int64); //dataValue->sourceTimestamp
+			length += sizeof(UA_Int64); //dataValue->sourceTimestamp
 		}
 		if (p->encodingMask & 0x08) {
-			length += sizeof(Int64); //dataValue->serverTimestamp
+			length += sizeof(UA_Int64); //dataValue->serverTimestamp
 		}
 		if (p->encodingMask & 0x10) {
-			length += sizeof(Int64); //dataValue->sourcePicoseconds
+			length += sizeof(UA_Int64); //dataValue->sourcePicoseconds
 		}
 		if (p->encodingMask & 0x20) {
-			length += sizeof(Int64); //dataValue->serverPicoseconds
+			length += sizeof(UA_Int64); //dataValue->serverPicoseconds
 		}
 	}
 	return length;
@@ -1064,7 +1064,7 @@ Int32 extensionObject_calcSize(UA_ExtensionObject *extensionObject) {
 	Int32 length = 0;
 
 	length += nodeId_calcSize(&(extensionObject->typeId));
-	length += sizeof(Byte); //The EncodingMask Byte
+	length += sizeof(UA_Byte); //The EncodingMask Byte
 
 	if (extensionObject->encoding == BODY_IS_BYTE_STRING
 			|| extensionObject->encoding == BODY_IS_XML_ELEMENT) {
@@ -1092,7 +1092,7 @@ Int32 responseHeader_calcSize(UA_AD_ResponseHeader *responseHeader) {
 	length += diagnosticInfo_calcSize(responseHeader->serviceDiagnostics);
 
 	// String stringTable[], see 62541-6 § 5.2.4
-	length += sizeof(Int32); // Length of Stringtable always
+	length += sizeof(UA_Int32); // Length of Stringtable always
 	if (responseHeader->noOfStringTable > 0) {
 		for (i = 0; i < responseHeader->noOfStringTable; i++) {
 			length += UAString_calcSize(responseHeader->stringTable[i]);