Browse Source

tools folder compiles...

FlorianPalm 11 years ago
parent
commit
2e6eb93c75

+ 41 - 41
src/opcua_advancedDatatypes.h

@@ -14,7 +14,7 @@ typedef struct AD_RawMessage_t AD_RawMessage;
 struct AD_RawMessage_t
 {
 	char *message;
-	UInt32 length;
+	UA_UInt32 length;
 };
 
 enum BED_ApplicationType {SERVER_0, CLIENT_1, CLIENTANDSERVER_2, DISCOVERYSERVER_3};
@@ -96,7 +96,7 @@ struct BED_ContentFilter
 * Chapter: 7.5
 * Page: 113
 */
-typedef UInt32 BED_Counter;
+typedef UA_UInt32 BED_Counter;
 
 
 /**
@@ -158,7 +158,7 @@ struct BED_EndpointDescription
 	UA_String securityPolicyUri;
 //	struct BED_UserTokenPolicy useridentyTokens[];
 	UA_String transportProfileUri;
-	Byte securtiyLevel;
+	UA_Byte securtiyLevel;
 };
 
 /**
@@ -196,7 +196,7 @@ struct BED_ExtensibleParameter
 * Chapter: 7.12
 * Page: 118
 */
-typedef UInt32 BED_Index;
+typedef UA_UInt32 BED_Index;
 
 
 /**
@@ -205,7 +205,7 @@ typedef UInt32 BED_Index;
 * Chapter: 7.13
 * Page: 118
 */
-typedef UInt32 BED_IntegerId;
+typedef UA_UInt32 BED_IntegerId;
 
 
 /**
@@ -269,8 +269,8 @@ enum BED_MonitoringFilter
 struct BED_DataChangeFilter
 {
 //ToDo	enum BED_MonitoringFilter trigger = BED_MonitoringFilter.DATA_CHANGE_FILTER;
-	UInt32 deadbandType;
-	Double deadbandValue;
+	UA_UInt32 deadbandType;
+	UA_Double deadbandValue;
 };
 
 
@@ -308,8 +308,8 @@ struct BED_AggregateFilter
 //ToDo	AggregateConfiguration aggregateConfiguration;		//ToDo
 	Boolean useServerCapabilitiesDafaults;
 	Boolean treatUncertainAsBad;
-	Byte percentDataBad;
-	Byte percentDataGood;
+	UA_Byte percentDataBad;
+	UA_Byte percentDataGood;
 	Boolean steppedSlopedExtrapolation;
 };
 
@@ -388,12 +388,12 @@ enum BED_NodeAttributesBitMask
 */
 struct BED_ObjectAttributes
 {
-	UInt32 specifiedAttribute;	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttribute;	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
-	Byte eventNotifier;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_Byte eventNotifier;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -405,19 +405,19 @@ struct BED_ObjectAttributes
 */
 struct BED_VariableAttributes
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value				//ToDo
 //	struct UA_NodeId dataType;
 	UA_Int32 valueRank;
 //	UInt32 arrayDimensions[];
-	Byte accessLevel;
-	Byte userAccesLevel;
+	UA_Byte accessLevel;
+	UA_Byte userAccesLevel;
 //ToDo	Duration???? minimumSamplingInterval;			//ToDo
 	Boolean historizing;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -429,13 +429,13 @@ struct BED_VariableAttributes
 */
 struct BED_MethodAttributes
 {
-	UInt32 specifiedAttributes;	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes;	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 	Boolean executable;
 	Boolean userExecutable;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -447,12 +447,12 @@ struct BED_MethodAttributes
 */
 struct BED_ObjectTypeAttributes
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 	Boolean isAbstract;
-	UInt32 wirteMask;
-	UInt32 userWriteMask;
+	UA_UInt32 wirteMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -464,7 +464,7 @@ struct BED_ObjectTypeAttributes
 */
 struct BED_VariableTypeAttributes
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value			//ToDo
@@ -472,8 +472,8 @@ struct BED_VariableTypeAttributes
 	UA_Int32 valueRank;
 //	UInt32 arrayDimesions[];
 	Boolean isAbstract;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -485,14 +485,14 @@ struct BED_VariableTypeAttributes
 */
 struct BED_ReferenceTypeAttributes
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 	Boolean isAbstract;
 	Boolean symmetric;
 //	struct UA_LocalizedText inverseName;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -505,12 +505,12 @@ struct BED_ReferenceTypeAttributes
 */
 struct BED_DataTypeAttributes
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 	Boolean isAbstract;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -523,13 +523,13 @@ struct BED_DataTypeAttributes
 */
 struct BED_ViewAttributes
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 //	struct UA_LocalizedText displayName;
 //	struct UA_LocalizedText description;
 	Boolean containsNoLoops;
-	Byte eventNotifier;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_Byte eventNotifier;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 };
 
 
@@ -696,9 +696,9 @@ struct BED_RequestHeader
 	UA_NodeId authenticationToken;		//ToDo
 	UA_DateTime timestamp;
 	BED_IntegerId requestHandle;
-	UInt32 returnDiagnostics;
+	UA_UInt32 returnDiagnostics;
 	UA_String auditEntryId;
-	UInt32 timeoutHint;
+	UA_UInt32 timeoutHint;
 	UA_ExtensionObject additionalHeader;
 };
 
@@ -872,7 +872,7 @@ enum BED_TimestampsToReturn
 */
 struct BED_UserIdentityTokenEncryptedTokenFormat
 {
-	Byte length[4];
+	UA_Byte length[4];
 //	Byte tokenData[];
 //	Byte serverNonce[];
 };
@@ -966,7 +966,7 @@ struct BED_ViewDescription
 {
 //	struct UA_NodeId viewId;
 	UA_DateTime timestamp;
-	UInt32 viewVersion;
+	UA_UInt32 viewVersion;
 };
 
 

+ 94 - 94
src/opcua_binaryEncDec.c

