//This file is automatically generated. DO NOT EDIT!
using System;
using RobotRaconteur;
using System.Collections.Generic;
using System.Threading.Tasks;

#pragma warning disable 0108

namespace com.robotraconteur.testing.TestService3
{
public class com__robotraconteur__testing__TestService3Factory : ServiceFactory
{
    public override string DefString()
{
    const string s="service com.robotraconteur.testing.TestService3\n\nstdver 0.9.2\n#option version 0.9.0\n\nimport com.robotraconteur.testing.TestService1\nusing  com.robotraconteur.testing.TestService1.testroot\nusing  com.robotraconteur.testing.TestService1.teststruct1\nusing  com.robotraconteur.testing.TestService1.teststruct2\nusing  com.robotraconteur.testing.TestService1.testexception1\nusing  com.robotraconteur.testing.TestService1.sub2\nusing  com.robotraconteur.testing.TestService1.sub3\n\nenum testenum1\nvalue1 = 0,	value2,	value3,	anothervalue = -1,\nanothervalue2 = -2,\nanothervalue3 = -3,\nhexval1 = 0x10,\nhexval2,\nneghexval1 = -0x7ffffffb,\nneghexval2,\nmore_values\nend\n\nconstant string strconst \"This is a\\n \\\"string constant\\\" \\\\\\/\\b\\f \\r\\u00FF tabme\\ttabme\\n smile! \\ud83d\\udE01\"\nconstant int32 int32const 3856384\nconstant int32[] int32const_array {182476, 56483, -2947}\nconstant int32 int32hexconst 0x082bc7\nconstant int32 int32hexconst2 -0x7264c17\nconstant int32[] int32hexconst_array { 0x8274ec, -0x0001, +0xABCDEF, 0xabcdef, 0x012345, 0x6789 }\nconstant double[] doubleconst_array {1.5847, 3.14, -548e3, 3452.67e2, 485e-21}\nconstant struct structconst {field1: strconst, field2: int32const_array}\nconstant struct structconst2 {field3: structconst, field4: int32const}\n\nexception test_exception4\n\nnamedarray vector3\nfield double x\nfield double y\nfield double z\nend\n\nnamedarray quaternion\nfield double q0\nfield double q1\nfield double q2\nfield double q3\nend\n\nnamedarray transform\nfield quaternion rotation\nfield vector3 translation\nend\n\nnamedarray pixel\nfield uint8 r\nfield uint8 b\nfield uint8 g\nend\n\nnamedarray pixel2\nfield uint8 c\nfield pixel d\nfield pixel e\nfield pixel[7] f\nfield pixel g\nend\n\npod testpod1\nfield double d1\nfield double[6] d2\nfield double[6-] d3\nfield double[3,3] d4\nfield testpod2 s1\nfield testpod2[8] s2\nfield testpod2[9-] s3\nfield testpod2[2,4] s4\nfield transform t1\nfield transform[4] t2\nfield transform[15-] t3\nfield transform[2,4] t4\nend\n\npod testpod2\nfield int8 i1\nfield int8[15] i2\nfield int8[17-] i3\nend\n\nstruct teststruct3\nfield testpod1 s1\nfield testpod1[] s2\nfield testpod1[11] s3\nfield testpod1[16-] s4\nfield testpod1[3,3] s5\nfield testpod1[*] s6\nfield testpod1{list} s7\nfield testpod1[]{list} s8\nfield testpod1[*]{list} s9\nfield varvalue s10\nfield varvalue s11\nfield varvalue s12\nfield varvalue s13\nfield varvalue s14\nfield varvalue s15\nfield transform t1\nfield transform[4] t2\nfield transform[2,4] t3\nfield varvalue t4\nfield varvalue t5\nfield transform{list} t6\nfield transform[4]{list} t7\nfield transform[2,4]{list} t8\nfield varvalue t9\nfield varvalue t10\nfield varvalue t11\n\nend\n\nobject testroot3\n\nconstant string unknown_modifier_hello \"hello world!\"\n\nproperty int32 readme [readonly]\nproperty int32 writeme [writeonly]\n\npipe int32 unreliable1 [unreliable,readonly]\n\nwire int32 peekwire [readonly]\nwire int32 \\\npokewire [writeonly]\nproperty int32 unknown_modifier [unknown, unknown_3(23, 45.8e-5, unknown_modifier_hello)]\n\nmemory double[] readmem [readonly]\n\nobjref obj4 o4\n\nproperty testenum1 testenum1_prop\n\nproperty testpod1 testpod1_prop\nfunction void testpod1_func1(testpod1 s)\nfunction testpod1 testpod1_func2()\n\nproperty teststruct3 teststruct3_prop\n\nmemory testpod2[] pod_m1\nmemory testpod2[*] pod_m2\n\nfunction double{generator} gen_func1()\nfunction uint8[]{generator} gen_func2(string name)\nfunction void gen_func3(string name, uint8[]{generator} in)\nfunction uint8[]{generator} gen_func4(uint8[]{generator} in)\nfunction teststruct2{generator} gen_func5(teststruct2{generator} in)\n\n#extra tests for fixed length arrays\nproperty double[6]{list} d1\nproperty double[6-]{list} d2\nproperty double[6]{int32} d3\nproperty double[6-]{int32} d4\nproperty double[3,3]{list} d5\nproperty double[3,3]{int32} d6\n\n#Test pipe and wire verification\npipe int32[3] p1\npipe int32[3-] p2\npipe int32[2,2] p3\nwire int32[6] w1\nwire int32[6-] w2\nwire int32[3,2] w3\n\n#namedarray test\nproperty vector3 testnamedarray1\nproperty transform testnamedarray2\nproperty transform[10-] testnamedarray3\nproperty transform[*] testnamedarray4\nproperty transform[3,2] testnamedarray5\n\nmemory transform[] namedarray_m1\nmemory transform[*] namedarray_m2\n\n#new primitive types test\nproperty cdouble c1\nproperty cdouble[] c2\nproperty cdouble[*] c3\nproperty cdouble{list} c4\nproperty cdouble[]{list} c5\nproperty cdouble[*]{list} c6\nproperty csingle c7\nproperty csingle[] c8\nproperty csingle[*] c9\nproperty csingle{list} c10\nproperty csingle[]{list} c11\nproperty csingle[*]{list} c12\n\nproperty bool b1\nproperty bool[] b2\nproperty bool[*] b3\nproperty bool{list} b4\nproperty bool[]{list} b5\nproperty bool[*]{list} b6\n\nmemory cdouble[] c_m1\nmemory cdouble[*] c_m2\nmemory cdouble[] c_m3\nmemory cdouble[*] c_m4\nmemory bool[] c_m5\nmemory bool[*] c_m6\n\nobjref obj5 nolock_test\n\nfunction void test_exception_params1()\nfunction void test_exception_params2()\n\nfunction testenum1{generator} enum_generator1()\nfunction testenum1{generator} enum_generator2(int32 a, int32 b, testenum1{generator} enum_gen)\n\nend\n\nobject obj1\nproperty double[] d1\nend\n\nobject obj2\nimplements obj1\nproperty double[] d1\nend\n\nobject obj3\nimplements obj1\nimplements obj2\nproperty double[] d1\nend\n\nobject obj4\nimplements sub2\nproperty string s_ind\nproperty int32 i_ind\n\nproperty string data\nobjref sub3{string} o3_1\nend\n\nobject obj5\n\nproperty double p1\nproperty double p2 [nolock]\nproperty double p3 [nolockread]\n\nfunction int32 f1()\nfunction int32 f2() [nolock]\n\npipe int32 q1 [readonly]\npipe int32 q2 [readonly,nolock]\n\nwire int32 w1 [readonly]\nwire int32 w2 [readonly,nolock]\n\nmemory int32[] m1\nmemory int32[] m2 [nolock]\nmemory int32[] m3 [nolockread]\n\nend\n\n";
    return s;
    }
    public override string GetServiceName() {return "com.robotraconteur.testing.TestService3";}
    public teststruct3_stub teststruct3_stubentry;
    public testpod1_stub testpod1_stubentry;
    public testpod2_stub testpod2_stubentry;
    public vector3_stub vector3_stubentry;
    public quaternion_stub quaternion_stubentry;
    public transform_stub transform_stubentry;
    public pixel_stub pixel_stubentry;
    public pixel2_stub pixel2_stubentry;
    public com__robotraconteur__testing__TestService3Factory()
{
    teststruct3_stubentry=new teststruct3_stub(this);
    testpod1_stubentry=new testpod1_stub(this);
    testpod2_stubentry=new testpod2_stub(this);
    vector3_stubentry=new vector3_stub();
    quaternion_stubentry=new quaternion_stub();
    transform_stubentry=new transform_stub();
    pixel_stubentry=new pixel_stub();
    pixel2_stubentry=new pixel2_stub();
    }
    public override IStructureStub FindStructureStub(string objecttype)
    {
    if (objecttype=="teststruct3")    return teststruct3_stubentry;
    throw new DataTypeException("Cannot find appropriate structure stub");
    }
    public override IPodStub FindPodStub(string objecttype)
    {
    if (objecttype=="testpod1")    return testpod1_stubentry;
    if (objecttype=="testpod2")    return testpod2_stubentry;
    throw new DataTypeException("Cannot find appropriate pod stub");
    }
    public override INamedArrayStub FindNamedArrayStub(string objecttype)
    {
    if (objecttype=="vector3")    return vector3_stubentry;
    if (objecttype=="quaternion")    return quaternion_stubentry;
    if (objecttype=="transform")    return transform_stubentry;
    if (objecttype=="pixel")    return pixel_stubentry;
    if (objecttype=="pixel2")    return pixel2_stubentry;
    throw new DataTypeException("Cannot find appropriate pod stub");
    }
    public override ServiceStub CreateStub(WrappedServiceStub innerstub) {
    string objecttype=innerstub.RR_objecttype.GetServiceDefinition().Name + "." + innerstub.RR_objecttype.Name;    string objshort;
    if (CompareNamespace(objecttype, out objshort)) {
    switch (objshort) {
    case "testroot3":
    return new testroot3_stub(innerstub);
    case "obj1":
    return new obj1_stub(innerstub);
    case "obj2":
    return new obj2_stub(innerstub);
    case "obj3":
    return new obj3_stub(innerstub);
    case "obj4":
    return new obj4_stub(innerstub);
    case "obj5":
    return new obj5_stub(innerstub);
    default:
    break;
    }
    } else {
    string ext_service_type=RobotRaconteurNode.SplitQualifiedName(objecttype).Item1;
    return RobotRaconteurNode.s.GetServiceType(ext_service_type).CreateStub(innerstub);
    }
    throw new ServiceException("Could not create stub");
    }
    public override ServiceSkel CreateSkel(object obj) {
    string objtype = RobotRaconteurNode.GetTypeString(ServiceSkelUtil.FindParentInterface(obj.GetType()));
    string objshort;
    if (CompareNamespace(objtype, out objshort)) {
    switch(objshort) {
    case "testroot3":
    return new testroot3_skel((testroot3)obj);
    case "obj1":
    return new obj1_skel((obj1)obj);
    case "obj2":
    return new obj2_skel((obj2)obj);
    case "obj3":
    return new obj3_skel((obj3)obj);
    case "obj4":
    return new obj4_skel((obj4)obj);
    case "obj5":
    return new obj5_skel((obj5)obj);
    default:
    break;
    }
    } else {
    string ext_service_type=RobotRaconteurNode.SplitQualifiedName(objtype).Item1;
    return RobotRaconteurNode.s.GetServiceFactory(ext_service_type).CreateSkel(obj);
    }
    throw new ServiceException("Could not create skel");
    }
    public override RobotRaconteurException DownCastException(RobotRaconteurException rr_exp){
    if (rr_exp==null) return rr_exp;
    string rr_type=rr_exp.Error;
    if (!rr_type.Contains(".")) return rr_exp;
    string rr_stype;
    if (CompareNamespace(rr_type, out rr_stype)) {
    if (rr_stype=="test_exception4") return new test_exception4(rr_exp.Message,rr_exp.ErrorSubName,rr_exp.ErrorParam);
    } else {
    return RobotRaconteurNode.s.DownCastException(rr_exp); 
    }
    return rr_exp;
    }
}

public class teststruct3_stub : IStructureStub {
    public teststruct3_stub(com__robotraconteur__testing__TestService3Factory d) {def=d;}
    private com__robotraconteur__testing__TestService3Factory def;
    public MessageElementNestedElementList PackStructure(object s1) {
    using(vectorptr_messageelement m=new vectorptr_messageelement())
    {
    if (s1 ==null) return null;
    teststruct3 s = (teststruct3)s1;
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodToArray<testpod1>("s1",ref s.s1));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodArray<testpod1>("s2",s.s2));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodArray<testpod1>("s3",DataTypeUtil.VerifyArrayLength(s.s3, 11, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodArray<testpod1>("s4",DataTypeUtil.VerifyArrayLength(s.s4, 16, true)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodMultiDimArray<testpod1>("s5",DataTypeUtil.VerifyArrayLength(s.s5,9,new uint[] {3,3})));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodMultiDimArray<testpod1>("s6",s.s6));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackListType<testpod1>("s7",s.s7));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackListType<testpod1[]>("s8",s.s8));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackListType<PodMultiDimArray>("s9",s.s9));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("s10",s.s10));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("s11",s.s11));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("s12",s.s12));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("s13",s.s13));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("s14",s.s14));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("s15",s.s15));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedArrayToArray<transform>("t1",ref s.t1));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedArray<transform>("t2",DataTypeUtil.VerifyArrayLength(s.t2, 4, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedMultiDimArray<transform>("t3",DataTypeUtil.VerifyArrayLength(s.t3,8,new uint[] {2,4})));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("t4",s.t4));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("t5",s.t5));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackListType<transform>("t6",s.t6));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackListType<transform[]>("t7",DataTypeUtil.VerifyArrayLength(s.t7, 4, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackListType<NamedMultiDimArray>("t8",DataTypeUtil.VerifyArrayLength(s.t8,8,new uint[] {2,4})));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("t9",s.t9));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("t10",s.t10));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackVarType("t11",s.t11));
    return new MessageElementNestedElementList(DataTypes.structure_t,"com.robotraconteur.testing.TestService3.teststruct3",m);
    }
    }
    public T UnpackStructure<T>(MessageElementNestedElementList m) {
    if (m == null ) return default(T);
    teststruct3 s=new teststruct3();
    using(vectorptr_messageelement mm=m.Elements)
    {
    s.s1 =MessageElementUtil.UnpackPodFromArray<testpod1>(MessageElement.FindElement(mm,"s1"));
    s.s2 =MessageElementUtil.UnpackPodArray<testpod1>(MessageElement.FindElement(mm,"s2"));
    s.s3 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackPodArray<testpod1>(MessageElement.FindElement(mm,"s3")), 11, false);
    s.s4 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackPodArray<testpod1>(MessageElement.FindElement(mm,"s4")), 16, true);
    s.s5 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackPodMultiDimArray<testpod1>(MessageElement.FindElement(mm,"s5")),9,new uint[] {3,3});
    s.s6 =MessageElementUtil.UnpackPodMultiDimArray<testpod1>(MessageElement.FindElement(mm,"s6"));
    s.s7 =MessageElementUtil.UnpackList<testpod1>(MessageElement.FindElement(mm,"s7"));
    s.s8 =MessageElementUtil.UnpackList<testpod1[]>(MessageElement.FindElement(mm,"s8"));
    s.s9 =MessageElementUtil.UnpackList<PodMultiDimArray>(MessageElement.FindElement(mm,"s9"));
    s.s10 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"s10"));
    s.s11 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"s11"));
    s.s12 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"s12"));
    s.s13 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"s13"));
    s.s14 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"s14"));
    s.s15 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"s15"));
    s.t1 =MessageElementUtil.UnpackNamedArrayFromArray<transform>(MessageElement.FindElement(mm,"t1"));
    s.t2 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(MessageElement.FindElement(mm,"t2")), 4, false);
    s.t3 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedMultiDimArray<transform>(MessageElement.FindElement(mm,"t3")),8,new uint[] {2,4});
    s.t4 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"t4"));
    s.t5 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"t5"));
    s.t6 =MessageElementUtil.UnpackList<transform>(MessageElement.FindElement(mm,"t6"));
    s.t7 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<transform[]>(MessageElement.FindElement(mm,"t7")), 4, false);
    s.t8 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<NamedMultiDimArray>(MessageElement.FindElement(mm,"t8")),8,new uint[] {2,4});
    s.t9 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"t9"));
    s.t10 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"t10"));
    s.t11 =MessageElementUtil.UnpackVarType(MessageElement.FindElement(mm,"t11"));
    T st; try {st=(T)((object)s);} catch (InvalidCastException) {throw new DataTypeMismatchException("Wrong structuretype");}
    return st;
    }
    }
}

