public boolean[] getBooleanArray(boolean in[]);
public char[] getCharArray(char in[]);
+ public List<Byte> getByteList(List<Byte> in);
+ public List<Short> getShortList(List<Short> in);
+ public List<Long> getLongList(List<Long> in);
+ public List<Float> getFloatList(List<Float> in);
+ public List<Double> getDoubleList(List<Double> in);
+ public List<Boolean> getBooleanList(List<Boolean> in);
+ public List<Character> getCharList(List<Character> in);
+
public int getA();
public void setA(int _int);
public void setB(float _float);
method = "getDoubleArray(double in[])";
method = "getBooleanArray(boolean in[])";
method = "getCharArray(char in[])";
+ method = "getByteList(List<Byte> in)";
+ method = "getShortList(List<Short> in)";
+ method = "getLongList(List<Long> in)";
+ method = "getFloatList(List<Float> in)";
+ method = "getDoubleList(List<Double> in)";
+ method = "getBooleanList(List<Boolean> in)";
+ method = "getCharList(List<Character> in)";
method = "getA()";
method = "setA(int _int)";
method = "setB(float _float)";
} else if ( string(type).find("*") != string::npos) {
// This is an array type, i.e. vector
retObj = getArrayParamObject(retObj, type, paramBytes, len);
+ } else if ( (string(type).find("<") != string::npos) &&
+ (string(type).find(">") != string::npos)) {
+ // This is a vector/list type
+ retObj = getArrayParamObject(retObj, type, paramBytes, len);
} else {
cerr << "IoTRMIUtil: Unrecognizable type: " << type << endl;
exit(-1);
} else if ( string(type).find("*") != string::npos) {
// This is an array type, i.e. vector
retObjBytes = getArrayObjectBytes(retObjBytes, obj, type);
+ } else if ( (string(type).find("<") != string::npos) &&
+ (string(type).find(">") != string::npos)) {
+ // This is a vector/list type
+ retObjBytes = getArrayObjectBytes(retObjBytes, obj, type);
} else {
cerr << "IoTRMIUtil: Unrecognizable type: " << type << endl;
exit(-1);
vector<bool> getBooleanArray(vector<bool> in);
vector<char> getCharArray(vector<char> in);
+ vector<char> getByteList(vector<char> in);
+ vector<short> getShortList(vector<short> in);
+ vector<int64_t> getLongList(vector<int64_t> in);
+ vector<float> getFloatList(vector<float> in);
+ vector<double> getDoubleList(vector<double> in);
+ vector<bool> getBooleanList(vector<bool> in);
+ vector<char> getCharList(vector<char> in);
+
int getA();
void setA(int _int);
void setB(float _float);
return in;
}
+// List
+vector<char> TestClass::getByteList(vector<char> in) {
+
+ return in;
+}
+
+
+vector<short> TestClass::getShortList(vector<short> in) {
+
+ return in;
+}
+
+
+vector<int64_t> TestClass::getLongList(vector<int64_t> in) {
+
+ return in;
+}
+
+
+vector<float> TestClass::getFloatList(vector<float> in) {
+
+ return in;
+}
+
+
+vector<double> TestClass::getDoubleList(vector<double> in) {
+
+ return in;
+}
+
+
+vector<bool> TestClass::getBooleanList(vector<bool> in) {
+
+ return in;
+}
+
+
+vector<char> TestClass::getCharList(vector<char> in) {
+
+ return in;
+}
+
int TestClass::getA() {
in7.push_back('c');
in7.push_back('e');
cout << "Return value: " << tcStub->getCharArray(in7)[0] << ", " << tcStub->getCharArray(in7)[1] << endl;
+ cout << "==== VECTOR/LIST ====" << endl;
+ vector<char> inl1;
+ inl1.push_back(68);
+ inl1.push_back(69);
+ cout << "Return value: " << tcStub->getByteList(inl1)[0] << ", " << tcStub->getByteList(inl1)[1] << endl;
+ vector<short> inl2;
+ inl2.push_back(1234);
+ inl2.push_back(1235);
+ cout << "Return value: " << tcStub->getShortList(inl2)[0] << ", " << tcStub->getShortList(inl2)[1] << endl;
+ vector<int64_t> inl3;
+ inl3.push_back(12345678);
+ inl3.push_back(12356782);
+ cout << "Return value: " << tcStub->getLongList(inl3)[0] << ", " << tcStub->getLongList(inl3)[1] << endl;
+ vector<float> inl4;
+ inl4.push_back(12.345);
+ inl4.push_back(12.346);
+ cout << "Return value: " << tcStub->getFloatList(inl4)[0] << ", " << tcStub->getFloatList(inl4)[1] << endl;
+ vector<double> inl5;
+ inl5.push_back(12345.678);
+ inl5.push_back(12345.543);
+ cout << "Return value: " << tcStub->getDoubleList(inl5)[0] << ", " << tcStub->getDoubleList(inl5)[1] << endl;
+ vector<bool> inl6;
+ inl6.push_back(true);
+ inl6.push_back(false);
+ cout << "Return value: " << tcStub->getBooleanList(inl6)[0] << ", " << tcStub->getBooleanList(inl6)[1] << endl;
+ vector<char> inl7;
+ inl7.push_back('c');
+ inl7.push_back('e');
+ cout << "Return value: " << tcStub->getCharList(inl7)[0] << ", " << tcStub->getCharList(inl7)[1] << endl;
cout << "==== OTHERS ====" << endl;
cout << "Return value: " << tcStub->getA() << endl;
cout << "Return value: " << tcStub->setAndGetA(123) << endl;
}
+ // Lists
+ public List<Byte> getByteList(List<Byte> in) {
+
+ return in;
+ }
+
+
+ public List<Short> getShortList(List<Short> in) {
+
+ return in;
+ }
+
+
+ public List<Long> getLongList(List<Long> in) {
+
+ return in;
+ }
+
+
+ public List<Float> getFloatList(List<Float> in) {
+
+ return in;
+ }
+
+
+ public List<Double> getDoubleList(List<Double> in) {
+
+ return in;
+ }
+
+
+ public List<Boolean> getBooleanList(List<Boolean> in) {
+
+ return in;
+ }
+
+
+ public List<Character> getCharList(List<Character> in) {
+
+ return in;
+ }
+
+
// Other functions
public int getA() {
import java.util.Arrays;
+import java.util.List;
+import java.util.ArrayList;
import iotruntime.master.CommunicationHandler;
public class TestClass_Stub {
char[] in7 = { 'c', 'e' };
System.out.println("Return value: " + Arrays.toString(tcstub.getCharArray(in7)));
+ System.out.println("==== LIST ====");
+ List<Byte> inl1 = Arrays.asList(new Byte[] { 68, 69 });
+ System.out.println("Return value: " + tcstub.getByteList(inl1));
+ List<Short> inl2 = Arrays.asList(new Short[] { (short)1234, (short)1235 });
+ System.out.println("Return value: " + tcstub.getShortList(inl2));
+ List<Long> inl3 = Arrays.asList(new Long[] { 12345678l, 12356782l });
+ System.out.println("Return value: " + tcstub.getLongList(inl3));
+ List<Float> inl4 = Arrays.asList(new Float[] { 12.345f, 12.346f });
+ System.out.println("Return value: " + tcstub.getFloatList(inl4));
+ List<Double> inl5 = Arrays.asList(new Double[] { 12345.678, 12345.543 });
+ System.out.println("Return value: " + tcstub.getDoubleList(inl5));
+ List<Boolean> inl6 = Arrays.asList(new Boolean[] { true, false });
+ System.out.println("Return value: " + tcstub.getBooleanList(inl6));
+ List<Character> inl7 = Arrays.asList(new Character[] { 'c', 'e' });
+ System.out.println("Return value: " + tcstub.getCharList(inl7));
+
System.out.println("==== OTHERS ====");
System.out.println("Return value: " + tcstub.getA());
System.out.println("Return value: " + tcstub.setAndGetA(123));