Browse Source

cleaning up

FlorianPalm 10 years ago
parent
commit
673138a8ec
1 changed files with 0 additions and 84 deletions
  1. 0 84
      examples/src/opcuaServerACPLT.c

+ 0 - 84
examples/src/opcuaServerACPLT.c

@@ -36,90 +36,6 @@ int main(void) {
 #ifdef LINUX
 void tmpTestFunction()
 {
-	// given
-/*	UA_Variant *value = UA_NULL;
-	UA_Variant *copiedValue = UA_NULL;
-	UA_Int32 *dimensions;
-	UA_Int32 theta, zeta;
-	UA_String **srcArray; UA_Array_new((void***)&srcArray,3,UA_STRING);
-	//init
-	UA_String_copycstring("open",srcArray[0]);
-	UA_String_copycstring("62541",srcArray[1]);
-	UA_String_copycstring("opc ua",srcArray[2]);
-
-	UA_alloc((void**)&dimensions,UA_Int32_calcSize(UA_NULL));
-	dimensions[0]=1;
-	UA_Variant_new(&value);
-	UA_Variant_new(&copiedValue);
-
-	value->arrayLength = 3;
-	value->data = (void**)srcArray;
-	value->arrayDimensionsLength = 1;
-	value->arrayDimensions = &dimensions;
-	value->encodingMask |= UA_VARIANT_ENCODINGMASKTYPE_ARRAY;
-	value->encodingMask |= UA_STRING_NS0;
-	value->encodingMask |= UA_VARIANT_ENCODINGMASKTYPE_DIMENSIONS;
-
-	UA_Variant_copy(value,copiedValue);
-	theta = *(value->arrayDimensions)[0],
-	zeta =  *(copiedValue->arrayDimensions)[0];
-
-	theta = zeta * theta;
-*/
-	// given
-	UA_Variant *value = UA_NULL;
-	UA_Variant *copiedValue = UA_NULL;
-	UA_Int32 **dimensions;
-	UA_Int32 i,i1,i2;
-	UA_Int32 **srcArray;
-	UA_Array_new((void***)&srcArray,6,UA_INT32);
-
-
-	*srcArray[0] = 0;
-	*srcArray[1] = 1;
-	*srcArray[2] = 2;
-	*srcArray[3] = 3;
-	*srcArray[4] = 4;
-	*srcArray[5] = 5;
-
-
-
-	UA_Array_new((void***)&dimensions,2,UA_INT32);
-
-	*(dimensions)[0] = 3;
-	*(dimensions)[1] = 2;
-
-	UA_Variant_new(&value);
-	UA_Variant_new(&copiedValue);
-
-	value->arrayLength = 6;
-	value->data = (void**)srcArray;
-	value->arrayDimensionsLength = 2;
-	value->arrayDimensions = dimensions;
-	value->encodingMask |= UA_VARIANT_ENCODINGMASKTYPE_ARRAY;
-	value->encodingMask |= UA_INT32_NS0;
-	value->encodingMask |= UA_VARIANT_ENCODINGMASKTYPE_DIMENSIONS;
-
-	//when
-	UA_Variant_copy(value, copiedValue);
-
-	//then
-	//1st dimension
-	i1 = *(value->arrayDimensions)[0],
-	i2 = *(copiedValue->arrayDimensions)[0];
-	//	ck_assert_int_eq(i1,i2);
-
-	//2nd dimension
-	i1 = *(value->arrayDimensions)[1];
-	i2 = *(copiedValue->arrayDimensions)[1];
-	//ck_assert_int_eq(i1,i2);
-
-	for(i=0;i<6;i++){
-		i1 = *((UA_Int32*)(value->data[i]));
-		i2 = *((UA_Int32*)(copiedValue->data[i]));
-	//	ck_assert_int_eq(i1,i2);
-	}
-
 }
 void server_run() {
 	//just for debugging