public class testpod1_stub : PodStub<testpod1> {
    public testpod1_stub(com__robotraconteur__testing__TestService3Factory d) {def=d;}
    private com__robotraconteur__testing__TestService3Factory def;
    public override MessageElementNestedElementList PackPod(ref testpod1 s1) {
    using(vectorptr_messageelement m=new vectorptr_messageelement())
    {
    testpod1 s = (testpod1)s1;
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackScalar<double>("d1",s.d1));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackArray<double>("d2",DataTypeUtil.VerifyArrayLength(s.d2, 6, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackArray<double>("d3",DataTypeUtil.VerifyArrayLength(s.d3, 6, true)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackArray<double>("d4",DataTypeUtil.VerifyArrayLength(s.d4, 9, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodToArray<testpod2>("s1",ref s.s1));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodArray<testpod2>("s2",DataTypeUtil.VerifyArrayLength(s.s2, 8, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodArray<testpod2>("s3",DataTypeUtil.VerifyArrayLength(s.s3, 9, true)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackPodArray<testpod2>("s4",DataTypeUtil.VerifyArrayLength(s.s4, 8, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedArrayToArray<transform>("t1",ref s.t1));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedArray<transform>("t2",DataTypeUtil.VerifyArrayLength(s.t2, 4, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedArray<transform>("t3",DataTypeUtil.VerifyArrayLength(s.t3, 15, true)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackNamedArray<transform>("t4",DataTypeUtil.VerifyArrayLength(s.t4, 8, false)));
    return new MessageElementNestedElementList(DataTypes.pod_t,"",m);
    }
    }
    public override testpod1 UnpackPod(MessageElementNestedElementList m) {
    if (m == null ) throw new NullReferenceException("Pod must not be null");
    using(vectorptr_messageelement mm=m.Elements)
    {
    testpod1 s = new testpod1();
    s.d1 =(MessageElementUtil.UnpackScalar<double>(MessageElement.FindElement(mm,"d1")));
    s.d2 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackArray<double>(MessageElement.FindElement(mm,"d2")), 6, false);
    s.d3 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackArray<double>(MessageElement.FindElement(mm,"d3")), 6, true);
    s.d4 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackArray<double>(MessageElement.FindElement(mm,"d4")), 9, false);
    s.s1 =MessageElementUtil.UnpackPodFromArray<testpod2>(MessageElement.FindElement(mm,"s1"));
    s.s2 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackPodArray<testpod2>(MessageElement.FindElement(mm,"s2")), 8, false);
    s.s3 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackPodArray<testpod2>(MessageElement.FindElement(mm,"s3")), 9, true);
    s.s4 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackPodArray<testpod2>(MessageElement.FindElement(mm,"s4")), 8, false);
    s.t1 =MessageElementUtil.UnpackNamedArrayFromArray<transform>(MessageElement.FindElement(mm,"t1"));
    s.t2 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(MessageElement.FindElement(mm,"t2")), 4, false);
    s.t3 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(MessageElement.FindElement(mm,"t3")), 15, true);
    s.t4 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(MessageElement.FindElement(mm,"t4")), 8, false);
    return s;
    }
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.testpod1"; } }}

public class testpod2_stub : PodStub<testpod2> {
    public testpod2_stub(com__robotraconteur__testing__TestService3Factory d) {def=d;}
    private com__robotraconteur__testing__TestService3Factory def;
    public override MessageElementNestedElementList PackPod(ref testpod2 s1) {
    using(vectorptr_messageelement m=new vectorptr_messageelement())
    {
    testpod2 s = (testpod2)s1;
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackScalar<sbyte>("i1",s.i1));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackArray<sbyte>("i2",DataTypeUtil.VerifyArrayLength(s.i2, 15, false)));
    MessageElementUtil.AddMessageElementDispose(m,MessageElementUtil.PackArray<sbyte>("i3",DataTypeUtil.VerifyArrayLength(s.i3, 17, true)));
    return new MessageElementNestedElementList(DataTypes.pod_t,"",m);
    }
    }
    public override testpod2 UnpackPod(MessageElementNestedElementList m) {
    if (m == null ) throw new NullReferenceException("Pod must not be null");
    using(vectorptr_messageelement mm=m.Elements)
    {
    testpod2 s = new testpod2();
    s.i1 =(MessageElementUtil.UnpackScalar<sbyte>(MessageElement.FindElement(mm,"i1")));
    s.i2 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackArray<sbyte>(MessageElement.FindElement(mm,"i2")), 15, false);
    s.i3 =DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackArray<sbyte>(MessageElement.FindElement(mm,"i3")), 17, true);
    return s;
    }
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.testpod2"; } }}

