X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iot2.git;a=blobdiff_plain;f=iotjava%2Fiotrmi%2FC%2B%2B%2Fsample%2FTestClass_Skeleton.hpp;h=052737841dc16a0427f54635a04ef1391b9595d9;hp=95afe9b7e35b4c01614a7bfdbdd51c5c981e6c7a;hb=87ac04592d1d46c7474cad5b046fdf1ecef3dcd1;hpb=b6effa890ccb61eb4b7a82f0dd7493cac354ef49 diff --git a/iotjava/iotrmi/C++/sample/TestClass_Skeleton.hpp b/iotjava/iotrmi/C++/sample/TestClass_Skeleton.hpp index 95afe9b..0527378 100644 --- a/iotjava/iotrmi/C++/sample/TestClass_Skeleton.hpp +++ b/iotjava/iotrmi/C++/sample/TestClass_Skeleton.hpp @@ -22,7 +22,8 @@ class TestClass_Skeleton { "voidsetA(int)", "voidsetB(float)", "voidsetC(string)", - "sumArray(string[])", + //"sumArray(string[])", + "sumArray(int[])", "intsetAndGetA(int)", "intsetACAndGetA(string,int)", "intcallBack()", @@ -78,7 +79,7 @@ void TestClass_Skeleton::waitRequestInvokeMethod() { void* paramObj[] = { ¶m1 }; rmiObj->getMethodParams(paramCls, numParam, paramObj); tc->setC(param1); - } else if (methodSign.compare("sumArray(string[])") == 0) { + /*} else if (methodSign.compare("sumArray(string[])") == 0) { string paramCls[] = { "string[]" }; int numParam = 1; vector param1; @@ -86,7 +87,16 @@ void TestClass_Skeleton::waitRequestInvokeMethod() { rmiObj->getMethodParams(paramCls, numParam, paramObj); string retVal = tc->sumArray(param1); void* retObj = &retVal; - rmiObj->sendReturnObj(retObj, "string"); + rmiObj->sendReturnObj(retObj, "string");*/ + } else if (methodSign.compare("sumArray(int[])") == 0) { + string paramCls[] = { "int[]" }; + int numParam = 1; + vector param1; + void* paramObj[] = { ¶m1 }; + rmiObj->getMethodParams(paramCls, numParam, paramObj); + int64_t retVal = tc->sumArray(param1); + void* retObj = &retVal; + rmiObj->sendReturnObj(retObj, "long"); } else if (methodSign.compare("intsetAndGetA(int)") == 0) { string paramCls[] = { "int" }; int numParam = 1;