@@ -19,10 +19,10 @@ UA_Int32 encoder_encodeBuiltInDatatype(void *data, UA_Int32 type, UA_Int32 *pos,
 		encodeBoolean((*(Boolean*) data), pos, dstBuf);
 		break;
 	case SBYTE:
-		encodeSByte((*(Byte*) data), pos, dstBuf);
+		encodeSByte((*(UA_Byte*) data), pos, dstBuf);
 		break;
 	case BYTE:
-		encodeByte((*(Byte*) data), pos, dstBuf);
+		encodeByte((*(UA_Byte*) data), pos, dstBuf);
 		break;
 	case INT16:
 		encodeInt16((*(Int16*) data), pos, dstBuf);
@@ -34,19 +34,19 @@ UA_Int32 encoder_encodeBuiltInDatatype(void *data, UA_Int32 type, UA_Int32 *pos,
 		encodeInt32((*(UA_Int32*) data), pos, dstBuf);
 		break;
 	case UINT32:
-		encodeUInt32(*(UInt32*) (data), pos, dstBuf);
+		encodeUInt32(*(UA_UInt32*) (data), pos, dstBuf);
 		break;
 	case INT64:
-		encodeInt64((*(Int64*) data), pos, dstBuf);
+		encodeInt64((*(UA_Int64*) data), pos, dstBuf);
 		break;
 	case UINT64:
-		encodeUInt64((*(UInt64*) data), pos, dstBuf);
+		encodeUInt64((*(UA_UInt64*) data), pos, dstBuf);
 		break;
 	case FLOAT:
 		encodeFloat((*(Float*) data), pos, dstBuf);
 		break;
 	case DOUBLE:
-		encodeDouble((*(Double*) data), pos, dstBuf);
+		encodeDouble((*(UA_Double*) data), pos, dstBuf);
 		break;
 	case STRING:
 		encodeUAString(((UA_String*) data), pos, dstBuf);
@@ -70,7 +70,7 @@ UA_Int32 encoder_encodeBuiltInDatatype(void *data, UA_Int32 type, UA_Int32 *pos,
 		encodeExpandedNodeId((UA_ExpandedNodeId*) data, pos, dstBuf);
 		break;
 	case STATUS_CODE:
-		encodeUInt32(*((UInt32*) data), pos, dstBuf);
+		encodeUInt32(*((UA_UInt32*) data), pos, dstBuf);
 		break;
 	case QUALIFIED_NAME:
 		encodeQualifiedName(((UA_QualifiedName*) data), pos, dstBuf);
@@ -108,7 +108,7 @@ UA_Int32 decoder_decodeBuiltInDatatype(char const * srcBuf, UA_Int32 type, UA_In
 		decodeSByte(srcBuf, pos, (SByte*) dstStructure);
 		break;
 	case BYTE:
-		decodeByte(srcBuf, pos, (Byte*) dstStructure);
+		decodeByte(srcBuf, pos, (UA_Byte*) dstStructure);
 		break;
 	case INT16:
 		decodeInt16(srcBuf, pos, (Int16*) dstStructure);
@@ -120,19 +120,19 @@ UA_Int32 decoder_decodeBuiltInDatatype(char const * srcBuf, UA_Int32 type, UA_In
 		decodeInt32(srcBuf, pos, (UA_Int32*) dstStructure);
 		break;
 	case UINT32:
-		decodeUInt32(srcBuf, pos, (UInt32*) dstStructure);
+		decodeUInt32(srcBuf, pos, (UA_UInt32*) dstStructure);
 		break;
 	case INT64:
-		decodeInt64(srcBuf, pos, (Int64*) dstStructure);
+		decodeInt64(srcBuf, pos, (UA_Int64*) dstStructure);
 		break;
 	case UINT64:
-		decodeUInt64(srcBuf, pos, (UInt64*) dstStructure);
+		decodeUInt64(srcBuf, pos, (UA_UInt64*) dstStructure);
 		break;
 	case FLOAT:
 		decodeFloat(srcBuf, pos, (Float*) dstStructure);
 		break;
 	case DOUBLE:
-		decodeDouble(srcBuf, pos, (Double*) dstStructure);
+		decodeDouble(srcBuf, pos, (UA_Double*) dstStructure);
 		break;
 	case STRING:
 		decodeUAByteString(srcBuf, pos, (UA_String*) dstStructure);
@@ -459,8 +459,8 @@ UA_Int32 encoder_encodeBuiltInDatatypeArray(void **data, UA_Int32 size, UA_Int32
 			pElement = (SByte*)pElement + 1;
 			break;
 		case BYTE:
-			encoder_encodeBuiltInDatatype((Byte*)pElement, type, pos, dstBuf);
-			pElement = (Byte*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_Byte*)pElement, type, pos, dstBuf);
+			pElement = (UA_Byte*)pElement + 1;
 			break;
 		case INT16:
 			encoder_encodeBuiltInDatatype((Int16*)pElement, type, pos, dstBuf);
@@ -475,24 +475,24 @@ UA_Int32 encoder_encodeBuiltInDatatypeArray(void **data, UA_Int32 size, UA_Int32
 			pElement = (UA_Int32*)pElement + 1;
 			break;
 		case UINT32:
-			encoder_encodeBuiltInDatatype((UInt32*)pElement, type, pos, dstBuf);
-			pElement = (UInt32*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_UInt32*)pElement, type, pos, dstBuf);
+			pElement = (UA_UInt32*)pElement + 1;
 			break;
 		case INT64:
-			encoder_encodeBuiltInDatatype((Int64*)pElement, type, pos, dstBuf);
-			pElement = (Int64*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_Int64*)pElement, type, pos, dstBuf);
+			pElement = (UA_Int64*)pElement + 1;
 			break;
 		case UINT64:
-			encoder_encodeBuiltInDatatype((UInt64*)pElement, type, pos, dstBuf);
-			pElement = (UInt64*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_UInt64*)pElement, type, pos, dstBuf);
+			pElement = (UA_UInt64*)pElement + 1;
 			break;
 		case FLOAT:
 			encoder_encodeBuiltInDatatype((Float*)pElement, type, pos, dstBuf);
 			pElement = (Float*)pElement + 1;
 			break;
 		case DOUBLE:
-			encoder_encodeBuiltInDatatype((Double*)pElement, type, pos, dstBuf);
-			pElement = (Double*)pElement + 1;
+			encoder_encodeBuiltInDatatype((UA_Double*)pElement, type, pos, dstBuf);
+			pElement = (UA_Double*)pElement + 1;
 			break;
 		case STRING:
 			encoder_encodeBuiltInDatatype((UA_String*)pElement, type, pos, dstBuf);
@@ -577,19 +577,19 @@ void encodeSByte(SByte value, UA_Int32 *pos, char *dstBuf) {
 	*pos = (*pos) + 1;
 
 }
-UA_Int32 decodeByte(char const * buf, UA_Int32 *pos, Byte* dst) {
+UA_Int32 decodeByte(char const * buf, UA_Int32 *pos, UA_Byte* dst) {
 	*pos = (*pos) + 1;
-	*dst = (Byte) buf[(*pos) - 1];
+	*dst = (UA_Byte) buf[(*pos) - 1];
 	return UA_NO_ERROR;
 
 }
-void encodeByte(Byte value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(Byte));
+void encodeByte(UA_Byte value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_Byte));
 	*pos = (*pos) + 1;
 }
 
 UA_Int32 decodeUInt16(char const * buf, UA_Int32 *pos, UInt16 *dst) {
-	Byte t1 = buf[*pos];
+	UA_Byte t1 = buf[*pos];
 	UInt16 t2 = (UInt16) (buf[*pos + 1] << 8);
 	*pos += 2;
 	*dst = t1 + t2;
@@ -626,57 +626,57 @@ void encodeInt32(UA_Int32 value, UA_Int32 *pos, char *dstBuf) {
 	*pos = (*pos) + sizeof(UA_Int32);
 }
 
-UA_Int32 decodeUInt32(char const * buf, UA_Int32 *pos, UInt32 *dst) {
-	Byte t1 = buf[*pos];
-	UInt32 t2 = (UInt32) buf[*pos + 1] << 8;
-	UInt32 t3 = (UInt32) buf[*pos + 2] << 16;
-	UInt32 t4 = (UInt32) buf[*pos + 3] << 24;
-	*pos += sizeof(UInt32);
+UA_Int32 decodeUInt32(char const * buf, UA_Int32 *pos, UA_UInt32 *dst) {
+	UA_Byte t1 = buf[*pos];
+	UA_UInt32 t2 = (UA_UInt32) buf[*pos + 1] << 8;
+	UA_UInt32 t3 = (UA_UInt32) buf[*pos + 2] << 16;
+	UA_UInt32 t4 = (UA_UInt32) buf[*pos + 3] << 24;
+	*pos += sizeof(UA_UInt32);
 	*dst = t1 + t2 + t3 + t4;
 	return UA_NO_ERROR;
 }
 
-void encodeUInt32(UInt32 value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(UInt32));
+void encodeUInt32(UA_UInt32 value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_UInt32));
 	*pos += 4;
 }
 
-UA_Int32 decodeInt64(char const * buf, UA_Int32 *pos, Int64 *dst) {
+UA_Int32 decodeInt64(char const * buf, UA_Int32 *pos, UA_Int64 *dst) {
 
 	SByte t1 = buf[*pos];
-	Int64 t2 = (Int64) buf[*pos + 1] << 8;
-	Int64 t3 = (Int64) buf[*pos + 2] << 16;
-	Int64 t4 = (Int64) buf[*pos + 3] << 24;
-	Int64 t5 = (Int64) buf[*pos + 4] << 32;
-	Int64 t6 = (Int64) buf[*pos + 5] << 40;
-	Int64 t7 = (Int64) buf[*pos + 6] << 48;
-	Int64 t8 = (Int64) buf[*pos + 7] << 56;
+	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;
+	UA_Int64 t5 = (UA_Int64) buf[*pos + 4] << 32;
+	UA_Int64 t6 = (UA_Int64) buf[*pos + 5] << 40;
+	UA_Int64 t7 = (UA_Int64) buf[*pos + 6] << 48;
+	UA_Int64 t8 = (UA_Int64) buf[*pos + 7] << 56;
 	*pos += 8;
 	*dst = t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8;
 	return UA_NO_ERROR;
 }
-void encodeInt64(Int64 value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(Int64));
-	*pos = (*pos) + sizeof(Int64);
+void encodeInt64(UA_Int64 value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_Int64));
+	*pos = (*pos) + sizeof(UA_Int64);
 }
 
-UA_Int32 decodeUInt64(char const * buf, UA_Int32 *pos, UInt64 *dst) {
+UA_Int32 decodeUInt64(char const * buf, UA_Int32 *pos, UA_UInt64 *dst) {
 
-	Byte t1 = buf[*pos];
-	UInt64 t2 = (UInt64) buf[*pos + 1] << 8;
-	UInt64 t3 = (UInt64) buf[*pos + 2] << 16;
-	UInt64 t4 = (UInt64) buf[*pos + 3] << 24;
-	UInt64 t5 = (UInt64) buf[*pos + 4] << 32;
-	UInt64 t6 = (UInt64) buf[*pos + 5] << 40;
-	UInt64 t7 = (UInt64) buf[*pos + 6] << 48;
-	UInt64 t8 = (UInt64) buf[*pos + 7] << 56;
+	UA_Byte t1 = buf[*pos];
+	UA_UInt64 t2 = (UA_UInt64) buf[*pos + 1] << 8;
+	UA_UInt64 t3 = (UA_UInt64) buf[*pos + 2] << 16;
+	UA_UInt64 t4 = (UA_UInt64) buf[*pos + 3] << 24;
+	UA_UInt64 t5 = (UA_UInt64) buf[*pos + 4] << 32;
+	UA_UInt64 t6 = (UA_UInt64) buf[*pos + 5] << 40;
+	UA_UInt64 t7 = (UA_UInt64) buf[*pos + 6] << 48;
+	UA_UInt64 t8 = (UA_UInt64) buf[*pos + 7] << 56;
 	*pos += 8;
 	*dst = t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8;
 	return UA_NO_ERROR;
 }
-void encodeUInt64(UInt64 value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(UInt64));
-	*pos = (*pos) + sizeof(UInt64);
+void encodeUInt64(UA_UInt64 value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_UInt64));
+	*pos = (*pos) + sizeof(UA_UInt64);
 }
 
 UA_Int32 decodeFloat(char const * buf, UA_Int32 *pos, Float *dst) {
@@ -692,16 +692,16 @@ UA_Int32 encodeFloat(Float value, UA_Int32 *pos, char *dstBuf) {
 	return UA_NO_ERROR;
 }
 
-UA_Int32 decodeDouble(char const * buf, UA_Int32 *pos, Double *dst) {
-	Double tmpDouble;
-	tmpDouble = (Double) (buf[*pos]);
-	*pos += sizeof(Double);
+UA_Int32 decodeDouble(char const * buf, UA_Int32 *pos, UA_Double *dst) {
+	UA_Double tmpDouble;
+	tmpDouble = (UA_Double) (buf[*pos]);
+	*pos += sizeof(UA_Double);
 	*dst = tmpDouble;
 	return UA_NO_ERROR;
 }
-UA_Int32 encodeDouble(Double value, UA_Int32 *pos, char *dstBuf) {
-	memcpy(&(dstBuf[*pos]), &value, sizeof(Double));
-	*pos *= sizeof(Double);
+UA_Int32 encodeDouble(UA_Double value, UA_Int32 *pos, char *dstBuf) {
+	memcpy(&(dstBuf[*pos]), &value, sizeof(UA_Double));
+	*pos *= sizeof(UA_Double);
 	return UA_NO_ERROR;
 }
 
@@ -798,7 +798,7 @@ UA_Int32 UAByteString_calcSize(UA_ByteString *byteString) {
 /* Serialization of UANodeID is specified in 62541-6, §5.2.2.9 */
 UA_Int32 decodeUANodeId(char const * buf, UA_Int32 *pos, UA_NodeId *dstNodeId) {
 	// Vars for overcoming decoder_decodeXXX's non-endian-savenes
-	Byte dstByte;
+	UA_Byte dstByte;
 	UInt16 dstUInt16;
 
 	decoder_decodeBuiltInDatatype(buf, BYTE, pos, &(dstNodeId->encodingByte));
@@ -844,14 +844,14 @@ UA_Int32 decodeUANodeId(char const * buf, UA_Int32 *pos, UA_NodeId *dstNodeId) {
 }
 UA_Int32 encodeUANodeId(UA_NodeId *srcNodeId, UA_Int32 *pos, char *buf) {
 	buf[*pos] = srcNodeId->encodingByte;
-	*pos += sizeof(Byte);
+	*pos += sizeof(UA_Byte);
 	switch (srcNodeId->encodingByte) {
 	case NIEVT_TWO_BYTE:
-		memcpy(&(buf[*pos]), &(srcNodeId->identifier.numeric), sizeof(Byte));
-		*pos += sizeof(Byte);
+		memcpy(&(buf[*pos]), &(srcNodeId->identifier.numeric), sizeof(UA_Byte));
+		*pos += sizeof(UA_Byte);
 		break;
 	case NIEVT_FOUR_BYTE:
-		encodeByte((Byte) (srcNodeId->namespace & 0xFF), pos, buf);
+		encodeByte((UA_Byte) (srcNodeId->namespace & 0xFF), pos, buf);
 		encodeUInt16((UInt16) (srcNodeId->identifier.numeric & 0xFFFF), pos,
 				buf);
 		break;
@@ -878,24 +878,24 @@ UA_Int32 nodeId_calcSize(UA_NodeId *nodeId) {
 	UA_Int32 length = 0;
 	switch (nodeId->encodingByte) {
 	case NIEVT_TWO_BYTE:
-		length += 2 * sizeof(Byte);
+		length += 2 * sizeof(UA_Byte);
 		break;
 	case NIEVT_FOUR_BYTE:
-		length += 4 * sizeof(Byte);
+		length += 4 * sizeof(UA_Byte);
 		break;
 	case NIEVT_NUMERIC:
-		length += sizeof(Byte) + sizeof(UInt16) + sizeof(UInt32);
+		length += sizeof(UA_Byte) + sizeof(UInt16) + sizeof(UA_UInt32);
 		break;
 	case NIEVT_STRING:
-		length += sizeof(Byte) + sizeof(UInt16) + sizeof(UInt32)
+		length += sizeof(UA_Byte) + sizeof(UInt16) + sizeof(UA_UInt32)
 				+ nodeId->identifier.string.length;
 		break;
 	case NIEVT_GUID:
-		length += sizeof(Byte) + sizeof(UInt16) + sizeof(UInt32)
-				+ sizeof(UInt16) + sizeof(UInt16) + 8 * sizeof(Byte);
+		length += sizeof(UA_Byte) + sizeof(UInt16) + sizeof(UA_UInt32)
+				+ sizeof(UInt16) + sizeof(UInt16) + 8 * sizeof(UA_Byte);
 		break;
 	case NIEVT_BYTESTRING:
-		length += sizeof(Byte) + sizeof(UInt16) + sizeof(UInt32)
+		length += sizeof(UA_Byte) + sizeof(UInt16) + sizeof(UA_UInt32)
 				+ nodeId->identifier.byteString.length;
 		break;
 	default:
@@ -1012,17 +1012,17 @@ UA_Int32 encodeExpandedNodeId(UA_ExpandedNodeId *nodeId, UA_Int32 *pos, char *ds
 UA_Int32 ExpandedNodeId_calcSize(UA_ExpandedNodeId *nodeId) {
 	UA_Int32 length = 0;
 
-	length += sizeof(UInt32); //nodeId->nodeId.encodingByte
+	length += sizeof(UA_UInt32); //nodeId->nodeId.encodingByte
 
 	switch (nodeId->nodeId.encodingByte) {
 	case NIEVT_TWO_BYTE:
-		length += sizeof(Byte); //nodeId->nodeId.identifier.numeric
+		length += sizeof(UA_Byte); //nodeId->nodeId.identifier.numeric
 		break;
 	case NIEVT_FOUR_BYTE:
 		length += sizeof(UInt16); //nodeId->nodeId.identifier.numeric
 		break;
 	case NIEVT_NUMERIC:
-		length += sizeof(UInt32); //nodeId->nodeId.identifier.numeric
+		length += sizeof(UA_UInt32); //nodeId->nodeId.identifier.numeric
 		break;
 	case NIEVT_STRING:
 		//nodeId->nodeId.identifier.string
@@ -1043,7 +1043,7 @@ UA_Int32 ExpandedNodeId_calcSize(UA_ExpandedNodeId *nodeId) {
 		length += UAString_calcSize(&(nodeId->namespaceUri)); //nodeId->namespaceUri
 	}
 	if (nodeId->nodeId.encodingByte & NIEVT_SERVERINDEX_FLAG) {
-		length += sizeof(UInt32); //nodeId->serverIndex
+		length += sizeof(UA_UInt32); //nodeId->serverIndex
 	}
 	return length;
 }
@@ -1156,7 +1156,7 @@ UA_Int32 ExtensionObject_calcSize(UA_ExtensionObject *extensionObject) {
 	UA_Int32 length = 0;
 
 	length += nodeId_calcSize(&(extensionObject->typeId));
-	length += sizeof(Byte); //extensionObject->encoding
+	length += sizeof(UA_Byte); //extensionObject->encoding
 	switch (extensionObject->encoding) {
 	case 0x00:
 		length += sizeof(UA_Int32); //extensionObject->body.length
@@ -1217,7 +1217,7 @@ UA_Int32 encodeVariant(UA_Variant *variant, UA_Int32 *pos, char *dstBuf) {
 UA_Int32 Variant_calcSize(UA_Variant *variant) {
 	UA_Int32 length = 0;
 
-	length += sizeof(Byte); //variant->encodingMask
+	length += sizeof(UA_Byte); //variant->encodingMask
 	if (variant->encodingMask & (1 << 7)) // array length is encoded
 			{
 		length += sizeof(UA_Int32); //variant->arrayLength
@@ -1306,25 +1306,25 @@ UA_Int32 encodeDataValue(UA_DataValue *dataValue, UA_Int32 *pos, char *dstBuf) {
 UA_Int32 DataValue_calcSize(UA_DataValue *dataValue) {
 	UA_Int32 length = 0;
 
-	length += sizeof(Byte); //dataValue->encodingMask
+	length += sizeof(UA_Byte); //dataValue->encodingMask
 
 	if (dataValue->encodingMask & 0x01) {
 		length += Variant_calcSize(&(dataValue->value));
 	}
 	if (dataValue->encodingMask & 0x02) {
-		length += sizeof(UInt32); //dataValue->Status
+		length += sizeof(UA_UInt32); //dataValue->Status
 	}
 	if (dataValue->encodingMask & 0x04) {
-		length += sizeof(Int64); //dataValue->SourceTimestamp
+		length += sizeof(UA_Int64); //dataValue->SourceTimestamp
 	}
 	if (dataValue->encodingMask & 0x08) {
-		length += sizeof(Int64); //dataValue->serverTimestamp
+		length += sizeof(UA_Int64); //dataValue->serverTimestamp
 	}
 	if (dataValue->encodingMask & 0x10) {
-		length += sizeof(Int64); //dataValue->SourcePicoseconds
+		length += sizeof(UA_Int64); //dataValue->SourcePicoseconds
 	}
 	if (dataValue->encodingMask & 0x20) {
-		length += sizeof(Int64); //dataValue->serverPicoseconds
+		length += sizeof(UA_Int64); //dataValue->serverPicoseconds
 	}
 	return length;
 }
@@ -1337,8 +1337,8 @@ UA_Int32 DataValue_calcSize(UA_DataValue *dataValue) {
 UA_Int32 decodeDiagnosticInfo(char const * buf, UA_Int32 *pos,
 		UA_DiagnosticInfo *dstDiagnosticInfo) {
 
-	Byte encodingByte = (buf[*pos]);
-	Byte mask;
+	UA_Byte encodingByte = (buf[*pos]);
+	UA_Byte mask;
 	for (mask = 1; mask <= 0x40; mask << 2) {
 
 		switch (mask & encodingByte) {
@@ -1389,7 +1389,7 @@ UA_Int32 decodeDiagnosticInfo(char const * buf, UA_Int32 *pos,
 }
 UA_Int32 encodeDiagnosticInfo(UA_DiagnosticInfo *diagnosticInfo, UA_Int32 *pos,
 		char *dstbuf) {
-	Byte mask;
+	UA_Byte mask;
 	int i;
 
 	encoder_encodeBuiltInDatatype((void*) (&(diagnosticInfo->encodingMask)),
@@ -1437,9 +1437,9 @@ UA_Int32 encodeDiagnosticInfo(UA_DiagnosticInfo *diagnosticInfo, UA_Int32 *pos,
 }
 UA_Int32 diagnosticInfo_calcSize(UA_DiagnosticInfo *diagnosticInfo) {
 	UA_Int32 length = 0;
-	Byte mask;
+	UA_Byte mask;
 
-	length += sizeof(Byte);	// EncodingMask
+	length += sizeof(UA_Byte);	// EncodingMask
 
 	for (mask = 0x01; mask <= 0x40; mask *= 2) {
 		switch (mask & (diagnosticInfo->encodingMask)) {

+ 10 - 10
src/opcua_binaryEncDec.h

@@ -89,14 +89,14 @@ void encodeSByte(SByte value, UA_Int32 *pos, char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeByte(char const * buf, UA_Int32 *pos,Byte *dst);
+UA_Int32 decodeByte(char const * buf, UA_Int32 *pos,UA_Byte *dst);
 /**
  *
  * @param value
  * @param pos
  * @param dstBuf
  */
-void encodeByte(Byte value, UA_Int32 *pos, char *dstBuf);
+void encodeByte(UA_Byte value, UA_Int32 *pos, char *dstBuf);
 /**
  *
  * @param buf
@@ -148,14 +148,14 @@ void encodeInt32(UA_Int32 value, UA_Int32 *pos, char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeUInt32(char const * const buf, UA_Int32 *pos, UInt32 *dst);
+UA_Int32 decodeUInt32(char const * const buf, UA_Int32 *pos, UA_UInt32 *dst);
 /**
  *
  * @param value
  * @param dstBuf
  * @param pos
  */
-void encodeUInt32(UInt32 value, UA_Int32 *pos, char *dstBuf);
+void encodeUInt32(UA_UInt32 value, UA_Int32 *pos, char *dstBuf);
 /**
  *
  * @param buf
@@ -163,14 +163,14 @@ void encodeUInt32(UInt32 value, UA_Int32 *pos, char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeInt64(char const * buf, UA_Int32 *pos,Int64 *dst);
+UA_Int32 decodeInt64(char const * buf, UA_Int32 *pos,UA_Int64 *dst);
 /**
  *
  * @param value
  * @param pos
  * @param dstBuf
  */
-void encodeInt64(Int64 value, UA_Int32 *pos, char *dstBuf);
+void encodeInt64(UA_Int64 value, UA_Int32 *pos, char *dstBuf);
 /**
  *
  * @param buf
@@ -178,14 +178,14 @@ void encodeInt64(Int64 value, UA_Int32 *pos, char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeUInt64(char const * buf, UA_Int32 *pos, UInt64 *dst);
+UA_Int32 decodeUInt64(char const * buf, UA_Int32 *pos, UA_UInt64 *dst);
 /**
  *
  * @param value
  * @param pos
  * @param dstBuf
  */
-void encodeUInt64(UInt64 value, UA_Int32 *pos, char *dstBuf);
+void encodeUInt64(UA_UInt64 value, UA_Int32 *pos, char *dstBuf);
 /**
  *
  * @param buf  			binary encoded message
@@ -217,7 +217,7 @@ UA_Int32 encodeFloat(Float value,UA_Int32 *pos,char *dstBuf);
  * @param dst
  * @return
  */
-UA_Int32 decodeDouble(char const * buf, UA_Int32 *pos, Double *dst);
+UA_Int32 decodeDouble(char const * buf, UA_Int32 *pos, UA_Double *dst);
 /**
  *
  * @param value
@@ -225,7 +225,7 @@ UA_Int32 decodeDouble(char const * buf, UA_Int32 *pos, Double *dst);
  * @param dstBuf
  * @return
  */
-UA_Int32 encodeDouble(Double value, UA_Int32 *pos,char *dstBuf);
+UA_Int32 encodeDouble(UA_Double value, UA_Int32 *pos,char *dstBuf);
 /**
  *
  * @param srcNodeId

+ 32 - 32
src/opcua_builtInDatatypes.h

@@ -129,7 +129,7 @@ typedef _Bool Boolean;
 
 typedef int8_t SByte;
 
-typedef uint8_t Byte;
+typedef uint8_t UA_Byte;
 
 typedef int16_t Int16;
 
@@ -137,15 +137,15 @@ typedef uint16_t UInt16;
 
 typedef int32_t 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;
 
-typedef double Double;
+typedef double UA_Double;
 
 
 /**
@@ -167,7 +167,7 @@ UA_String;
 * Chapter: 5.2.2.5
 * Page: 16
 */
-typedef Int64 UA_DateTime; //100 nanosecond resolution
+typedef UA_Int64 UA_DateTime; //100 nanosecond resolution
 			      //start Date: 1601-01-01 12:00 AM
 
 /*
@@ -179,7 +179,7 @@ typedef Int64 UA_DateTime; //100 nanosecond resolution
 typedef struct UA_ByteString
 {
 	UA_Int32 Length;
-	Byte *Data;
+	UA_Byte *Data;
 }
 UA_ByteString;
 
@@ -191,7 +191,7 @@ UA_ByteString;
 */
 typedef struct UA_Guid
 {
-	UInt32 Data1;
+	UA_UInt32 Data1;
 	UInt16 Data2;
 	UInt16 Data3;
 	UA_ByteString Data4;
@@ -214,10 +214,10 @@ UA_XmlElement;
 
 typedef struct UA_XmlElementEncoded
 {
-	UInt32 Length;
-	Byte StartTag[3];
-	Byte *Message;
-	UInt32 EndTag[4];
+	UA_UInt32 Length;
+	UA_Byte StartTag[3];
+	UA_Byte *Message;
+	UA_UInt32 EndTag[4];
 }
 UA_XmlElementEncoded;
 
@@ -265,12 +265,12 @@ UA_NodeIdEncodingValuesType;
 */
 typedef struct UA_NodeId
 {
-	Byte   EncodingByte; //enum BID_NodeIdEncodingValuesType
+	UA_Byte   EncodingByte; //enum BID_NodeIdEncodingValuesType
 	UInt16 Namespace;
 
     union
     {
-        UInt32 Numeric;
+        UA_UInt32 Numeric;
         UA_String String;
         UA_Guid Guid;
         UA_ByteString ByteString;
@@ -292,7 +292,7 @@ typedef struct UA_ExpandedNodeId
 	UA_NodeId NodeId;
 	UA_Int32 EncodingByte; //enum BID_NodeIdEncodingValuesType
 	UA_String NamespaceUri;
-	UInt32 ServerIndex;
+	UA_UInt32 ServerIndex;
 }
 UA_ExpandedNodeId;
 
@@ -303,7 +303,7 @@ UA_ExpandedNodeId;
 * Chapter: 5.2.2.11
 * Page: 20
 */
-typedef UInt32 UA_StatusCode;
+typedef UA_UInt32 UA_StatusCode;
 typedef enum UA_StatusCodes
 {
 	// Some Values are called the same as previous Enumerations so we need
@@ -320,7 +320,7 @@ typedef enum UA_StatusCodes
 */
 typedef struct UA_DiagnosticInfo
 {
-	Byte EncodingMask; //Type of the Enum UA_DiagnosticInfoEncodingMaskType
+	UA_Byte EncodingMask; //Type of the Enum UA_DiagnosticInfoEncodingMaskType
 	UA_Int32 SymbolicId;
 	UA_Int32 NamespaceUri;
 	UA_Int32 LocalizedText;
@@ -369,7 +369,7 @@ UA_QualifiedName;
 */
 typedef struct UA_LocalizedText
 {
-	Byte EncodingMask;
+	UA_Byte EncodingMask;
 	UA_String Locale;
 	UA_String Text;
 }
@@ -391,7 +391,7 @@ UA_LocalizedTextEncodingMaskType;
 typedef struct UA_ExtensionObject
 {
 	UA_NodeId TypeId;
-	Byte Encoding; //Type of the Enum UA_ExtensionObjectEncodingMaskType
+	UA_Byte Encoding; //Type of the Enum UA_ExtensionObjectEncodingMaskType
 	UA_ByteString Body;
 }
 UA_ExtensionObject;
@@ -416,7 +416,7 @@ typedef UA_VariantUnion;
 */
 typedef struct UA_Variant
 {
-	Byte EncodingMask; //Type of Enum UA_VariantTypeEncodingMaskType
+	UA_Byte EncodingMask; //Type of Enum UA_VariantTypeEncodingMaskType
 	UA_Int32 ArrayLength;
 	UA_VariantUnion *Value;
 }
@@ -430,7 +430,7 @@ UA_Variant;
 */
 typedef struct UA_DataValue
 {
-	Byte EncodingMask;
+	UA_Byte EncodingMask;
 	UA_Variant Value;
 	UA_StatusCode Status;
 	UA_DateTime SourceTimestamp;
@@ -478,7 +478,7 @@ typedef struct
 
 typedef struct Byte_Array
 {
-	Byte *data;
+	UA_Byte *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }Byte_Array;
@@ -500,21 +500,21 @@ typedef struct UInt16_Array
 
 typedef struct UInt32_Array
 {
-	UInt32 *data;
+	UA_UInt32 *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }UInt32_Array;
 
 typedef struct
 {
-	Int64 *data;
+	UA_Int64 *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }Int64_Array;
 
 typedef struct UInt64_Array
 {
-	UInt64 *data;
+	UA_UInt64 *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }UInt64_Array;
@@ -528,7 +528,7 @@ typedef struct Float_Array
 
 typedef struct Double_Array
 {
-	Double *data;
+	UA_Double *data;
 	UA_Int32 arrayLength;
 	IntegerString  dimensions;
 }Double_Array;
@@ -684,15 +684,15 @@ union UA_VariantUnion
 {
     Boolean Boolean;
     SByte SByte;
-    Byte Byte;
+    UA_Byte Byte;
     Int16 Int16;
     UInt16 UInt16;
     UA_Int32 Int32;
-    UInt32 UInt32;
-    Int64 Int64;
-    UInt64 UInt64;
+    UA_UInt32 UInt32;
+    UA_Int64 Int64;
+    UA_UInt64 UInt64;
     Float Float;
-    Double Double;
+    UA_Double Double;
     UA_DateTime DateTime;
     UA_String String;
     UA_Guid *Guid;
@@ -749,7 +749,7 @@ UA_VariantTypeEncodingMaskType;
 
 
 
-typedef UInt32 IntegerId;
+typedef UA_UInt32 IntegerId;
 
 
 /**

+ 13 - 13
src/opcua_connectionHelper.h

@@ -29,25 +29,25 @@ enum connectionState
 
 typedef struct
 {
-	UInt32 secureChannelId;
-	UInt32 tokenId;
+	UA_UInt32 secureChannelId;
+	UA_UInt32 tokenId;
 	UA_DateTime createdAt;
 	UA_Int32 revisedLifetime;
 }SL_ChannelSecurityToken;
 
 typedef struct
 {
-	UInt32 protocolVersion;
-	UInt32 sendBufferSize;
-	UInt32 recvBufferSize;
-	UInt32 maxMessageSize;
-	UInt32 maxChunkCount;
+	UA_UInt32 protocolVersion;
+	UA_UInt32 sendBufferSize;
+	UA_UInt32 recvBufferSize;
+	UA_UInt32 maxMessageSize;
+	UA_UInt32 maxChunkCount;
 }TL_buffer;
 
 struct TL_connection
 {
 	UA_Int32 socket;
-	UInt32 connectionState;
+	UA_UInt32 connectionState;
 	TL_buffer remoteConf;
 	TL_buffer localConf;
 	UA_String endpointURL;
@@ -71,16 +71,16 @@ struct SL_connection
 	UA_ByteString SenderCertificate;
 	UA_ByteString ReceiverCertificateThumbprint;
 */
-	UInt32 sequenceNumber;
-	UInt32 requestType;
+	UA_UInt32 sequenceNumber;
+	UA_UInt32 requestType;
 	UA_String secureChannelId;
 	//UInt32 UInt32_secureChannelId;
-	UInt32 securityMode;
+	UA_UInt32 securityMode;
 	UA_ByteString remoteNonce;
 	UA_ByteString localNonce;
-	UInt32 connectionState;
+	UA_UInt32 connectionState;
 	SL_ChannelSecurityToken securityToken;
-	UInt32 requestId; // request Id of the current request
+	UA_UInt32 requestId; // request Id of the current request
 };
 
 struct SS_connection

+ 11 - 11
src/opcua_secureChannelLayer.c

@@ -31,8 +31,8 @@ UA_Int32 SL_initConnectionObject(UA_connection *connection)
 	connection->secureLayer.remoteNonce.data = NULL;
 	connection->secureLayer.remoteNonce.length = 0;
 
-	connection->secureLayer.localNonce.data = (Byte*)opcua_malloc(sizeof(Byte));
-	*connection->secureLayer.localNonce.data = sizeof(Byte);
+	connection->secureLayer.localNonce.data = (UA_Byte*)opcua_malloc(sizeof(UA_Byte));
+	*connection->secureLayer.localNonce.data = sizeof(UA_Byte);
 	connection->secureLayer.localNonce.length = 1;
 
 	connection->secureLayer.connectionState = connectionState_CLOSED;
@@ -57,8 +57,8 @@ UA_Int32 SL_initConnectionObject(UA_connection *connection)
 
 UA_Int32 SL_send(UA_connection *connection, UA_ByteString responseMessage, UA_Int32 type)
 {
-	UInt32 sequenceNumber;
-	UInt32 requestId;
+	UA_UInt32 sequenceNumber;
+	UA_UInt32 requestId;
 	UA_Int32 pos;
 	UA_Int32 sizeAsymAlgHeader;
 	UA_ByteString responsePacket;
@@ -67,7 +67,7 @@ UA_Int32 SL_send(UA_connection *connection, UA_ByteString responseMessage, UA_In
 	UA_Int32 sizeSignature;
 
 
-	sizeAsymAlgHeader = 3 * sizeof(UInt32) +
+	sizeAsymAlgHeader = 3 * sizeof(UA_UInt32) +
 			connection->secureLayer.localtAsymAlgSettings.SecurityPolicyUri.length +
 			connection->secureLayer.localtAsymAlgSettings.SenderCertificate.length +
 			connection->secureLayer.localtAsymAlgSettings.ReceiverCertificateThumbprint.length;
@@ -161,7 +161,7 @@ UA_Int32 SL_openSecureChannel(UA_connection *connection,
 	UA_Int32 sizeRespMessage;
 	UA_Int32 sizeSecurityToken;
 	UA_ByteString response;
-	UInt32 serverProtocolVersion;
+	UA_UInt32 serverProtocolVersion;
 	UA_Int32 pos;
 	UA_DiagnosticInfo serviceDiagnostics;
 
@@ -232,7 +232,7 @@ UA_Int32 SL_openSecureChannel(UA_connection *connection,
 	*/
 
 	//                  secureChannelId + TokenId + CreatedAt + RevisedLifetime
-	sizeSecurityToken = sizeof(UInt32) + sizeof(UInt32) + sizeof(UA_DateTime) + sizeof(UA_Int32);
+	sizeSecurityToken = sizeof(UA_UInt32) + sizeof(UA_UInt32) + sizeof(UA_DateTime) + sizeof(UA_Int32);
 
 	//ignore server nonce
 	serverNonce.length = -1;
@@ -250,7 +250,7 @@ UA_Int32 SL_openSecureChannel(UA_connection *connection,
 	serverProtocolVersion = connection->transportLayer.localConf.protocolVersion;
 
 	//                ProtocolVersion + SecurityToken + Nonce
-	sizeRespMessage = sizeof(UInt32) + serverNonce.length + sizeof(UA_Int32) + sizeSecurityToken;
+	sizeRespMessage = sizeof(UA_UInt32) + serverNonce.length + sizeof(UA_Int32) + sizeSecurityToken;
 	printf("SL_openSecureChannel - size of response message=%d\n",sizeRespMessage);
 
 
@@ -320,7 +320,7 @@ UA_Int32 SL_processMessage(UA_connection *connection, UA_ByteString message) {
 
 	UA_Int32 pos = 0;
 	UA_AD_RequestHeader requestHeader;
-	UInt32 clientProtocolVersion;
+	UA_UInt32 clientProtocolVersion;
 	UA_NodeId serviceRequestType;
 	UA_Int32 requestType;
 	UA_Int32 securityMode;
@@ -342,7 +342,7 @@ UA_Int32 SL_processMessage(UA_connection *connection, UA_ByteString message) {
 		// 	Req-1) RequestHeader requestHeader
 		UA_AD_RequestHeader requestHeader;
 		// 	Req-2) UInt32 ClientProtocolVersion
-		UInt32 clientProtocolVersion;
+		UA_UInt32 clientProtocolVersion;
 		// 	Req-3) Enum SecurityTokenRequestType requestType
 		UA_Int32 requestType;
 		// 	Req-4) Enum MessageSecurityMode SecurityMode
@@ -602,7 +602,7 @@ void SL_receive(UA_connection *connection, UA_ByteString *serviceMessage) {
  */
 UA_Int32 decodeSCMHeader(UA_ByteString *rawMessage, UA_Int32 *pos,
 		SL_SecureConversationMessageHeader* SC_Header) {
-	UInt32 err;
+	UA_UInt32 err;
 	printf("decodeSCMHeader - entered \n");
 	// LU: wild guess - reset pos, we want to reread the message type again
 	*pos = 0;

+ 11 - 11
src/opcua_secureChannelLayer.h

@@ -29,7 +29,7 @@ typedef enum
 }securityMode;
 typedef struct
 {
-	UInt32 ServerProtocolVersion;
+	UA_UInt32 ServerProtocolVersion;
 	SL_ChannelSecurityToken SecurityToken;
 	UA_String ServerNonce;
 }SL_Response;
@@ -37,10 +37,10 @@ typedef struct
 
 typedef struct
 {
-	UInt32 MessageType;
-	Byte   IsFinal;
-	UInt32 MessageSize;
-	UInt32 SecureChannelId;
+	UA_UInt32 MessageType;
+	UA_Byte   IsFinal;
+	UA_UInt32 MessageSize;
+	UA_UInt32 SecureChannelId;
 }SL_SecureConversationMessageHeader;
 
 
@@ -53,8 +53,8 @@ typedef struct
 
 typedef struct _SL_SequenceHeader
 {
-	UInt32 SequenceNumber;
-	UInt32 RequestId;
+	UA_UInt32 SequenceNumber;
+	UA_UInt32 RequestId;
 }SL_SequenceHeader;
 
 /*
@@ -62,11 +62,11 @@ typedef struct _SL_SequenceHeader
  */
 typedef struct _SL_AsymmetricAlgorithmSecurityFooter
 {
-	Byte PaddingSize;
-	Byte *Padding;
+	UA_Byte PaddingSize;
+	UA_Byte *Padding;
 
-	UInt32 SignatureSize;
-	Byte *Signature;
+	UA_UInt32 SignatureSize;
+	UA_Byte *Signature;
 }SL_AsymmetricAlgorithmSecurityFooter;
 
 /*

+ 13 - 13
src/opcua_transportLayer.c

@@ -25,7 +25,7 @@ UA_Int32 TL_initConnectionObject(UA_connection *connection)
 UA_Int32 TL_check(UA_connection *connection)
 {
 	UA_Int32 position = 4;
-	UInt32 messageLength = 0;
+	UA_UInt32 messageLength = 0;
 
 
 	printf("TL_check - entered \n");
@@ -51,7 +51,7 @@ UA_Int32 TL_check(UA_connection *connection)
 
 UA_Int32 TL_receive(UA_connection *connection, UA_ByteString *packet)
 {
-	UInt32 length = 0;
+	UA_UInt32 length = 0;
 	UA_Int32 pos = 0;
 
 	AD_RawMessage tmpRawMessage;
@@ -70,9 +70,9 @@ UA_Int32 TL_receive(UA_connection *connection, UA_ByteString *packet)
 
 		//is final chunk or not
 		//TODO process chunks
-		pos += sizeof(Byte);
+		pos += sizeof(UA_Byte);
 		//save the message size if needed
-		pos += sizeof(UInt32);
+		pos += sizeof(UA_UInt32);
 
 		printf("TL_receive - packetType = %d \n",packetType);
 		switch(packetType)
@@ -126,42 +126,42 @@ UA_Int32 TL_getPacketType(UA_ByteString *packet, UA_Int32 *pos)
 	   packet->data[*pos+1] == 'E' &&
 	   packet->data[*pos+2] == 'L')
 	{
-		*pos += 3 * sizeof(Byte);
+		*pos += 3 * sizeof(UA_Byte);
 		retVal = packetType_HEL;
 	}
 	else if(packet->data[*pos] == 'A' &&
 	        packet->data[*pos+1] == 'C' &&
 	        packet->data[*pos+2] == 'K')
 	{
-		*pos += 3 * sizeof(Byte);
+		*pos += 3 * sizeof(UA_Byte);
 		retVal = packetType_ACK;
 	}
 	else if(packet->data[*pos] == 'E' &&
 			packet->data[*pos+1] == 'R' &&
 			packet->data[*pos+2] == 'R')
 	{
-		*pos += 3 * sizeof(Byte);
+		*pos += 3 * sizeof(UA_Byte);
 		retVal =  packetType_ERR;
 	}
 	else if(packet->data[*pos] == 'O' &&
 	        packet->data[*pos+1] == 'P' &&
 	        packet->data[*pos+2] == 'N')
 	{
-		*pos += 3 * sizeof(Byte);
+		*pos += 3 * sizeof(UA_Byte);
 		retVal =  packetType_OPN;
 	}
 	else if(packet->data[*pos] == 'C' &&
 	        packet->data[*pos+1] == 'L' &&
 	        packet->data[*pos+2] == 'O')
 	{
-		*pos += 3 * sizeof(Byte);
+		*pos += 3 * sizeof(UA_Byte);
 		retVal =  packetType_CLO;
 	}
 	else if(packet->data[*pos] == 'M' &&
 			packet->data[*pos+1] == 'S' &&
 			packet->data[*pos+2] == 'G')
 	{
-		*pos += 3 * sizeof(Byte);
+		*pos += 3 * sizeof(UA_Byte);
 		retVal =  packetType_MSG;
 	}
 	//TODO retVal == -1 -- ERROR no valid message received
@@ -173,8 +173,8 @@ UA_Int32 TL_process(UA_connection *connection,UA_Int32 packetType, UA_Int32 *pos
 {
 	UA_Int32 tmpPos = 0;
 	UA_ByteString tmpMessage;
-	Byte reserved;
-	UInt32 messageSize;
+	UA_Byte reserved;
+	UA_UInt32 messageSize;
 	printf("TL_process - entered \n");
 	struct TL_header tmpHeader;
 	switch(packetType)
@@ -215,7 +215,7 @@ UA_Int32 TL_process(UA_connection *connection,UA_Int32 packetType, UA_Int32 *pos
 					(void*)(&(connection->transportLayer.endpointURL)));
 
 			/* send back acknowledge */
-			tmpMessage.data = (Byte*)opcua_malloc(SIZE_OF_ACKNOWLEDGE_MESSAGE);
+			tmpMessage.data = (UA_Byte*)opcua_malloc(SIZE_OF_ACKNOWLEDGE_MESSAGE);
 			if(tmpMessage.data == NULL)
 			{
 				printf("TL_process - memory allocation failed \n");

+ 17 - 17
src/opcua_transportLayer.h

@@ -26,9 +26,9 @@
 #define SIZE_OF_ACKNOWLEDGE_MESSAGE 28
 
 //constants
-static const UInt32 TL_HEADER_LENGTH = 8;
-static const UInt32 TL_MESSAGE_TYPE_LEN = 3;
-static const UInt32 TL_RESERVED_LEN = 1;
+static const UA_UInt32 TL_HEADER_LENGTH = 8;
+static const UA_UInt32 TL_MESSAGE_TYPE_LEN = 3;
+static const UA_UInt32 TL_RESERVED_LEN = 1;
 
 //variables which belong to layer
 static const TL_SERVER_PROTOCOL_VERSION = 0;
@@ -47,9 +47,9 @@ enum TL_messageType_td
 
 struct TL_header
 {
-	UInt32 MessageType;
-	Byte Reserved;
-	UInt32 MessageSize;
+	UA_UInt32 MessageType;
+	UA_Byte Reserved;
+	UA_UInt32 MessageSize;
 };
 struct TL_message
 {
@@ -68,27 +68,27 @@ UA_TYPE_METHOD_PROTOTYPES (UA_SecureConversationMessageHeader)
 
 struct TL_messageBodyHEL
 {
-	UInt32 ProtocolVersion;
-	UInt32 ReceiveBufferSize;
-	UInt32 SendBufferSize;
-	UInt32 MaxMessageSize;
-	UInt32 MaxChunkCount;
+	UA_UInt32 ProtocolVersion;
+	UA_UInt32 ReceiveBufferSize;
+	UA_UInt32 SendBufferSize;
+	UA_UInt32 MaxMessageSize;
+	UA_UInt32 MaxChunkCount;
 	UA_String EndpointUrl;
 };
 
 struct TL_messageBodyACK
 {
-	UInt32 ProtocolVersion;
-	UInt32 ReceiveBufferSize;
-	UInt32 SendBufferSize;
-	UInt32 MaxMessageSize;
-	UInt32 MaxChunkCount;
+	UA_UInt32 ProtocolVersion;
+	UA_UInt32 ReceiveBufferSize;
+	UA_UInt32 SendBufferSize;
+	UA_UInt32 MaxMessageSize;
+	UA_UInt32 MaxChunkCount;
 	UA_String EndpointUrl;
 };
 
 struct TL_messageBodyERR
 {
-	UInt32 Error;
+	UA_UInt32 Error;
 	UA_String Reason;
 
 };

+ 44 - 44
src/opcua_types.h

@@ -27,7 +27,7 @@ UA_AD_ApplicationType;
 * Chapter: 7.12
 * Page: 118
 */
-typedef UInt32 UA_AD_Index;
+typedef UA_UInt32 UA_AD_Index;
 
 
 /**
@@ -36,7 +36,7 @@ typedef UInt32 UA_AD_Index;
 * Chapter: 7.13
 * Page: 118
 */
-typedef UInt32 UA_AD_IntegerId;
+typedef UA_UInt32 UA_AD_IntegerId;
 
 
 /**
@@ -137,7 +137,7 @@ UA_AD_BrowseResult;
 * Chapter: 7.5
 * Page: 113
 */
-typedef UInt32 UA_Counter;
+typedef UA_UInt32 UA_Counter;
 
 
 /**
@@ -225,7 +225,7 @@ typedef struct
 	UInt16 noOfUserIdentyTokens;
 	UA_AD_UserTokenPolicy* useridentyTokens;
 	UA_String transportProfileUri;
-	Byte securtiyLevel;
+	UA_Byte securtiyLevel;
 }
 UA_AD_EndpointDescription;
 
@@ -270,8 +270,8 @@ UA_AD_ExtensibleParameter;
 typedef struct
 {
 //ToDo	enum BED_MonitoringFilter trigger = BED_MonitoringFilter.DATA_CHANGE_FILTER;
-	UInt32 deadbandType;
-	Double deadbandValue;
+	UA_UInt32 deadbandType;
+	UA_Double deadbandValue;
 }
 UA_AD_DataChangeFilter;
 
@@ -327,8 +327,8 @@ typedef struct
 //ToDo	AggregateConfiguration aggregateConfiguration;		//ToDo
 	Boolean useServerCapabilitiesDafaults;
 	Boolean treatUncertainAsBad;
-	Byte percentDataBad;
-	Byte percentDataGood;
+	UA_Byte percentDataBad;
+	UA_Byte percentDataGood;
 	Boolean steppedSlopedExtrapolation;
 }
 UA_AD_AggregateFilter;
@@ -456,12 +456,12 @@ UA_AD_NodeAttributesBitMask;
 */
 typedef struct
 {
-	UInt32 specifiedAttribute;	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttribute;	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
-	Byte eventNotifier;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_Byte eventNotifier;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_ObjectAttributes;
 
@@ -474,20 +474,20 @@ UA_AD_ObjectAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value				//ToDo
 	UA_NodeId dataType;
 	UA_Int32 valueRank;
 	UInt16 noOfArrayDimensions;
-	UInt32* arrayDimensions;
-	Byte accessLevel;
-	Byte userAccesLevel;
+	UA_UInt32* arrayDimensions;
+	UA_Byte accessLevel;
+	UA_Byte userAccesLevel;
 //ToDo	Duration???? minimumSamplingInterval;			//ToDo
 	Boolean historizing;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_VariableAttributes;
 
@@ -500,13 +500,13 @@ UA_AD_VariableAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes;	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes;	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 	Boolean executable;
 	Boolean userExecutable;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_MethodAttributes;
 
@@ -519,12 +519,12 @@ UA_AD_MethodAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 	Boolean isAbstract;
-	UInt32 wirteMask;
-	UInt32 userWriteMask;
+	UA_UInt32 wirteMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_ObjectTypeAttributes;
 
@@ -537,17 +537,17 @@ UA_AD_ObjectTypeAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 //ToDo	DefinedByTheDataTypeAttribte??? value			//ToDo
 	UA_NodeId dataType;
 	UA_Int32 valueRank;
 	UInt16 noOfArrayDimensions;
-	UInt32* arrayDimesions;
+	UA_UInt32* arrayDimesions;
 	Boolean isAbstract;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_VariableTypeAttributes;
 
@@ -560,14 +560,14 @@ UA_AD_VariableTypeAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 	Boolean isAbstract;
 	Boolean symmetric;
 	UA_LocalizedText inverseName;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_ReferenceTypeAttributes;
 
@@ -581,12 +581,12 @@ UA_AD_ReferenceTypeAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 	Boolean isAbstract;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_DataTypeAttributes;
 
@@ -600,13 +600,13 @@ UA_AD_DataTypeAttributes;
 */
 typedef struct
 {
-	UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
+	UA_UInt32 specifiedAttributes; 	//BitMask corresponding to BED_NodeAttributesBitMask
 	UA_LocalizedText displayName;
 	UA_LocalizedText description;
 	Boolean containsNoLoops;
-	Byte eventNotifier;
-	UInt32 writeMask;
-	UInt32 userWriteMask;
+	UA_Byte eventNotifier;
+	UA_UInt32 writeMask;
+	UA_UInt32 userWriteMask;
 }
 UA_AD_ViewAttributes;
 
@@ -770,9 +770,9 @@ typedef struct
 	UA_NodeId authenticationToken;
 	UA_DateTime timestamp;
 	UA_AD_IntegerId requestHandle;
-	UInt32 returnDiagnostics;
+	UA_UInt32 returnDiagnostics;
 	UA_String auditEntryId;
-	UInt32 timeoutHint;
+	UA_UInt32 timeoutHint;
 	UA_ExtensionObject additionalHeader;
 }
 UA_AD_RequestHeader;
@@ -959,11 +959,11 @@ UA_AD_TimestampsToReturn;
 */
 typedef struct
 {
-	Byte length[4];
+	UA_Byte length[4];
 	UInt16 noOfTokenData;
-	Byte* tokenData;
+	UA_Byte* tokenData;
 	UInt16 noOfServerNonce;
-	Byte* serverNonce;
+	UA_Byte* serverNonce;
 }
 UA_AD_UserIdentityTokenEncryptedTokenFormat;
 
@@ -1039,7 +1039,7 @@ typedef struct
 {
 	UA_NodeId viewId;
 	UA_DateTime timestamp;
-	UInt32 viewVersion;
+	UA_UInt32 viewVersion;
 }
 UA_AD_ViewDescription;
 

+ 39 - 39
tests/check_stack.c

@@ -39,7 +39,7 @@ START_TEST(decodeByte_test)
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
 	//EncodeByte
-		char *mem = malloc(sizeof(Byte));
+		char *mem = malloc(sizeof(UA_Byte));
 		UInt16 Ui16Val;
 
 		rawMessage.message = mem;
@@ -61,9 +61,9 @@ START_TEST(encodeByte_test)
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
 	//EncodeByte
-		char *mem = malloc(sizeof(Byte));
+		char *mem = malloc(sizeof(UA_Byte));
 		rawMessage.message = mem;
-		Byte testByte = 0x08;
+		UA_Byte testByte = 0x08;
 		rawMessage.length = 1;
 		position = 0;
 
@@ -234,7 +234,7 @@ START_TEST(decodeUInt32_test)
 	rawMessage.length = 4;
 
 	UA_Int32 p = 0;
-	UInt32 val;
+	UA_UInt32 val;
 	decoder_decodeBuiltInDatatype(rawMessage.message, UINT32, &p, &val);
 	ck_assert_uint_eq(val,255);
 
@@ -244,20 +244,20 @@ START_TEST(encodeUInt32_test)
 {
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
-	UInt32 value = 0x0101FF00;
+	UA_UInt32 value = 0x0101FF00;
 	//EncodeUInt16
 
-	rawMessage.message = (char*)opcua_malloc(2 * sizeof(UInt32));
+	rawMessage.message = (char*)opcua_malloc(2 * sizeof(UA_UInt32));
 
 	rawMessage.length = 8;
 
 	UA_Int32 p = 4;
 	//encodeUInt32(value, &p,rawMessage.message);
 	encoder_encodeBuiltInDatatype(&value,UINT32,&p,rawMessage.message);
-	ck_assert_uint_eq((Byte)rawMessage.message[4],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[5],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[6],0x01);
-	ck_assert_uint_eq((Byte)rawMessage.message[7],0x01);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[4],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[5],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[6],0x01);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[7],0x01);
 	ck_assert_int_eq(p,8);
 
 
@@ -293,7 +293,7 @@ START_TEST(decodeUInt64_test)
 {
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
-	UInt64 expectedVal = 0xFF;
+	UA_UInt64 expectedVal = 0xFF;
 	expectedVal = expectedVal << 56;
 	char mem[8] = {00,00,00,00,0x00,0x00,0x00,0xFF};
 
@@ -302,7 +302,7 @@ START_TEST(decodeUInt64_test)
 	rawMessage.length = 8;
 
 	UA_Int32 p = 0;
-	UInt64 val;
+	UA_UInt64 val;
 	decoder_decodeBuiltInDatatype(rawMessage.message, UINT64, &p, &val);
 	ck_assert_uint_eq(val, expectedVal);
 }
@@ -311,24 +311,24 @@ START_TEST(encodeUInt64_test)
 {
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
-	UInt64 value = 0x0101FF00FF00FF00;
+	UA_UInt64 value = 0x0101FF00FF00FF00;
 	//EncodeUInt16
 
-	rawMessage.message = (char*)opcua_malloc(sizeof(UInt32));
+	rawMessage.message = (char*)opcua_malloc(sizeof(UA_UInt32));
 
 	rawMessage.length = 8;
 
 	UA_Int32 p = 0;
 	encodeUInt64(value, &p,rawMessage.message);
 
-	ck_assert_uint_eq((Byte)rawMessage.message[0],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[1],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[2],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[3],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[4],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[5],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[6],0x01);
-	ck_assert_uint_eq((Byte)rawMessage.message[7],0x01);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[0],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[1],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[2],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[3],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[4],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[5],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[6],0x01);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[7],0x01);
 }
 END_TEST
 
@@ -336,7 +336,7 @@ START_TEST(decodeInt64_test)
 {
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
-	Int64 expectedVal = 0xFF;
+	UA_Int64 expectedVal = 0xFF;
 	expectedVal = expectedVal << 56;
 	char mem[8] = {00,00,00,00,0x00,0x00,0x00,0xFF};
 
@@ -345,7 +345,7 @@ START_TEST(decodeInt64_test)
 	rawMessage.length = 8;
 
 	UA_Int32 p = 0;
-	Int64 val;
+	UA_Int64 val;
 	decoder_decodeBuiltInDatatype(rawMessage.message, INT64, &p, &val);
 	ck_assert_uint_eq(val, expectedVal);
 }
@@ -354,24 +354,24 @@ START_TEST(encodeInt64_test)
 {
 	AD_RawMessage rawMessage;
 	UA_Int32 position = 0;
-	UInt64 value = 0x0101FF00FF00FF00;
+	UA_UInt64 value = 0x0101FF00FF00FF00;
 	//EncodeUInt16
 
-	rawMessage.message = (char*)opcua_malloc(sizeof(UInt32));
+	rawMessage.message = (char*)opcua_malloc(sizeof(UA_UInt32));
 
 	rawMessage.length = 8;
 
 	UA_Int32 p = 0;
 	encodeUInt64(value, &p,rawMessage.message);
 
-	ck_assert_uint_eq((Byte)rawMessage.message[0],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[1],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[2],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[3],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[4],0x00);
-	ck_assert_uint_eq((Byte)rawMessage.message[5],0xFF);
-	ck_assert_uint_eq((Byte)rawMessage.message[6],0x01);
-	ck_assert_uint_eq((Byte)rawMessage.message[7],0x01);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[0],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[1],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[2],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[3],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[4],0x00);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[5],0xFF);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[6],0x01);
+	ck_assert_uint_eq((UA_Byte)rawMessage.message[7],0x01);
 }
 END_TEST
 
@@ -404,8 +404,8 @@ START_TEST(encodeFloat_test)
 
 	encodeFloat(value,&pos,buf);
 
-	ck_assert_uint_eq((Byte)buf[2],0xD0);
-	ck_assert_uint_eq((Byte)buf[3],0xC0);
+	ck_assert_uint_eq((UA_Byte)buf[2],0xD0);
+	ck_assert_uint_eq((UA_Byte)buf[3],0xC0);
 	opcua_free(buf);
 
 }
@@ -424,8 +424,8 @@ START_TEST(encodeDouble_test)
 
 	encodeDouble(value,&pos,buf);
 
-	ck_assert_uint_eq((Byte)buf[6],0xD0);
-	ck_assert_uint_eq((Byte)buf[7],0xC0);
+	ck_assert_uint_eq((UA_Byte)buf[6],0xD0);
+	ck_assert_uint_eq((UA_Byte)buf[7],0xC0);
 	opcua_free(buf);
 }
 END_TEST
@@ -496,7 +496,7 @@ START_TEST(extensionObject_calcSize_test)
 
 	UA_Int32 valreal = 0;
 	UA_Int32 valcalc = 0;
-	Byte data[3] = {1,2,3};
+	UA_Byte data[3] = {1,2,3};
 	UA_ExtensionObject extensionObject;
 
 	// empty ExtensionObject