public class vector3_stub : NamedArrayStub<vector3,double> {
    public override double[] GetNumericArrayFromNamedArrayStruct(ref vector3 s) {
    return s.GetNumericArray();
    }
    public override vector3 GetNamedArrayStructFromNumericArray(double[] m) {
    if (m.Length != 3) throw new DataTypeException("Invalid namedarray array");
    var s = new vector3();
    var a = new ArraySegment<double>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override double[] GetNumericArrayFromNamedArray(vector3[] s) {
    return s.GetNumericArray();
    }
    public override vector3[] GetNamedArrayFromNumericArray(double[] m) {
    if (m.Length % 3 != 0) throw new DataTypeException("Invalid namedarray array");
    vector3[] s = new vector3[m.Length / 3];
    var a = new ArraySegment<double>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.vector3"; } }}

public class quaternion_stub : NamedArrayStub<quaternion,double> {
    public override double[] GetNumericArrayFromNamedArrayStruct(ref quaternion s) {
    return s.GetNumericArray();
    }
    public override quaternion GetNamedArrayStructFromNumericArray(double[] m) {
    if (m.Length != 4) throw new DataTypeException("Invalid namedarray array");
    var s = new quaternion();
    var a = new ArraySegment<double>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override double[] GetNumericArrayFromNamedArray(quaternion[] s) {
    return s.GetNumericArray();
    }
    public override quaternion[] GetNamedArrayFromNumericArray(double[] m) {
    if (m.Length % 4 != 0) throw new DataTypeException("Invalid namedarray array");
    quaternion[] s = new quaternion[m.Length / 4];
    var a = new ArraySegment<double>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.quaternion"; } }}

public class transform_stub : NamedArrayStub<transform,double> {
    public override double[] GetNumericArrayFromNamedArrayStruct(ref transform s) {
    return s.GetNumericArray();
    }
    public override transform GetNamedArrayStructFromNumericArray(double[] m) {
    if (m.Length != 7) throw new DataTypeException("Invalid namedarray array");
    var s = new transform();
    var a = new ArraySegment<double>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override double[] GetNumericArrayFromNamedArray(transform[] s) {
    return s.GetNumericArray();
    }
    public override transform[] GetNamedArrayFromNumericArray(double[] m) {
    if (m.Length % 7 != 0) throw new DataTypeException("Invalid namedarray array");
    transform[] s = new transform[m.Length / 7];
    var a = new ArraySegment<double>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.transform"; } }}

public class pixel_stub : NamedArrayStub<pixel,byte> {
    public override byte[] GetNumericArrayFromNamedArrayStruct(ref pixel s) {
    return s.GetNumericArray();
    }
    public override pixel GetNamedArrayStructFromNumericArray(byte[] m) {
    if (m.Length != 3) throw new DataTypeException("Invalid namedarray array");
    var s = new pixel();
    var a = new ArraySegment<byte>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override byte[] GetNumericArrayFromNamedArray(pixel[] s) {
    return s.GetNumericArray();
    }
    public override pixel[] GetNamedArrayFromNumericArray(byte[] m) {
    if (m.Length % 3 != 0) throw new DataTypeException("Invalid namedarray array");
    pixel[] s = new pixel[m.Length / 3];
    var a = new ArraySegment<byte>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.pixel"; } }}

public class pixel2_stub : NamedArrayStub<pixel2,byte> {
    public override byte[] GetNumericArrayFromNamedArrayStruct(ref pixel2 s) {
    return s.GetNumericArray();
    }
    public override pixel2 GetNamedArrayStructFromNumericArray(byte[] m) {
    if (m.Length != 31) throw new DataTypeException("Invalid namedarray array");
    var s = new pixel2();
    var a = new ArraySegment<byte>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override byte[] GetNumericArrayFromNamedArray(pixel2[] s) {
    return s.GetNumericArray();
    }
    public override pixel2[] GetNamedArrayFromNumericArray(byte[] m) {
    if (m.Length % 31 != 0) throw new DataTypeException("Invalid namedarray array");
    pixel2[] s = new pixel2[m.Length / 31];
    var a = new ArraySegment<byte>(m);
    s.AssignFromNumericArray(ref a);
    return s;
    }
    public override string TypeName { get { return "com.robotraconteur.testing.TestService3.pixel2"; } }}

public interface async_testroot3
{
    Task<int> async_get_readme(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_writeme(int value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<int> async_get_unknown_modifier(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_unknown_modifier(int value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<testenum1> async_get_testenum1_prop(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testenum1_prop(testenum1 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<testpod1> async_get_testpod1_prop(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testpod1_prop(testpod1 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<teststruct3> async_get_teststruct3_prop(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_teststruct3_prop(teststruct3 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<double[]>> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d1(List<double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<double[]>> async_get_d2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d2(List<double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Dictionary<int,double[]>> async_get_d3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d3(Dictionary<int,double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Dictionary<int,double[]>> async_get_d4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d4(Dictionary<int,double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<MultiDimArray>> async_get_d5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d5(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Dictionary<int,MultiDimArray>> async_get_d6(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d6(Dictionary<int,MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<vector3> async_get_testnamedarray1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testnamedarray1(vector3 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<transform> async_get_testnamedarray2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testnamedarray2(transform value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<transform[]> async_get_testnamedarray3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testnamedarray3(transform[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<NamedMultiDimArray> async_get_testnamedarray4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testnamedarray4(NamedMultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<NamedMultiDimArray> async_get_testnamedarray5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_testnamedarray5(NamedMultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<CDouble> async_get_c1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c1(CDouble value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<CDouble[]> async_get_c2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c2(CDouble[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<MultiDimArray> async_get_c3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c3(MultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<CDouble>> async_get_c4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c4(List<CDouble> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<CDouble[]>> async_get_c5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c5(List<CDouble[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<MultiDimArray>> async_get_c6(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c6(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<CSingle> async_get_c7(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c7(CSingle value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<CSingle[]> async_get_c8(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c8(CSingle[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<MultiDimArray> async_get_c9(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c9(MultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<CSingle>> async_get_c10(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c10(List<CSingle> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<CSingle[]>> async_get_c11(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c11(List<CSingle[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<MultiDimArray>> async_get_c12(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_c12(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<bool> async_get_b1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_b1(bool value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<bool[]> async_get_b2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_b2(bool[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<MultiDimArray> async_get_b3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_b3(MultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<bool>> async_get_b4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_b4(List<bool> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<bool[]>> async_get_b5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_b5(List<bool[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<List<MultiDimArray>> async_get_b6(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_b6(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_testpod1_func1(testpod1 s,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<testpod1> async_testpod1_func2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator2<double>> async_gen_func1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator2<byte[]>> async_gen_func2(string name,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator3<byte[]>> async_gen_func3(string name,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator1<byte[],byte[]>> async_gen_func4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator1<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2>> async_gen_func5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_test_exception_params1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_test_exception_params2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator2<testenum1>> async_enum_generator1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<Generator1<testenum1,testenum1>> async_enum_generator2(int a, int b,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<obj4> async_get_o4(int timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<obj5> async_get_nolock_test(int timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
}
public class testroot3_stub : ServiceStub , testroot3, async_testroot3{
    private Pipe<int> rr_unreliable1;
    private Pipe<int[]> rr_p1;
    private Pipe<int[]> rr_p2;
    private Pipe<MultiDimArray> rr_p3;
    private Wire<int> rr_peekwire;
    private Wire<int> rr_pokewire;
    private Wire<int[]> rr_w1;
    private Wire<int[]> rr_w2;
    private Wire<MultiDimArray> rr_w3;
    private ArrayMemory<double> rr_readmem;
    private PodArrayMemory<testpod2> rr_pod_m1;
    private PodMultiDimArrayMemory<testpod2> rr_pod_m2;
    private NamedArrayMemory<transform> rr_namedarray_m1;
    private NamedMultiDimArrayMemory<transform> rr_namedarray_m2;
    private ArrayMemory<CDouble> rr_c_m1;
    private MultiDimArrayMemory<CDouble> rr_c_m2;
    private ArrayMemory<CDouble> rr_c_m3;
    private MultiDimArrayMemory<CDouble> rr_c_m4;
    private ArrayMemory<bool> rr_c_m5;
    private MultiDimArrayMemory<bool> rr_c_m6;
    public testroot3_stub(WrappedServiceStub innerstub) : base(innerstub) {
    rr_unreliable1=new Pipe<int>(innerstub.GetPipe("unreliable1"));
    rr_p1=new Pipe<int[]>(innerstub.GetPipe("p1"));
    rr_p2=new Pipe<int[]>(innerstub.GetPipe("p2"));
    rr_p3=new Pipe<MultiDimArray>(innerstub.GetPipe("p3"));
    rr_peekwire=new Wire<int>(innerstub.GetWire("peekwire"));
    rr_pokewire=new Wire<int>(innerstub.GetWire("pokewire"));
    rr_w1=new Wire<int[]>(innerstub.GetWire("w1"));
    rr_w2=new Wire<int[]>(innerstub.GetWire("w2"));
    rr_w3=new Wire<MultiDimArray>(innerstub.GetWire("w3"));
    rr_readmem=new ArrayMemoryClient<double>(innerstub.GetArrayMemory("readmem"));
    rr_pod_m1=new PodArrayMemoryClient<testpod2>(innerstub.GetPodArrayMemory("pod_m1"));
    rr_pod_m2=new PodMultiDimArrayMemoryClient<testpod2>(innerstub.GetPodMultiDimArrayMemory("pod_m2"));
    rr_namedarray_m1=new NamedArrayMemoryClient<transform>(innerstub.GetNamedArrayMemory("namedarray_m1"));
    rr_namedarray_m2=new NamedMultiDimArrayMemoryClient<transform>(innerstub.GetNamedMultiDimArrayMemory("namedarray_m2"));
    rr_c_m1=new ArrayMemoryClient<CDouble>(innerstub.GetArrayMemory("c_m1"));
    rr_c_m2=new MultiDimArrayMemoryClient<CDouble>(innerstub.GetMultiDimArrayMemory("c_m2"));
    rr_c_m3=new ArrayMemoryClient<CDouble>(innerstub.GetArrayMemory("c_m3"));
    rr_c_m4=new MultiDimArrayMemoryClient<CDouble>(innerstub.GetMultiDimArrayMemory("c_m4"));
    rr_c_m5=new ArrayMemoryClient<bool>(innerstub.GetArrayMemory("c_m5"));
    rr_c_m6=new MultiDimArrayMemoryClient<bool>(innerstub.GetMultiDimArrayMemory("c_m6"));
    }
    public int readme {
    get {
    return (MessageElementUtil.UnpackScalar<int>(rr_innerstub.PropertyGet("readme")));
    }
    }
    public int writeme {
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<int>("value",value))
    {
    rr_innerstub.PropertySet("writeme", m);
    }
    }
    }
    public int unknown_modifier {
    get {
    return (MessageElementUtil.UnpackScalar<int>(rr_innerstub.PropertyGet("unknown_modifier")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<int>("value",value))
    {
    rr_innerstub.PropertySet("unknown_modifier", m);
    }
    }
    }
    public testenum1 testenum1_prop {
    get {
    return MessageElementUtil.UnpackEnum<testenum1>(rr_innerstub.PropertyGet("testenum1_prop"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackEnum<testenum1>("value",value))
    {
    rr_innerstub.PropertySet("testenum1_prop", m);
    }
    }
    }
    public testpod1 testpod1_prop {
    get {
    return MessageElementUtil.UnpackPodFromArray<testpod1>(rr_innerstub.PropertyGet("testpod1_prop"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackPodToArray<testpod1>("value",ref value))
    {
    rr_innerstub.PropertySet("testpod1_prop", m);
    }
    }
    }
    public teststruct3 teststruct3_prop {
    get {
    return MessageElementUtil.UnpackStructure<teststruct3>(rr_innerstub.PropertyGet("teststruct3_prop"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackStructure("value",value))
    {
    rr_innerstub.PropertySet("teststruct3_prop", m);
    }
    }
    }
    public List<double[]> d1 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(rr_innerstub.PropertyGet("d1")), 6, false);
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, false)))
    {
    rr_innerstub.PropertySet("d1", m);
    }
    }
    }
    public List<double[]> d2 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(rr_innerstub.PropertyGet("d2")), 6, true);
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, true)))
    {
    rr_innerstub.PropertySet("d2", m);
    }
    }
    }
    public Dictionary<int,double[]> d3 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(rr_innerstub.PropertyGet("d3")), 6, false);
    }
    set {
    using(MessageElement m=MessageElementUtil.PackMapType<int,double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, false)))
    {
    rr_innerstub.PropertySet("d3", m);
    }
    }
    }
    public Dictionary<int,double[]> d4 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(rr_innerstub.PropertyGet("d4")), 6, true);
    }
    set {
    using(MessageElement m=MessageElementUtil.PackMapType<int,double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, true)))
    {
    rr_innerstub.PropertySet("d4", m);
    }
    }
    }
    public List<MultiDimArray> d5 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<MultiDimArray>(rr_innerstub.PropertyGet("d5")),9,new uint[] {3,3});
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<MultiDimArray>("value",DataTypeUtil.VerifyArrayLength(value,9,new uint[] {3,3})))
    {
    rr_innerstub.PropertySet("d5", m);
    }
    }
    }
    public Dictionary<int,MultiDimArray> d6 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,MultiDimArray>(rr_innerstub.PropertyGet("d6")),9,new uint[] {3,3});
    }
    set {
    using(MessageElement m=MessageElementUtil.PackMapType<int,MultiDimArray>("value",DataTypeUtil.VerifyArrayLength(value,9,new uint[] {3,3})))
    {
    rr_innerstub.PropertySet("d6", m);
    }
    }
    }
    public vector3 testnamedarray1 {
    get {
    return MessageElementUtil.UnpackNamedArrayFromArray<vector3>(rr_innerstub.PropertyGet("testnamedarray1"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackNamedArrayToArray<vector3>("value",ref value))
    {
    rr_innerstub.PropertySet("testnamedarray1", m);
    }
    }
    }
    public transform testnamedarray2 {
    get {
    return MessageElementUtil.UnpackNamedArrayFromArray<transform>(rr_innerstub.PropertyGet("testnamedarray2"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackNamedArrayToArray<transform>("value",ref value))
    {
    rr_innerstub.PropertySet("testnamedarray2", m);
    }
    }
    }
    public transform[] testnamedarray3 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(rr_innerstub.PropertyGet("testnamedarray3")), 10, true);
    }
    set {
    using(MessageElement m=MessageElementUtil.PackNamedArray<transform>("value",DataTypeUtil.VerifyArrayLength(value, 10, true)))
    {
    rr_innerstub.PropertySet("testnamedarray3", m);
    }
    }
    }
    public NamedMultiDimArray testnamedarray4 {
    get {
    return MessageElementUtil.UnpackNamedMultiDimArray<transform>(rr_innerstub.PropertyGet("testnamedarray4"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackNamedMultiDimArray<transform>("value",value))
    {
    rr_innerstub.PropertySet("testnamedarray4", m);
    }
    }
    }
    public NamedMultiDimArray testnamedarray5 {
    get {
    return DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedMultiDimArray<transform>(rr_innerstub.PropertyGet("testnamedarray5")),6,new uint[] {3,2});
    }
    set {
    using(MessageElement m=MessageElementUtil.PackNamedMultiDimArray<transform>("value",DataTypeUtil.VerifyArrayLength(value,6,new uint[] {3,2})))
    {
    rr_innerstub.PropertySet("testnamedarray5", m);
    }
    }
    }
    public CDouble c1 {
    get {
    return (MessageElementUtil.UnpackScalar<CDouble>(rr_innerstub.PropertyGet("c1")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<CDouble>("value",value))
    {
    rr_innerstub.PropertySet("c1", m);
    }
    }
    }
    public CDouble[] c2 {
    get {
    return MessageElementUtil.UnpackArray<CDouble>(rr_innerstub.PropertyGet("c2"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackArray<CDouble>("value",value))
    {
    rr_innerstub.PropertySet("c2", m);
    }
    }
    }
    public MultiDimArray c3 {
    get {
    return MessageElementUtil.UnpackMultiDimArray(rr_innerstub.PropertyGet("c3"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackMultiDimArray("value",(MultiDimArray)value))
    {
    rr_innerstub.PropertySet("c3", m);
    }
    }
    }
    public List<CDouble> c4 {
    get {
    return MessageElementUtil.UnpackList<CDouble>(rr_innerstub.PropertyGet("c4"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<CDouble>("value",value))
    {
    rr_innerstub.PropertySet("c4", m);
    }
    }
    }
    public List<CDouble[]> c5 {
    get {
    return MessageElementUtil.UnpackList<CDouble[]>(rr_innerstub.PropertyGet("c5"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<CDouble[]>("value",value))
    {
    rr_innerstub.PropertySet("c5", m);
    }
    }
    }
    public List<MultiDimArray> c6 {
    get {
    return MessageElementUtil.UnpackList<MultiDimArray>(rr_innerstub.PropertyGet("c6"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<MultiDimArray>("value",value))
    {
    rr_innerstub.PropertySet("c6", m);
    }
    }
    }
    public CSingle c7 {
    get {
    return (MessageElementUtil.UnpackScalar<CSingle>(rr_innerstub.PropertyGet("c7")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<CSingle>("value",value))
    {
    rr_innerstub.PropertySet("c7", m);
    }
    }
    }
    public CSingle[] c8 {
    get {
    return MessageElementUtil.UnpackArray<CSingle>(rr_innerstub.PropertyGet("c8"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackArray<CSingle>("value",value))
    {
    rr_innerstub.PropertySet("c8", m);
    }
    }
    }
    public MultiDimArray c9 {
    get {
    return MessageElementUtil.UnpackMultiDimArray(rr_innerstub.PropertyGet("c9"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackMultiDimArray("value",(MultiDimArray)value))
    {
    rr_innerstub.PropertySet("c9", m);
    }
    }
    }
    public List<CSingle> c10 {
    get {
    return MessageElementUtil.UnpackList<CSingle>(rr_innerstub.PropertyGet("c10"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<CSingle>("value",value))
    {
    rr_innerstub.PropertySet("c10", m);
    }
    }
    }
    public List<CSingle[]> c11 {
    get {
    return MessageElementUtil.UnpackList<CSingle[]>(rr_innerstub.PropertyGet("c11"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<CSingle[]>("value",value))
    {
    rr_innerstub.PropertySet("c11", m);
    }
    }
    }
    public List<MultiDimArray> c12 {
    get {
    return MessageElementUtil.UnpackList<MultiDimArray>(rr_innerstub.PropertyGet("c12"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<MultiDimArray>("value",value))
    {
    rr_innerstub.PropertySet("c12", m);
    }
    }
    }
    public bool b1 {
    get {
    return (MessageElementUtil.UnpackScalar<bool>(rr_innerstub.PropertyGet("b1")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<bool>("value",value))
    {
    rr_innerstub.PropertySet("b1", m);
    }
    }
    }
    public bool[] b2 {
    get {
    return MessageElementUtil.UnpackArray<bool>(rr_innerstub.PropertyGet("b2"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackArray<bool>("value",value))
    {
    rr_innerstub.PropertySet("b2", m);
    }
    }
    }
    public MultiDimArray b3 {
    get {
    return MessageElementUtil.UnpackMultiDimArray(rr_innerstub.PropertyGet("b3"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackMultiDimArray("value",(MultiDimArray)value))
    {
    rr_innerstub.PropertySet("b3", m);
    }
    }
    }
    public List<bool> b4 {
    get {
    return MessageElementUtil.UnpackList<bool>(rr_innerstub.PropertyGet("b4"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<bool>("value",value))
    {
    rr_innerstub.PropertySet("b4", m);
    }
    }
    }
    public List<bool[]> b5 {
    get {
    return MessageElementUtil.UnpackList<bool[]>(rr_innerstub.PropertyGet("b5"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<bool[]>("value",value))
    {
    rr_innerstub.PropertySet("b5", m);
    }
    }
    }
    public List<MultiDimArray> b6 {
    get {
    return MessageElementUtil.UnpackList<MultiDimArray>(rr_innerstub.PropertyGet("b6"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackListType<MultiDimArray>("value",value))
    {
    rr_innerstub.PropertySet("b6", m);
    }
    }
    }
    public void testpod1_func1(testpod1 s) {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackPodToArray<testpod1>("s",ref s));
    using(MessageElement rr_me=rr_innerstub.FunctionCall("testpod1_func1",rr_param))
    {
    }
    }
    }
    public testpod1 testpod1_func2() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(MessageElement rr_me=rr_innerstub.FunctionCall("testpod1_func2",rr_param))
    {
    return MessageElementUtil.UnpackPodFromArray<testpod1>(rr_me);
    }
    }
    }
    public Generator2<double> gen_func1() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("gen_func1",rr_param);
    return new Generator2Client<double>(generator_client);
    }
    }
    public Generator2<byte[]> gen_func2(string name) {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackString("name",name));
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("gen_func2",rr_param);
    return new Generator2Client<byte[]>(generator_client);
    }
    }
    public Generator3<byte[]> gen_func3(string name) {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackString("name",name));
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("gen_func3",rr_param);
    return new Generator3Client<byte[]>(generator_client);
    }
    }
    public Generator1<byte[],byte[]> gen_func4() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("gen_func4",rr_param);
    return new Generator1Client<byte[],byte[]>(generator_client);
    }
    }
    public Generator1<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2> gen_func5() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("gen_func5",rr_param);
    return new Generator1Client<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2>(generator_client);
    }
    }
    public void test_exception_params1() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(MessageElement rr_me=rr_innerstub.FunctionCall("test_exception_params1",rr_param))
    {
    }
    }
    }
    public void test_exception_params2() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(MessageElement rr_me=rr_innerstub.FunctionCall("test_exception_params2",rr_param))
    {
    }
    }
    }
    public Generator2<testenum1> enum_generator1() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("enum_generator1",rr_param);
    return new Generator2Client<testenum1>(generator_client);
    }
    }
    public Generator1<testenum1,testenum1> enum_generator2(int a, int b) {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackScalar<int>("a",a));
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackScalar<int>("b",b));
    WrappedGeneratorClient generator_client = rr_innerstub.GeneratorFunctionCall("enum_generator2",rr_param);
    return new Generator1Client<testenum1,testenum1>(generator_client);
    }
    }
    public override void DispatchEvent(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    }
    public obj4 get_o4() {
    return (obj4)FindObjRefTyped("o4","com.robotraconteur.testing.TestService3.obj4");
    }
    public obj5 get_nolock_test() {
    return (obj5)FindObjRefTyped("nolock_test","com.robotraconteur.testing.TestService3.obj5");
    }
    public Pipe<int> unreliable1 {
    get { return rr_unreliable1;  }
    set { throw new InvalidOperationException();}
    }
    public Pipe<int[]> p1 {
    get { return rr_p1;  }
    set { throw new InvalidOperationException();}
    }
    public Pipe<int[]> p2 {
    get { return rr_p2;  }
    set { throw new InvalidOperationException();}
    }
    public Pipe<MultiDimArray> p3 {
    get { return rr_p3;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<int> peekwire {
    get { return rr_peekwire;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<int> pokewire {
    get { return rr_pokewire;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<int[]> w1 {
    get { return rr_w1;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<int[]> w2 {
    get { return rr_w2;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<MultiDimArray> w3 {
    get { return rr_w3;  }
    set { throw new InvalidOperationException();}
    }
    public override MessageElement CallbackCall(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public ArrayMemory<double> readmem { 
    get { return rr_readmem; }
    }
    public PodArrayMemory<testpod2> pod_m1 { 
    get { return rr_pod_m1; }
    }
    public PodMultiDimArrayMemory<testpod2> pod_m2 {
    get { return rr_pod_m2; }
    }
    public NamedArrayMemory<transform> namedarray_m1 { 
    get { return rr_namedarray_m1; }
    }
    public NamedMultiDimArrayMemory<transform> namedarray_m2 {
    get { return rr_namedarray_m2; }
    }
    public ArrayMemory<CDouble> c_m1 { 
    get { return rr_c_m1; }
    }
    public MultiDimArrayMemory<CDouble> c_m2 {
    get { return rr_c_m2; }
    }
    public ArrayMemory<CDouble> c_m3 { 
    get { return rr_c_m3; }
    }
    public MultiDimArrayMemory<CDouble> c_m4 {
    get { return rr_c_m4; }
    }
    public ArrayMemory<bool> c_m5 { 
    get { return rr_c_m5; }
    }
    public MultiDimArrayMemory<bool> c_m6 {
    get { return rr_c_m6; }
    }
    public virtual async Task<int> async_get_readme(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("readme",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<int>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_writeme(int value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<int>("value",value))
    {
    await rr_async_PropertySet("writeme",mm,rr_timeout);
    }
    }
    public virtual async Task<int> async_get_unknown_modifier(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("unknown_modifier",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<int>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_unknown_modifier(int value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<int>("value",value))
    {
    await rr_async_PropertySet("unknown_modifier",mm,rr_timeout);
    }
    }
    public virtual async Task<testenum1> async_get_testenum1_prop(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testenum1_prop",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackEnum<testenum1>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_testenum1_prop(testenum1 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackEnum<testenum1>("value",value))
    {
    await rr_async_PropertySet("testenum1_prop",mm,rr_timeout);
    }
    }
    public virtual async Task<testpod1> async_get_testpod1_prop(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testpod1_prop",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackPodFromArray<testpod1>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_testpod1_prop(testpod1 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackPodToArray<testpod1>("value",ref value))
    {
    await rr_async_PropertySet("testpod1_prop",mm,rr_timeout);
    }
    }
    public virtual async Task<teststruct3> async_get_teststruct3_prop(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("teststruct3_prop",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackStructure<teststruct3>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_teststruct3_prop(teststruct3 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackStructure("value",value))
    {
    await rr_async_PropertySet("teststruct3_prop",mm,rr_timeout);
    }
    }
    public virtual async Task<List<double[]>> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d1",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(rr_value), 6, false);
    return rr_ret;
    } }
    public virtual async Task async_set_d1(List<double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, false)))
    {
    await rr_async_PropertySet("d1",mm,rr_timeout);
    }
    }
    public virtual async Task<List<double[]>> async_get_d2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d2",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(rr_value), 6, true);
    return rr_ret;
    } }
    public virtual async Task async_set_d2(List<double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, true)))
    {
    await rr_async_PropertySet("d2",mm,rr_timeout);
    }
    }
    public virtual async Task<Dictionary<int,double[]>> async_get_d3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d3",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(rr_value), 6, false);
    return rr_ret;
    } }
    public virtual async Task async_set_d3(Dictionary<int,double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackMapType<int,double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, false)))
    {
    await rr_async_PropertySet("d3",mm,rr_timeout);
    }
    }
    public virtual async Task<Dictionary<int,double[]>> async_get_d4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d4",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(rr_value), 6, true);
    return rr_ret;
    } }
    public virtual async Task async_set_d4(Dictionary<int,double[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackMapType<int,double[]>("value",DataTypeUtil.VerifyArrayLength(value, 6, true)))
    {
    await rr_async_PropertySet("d4",mm,rr_timeout);
    }
    }
    public virtual async Task<List<MultiDimArray>> async_get_d5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d5",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<MultiDimArray>(rr_value),9,new uint[] {3,3});
    return rr_ret;
    } }
    public virtual async Task async_set_d5(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<MultiDimArray>("value",DataTypeUtil.VerifyArrayLength(value,9,new uint[] {3,3})))
    {
    await rr_async_PropertySet("d5",mm,rr_timeout);
    }
    }
    public virtual async Task<Dictionary<int,MultiDimArray>> async_get_d6(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d6",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,MultiDimArray>(rr_value),9,new uint[] {3,3});
    return rr_ret;
    } }
    public virtual async Task async_set_d6(Dictionary<int,MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackMapType<int,MultiDimArray>("value",DataTypeUtil.VerifyArrayLength(value,9,new uint[] {3,3})))
    {
    await rr_async_PropertySet("d6",mm,rr_timeout);
    }
    }
    public virtual async Task<vector3> async_get_testnamedarray1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testnamedarray1",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackNamedArrayFromArray<vector3>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_testnamedarray1(vector3 value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackNamedArrayToArray<vector3>("value",ref value))
    {
    await rr_async_PropertySet("testnamedarray1",mm,rr_timeout);
    }
    }
    public virtual async Task<transform> async_get_testnamedarray2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testnamedarray2",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackNamedArrayFromArray<transform>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_testnamedarray2(transform value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackNamedArrayToArray<transform>("value",ref value))
    {
    await rr_async_PropertySet("testnamedarray2",mm,rr_timeout);
    }
    }
    public virtual async Task<transform[]> async_get_testnamedarray3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testnamedarray3",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(rr_value), 10, true);
    return rr_ret;
    } }
    public virtual async Task async_set_testnamedarray3(transform[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackNamedArray<transform>("value",DataTypeUtil.VerifyArrayLength(value, 10, true)))
    {
    await rr_async_PropertySet("testnamedarray3",mm,rr_timeout);
    }
    }
    public virtual async Task<NamedMultiDimArray> async_get_testnamedarray4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testnamedarray4",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackNamedMultiDimArray<transform>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_testnamedarray4(NamedMultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackNamedMultiDimArray<transform>("value",value))
    {
    await rr_async_PropertySet("testnamedarray4",mm,rr_timeout);
    }
    }
    public virtual async Task<NamedMultiDimArray> async_get_testnamedarray5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("testnamedarray5",rr_timeout)) {
    var rr_ret=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedMultiDimArray<transform>(rr_value),6,new uint[] {3,2});
    return rr_ret;
    } }
    public virtual async Task async_set_testnamedarray5(NamedMultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackNamedMultiDimArray<transform>("value",DataTypeUtil.VerifyArrayLength(value,6,new uint[] {3,2})))
    {
    await rr_async_PropertySet("testnamedarray5",mm,rr_timeout);
    }
    }
    public virtual async Task<CDouble> async_get_c1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c1",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<CDouble>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_c1(CDouble value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<CDouble>("value",value))
    {
    await rr_async_PropertySet("c1",mm,rr_timeout);
    }
    }
    public virtual async Task<CDouble[]> async_get_c2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c2",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackArray<CDouble>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c2(CDouble[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackArray<CDouble>("value",value))
    {
    await rr_async_PropertySet("c2",mm,rr_timeout);
    }
    }
    public virtual async Task<MultiDimArray> async_get_c3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c3",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackMultiDimArray(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c3(MultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackMultiDimArray("value",(MultiDimArray)value))
    {
    await rr_async_PropertySet("c3",mm,rr_timeout);
    }
    }
    public virtual async Task<List<CDouble>> async_get_c4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c4",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<CDouble>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c4(List<CDouble> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<CDouble>("value",value))
    {
    await rr_async_PropertySet("c4",mm,rr_timeout);
    }
    }
    public virtual async Task<List<CDouble[]>> async_get_c5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c5",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<CDouble[]>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c5(List<CDouble[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<CDouble[]>("value",value))
    {
    await rr_async_PropertySet("c5",mm,rr_timeout);
    }
    }
    public virtual async Task<List<MultiDimArray>> async_get_c6(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c6",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<MultiDimArray>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c6(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<MultiDimArray>("value",value))
    {
    await rr_async_PropertySet("c6",mm,rr_timeout);
    }
    }
    public virtual async Task<CSingle> async_get_c7(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c7",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<CSingle>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_c7(CSingle value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<CSingle>("value",value))
    {
    await rr_async_PropertySet("c7",mm,rr_timeout);
    }
    }
    public virtual async Task<CSingle[]> async_get_c8(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c8",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackArray<CSingle>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c8(CSingle[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackArray<CSingle>("value",value))
    {
    await rr_async_PropertySet("c8",mm,rr_timeout);
    }
    }
    public virtual async Task<MultiDimArray> async_get_c9(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c9",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackMultiDimArray(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c9(MultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackMultiDimArray("value",(MultiDimArray)value))
    {
    await rr_async_PropertySet("c9",mm,rr_timeout);
    }
    }
    public virtual async Task<List<CSingle>> async_get_c10(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c10",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<CSingle>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c10(List<CSingle> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<CSingle>("value",value))
    {
    await rr_async_PropertySet("c10",mm,rr_timeout);
    }
    }
    public virtual async Task<List<CSingle[]>> async_get_c11(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c11",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<CSingle[]>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c11(List<CSingle[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<CSingle[]>("value",value))
    {
    await rr_async_PropertySet("c11",mm,rr_timeout);
    }
    }
    public virtual async Task<List<MultiDimArray>> async_get_c12(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("c12",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<MultiDimArray>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_c12(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<MultiDimArray>("value",value))
    {
    await rr_async_PropertySet("c12",mm,rr_timeout);
    }
    }
    public virtual async Task<bool> async_get_b1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("b1",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<bool>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_b1(bool value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<bool>("value",value))
    {
    await rr_async_PropertySet("b1",mm,rr_timeout);
    }
    }
    public virtual async Task<bool[]> async_get_b2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("b2",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackArray<bool>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_b2(bool[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackArray<bool>("value",value))
    {
    await rr_async_PropertySet("b2",mm,rr_timeout);
    }
    }
    public virtual async Task<MultiDimArray> async_get_b3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("b3",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackMultiDimArray(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_b3(MultiDimArray value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackMultiDimArray("value",(MultiDimArray)value))
    {
    await rr_async_PropertySet("b3",mm,rr_timeout);
    }
    }
    public virtual async Task<List<bool>> async_get_b4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("b4",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<bool>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_b4(List<bool> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<bool>("value",value))
    {
    await rr_async_PropertySet("b4",mm,rr_timeout);
    }
    }
    public virtual async Task<List<bool[]>> async_get_b5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("b5",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<bool[]>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_b5(List<bool[]> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<bool[]>("value",value))
    {
    await rr_async_PropertySet("b5",mm,rr_timeout);
    }
    }
    public virtual async Task<List<MultiDimArray>> async_get_b6(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("b6",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackList<MultiDimArray>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_b6(List<MultiDimArray> value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackListType<MultiDimArray>("value",value))
    {
    await rr_async_PropertySet("b6",mm,rr_timeout);
    }
    }
    public virtual async Task async_testpod1_func1(testpod1 s,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackPodToArray<testpod1>("s",ref s));
    using(var rr_return = await rr_async_FunctionCall("testpod1_func1",rr_param,rr_timeout)) {
    } } }
    public virtual async Task<testpod1> async_testpod1_func2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(var rr_return = await rr_async_FunctionCall("testpod1_func2",rr_param,rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackPodFromArray<testpod1>(rr_return);
    return rr_ret;
    } } }
    public virtual async Task<Generator2<double>> async_gen_func1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    var rr_return = await rr_async_GeneratorFunctionCall("gen_func1",rr_param,rr_timeout);
    Generator2Client< double> rr_ret=new Generator2Client< double>(rr_return);
    return rr_ret;
    } }
    public virtual async Task<Generator2<byte[]>> async_gen_func2(string name,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackString("name",name));
    var rr_return = await rr_async_GeneratorFunctionCall("gen_func2",rr_param,rr_timeout);
    Generator2Client< byte[]> rr_ret=new Generator2Client< byte[]>(rr_return);
    return rr_ret;
    } }
    public virtual async Task<Generator3<byte[]>> async_gen_func3(string name,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackString("name",name));
    var rr_return = await rr_async_GeneratorFunctionCall("gen_func3",rr_param,rr_timeout);
    Generator3Client< byte[]> rr_ret=new Generator3Client< byte[]>(rr_return);
    return rr_ret;
    } }
    public virtual async Task<Generator1<byte[],byte[]>> async_gen_func4(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    var rr_return = await rr_async_GeneratorFunctionCall("gen_func4",rr_param,rr_timeout);
    Generator1Client< byte[],byte[]> rr_ret=new Generator1Client< byte[],byte[]>(rr_return);
    return rr_ret;
    } }
    public virtual async Task<Generator1<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2>> async_gen_func5(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    var rr_return = await rr_async_GeneratorFunctionCall("gen_func5",rr_param,rr_timeout);
    Generator1Client< com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2> rr_ret=new Generator1Client< com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2>(rr_return);
    return rr_ret;
    } }
    public virtual async Task async_test_exception_params1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(var rr_return = await rr_async_FunctionCall("test_exception_params1",rr_param,rr_timeout)) {
    } } }
    public virtual async Task async_test_exception_params2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(var rr_return = await rr_async_FunctionCall("test_exception_params2",rr_param,rr_timeout)) {
    } } }
    public virtual async Task<Generator2<testenum1>> async_enum_generator1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    var rr_return = await rr_async_GeneratorFunctionCall("enum_generator1",rr_param,rr_timeout);
    Generator2Client< testenum1> rr_ret=new Generator2Client< testenum1>(rr_return);
    return rr_ret;
    } }
    public virtual async Task<Generator1<testenum1,testenum1>> async_enum_generator2(int a, int b,int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackScalar<int>("a",a));
    MessageElementUtil.AddMessageElementDispose(rr_param,MessageElementUtil.PackScalar<int>("b",b));
    var rr_return = await rr_async_GeneratorFunctionCall("enum_generator2",rr_param,rr_timeout);
    Generator1Client< testenum1,testenum1> rr_ret=new Generator1Client< testenum1,testenum1>(rr_return);
    return rr_ret;
    } }
    public Task<obj4> async_get_o4(int timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    return AsyncFindObjRefTyped<obj4>("o4","com.robotraconteur.testing.TestService3.obj4",timeout);
    }
    public Task<obj5> async_get_nolock_test(int timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    return AsyncFindObjRefTyped<obj5>("nolock_test","com.robotraconteur.testing.TestService3.obj5",timeout);
    }
}
public interface async_obj1
{
    Task<double[]> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d1(double[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
}
public class obj1_stub : ServiceStub , obj1, async_obj1{
    public obj1_stub(WrappedServiceStub innerstub) : base(innerstub) {
    }
    public double[] d1 {
    get {
    return MessageElementUtil.UnpackArray<double>(rr_innerstub.PropertyGet("d1"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackArray<double>("value",value))
    {
    rr_innerstub.PropertySet("d1", m);
    }
    }
    }
    public override void DispatchEvent(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    }
    public override MessageElement CallbackCall(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public virtual async Task<double[]> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d1",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackArray<double>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_d1(double[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackArray<double>("value",value))
    {
    await rr_async_PropertySet("d1",mm,rr_timeout);
    }
    }
}
public interface async_obj2 : async_obj1
{
    Task<double[]> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d1(double[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
}
public class obj2_stub : ServiceStub , obj2, async_obj2{
    public obj2_stub(WrappedServiceStub innerstub) : base(innerstub) {
    }
    public double[] d1 {
    get {
    return MessageElementUtil.UnpackArray<double>(rr_innerstub.PropertyGet("d1"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackArray<double>("value",value))
    {
    rr_innerstub.PropertySet("d1", m);
    }
    }
    }
    public override void DispatchEvent(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    }
    public override MessageElement CallbackCall(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public virtual async Task<double[]> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d1",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackArray<double>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_d1(double[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackArray<double>("value",value))
    {
    await rr_async_PropertySet("d1",mm,rr_timeout);
    }
    }
}
public interface async_obj3 : async_obj1, async_obj2
{
    Task<double[]> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_d1(double[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
}
public class obj3_stub : ServiceStub , obj3, async_obj3{
    public obj3_stub(WrappedServiceStub innerstub) : base(innerstub) {
    }
    public double[] d1 {
    get {
    return MessageElementUtil.UnpackArray<double>(rr_innerstub.PropertyGet("d1"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackArray<double>("value",value))
    {
    rr_innerstub.PropertySet("d1", m);
    }
    }
    }
    public override void DispatchEvent(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    }
    public override MessageElement CallbackCall(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public virtual async Task<double[]> async_get_d1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("d1",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackArray<double>(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_d1(double[] value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackArray<double>("value",value))
    {
    await rr_async_PropertySet("d1",mm,rr_timeout);
    }
    }
}
public interface async_obj4 : com.robotraconteur.testing.TestService1.async_sub2
{
    Task<string> async_get_s_ind(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_s_ind(string value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<int> async_get_i_ind(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_i_ind(int value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<string> async_get_data(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_data(string value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<com.robotraconteur.testing.TestService1.sub3> async_get_o3_1(string ind, int timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
}
public class obj4_stub : ServiceStub , obj4, async_obj4{
    public obj4_stub(WrappedServiceStub innerstub) : base(innerstub) {
    }
    public string s_ind {
    get {
    return MessageElementUtil.UnpackString(rr_innerstub.PropertyGet("s_ind"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackString("value",value))
    {
    rr_innerstub.PropertySet("s_ind", m);
    }
    }
    }
    public int i_ind {
    get {
    return (MessageElementUtil.UnpackScalar<int>(rr_innerstub.PropertyGet("i_ind")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<int>("value",value))
    {
    rr_innerstub.PropertySet("i_ind", m);
    }
    }
    }
    public string data {
    get {
    return MessageElementUtil.UnpackString(rr_innerstub.PropertyGet("data"));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackString("value",value))
    {
    rr_innerstub.PropertySet("data", m);
    }
    }
    }
    public override void DispatchEvent(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    }
    public com.robotraconteur.testing.TestService1.sub3 get_o3_1(string ind) {
    return (com.robotraconteur.testing.TestService1.sub3)FindObjRefTyped("o3_1",ind.ToString(),"com.robotraconteur.testing.TestService1.sub3");
    }
    public override MessageElement CallbackCall(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public virtual async Task<string> async_get_s_ind(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("s_ind",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackString(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_s_ind(string value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackString("value",value))
    {
    await rr_async_PropertySet("s_ind",mm,rr_timeout);
    }
    }
    public virtual async Task<int> async_get_i_ind(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("i_ind",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<int>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_i_ind(int value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<int>("value",value))
    {
    await rr_async_PropertySet("i_ind",mm,rr_timeout);
    }
    }
    public virtual async Task<string> async_get_data(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("data",rr_timeout)) {
    var rr_ret=MessageElementUtil.UnpackString(rr_value);
    return rr_ret;
    } }
    public virtual async Task async_set_data(string value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackString("value",value))
    {
    await rr_async_PropertySet("data",mm,rr_timeout);
    }
    }
    public Task<com.robotraconteur.testing.TestService1.sub3>  async_get_o3_1(string ind, int timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    return AsyncFindObjRefTyped<com.robotraconteur.testing.TestService1.sub3>("o3_1",ind.ToString(),"com.robotraconteur.testing.TestService1.sub3",timeout);
    }
}
public interface async_obj5
{
    Task<double> async_get_p1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_p1(double value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<double> async_get_p2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_p2(double value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<double> async_get_p3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task async_set_p3(double value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<int> async_f1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
    Task<int> async_f2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE);
}
public class obj5_stub : ServiceStub , obj5, async_obj5{
    private Pipe<int> rr_q1;
    private Pipe<int> rr_q2;
    private Wire<int> rr_w1;
    private Wire<int> rr_w2;
    private ArrayMemory<int> rr_m1;
    private ArrayMemory<int> rr_m2;
    private ArrayMemory<int> rr_m3;
    public obj5_stub(WrappedServiceStub innerstub) : base(innerstub) {
    rr_q1=new Pipe<int>(innerstub.GetPipe("q1"));
    rr_q2=new Pipe<int>(innerstub.GetPipe("q2"));
    rr_w1=new Wire<int>(innerstub.GetWire("w1"));
    rr_w2=new Wire<int>(innerstub.GetWire("w2"));
    rr_m1=new ArrayMemoryClient<int>(innerstub.GetArrayMemory("m1"));
    rr_m2=new ArrayMemoryClient<int>(innerstub.GetArrayMemory("m2"));
    rr_m3=new ArrayMemoryClient<int>(innerstub.GetArrayMemory("m3"));
    }
    public double p1 {
    get {
    return (MessageElementUtil.UnpackScalar<double>(rr_innerstub.PropertyGet("p1")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<double>("value",value))
    {
    rr_innerstub.PropertySet("p1", m);
    }
    }
    }
    public double p2 {
    get {
    return (MessageElementUtil.UnpackScalar<double>(rr_innerstub.PropertyGet("p2")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<double>("value",value))
    {
    rr_innerstub.PropertySet("p2", m);
    }
    }
    }
    public double p3 {
    get {
    return (MessageElementUtil.UnpackScalar<double>(rr_innerstub.PropertyGet("p3")));
    }
    set {
    using(MessageElement m=MessageElementUtil.PackScalar<double>("value",value))
    {
    rr_innerstub.PropertySet("p3", m);
    }
    }
    }
    public int f1() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(MessageElement rr_me=rr_innerstub.FunctionCall("f1",rr_param))
    {
    return (MessageElementUtil.UnpackScalar<int>(rr_me));
    }
    }
    }
    public int f2() {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(MessageElement rr_me=rr_innerstub.FunctionCall("f2",rr_param))
    {
    return (MessageElementUtil.UnpackScalar<int>(rr_me));
    }
    }
    }
    public override void DispatchEvent(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    }
    public Pipe<int> q1 {
    get { return rr_q1;  }
    set { throw new InvalidOperationException();}
    }
    public Pipe<int> q2 {
    get { return rr_q2;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<int> w1 {
    get { return rr_w1;  }
    set { throw new InvalidOperationException();}
    }
    public Wire<int> w2 {
    get { return rr_w2;  }
    set { throw new InvalidOperationException();}
    }
    public override MessageElement CallbackCall(string rr_membername, vectorptr_messageelement rr_m) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public ArrayMemory<int> m1 { 
    get { return rr_m1; }
    }
    public ArrayMemory<int> m2 { 
    get { return rr_m2; }
    }
    public ArrayMemory<int> m3 { 
    get { return rr_m3; }
    }
    public virtual async Task<double> async_get_p1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("p1",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<double>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_p1(double value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<double>("value",value))
    {
    await rr_async_PropertySet("p1",mm,rr_timeout);
    }
    }
    public virtual async Task<double> async_get_p2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("p2",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<double>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_p2(double value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<double>("value",value))
    {
    await rr_async_PropertySet("p2",mm,rr_timeout);
    }
    }
    public virtual async Task<double> async_get_p3(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(var rr_value = await rr_async_PropertyGet("p3",rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<double>(rr_value));
    return rr_ret;
    } }
    public virtual async Task async_set_p3(double value, int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(MessageElement mm=MessageElementUtil.PackScalar<double>("value",value))
    {
    await rr_async_PropertySet("p3",mm,rr_timeout);
    }
    }
    public virtual async Task<int> async_f1(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(var rr_return = await rr_async_FunctionCall("f1",rr_param,rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<int>(rr_return));
    return rr_ret;
    } } }
    public virtual async Task<int> async_f2(int rr_timeout=RobotRaconteurNode.RR_TIMEOUT_INFINITE)
    {
    using(vectorptr_messageelement rr_param=new vectorptr_messageelement())
    {
    using(var rr_return = await rr_async_FunctionCall("f2",rr_param,rr_timeout)) {
    var rr_ret=(MessageElementUtil.UnpackScalar<int>(rr_return));
    return rr_ret;
    } } }
}
public class testroot3_skel : ServiceSkel {
    protected testroot3 obj;
    protected async_testroot3 async_obj;
    public testroot3_skel(object o) : base(o)    {
    obj=(testroot3)o;
    async_obj = o as async_testroot3;
    }
    public override void ReleaseCastObject() { 
    obj=null;
    async_obj=null;
    base.ReleaseCastObject();
    }
    public override MessageElement CallGetProperty(string membername, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "readme":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_readme().ContinueWith(t => async_adapter.EndTask<int>(t,async_ret => MessageElementUtil.PackScalar<int>("return",async_ret)));
    return null;
    }
    int ret=obj.readme;
    return MessageElementUtil.PackScalar<int>("return",ret);
    }
    case "unknown_modifier":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_unknown_modifier().ContinueWith(t => async_adapter.EndTask<int>(t,async_ret => MessageElementUtil.PackScalar<int>("return",async_ret)));
    return null;
    }
    int ret=obj.unknown_modifier;
    return MessageElementUtil.PackScalar<int>("return",ret);
    }
    case "testenum1_prop":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testenum1_prop().ContinueWith(t => async_adapter.EndTask<testenum1>(t,async_ret => MessageElementUtil.PackEnum<testenum1>("return",async_ret)));
    return null;
    }
    testenum1 ret=obj.testenum1_prop;
    return MessageElementUtil.PackEnum<testenum1>("return",ret);
    }
    case "testpod1_prop":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testpod1_prop().ContinueWith(t => async_adapter.EndTask<testpod1>(t,async_ret => MessageElementUtil.PackPodToArray<testpod1>("return",ref async_ret)));
    return null;
    }
    testpod1 ret=obj.testpod1_prop;
    return MessageElementUtil.PackPodToArray<testpod1>("return",ref ret);
    }
    case "teststruct3_prop":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_teststruct3_prop().ContinueWith(t => async_adapter.EndTask<teststruct3>(t,async_ret => MessageElementUtil.PackStructure("return",async_ret)));
    return null;
    }
    teststruct3 ret=obj.teststruct3_prop;
    return MessageElementUtil.PackStructure("return",ret);
    }
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d1().ContinueWith(t => async_adapter.EndTask<List<double[]>>(t,async_ret => MessageElementUtil.PackListType<double[]>("return",DataTypeUtil.VerifyArrayLength(async_ret, 6, false))));
    return null;
    }
    List<double[]> ret=obj.d1;
    return MessageElementUtil.PackListType<double[]>("return",DataTypeUtil.VerifyArrayLength(ret, 6, false));
    }
    case "d2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d2().ContinueWith(t => async_adapter.EndTask<List<double[]>>(t,async_ret => MessageElementUtil.PackListType<double[]>("return",DataTypeUtil.VerifyArrayLength(async_ret, 6, true))));
    return null;
    }
    List<double[]> ret=obj.d2;
    return MessageElementUtil.PackListType<double[]>("return",DataTypeUtil.VerifyArrayLength(ret, 6, true));
    }
    case "d3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d3().ContinueWith(t => async_adapter.EndTask<Dictionary<int,double[]>>(t,async_ret => MessageElementUtil.PackMapType<int,double[]>("return",DataTypeUtil.VerifyArrayLength(async_ret, 6, false))));
    return null;
    }
    Dictionary<int,double[]> ret=obj.d3;
    return MessageElementUtil.PackMapType<int,double[]>("return",DataTypeUtil.VerifyArrayLength(ret, 6, false));
    }
    case "d4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d4().ContinueWith(t => async_adapter.EndTask<Dictionary<int,double[]>>(t,async_ret => MessageElementUtil.PackMapType<int,double[]>("return",DataTypeUtil.VerifyArrayLength(async_ret, 6, true))));
    return null;
    }
    Dictionary<int,double[]> ret=obj.d4;
    return MessageElementUtil.PackMapType<int,double[]>("return",DataTypeUtil.VerifyArrayLength(ret, 6, true));
    }
    case "d5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d5().ContinueWith(t => async_adapter.EndTask<List<MultiDimArray>>(t,async_ret => MessageElementUtil.PackListType<MultiDimArray>("return",DataTypeUtil.VerifyArrayLength(async_ret,9,new uint[] {3,3}))));
    return null;
    }
    List<MultiDimArray> ret=obj.d5;
    return MessageElementUtil.PackListType<MultiDimArray>("return",DataTypeUtil.VerifyArrayLength(ret,9,new uint[] {3,3}));
    }
    case "d6":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d6().ContinueWith(t => async_adapter.EndTask<Dictionary<int,MultiDimArray>>(t,async_ret => MessageElementUtil.PackMapType<int,MultiDimArray>("return",DataTypeUtil.VerifyArrayLength(async_ret,9,new uint[] {3,3}))));
    return null;
    }
    Dictionary<int,MultiDimArray> ret=obj.d6;
    return MessageElementUtil.PackMapType<int,MultiDimArray>("return",DataTypeUtil.VerifyArrayLength(ret,9,new uint[] {3,3}));
    }
    case "testnamedarray1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testnamedarray1().ContinueWith(t => async_adapter.EndTask<vector3>(t,async_ret => MessageElementUtil.PackNamedArrayToArray<vector3>("return",ref async_ret)));
    return null;
    }
    vector3 ret=obj.testnamedarray1;
    return MessageElementUtil.PackNamedArrayToArray<vector3>("return",ref ret);
    }
    case "testnamedarray2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testnamedarray2().ContinueWith(t => async_adapter.EndTask<transform>(t,async_ret => MessageElementUtil.PackNamedArrayToArray<transform>("return",ref async_ret)));
    return null;
    }
    transform ret=obj.testnamedarray2;
    return MessageElementUtil.PackNamedArrayToArray<transform>("return",ref ret);
    }
    case "testnamedarray3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testnamedarray3().ContinueWith(t => async_adapter.EndTask<transform[]>(t,async_ret => MessageElementUtil.PackNamedArray<transform>("return",DataTypeUtil.VerifyArrayLength(async_ret, 10, true))));
    return null;
    }
    transform[] ret=obj.testnamedarray3;
    return MessageElementUtil.PackNamedArray<transform>("return",DataTypeUtil.VerifyArrayLength(ret, 10, true));
    }
    case "testnamedarray4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testnamedarray4().ContinueWith(t => async_adapter.EndTask<NamedMultiDimArray>(t,async_ret => MessageElementUtil.PackNamedMultiDimArray<transform>("return",async_ret)));
    return null;
    }
    NamedMultiDimArray ret=obj.testnamedarray4;
    return MessageElementUtil.PackNamedMultiDimArray<transform>("return",ret);
    }
    case "testnamedarray5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_testnamedarray5().ContinueWith(t => async_adapter.EndTask<NamedMultiDimArray>(t,async_ret => MessageElementUtil.PackNamedMultiDimArray<transform>("return",DataTypeUtil.VerifyArrayLength(async_ret,6,new uint[] {3,2}))));
    return null;
    }
    NamedMultiDimArray ret=obj.testnamedarray5;
    return MessageElementUtil.PackNamedMultiDimArray<transform>("return",DataTypeUtil.VerifyArrayLength(ret,6,new uint[] {3,2}));
    }
    case "c1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c1().ContinueWith(t => async_adapter.EndTask<CDouble>(t,async_ret => MessageElementUtil.PackScalar<CDouble>("return",async_ret)));
    return null;
    }
    CDouble ret=obj.c1;
    return MessageElementUtil.PackScalar<CDouble>("return",ret);
    }
    case "c2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c2().ContinueWith(t => async_adapter.EndTask<CDouble[]>(t,async_ret => MessageElementUtil.PackArray<CDouble>("return",async_ret)));
    return null;
    }
    CDouble[] ret=obj.c2;
    return MessageElementUtil.PackArray<CDouble>("return",ret);
    }
    case "c3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c3().ContinueWith(t => async_adapter.EndTask<MultiDimArray>(t,async_ret => MessageElementUtil.PackMultiDimArray("return",(MultiDimArray)async_ret)));
    return null;
    }
    MultiDimArray ret=obj.c3;
    return MessageElementUtil.PackMultiDimArray("return",(MultiDimArray)ret);
    }
    case "c4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c4().ContinueWith(t => async_adapter.EndTask<List<CDouble>>(t,async_ret => MessageElementUtil.PackListType<CDouble>("return",async_ret)));
    return null;
    }
    List<CDouble> ret=obj.c4;
    return MessageElementUtil.PackListType<CDouble>("return",ret);
    }
    case "c5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c5().ContinueWith(t => async_adapter.EndTask<List<CDouble[]>>(t,async_ret => MessageElementUtil.PackListType<CDouble[]>("return",async_ret)));
    return null;
    }
    List<CDouble[]> ret=obj.c5;
    return MessageElementUtil.PackListType<CDouble[]>("return",ret);
    }
    case "c6":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c6().ContinueWith(t => async_adapter.EndTask<List<MultiDimArray>>(t,async_ret => MessageElementUtil.PackListType<MultiDimArray>("return",async_ret)));
    return null;
    }
    List<MultiDimArray> ret=obj.c6;
    return MessageElementUtil.PackListType<MultiDimArray>("return",ret);
    }
    case "c7":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c7().ContinueWith(t => async_adapter.EndTask<CSingle>(t,async_ret => MessageElementUtil.PackScalar<CSingle>("return",async_ret)));
    return null;
    }
    CSingle ret=obj.c7;
    return MessageElementUtil.PackScalar<CSingle>("return",ret);
    }
    case "c8":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c8().ContinueWith(t => async_adapter.EndTask<CSingle[]>(t,async_ret => MessageElementUtil.PackArray<CSingle>("return",async_ret)));
    return null;
    }
    CSingle[] ret=obj.c8;
    return MessageElementUtil.PackArray<CSingle>("return",ret);
    }
    case "c9":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c9().ContinueWith(t => async_adapter.EndTask<MultiDimArray>(t,async_ret => MessageElementUtil.PackMultiDimArray("return",(MultiDimArray)async_ret)));
    return null;
    }
    MultiDimArray ret=obj.c9;
    return MessageElementUtil.PackMultiDimArray("return",(MultiDimArray)ret);
    }
    case "c10":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c10().ContinueWith(t => async_adapter.EndTask<List<CSingle>>(t,async_ret => MessageElementUtil.PackListType<CSingle>("return",async_ret)));
    return null;
    }
    List<CSingle> ret=obj.c10;
    return MessageElementUtil.PackListType<CSingle>("return",ret);
    }
    case "c11":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c11().ContinueWith(t => async_adapter.EndTask<List<CSingle[]>>(t,async_ret => MessageElementUtil.PackListType<CSingle[]>("return",async_ret)));
    return null;
    }
    List<CSingle[]> ret=obj.c11;
    return MessageElementUtil.PackListType<CSingle[]>("return",ret);
    }
    case "c12":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_c12().ContinueWith(t => async_adapter.EndTask<List<MultiDimArray>>(t,async_ret => MessageElementUtil.PackListType<MultiDimArray>("return",async_ret)));
    return null;
    }
    List<MultiDimArray> ret=obj.c12;
    return MessageElementUtil.PackListType<MultiDimArray>("return",ret);
    }
    case "b1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_b1().ContinueWith(t => async_adapter.EndTask<bool>(t,async_ret => MessageElementUtil.PackScalar<bool>("return",async_ret)));
    return null;
    }
    bool ret=obj.b1;
    return MessageElementUtil.PackScalar<bool>("return",ret);
    }
    case "b2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_b2().ContinueWith(t => async_adapter.EndTask<bool[]>(t,async_ret => MessageElementUtil.PackArray<bool>("return",async_ret)));
    return null;
    }
    bool[] ret=obj.b2;
    return MessageElementUtil.PackArray<bool>("return",ret);
    }
    case "b3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_b3().ContinueWith(t => async_adapter.EndTask<MultiDimArray>(t,async_ret => MessageElementUtil.PackMultiDimArray("return",(MultiDimArray)async_ret)));
    return null;
    }
    MultiDimArray ret=obj.b3;
    return MessageElementUtil.PackMultiDimArray("return",(MultiDimArray)ret);
    }
    case "b4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_b4().ContinueWith(t => async_adapter.EndTask<List<bool>>(t,async_ret => MessageElementUtil.PackListType<bool>("return",async_ret)));
    return null;
    }
    List<bool> ret=obj.b4;
    return MessageElementUtil.PackListType<bool>("return",ret);
    }
    case "b5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_b5().ContinueWith(t => async_adapter.EndTask<List<bool[]>>(t,async_ret => MessageElementUtil.PackListType<bool[]>("return",async_ret)));
    return null;
    }
    List<bool[]> ret=obj.b5;
    return MessageElementUtil.PackListType<bool[]>("return",ret);
    }
    case "b6":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_b6().ContinueWith(t => async_adapter.EndTask<List<MultiDimArray>>(t,async_ret => MessageElementUtil.PackListType<MultiDimArray>("return",async_ret)));
    return null;
    }
    List<MultiDimArray> ret=obj.b6;
    return MessageElementUtil.PackListType<MultiDimArray>("return",ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void CallSetProperty(string membername, MessageElement m, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "writeme":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_writeme((MessageElementUtil.UnpackScalar<int>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.writeme=(MessageElementUtil.UnpackScalar<int>(m));
    return;
    }
    case "unknown_modifier":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_unknown_modifier((MessageElementUtil.UnpackScalar<int>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.unknown_modifier=(MessageElementUtil.UnpackScalar<int>(m));
    return;
    }
    case "testenum1_prop":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testenum1_prop(MessageElementUtil.UnpackEnum<testenum1>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testenum1_prop=MessageElementUtil.UnpackEnum<testenum1>(m);
    return;
    }
    case "testpod1_prop":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testpod1_prop(MessageElementUtil.UnpackPodFromArray<testpod1>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testpod1_prop=MessageElementUtil.UnpackPodFromArray<testpod1>(m);
    return;
    }
    case "teststruct3_prop":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_teststruct3_prop(MessageElementUtil.UnpackStructure<teststruct3>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.teststruct3_prop=MessageElementUtil.UnpackStructure<teststruct3>(m);
    return;
    }
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d1(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(m), 6, false)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d1=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(m), 6, false);
    return;
    }
    case "d2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d2(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(m), 6, true)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d2=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<double[]>(m), 6, true);
    return;
    }
    case "d3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d3(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(m), 6, false)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d3=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(m), 6, false);
    return;
    }
    case "d4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d4(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(m), 6, true)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d4=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,double[]>(m), 6, true);
    return;
    }
    case "d5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d5(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<MultiDimArray>(m),9,new uint[] {3,3})).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d5=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackList<MultiDimArray>(m),9,new uint[] {3,3});
    return;
    }
    case "d6":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d6(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,MultiDimArray>(m),9,new uint[] {3,3})).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d6=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackMap<int,MultiDimArray>(m),9,new uint[] {3,3});
    return;
    }
    case "testnamedarray1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testnamedarray1(MessageElementUtil.UnpackNamedArrayFromArray<vector3>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testnamedarray1=MessageElementUtil.UnpackNamedArrayFromArray<vector3>(m);
    return;
    }
    case "testnamedarray2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testnamedarray2(MessageElementUtil.UnpackNamedArrayFromArray<transform>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testnamedarray2=MessageElementUtil.UnpackNamedArrayFromArray<transform>(m);
    return;
    }
    case "testnamedarray3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testnamedarray3(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(m), 10, true)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testnamedarray3=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedArray<transform>(m), 10, true);
    return;
    }
    case "testnamedarray4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testnamedarray4(MessageElementUtil.UnpackNamedMultiDimArray<transform>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testnamedarray4=MessageElementUtil.UnpackNamedMultiDimArray<transform>(m);
    return;
    }
    case "testnamedarray5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_testnamedarray5(DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedMultiDimArray<transform>(m),6,new uint[] {3,2})).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.testnamedarray5=DataTypeUtil.VerifyArrayLength(MessageElementUtil.UnpackNamedMultiDimArray<transform>(m),6,new uint[] {3,2});
    return;
    }
    case "c1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c1((MessageElementUtil.UnpackScalar<CDouble>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c1=(MessageElementUtil.UnpackScalar<CDouble>(m));
    return;
    }
    case "c2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c2(MessageElementUtil.UnpackArray<CDouble>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c2=MessageElementUtil.UnpackArray<CDouble>(m);
    return;
    }
    case "c3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c3(MessageElementUtil.UnpackMultiDimArray(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c3=MessageElementUtil.UnpackMultiDimArray(m);
    return;
    }
    case "c4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c4(MessageElementUtil.UnpackList<CDouble>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c4=MessageElementUtil.UnpackList<CDouble>(m);
    return;
    }
    case "c5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c5(MessageElementUtil.UnpackList<CDouble[]>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c5=MessageElementUtil.UnpackList<CDouble[]>(m);
    return;
    }
    case "c6":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c6(MessageElementUtil.UnpackList<MultiDimArray>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c6=MessageElementUtil.UnpackList<MultiDimArray>(m);
    return;
    }
    case "c7":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c7((MessageElementUtil.UnpackScalar<CSingle>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c7=(MessageElementUtil.UnpackScalar<CSingle>(m));
    return;
    }
    case "c8":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c8(MessageElementUtil.UnpackArray<CSingle>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c8=MessageElementUtil.UnpackArray<CSingle>(m);
    return;
    }
    case "c9":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c9(MessageElementUtil.UnpackMultiDimArray(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c9=MessageElementUtil.UnpackMultiDimArray(m);
    return;
    }
    case "c10":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c10(MessageElementUtil.UnpackList<CSingle>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c10=MessageElementUtil.UnpackList<CSingle>(m);
    return;
    }
    case "c11":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c11(MessageElementUtil.UnpackList<CSingle[]>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c11=MessageElementUtil.UnpackList<CSingle[]>(m);
    return;
    }
    case "c12":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_c12(MessageElementUtil.UnpackList<MultiDimArray>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.c12=MessageElementUtil.UnpackList<MultiDimArray>(m);
    return;
    }
    case "b1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_b1((MessageElementUtil.UnpackScalar<bool>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.b1=(MessageElementUtil.UnpackScalar<bool>(m));
    return;
    }
    case "b2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_b2(MessageElementUtil.UnpackArray<bool>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.b2=MessageElementUtil.UnpackArray<bool>(m);
    return;
    }
    case "b3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_b3(MessageElementUtil.UnpackMultiDimArray(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.b3=MessageElementUtil.UnpackMultiDimArray(m);
    return;
    }
    case "b4":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_b4(MessageElementUtil.UnpackList<bool>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.b4=MessageElementUtil.UnpackList<bool>(m);
    return;
    }
    case "b5":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_b5(MessageElementUtil.UnpackList<bool[]>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.b5=MessageElementUtil.UnpackList<bool[]>(m);
    return;
    }
    case "b6":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_b6(MessageElementUtil.UnpackList<MultiDimArray>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.b6=MessageElementUtil.UnpackList<MultiDimArray>(m);
    return;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override MessageElement CallFunction(string rr_membername, vectorptr_messageelement rr_m, WrappedServiceSkelAsyncAdapter rr_async_adapter) {
    switch (rr_membername) {
    case "testpod1_func1":
    {
    testpod1 s=MessageElementUtil.UnpackPodFromArray<testpod1>(vectorptr_messageelement_util.FindElement(rr_m,"s"));
    if (async_obj!=null)    {
    rr_async_adapter.MakeAsync();
    async_obj.async_testpod1_func1(s).ContinueWith(t => rr_async_adapter.EndTask(t,new MessageElement("return",(int)0)));
    return null;
    }
    this.obj.testpod1_func1(s);
    return new MessageElement("return",(int)0);
    }
    case "testpod1_func2":
    {
    if (async_obj!=null)    {
    rr_async_adapter.MakeAsync();
    async_obj.async_testpod1_func2().ContinueWith(t => rr_async_adapter.EndTask<testpod1>(t,async_ret => MessageElementUtil.PackPodToArray<testpod1>("return",ref async_ret)));
    return null;
    }
    testpod1 rr_ret=this.obj.testpod1_func2();
    return MessageElementUtil.PackPodToArray<testpod1>("return",ref rr_ret);
    }
    case "gen_func1":
    {
    Generator2<double> rr_ret=this.obj.gen_func1();
    int generator_index = innerskel.RegisterGeneratorServer("gen_func1", new WrappedGenerator2ServerDirectorNET<double>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    case "gen_func2":
    {
    string name=MessageElementUtil.UnpackString(vectorptr_messageelement_util.FindElement(rr_m,"name"));
    Generator2<byte[]> rr_ret=this.obj.gen_func2(name);
    int generator_index = innerskel.RegisterGeneratorServer("gen_func2", new WrappedGenerator2ServerDirectorNET<byte[]>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    case "gen_func3":
    {
    string name=MessageElementUtil.UnpackString(vectorptr_messageelement_util.FindElement(rr_m,"name"));
    Generator3<byte[]> rr_ret=this.obj.gen_func3(name);
    int generator_index = innerskel.RegisterGeneratorServer("gen_func3", new WrappedGenerator3ServerDirectorNET<byte[]>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    case "gen_func4":
    {
    Generator1<byte[],byte[]> rr_ret=this.obj.gen_func4();
    int generator_index = innerskel.RegisterGeneratorServer("gen_func4", new WrappedGenerator1ServerDirectorNET<byte[],byte[]>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    case "gen_func5":
    {
    Generator1<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2> rr_ret=this.obj.gen_func5();
    int generator_index = innerskel.RegisterGeneratorServer("gen_func5", new WrappedGenerator1ServerDirectorNET<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    case "test_exception_params1":
    {
    if (async_obj!=null)    {
    rr_async_adapter.MakeAsync();
    async_obj.async_test_exception_params1().ContinueWith(t => rr_async_adapter.EndTask(t,new MessageElement("return",(int)0)));
    return null;
    }
    this.obj.test_exception_params1();
    return new MessageElement("return",(int)0);
    }
    case "test_exception_params2":
    {
    if (async_obj!=null)    {
    rr_async_adapter.MakeAsync();
    async_obj.async_test_exception_params2().ContinueWith(t => rr_async_adapter.EndTask(t,new MessageElement("return",(int)0)));
    return null;
    }
    this.obj.test_exception_params2();
    return new MessageElement("return",(int)0);
    }
    case "enum_generator1":
    {
    Generator2<testenum1> rr_ret=this.obj.enum_generator1();
    int generator_index = innerskel.RegisterGeneratorServer("enum_generator1", new WrappedGenerator2ServerDirectorNET<testenum1>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    case "enum_generator2":
    {
    int a=(MessageElementUtil.UnpackScalar<int>(vectorptr_messageelement_util.FindElement(rr_m,"a")));
    int b=(MessageElementUtil.UnpackScalar<int>(vectorptr_messageelement_util.FindElement(rr_m,"b")));
    Generator1<testenum1,testenum1> rr_ret=this.obj.enum_generator2(a, b);
    int generator_index = innerskel.RegisterGeneratorServer("enum_generator2", new WrappedGenerator1ServerDirectorNET<testenum1,testenum1>(rr_ret));
    return new MessageElement("index",generator_index);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override object GetSubObj(string name, string ind) {
    switch (name) {
    case "o4": {
    return obj.get_o4();
    }
    case "nolock_test": {
    return obj.get_nolock_test();
    }
    default:
    break;
    }
    throw new MemberNotFoundException("");
    }
    public override void RegisterEvents(object rrobj1) {
    obj=(testroot3)rrobj1;
    }
    public override void UnregisterEvents(object rrobj1) {
    obj=(testroot3)rrobj1;
    }
    public override object GetCallbackFunction(uint rr_endpoint, string rr_membername) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void InitPipeServers(object rrobj1) {
    obj=(testroot3)rrobj1;
    obj.unreliable1=new Pipe<int>(innerskel.GetPipe("unreliable1"));
    obj.p1=new Pipe<int[]>(innerskel.GetPipe("p1"));
    obj.p2=new Pipe<int[]>(innerskel.GetPipe("p2"));
    obj.p3=new Pipe<MultiDimArray>(innerskel.GetPipe("p3"));
    }
    public override void InitCallbackServers(object rrobj1) {
    obj=(testroot3)rrobj1;
    }
    public override void InitWireServers(object rrobj1) {
    obj=(testroot3)rrobj1;
    obj.peekwire=new Wire<int>(innerskel.GetWire("peekwire"));
    obj.pokewire=new Wire<int>(innerskel.GetWire("pokewire"));
    obj.w1=new Wire<int[]>(innerskel.GetWire("w1"));
    obj.w2=new Wire<int[]>(innerskel.GetWire("w2"));
    obj.w3=new Wire<MultiDimArray>(innerskel.GetWire("w3"));
    }
    public override WrappedArrayMemoryDirector GetArrayMemory(string name) {
    switch (name) {
    case "readmem": {
    WrappedArrayMemoryDirectorNET<double> dir=new  WrappedArrayMemoryDirectorNET<double>(obj.readmem);
    return dir;
    }
    case "c_m1": {
    WrappedArrayMemoryDirectorNET<CDouble> dir=new  WrappedArrayMemoryDirectorNET<CDouble>(obj.c_m1);
    return dir;
    }
    case "c_m3": {
    WrappedArrayMemoryDirectorNET<CDouble> dir=new  WrappedArrayMemoryDirectorNET<CDouble>(obj.c_m3);
    return dir;
    }
    case "c_m5": {
    WrappedArrayMemoryDirectorNET<bool> dir=new  WrappedArrayMemoryDirectorNET<bool>(obj.c_m5);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedMultiDimArrayMemoryDirector GetMultiDimArrayMemory(string name) {
    switch (name) {
    case "c_m2": {
    WrappedMultiDimArrayMemoryDirectorNET<CDouble> dir=new  WrappedMultiDimArrayMemoryDirectorNET<CDouble>(obj.c_m2);
    return dir;
    }
    case "c_m4": {
    WrappedMultiDimArrayMemoryDirectorNET<CDouble> dir=new  WrappedMultiDimArrayMemoryDirectorNET<CDouble>(obj.c_m4);
    return dir;
    }
    case "c_m6": {
    WrappedMultiDimArrayMemoryDirectorNET<bool> dir=new  WrappedMultiDimArrayMemoryDirectorNET<bool>(obj.c_m6);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodArrayMemoryDirector GetPodArrayMemory(string name) {
    switch (name) {
    case "pod_m1": {
    WrappedPodArrayMemoryDirectorNET<testpod2> dir=new  WrappedPodArrayMemoryDirectorNET<testpod2>(obj.pod_m1);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodMultiDimArrayMemoryDirector GetPodMultiDimArrayMemory(string name) {
    switch (name) {
    case "pod_m2": {
    WrappedPodMultiDimArrayMemoryDirectorNET<testpod2> dir=new  WrappedPodMultiDimArrayMemoryDirectorNET<testpod2>(obj.pod_m2);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedArrayMemoryDirector GetNamedArrayMemory(string name) {
    switch (name) {
    case "namedarray_m1": {
    WrappedNamedArrayMemoryDirectorNET<transform> dir=new  WrappedNamedArrayMemoryDirectorNET<transform>(obj.namedarray_m1);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedMultiDimArrayMemoryDirector GetNamedMultiDimArrayMemory(string name) {
    switch (name) {
    case "namedarray_m2": {
    WrappedNamedMultiDimArrayMemoryDirectorNET<transform> dir=new  WrappedNamedMultiDimArrayMemoryDirectorNET<transform>(obj.namedarray_m2);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override string RRType { get { return "com.robotraconteur.testing.TestService3.testroot3"; } }
}
public class obj1_skel : ServiceSkel {
    protected obj1 obj;
    protected async_obj1 async_obj;
    public obj1_skel(object o) : base(o)    {
    obj=(obj1)o;
    async_obj = o as async_obj1;
    }
    public override void ReleaseCastObject() { 
    obj=null;
    async_obj=null;
    base.ReleaseCastObject();
    }
    public override MessageElement CallGetProperty(string membername, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d1().ContinueWith(t => async_adapter.EndTask<double[]>(t,async_ret => MessageElementUtil.PackArray<double>("return",async_ret)));
    return null;
    }
    double[] ret=obj.d1;
    return MessageElementUtil.PackArray<double>("return",ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void CallSetProperty(string membername, MessageElement m, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d1(MessageElementUtil.UnpackArray<double>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d1=MessageElementUtil.UnpackArray<double>(m);
    return;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override MessageElement CallFunction(string rr_membername, vectorptr_messageelement rr_m, WrappedServiceSkelAsyncAdapter rr_async_adapter) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override object GetSubObj(string name, string ind) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("");
    }
    public override void RegisterEvents(object rrobj1) {
    obj=(obj1)rrobj1;
    }
    public override void UnregisterEvents(object rrobj1) {
    obj=(obj1)rrobj1;
    }
    public override object GetCallbackFunction(uint rr_endpoint, string rr_membername) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void InitPipeServers(object rrobj1) {
    obj=(obj1)rrobj1;
    }
    public override void InitCallbackServers(object rrobj1) {
    obj=(obj1)rrobj1;
    }
    public override void InitWireServers(object rrobj1) {
    obj=(obj1)rrobj1;
    }
    public override WrappedArrayMemoryDirector GetArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedMultiDimArrayMemoryDirector GetMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodArrayMemoryDirector GetPodArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodMultiDimArrayMemoryDirector GetPodMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedArrayMemoryDirector GetNamedArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedMultiDimArrayMemoryDirector GetNamedMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override string RRType { get { return "com.robotraconteur.testing.TestService3.obj1"; } }
}
public class obj2_skel : ServiceSkel {
    protected obj2 obj;
    protected async_obj2 async_obj;
    public obj2_skel(object o) : base(o)    {
    obj=(obj2)o;
    async_obj = o as async_obj2;
    }
    public override void ReleaseCastObject() { 
    obj=null;
    async_obj=null;
    base.ReleaseCastObject();
    }
    public override MessageElement CallGetProperty(string membername, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d1().ContinueWith(t => async_adapter.EndTask<double[]>(t,async_ret => MessageElementUtil.PackArray<double>("return",async_ret)));
    return null;
    }
    double[] ret=obj.d1;
    return MessageElementUtil.PackArray<double>("return",ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void CallSetProperty(string membername, MessageElement m, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d1(MessageElementUtil.UnpackArray<double>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d1=MessageElementUtil.UnpackArray<double>(m);
    return;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override MessageElement CallFunction(string rr_membername, vectorptr_messageelement rr_m, WrappedServiceSkelAsyncAdapter rr_async_adapter) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override object GetSubObj(string name, string ind) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("");
    }
    public override void RegisterEvents(object rrobj1) {
    obj=(obj2)rrobj1;
    }
    public override void UnregisterEvents(object rrobj1) {
    obj=(obj2)rrobj1;
    }
    public override object GetCallbackFunction(uint rr_endpoint, string rr_membername) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void InitPipeServers(object rrobj1) {
    obj=(obj2)rrobj1;
    }
    public override void InitCallbackServers(object rrobj1) {
    obj=(obj2)rrobj1;
    }
    public override void InitWireServers(object rrobj1) {
    obj=(obj2)rrobj1;
    }
    public override WrappedArrayMemoryDirector GetArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedMultiDimArrayMemoryDirector GetMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodArrayMemoryDirector GetPodArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodMultiDimArrayMemoryDirector GetPodMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedArrayMemoryDirector GetNamedArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedMultiDimArrayMemoryDirector GetNamedMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override string RRType { get { return "com.robotraconteur.testing.TestService3.obj2"; } }
}
public class obj3_skel : ServiceSkel {
    protected obj3 obj;
    protected async_obj3 async_obj;
    public obj3_skel(object o) : base(o)    {
    obj=(obj3)o;
    async_obj = o as async_obj3;
    }
    public override void ReleaseCastObject() { 
    obj=null;
    async_obj=null;
    base.ReleaseCastObject();
    }
    public override MessageElement CallGetProperty(string membername, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_d1().ContinueWith(t => async_adapter.EndTask<double[]>(t,async_ret => MessageElementUtil.PackArray<double>("return",async_ret)));
    return null;
    }
    double[] ret=obj.d1;
    return MessageElementUtil.PackArray<double>("return",ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void CallSetProperty(string membername, MessageElement m, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "d1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_d1(MessageElementUtil.UnpackArray<double>(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.d1=MessageElementUtil.UnpackArray<double>(m);
    return;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override MessageElement CallFunction(string rr_membername, vectorptr_messageelement rr_m, WrappedServiceSkelAsyncAdapter rr_async_adapter) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override object GetSubObj(string name, string ind) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("");
    }
    public override void RegisterEvents(object rrobj1) {
    obj=(obj3)rrobj1;
    }
    public override void UnregisterEvents(object rrobj1) {
    obj=(obj3)rrobj1;
    }
    public override object GetCallbackFunction(uint rr_endpoint, string rr_membername) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void InitPipeServers(object rrobj1) {
    obj=(obj3)rrobj1;
    }
    public override void InitCallbackServers(object rrobj1) {
    obj=(obj3)rrobj1;
    }
    public override void InitWireServers(object rrobj1) {
    obj=(obj3)rrobj1;
    }
    public override WrappedArrayMemoryDirector GetArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedMultiDimArrayMemoryDirector GetMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodArrayMemoryDirector GetPodArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodMultiDimArrayMemoryDirector GetPodMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedArrayMemoryDirector GetNamedArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedMultiDimArrayMemoryDirector GetNamedMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override string RRType { get { return "com.robotraconteur.testing.TestService3.obj3"; } }
}
public class obj4_skel : ServiceSkel {
    protected obj4 obj;
    protected async_obj4 async_obj;
    public obj4_skel(object o) : base(o)    {
    obj=(obj4)o;
    async_obj = o as async_obj4;
    }
    public override void ReleaseCastObject() { 
    obj=null;
    async_obj=null;
    base.ReleaseCastObject();
    }
    public override MessageElement CallGetProperty(string membername, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "s_ind":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_s_ind().ContinueWith(t => async_adapter.EndTask<string>(t,async_ret => MessageElementUtil.PackString("return",async_ret)));
    return null;
    }
    string ret=obj.s_ind;
    return MessageElementUtil.PackString("return",ret);
    }
    case "i_ind":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_i_ind().ContinueWith(t => async_adapter.EndTask<int>(t,async_ret => MessageElementUtil.PackScalar<int>("return",async_ret)));
    return null;
    }
    int ret=obj.i_ind;
    return MessageElementUtil.PackScalar<int>("return",ret);
    }
    case "data":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_data().ContinueWith(t => async_adapter.EndTask<string>(t,async_ret => MessageElementUtil.PackString("return",async_ret)));
    return null;
    }
    string ret=obj.data;
    return MessageElementUtil.PackString("return",ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void CallSetProperty(string membername, MessageElement m, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "s_ind":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_s_ind(MessageElementUtil.UnpackString(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.s_ind=MessageElementUtil.UnpackString(m);
    return;
    }
    case "i_ind":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_i_ind((MessageElementUtil.UnpackScalar<int>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.i_ind=(MessageElementUtil.UnpackScalar<int>(m));
    return;
    }
    case "data":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_data(MessageElementUtil.UnpackString(m)).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.data=MessageElementUtil.UnpackString(m);
    return;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override MessageElement CallFunction(string rr_membername, vectorptr_messageelement rr_m, WrappedServiceSkelAsyncAdapter rr_async_adapter) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override object GetSubObj(string name, string ind) {
    switch (name) {
    case "o3_1": {
    return obj.get_o3_1(ind);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("");
    }
    public override void RegisterEvents(object rrobj1) {
    obj=(obj4)rrobj1;
    }
    public override void UnregisterEvents(object rrobj1) {
    obj=(obj4)rrobj1;
    }
    public override object GetCallbackFunction(uint rr_endpoint, string rr_membername) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void InitPipeServers(object rrobj1) {
    obj=(obj4)rrobj1;
    }
    public override void InitCallbackServers(object rrobj1) {
    obj=(obj4)rrobj1;
    }
    public override void InitWireServers(object rrobj1) {
    obj=(obj4)rrobj1;
    }
    public override WrappedArrayMemoryDirector GetArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedMultiDimArrayMemoryDirector GetMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodArrayMemoryDirector GetPodArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodMultiDimArrayMemoryDirector GetPodMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedArrayMemoryDirector GetNamedArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedMultiDimArrayMemoryDirector GetNamedMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override string RRType { get { return "com.robotraconteur.testing.TestService3.obj4"; } }
}
public class obj5_skel : ServiceSkel {
    protected obj5 obj;
    protected async_obj5 async_obj;
    public obj5_skel(object o) : base(o)    {
    obj=(obj5)o;
    async_obj = o as async_obj5;
    }
    public override void ReleaseCastObject() { 
    obj=null;
    async_obj=null;
    base.ReleaseCastObject();
    }
    public override MessageElement CallGetProperty(string membername, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "p1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_p1().ContinueWith(t => async_adapter.EndTask<double>(t,async_ret => MessageElementUtil.PackScalar<double>("return",async_ret)));
    return null;
    }
    double ret=obj.p1;
    return MessageElementUtil.PackScalar<double>("return",ret);
    }
    case "p2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_p2().ContinueWith(t => async_adapter.EndTask<double>(t,async_ret => MessageElementUtil.PackScalar<double>("return",async_ret)));
    return null;
    }
    double ret=obj.p2;
    return MessageElementUtil.PackScalar<double>("return",ret);
    }
    case "p3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_get_p3().ContinueWith(t => async_adapter.EndTask<double>(t,async_ret => MessageElementUtil.PackScalar<double>("return",async_ret)));
    return null;
    }
    double ret=obj.p3;
    return MessageElementUtil.PackScalar<double>("return",ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void CallSetProperty(string membername, MessageElement m, WrappedServiceSkelAsyncAdapter async_adapter) {
    switch (membername) {
    case "p1":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_p1((MessageElementUtil.UnpackScalar<double>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.p1=(MessageElementUtil.UnpackScalar<double>(m));
    return;
    }
    case "p2":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_p2((MessageElementUtil.UnpackScalar<double>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.p2=(MessageElementUtil.UnpackScalar<double>(m));
    return;
    }
    case "p3":
    {
    if (async_obj!=null)    {
    async_adapter.MakeAsync();
    async_obj.async_set_p3((MessageElementUtil.UnpackScalar<double>(m))).ContinueWith(t => async_adapter.EndTask(t));
    return;
    }
    obj.p3=(MessageElementUtil.UnpackScalar<double>(m));
    return;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override MessageElement CallFunction(string rr_membername, vectorptr_messageelement rr_m, WrappedServiceSkelAsyncAdapter rr_async_adapter) {
    switch (rr_membername) {
    case "f1":
    {
    if (async_obj!=null)    {
    rr_async_adapter.MakeAsync();
    async_obj.async_f1().ContinueWith(t => rr_async_adapter.EndTask<int>(t,async_ret => MessageElementUtil.PackScalar<int>("return",async_ret)));
    return null;
    }
    int rr_ret=this.obj.f1();
    return MessageElementUtil.PackScalar<int>("return",rr_ret);
    }
    case "f2":
    {
    if (async_obj!=null)    {
    rr_async_adapter.MakeAsync();
    async_obj.async_f2().ContinueWith(t => rr_async_adapter.EndTask<int>(t,async_ret => MessageElementUtil.PackScalar<int>("return",async_ret)));
    return null;
    }
    int rr_ret=this.obj.f2();
    return MessageElementUtil.PackScalar<int>("return",rr_ret);
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override object GetSubObj(string name, string ind) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("");
    }
    public override void RegisterEvents(object rrobj1) {
    obj=(obj5)rrobj1;
    }
    public override void UnregisterEvents(object rrobj1) {
    obj=(obj5)rrobj1;
    }
    public override object GetCallbackFunction(uint rr_endpoint, string rr_membername) {
    switch (rr_membername) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member not found");
    }
    public override void InitPipeServers(object rrobj1) {
    obj=(obj5)rrobj1;
    obj.q1=new Pipe<int>(innerskel.GetPipe("q1"));
    obj.q2=new Pipe<int>(innerskel.GetPipe("q2"));
    }
    public override void InitCallbackServers(object rrobj1) {
    obj=(obj5)rrobj1;
    }
    public override void InitWireServers(object rrobj1) {
    obj=(obj5)rrobj1;
    obj.w1=new Wire<int>(innerskel.GetWire("w1"));
    obj.w2=new Wire<int>(innerskel.GetWire("w2"));
    }
    public override WrappedArrayMemoryDirector GetArrayMemory(string name) {
    switch (name) {
    case "m1": {
    WrappedArrayMemoryDirectorNET<int> dir=new  WrappedArrayMemoryDirectorNET<int>(obj.m1);
    return dir;
    }
    case "m2": {
    WrappedArrayMemoryDirectorNET<int> dir=new  WrappedArrayMemoryDirectorNET<int>(obj.m2);
    return dir;
    }
    case "m3": {
    WrappedArrayMemoryDirectorNET<int> dir=new  WrappedArrayMemoryDirectorNET<int>(obj.m3);
    return dir;
    }
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedMultiDimArrayMemoryDirector GetMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodArrayMemoryDirector GetPodArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedPodMultiDimArrayMemoryDirector GetPodMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedArrayMemoryDirector GetNamedArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override WrappedNamedMultiDimArrayMemoryDirector GetNamedMultiDimArrayMemory(string name) {
    switch (name) {
    default:
    break;
    }
    throw new MemberNotFoundException("Member Not Found");
    }
    public override string RRType { get { return "com.robotraconteur.testing.TestService3.obj5"; } }
}
public class testroot3_default_impl : testroot3{
    protected PipeBroadcaster<int> rrvar_unreliable1;
    protected WireBroadcaster<int> rrvar_peekwire;
    protected WireUnicastReceiver<int> rrvar_pokewire;
    public virtual int readme {get; set;} = default(int);
    public virtual int writeme {get; set;} = default(int);
    public virtual int unknown_modifier {get; set;} = default(int);
    public virtual testenum1 testenum1_prop {get; set;} = default(testenum1);
    public virtual testpod1 testpod1_prop {get; set;} = default(testpod1);
    public virtual teststruct3 teststruct3_prop {get; set;} = default(teststruct3);
    public virtual List<double[]> d1 {get; set;} = default(List<double[]>);
    public virtual List<double[]> d2 {get; set;} = default(List<double[]>);
    public virtual Dictionary<int,double[]> d3 {get; set;} = default(Dictionary<int,double[]>);
    public virtual Dictionary<int,double[]> d4 {get; set;} = default(Dictionary<int,double[]>);
    public virtual List<MultiDimArray> d5 {get; set;} = default(List<MultiDimArray>);
    public virtual Dictionary<int,MultiDimArray> d6 {get; set;} = default(Dictionary<int,MultiDimArray>);
    public virtual vector3 testnamedarray1 {get; set;} = default(vector3);
    public virtual transform testnamedarray2 {get; set;} = default(transform);
    public virtual transform[] testnamedarray3 {get; set;} = new transform[0];
    public virtual NamedMultiDimArray testnamedarray4 {get; set;} = new NamedMultiDimArray(new uint[] {1,0}, new transform[0]);
    public virtual NamedMultiDimArray testnamedarray5 {get; set;} = new NamedMultiDimArray(new uint[] {3,2}, new transform[6]);
    public virtual CDouble c1 {get; set;} = default(CDouble);
    public virtual CDouble[] c2 {get; set;} = new CDouble[0];
    public virtual MultiDimArray c3 {get; set;} = new MultiDimArray(new uint[] {1,0}, new CDouble[0]);
    public virtual List<CDouble> c4 {get; set;} = default(List<CDouble>);
    public virtual List<CDouble[]> c5 {get; set;} = default(List<CDouble[]>);
    public virtual List<MultiDimArray> c6 {get; set;} = default(List<MultiDimArray>);
    public virtual CSingle c7 {get; set;} = default(CSingle);
    public virtual CSingle[] c8 {get; set;} = new CSingle[0];
    public virtual MultiDimArray c9 {get; set;} = new MultiDimArray(new uint[] {1,0}, new CSingle[0]);
    public virtual List<CSingle> c10 {get; set;} = default(List<CSingle>);
    public virtual List<CSingle[]> c11 {get; set;} = default(List<CSingle[]>);
    public virtual List<MultiDimArray> c12 {get; set;} = default(List<MultiDimArray>);
    public virtual bool b1 {get; set;} = default(bool);
    public virtual bool[] b2 {get; set;} = new bool[0];
    public virtual MultiDimArray b3 {get; set;} = new MultiDimArray(new uint[] {1,0}, new bool[0]);
    public virtual List<bool> b4 {get; set;} = default(List<bool>);
    public virtual List<bool[]> b5 {get; set;} = default(List<bool[]>);
    public virtual List<MultiDimArray> b6 {get; set;} = default(List<MultiDimArray>);
    public virtual void testpod1_func1(testpod1 s) {
    throw new NotImplementedException();    }
    public virtual testpod1 testpod1_func2() {
    throw new NotImplementedException();    }
    public virtual Generator2<double> gen_func1() {
    throw new NotImplementedException();    }
    public virtual Generator2<byte[]> gen_func2(string name) {
    throw new NotImplementedException();    }
    public virtual Generator3<byte[]> gen_func3(string name) {
    throw new NotImplementedException();    }
    public virtual Generator1<byte[],byte[]> gen_func4() {
    throw new NotImplementedException();    }
    public virtual Generator1<com.robotraconteur.testing.TestService1.teststruct2,com.robotraconteur.testing.TestService1.teststruct2> gen_func5() {
    throw new NotImplementedException();    }
    public virtual void test_exception_params1() {
    throw new NotImplementedException();    }
    public virtual void test_exception_params2() {
    throw new NotImplementedException();    }
    public virtual Generator2<testenum1> enum_generator1() {
    throw new NotImplementedException();    }
    public virtual Generator1<testenum1,testenum1> enum_generator2(int a, int b) {
    throw new NotImplementedException();    }
    public virtual obj4 get_o4() {
    throw new NotImplementedException();
    }
    public virtual obj5 get_nolock_test() {
    throw new NotImplementedException();
    }
    public virtual Pipe<int> unreliable1 {
    get { return rrvar_unreliable1.Pipe;  }
    set {
    if (rrvar_unreliable1!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_unreliable1= new PipeBroadcaster<int>(value);
    }
    }
    public virtual Pipe<int[]> p1 {
    get { throw new NotImplementedException(); }
    set { throw new InvalidOperationException();}
    }
    public virtual Pipe<int[]> p2 {
    get { throw new NotImplementedException(); }
    set { throw new InvalidOperationException();}
    }
    public virtual Pipe<MultiDimArray> p3 {
    get { throw new NotImplementedException(); }
    set { throw new InvalidOperationException();}
    }
    public virtual Wire<int> peekwire {
    get { return rrvar_peekwire.Wire;  }
    set {
    if (rrvar_peekwire!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_peekwire= new WireBroadcaster<int>(value);
    }
    }
    public virtual Wire<int> pokewire {
    get { return rrvar_pokewire.Wire;  }
    set {
    if (rrvar_pokewire!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_pokewire= new WireUnicastReceiver<int>(value);
    }
    }
    public virtual Wire<int[]> w1 {
    get { throw new NotImplementedException(); }
    set { throw new NotImplementedException();}
    }
    public virtual Wire<int[]> w2 {
    get { throw new NotImplementedException(); }
    set { throw new NotImplementedException();}
    }
    public virtual Wire<MultiDimArray> w3 {
    get { throw new NotImplementedException(); }
    set { throw new NotImplementedException();}
    }
    public virtual ArrayMemory<double> readmem { 
    get { throw new NotImplementedException(); }
    }
    public virtual PodArrayMemory<testpod2> pod_m1 { 
    get { throw new NotImplementedException(); }
    }
    public virtual PodMultiDimArrayMemory<testpod2> pod_m2 {
    get { throw new NotImplementedException(); }
    }
    public virtual NamedArrayMemory<transform> namedarray_m1 { 
    get { throw new NotImplementedException(); }
    }
    public virtual NamedMultiDimArrayMemory<transform> namedarray_m2 {
    get { throw new NotImplementedException(); }
    }
    public virtual ArrayMemory<CDouble> c_m1 { 
    get { throw new NotImplementedException(); }
    }
    public virtual MultiDimArrayMemory<CDouble> c_m2 {
    get { throw new NotImplementedException(); }
    }
    public virtual ArrayMemory<CDouble> c_m3 { 
    get { throw new NotImplementedException(); }
    }
    public virtual MultiDimArrayMemory<CDouble> c_m4 {
    get { throw new NotImplementedException(); }
    }
    public virtual ArrayMemory<bool> c_m5 { 
    get { throw new NotImplementedException(); }
    }
    public virtual MultiDimArrayMemory<bool> c_m6 {
    get { throw new NotImplementedException(); }
    }
}
public class obj1_default_impl : obj1{
    public virtual double[] d1 {get; set;} = new double[0];
}
public class obj2_default_impl : obj2{
    public virtual double[] d1 {get; set;} = new double[0];
}
public class obj3_default_impl : obj3{
    public virtual double[] d1 {get; set;} = new double[0];
}
public class obj4_default_impl : obj4{
    public virtual string s_ind {get; set;} = "";
    public virtual int i_ind {get; set;} = default(int);
    public virtual string data {get; set;} = "";
    public virtual com.robotraconteur.testing.TestService1.sub3 get_o3_1(string ind) {
    throw new NotImplementedException();
    }
}
public class obj5_default_impl : obj5{
    protected PipeBroadcaster<int> rrvar_q1;
    protected PipeBroadcaster<int> rrvar_q2;
    protected WireBroadcaster<int> rrvar_w1;
    protected WireBroadcaster<int> rrvar_w2;
    public virtual double p1 {get; set;} = default(double);
    public virtual double p2 {get; set;} = default(double);
    public virtual double p3 {get; set;} = default(double);
    public virtual int f1() {
    throw new NotImplementedException();    }
    public virtual int f2() {
    throw new NotImplementedException();    }
    public virtual Pipe<int> q1 {
    get { return rrvar_q1.Pipe;  }
    set {
    if (rrvar_q1!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_q1= new PipeBroadcaster<int>(value);
    }
    }
    public virtual Pipe<int> q2 {
    get { return rrvar_q2.Pipe;  }
    set {
    if (rrvar_q2!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_q2= new PipeBroadcaster<int>(value);
    }
    }
    public virtual Wire<int> w1 {
    get { return rrvar_w1.Wire;  }
    set {
    if (rrvar_w1!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_w1= new WireBroadcaster<int>(value);
    }
    }
    public virtual Wire<int> w2 {
    get { return rrvar_w2.Wire;  }
    set {
    if (rrvar_w2!=null) throw new InvalidOperationException("Pipe already set");
    rrvar_w2= new WireBroadcaster<int>(value);
    }
    }
    public virtual ArrayMemory<int> m1 { 
    get { throw new NotImplementedException(); }
    }
    public virtual ArrayMemory<int> m2 { 
    get { throw new NotImplementedException(); }
    }
    public virtual ArrayMemory<int> m3 { 
    get { throw new NotImplementedException(); }
    }
}
public static class RRExtensions{
    public static double[] GetNumericArray(this vector3[] s)
    {
    var a=new ArraySegment<double>(new double[3 * s.Length]);
    s.GetNumericArray(ref a);
    return a.Array;
    }
    public static void GetNumericArray(this vector3[] s, ref ArraySegment<double> a)
    {
    if(a.Count < 3 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<double>(a.Array, a.Offset + 3*i,3);
    s[i].GetNumericArray(ref a1);
    }
    }
    public static void AssignFromNumericArray(this vector3[] s, ref ArraySegment<double> a)
    {
    if(a.Count < 3 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<double>(a.Array, a.Offset + 3*i,3);
    s[i].AssignFromNumericArray(ref a1);
    }
    }
    public static double[] GetNumericArray(this quaternion[] s)
    {
    var a=new ArraySegment<double>(new double[4 * s.Length]);
    s.GetNumericArray(ref a);
    return a.Array;
    }
    public static void GetNumericArray(this quaternion[] s, ref ArraySegment<double> a)
    {
    if(a.Count < 4 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<double>(a.Array, a.Offset + 4*i,4);
    s[i].GetNumericArray(ref a1);
    }
    }
    public static void AssignFromNumericArray(this quaternion[] s, ref ArraySegment<double> a)
    {
    if(a.Count < 4 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<double>(a.Array, a.Offset + 4*i,4);
    s[i].AssignFromNumericArray(ref a1);
    }
    }
    public static double[] GetNumericArray(this transform[] s)
    {
    var a=new ArraySegment<double>(new double[7 * s.Length]);
    s.GetNumericArray(ref a);
    return a.Array;
    }
    public static void GetNumericArray(this transform[] s, ref ArraySegment<double> a)
    {
    if(a.Count < 7 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<double>(a.Array, a.Offset + 7*i,7);
    s[i].GetNumericArray(ref a1);
    }
    }
    public static void AssignFromNumericArray(this transform[] s, ref ArraySegment<double> a)
    {
    if(a.Count < 7 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<double>(a.Array, a.Offset + 7*i,7);
    s[i].AssignFromNumericArray(ref a1);
    }
    }
    public static byte[] GetNumericArray(this pixel[] s)
    {
    var a=new ArraySegment<byte>(new byte[3 * s.Length]);
    s.GetNumericArray(ref a);
    return a.Array;
    }
    public static void GetNumericArray(this pixel[] s, ref ArraySegment<byte> a)
    {
    if(a.Count < 3 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<byte>(a.Array, a.Offset + 3*i,3);
    s[i].GetNumericArray(ref a1);
    }
    }
    public static void AssignFromNumericArray(this pixel[] s, ref ArraySegment<byte> a)
    {
    if(a.Count < 3 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<byte>(a.Array, a.Offset + 3*i,3);
    s[i].AssignFromNumericArray(ref a1);
    }
    }
    public static byte[] GetNumericArray(this pixel2[] s)
    {
    var a=new ArraySegment<byte>(new byte[31 * s.Length]);
    s.GetNumericArray(ref a);
    return a.Array;
    }
    public static void GetNumericArray(this pixel2[] s, ref ArraySegment<byte> a)
    {
    if(a.Count < 31 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<byte>(a.Array, a.Offset + 31*i,31);
    s[i].GetNumericArray(ref a1);
    }
    }
    public static void AssignFromNumericArray(this pixel2[] s, ref ArraySegment<byte> a)
    {
    if(a.Count < 31 * s.Length) throw new ArgumentException("ArraySegment invalid length");
    for (int i=0; i<s.Length; i++)
    {
    var a1 = new ArraySegment<byte>(a.Array, a.Offset + 31*i,31);
    s[i].AssignFromNumericArray(ref a1);
    }
    }
}
}
