//This file is automatically generated. DO NOT EDIT!
package com.robotraconteur.testing.TestService1;
import java.util.*;
import com.robotraconteur.*;
public class sub1_stub extends ServiceStub implements sub1, async_sub1 {
    public sub1_stub(WrappedServiceStub innerstub) {
        super(innerstub); 
    }
    public double[] get_d1() {
    return MessageElementUtil.<double[]>unpackArray(rr_innerstub.propertyGet("d1"));
    }
    public void set_d1(double[] value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.<double[]>packArray("value",value);
    rr_innerstub.propertySet("d1", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public MultiDimArray get_d2() {
    return MessageElementUtil.unpackMultiDimArray(rr_innerstub.propertyGet("d2"));
    }
    public void set_d2(MultiDimArray value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packMultiDimArray("value",(MultiDimArray)value);
    rr_innerstub.propertySet("d2", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public String get_s_ind() {
    return MessageElementUtil.unpackString(rr_innerstub.propertyGet("s_ind"));
    }
    public void set_s_ind(String value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packString("value",value);
    rr_innerstub.propertySet("s_ind", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public int get_i_ind() {
    return (MessageElementUtil.<int[]>castDataAndDispose(rr_innerstub.propertyGet("i_ind")))[0];
    }
    public void set_i_ind(int value) {
    MessageElement m=null;
    try {
    m=MessageElementUtil.<int[]>packArray("value",new int[] {value});
    rr_innerstub.propertySet("i_ind", m);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    public void dispatchEvent(String rr_membername, vectorptr_messageelement rr_m) {
    }
    public sub2 get_o2_1() {
    return (sub2)findObjRefTyped("o2_1","com.robotraconteur.testing.TestService1.sub2");
    }
    public sub2 get_o2_2(int ind) {
    return (sub2)findObjRefTyped("o2_2",String.valueOf(ind),"com.robotraconteur.testing.TestService1.sub2");
    }
    public sub2 get_o2_3(String ind) {
    return (sub2)findObjRefTyped("o2_3",String.valueOf(ind),"com.robotraconteur.testing.TestService1.sub2");
    }
    public MessageElement callbackCall(String rr_membername, vectorptr_messageelement rr_m) {
    throw new MemberNotFoundException("Member not found");
    }
    public void async_get_d1(Action2<double[],RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("d1",new rrend_async_get_d1(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_d1 implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<double[],RuntimeException> rr_handler=(Action2<double[],RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(null,err);
    return;
    }
    double[] rr_ret;
    try {
    rr_ret=MessageElementUtil.<double[]>unpackArray(value);
    } catch (RuntimeException err2) {
    rr_handler.action(null,err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_d1(double[] value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.<double[]>packArray("value",value);
    rr_async_PropertySet("d1",m,new rrend_async_set_d1(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_d1 implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_d2(Action2<MultiDimArray,RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("d2",new rrend_async_get_d2(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_d2 implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<MultiDimArray,RuntimeException> rr_handler=(Action2<MultiDimArray,RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(null,err);
    return;
    }
    MultiDimArray rr_ret;
    try {
    rr_ret=MessageElementUtil.unpackMultiDimArray(value);
    } catch (RuntimeException err2) {
    rr_handler.action(null,err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_d2(MultiDimArray value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packMultiDimArray("value",(MultiDimArray)value);
    rr_async_PropertySet("d2",m,new rrend_async_set_d2(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_d2 implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_s_ind(Action2<String,RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("s_ind",new rrend_async_get_s_ind(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_s_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<String,RuntimeException> rr_handler=(Action2<String,RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action("",err);
    return;
    }
    String rr_ret;
    try {
    rr_ret=MessageElementUtil.unpackString(value);
    } catch (RuntimeException err2) {
    rr_handler.action("",err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_s_ind(String value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.packString("value",value);
    rr_async_PropertySet("s_ind",m,new rrend_async_set_s_ind(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_s_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_i_ind(Action2<Integer,RuntimeException> rr_handler, int rr_timeout)
    {
    rr_async_PropertyGet("i_ind",new rrend_async_get_i_ind(),rr_handler,rr_timeout);
    }
    protected class rrend_async_get_i_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement value ,RuntimeException err,Object param)
    {
    Action2<Integer,RuntimeException> rr_handler=(Action2<Integer,RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action((int)0,err);
    return;
    }
    Integer rr_ret;
    try {
    rr_ret=(MessageElementUtil.<int[]>castDataAndDispose(value))[0];
    } catch (RuntimeException err2) {
    rr_handler.action((int)0,err2);
    return;
    }
    rr_handler.action(rr_ret,null);
    }
    }
    public void async_set_i_ind(int value, Action1<RuntimeException> rr_handler, int rr_timeout)
    {
    MessageElement m=null;
    try {
    m=MessageElementUtil.<int[]>packArray("value",new int[] {value});
    rr_async_PropertySet("i_ind",m,new rrend_async_set_i_ind(),rr_handler,rr_timeout);
    }
    finally {
    if (m!=null) m.delete();
    }
    }
    protected class rrend_async_set_i_ind implements Action3<MessageElement,RuntimeException,Object> {
    public void action(MessageElement m ,RuntimeException err,Object param)
    {
    Action1<RuntimeException> rr_handler=(Action1<RuntimeException>)param;
    if (err!=null)
    {
    rr_handler.action(err);
    return;
    }
    rr_handler.action(null);
    }
    }
    public void async_get_o2_1(Action2<sub2,RuntimeException> handler, int timeout) {
    asyncFindObjRefTyped("o2_1","com.robotraconteur.testing.TestService1.sub2",handler,timeout);
    }
    public void async_get_o2_2(int ind, Action2<sub2,RuntimeException> handler, int timeout) {
    asyncFindObjRefTyped("o2_2",String.valueOf(ind),"com.robotraconteur.testing.TestService1.sub2",handler,timeout);
    }
    public void async_get_o2_3(String ind, Action2<sub2,RuntimeException> handler, int timeout) {
    asyncFindObjRefTyped("o2_3",String.valueOf(ind),"com.robotraconteur.testing.TestService1.sub2",handler,timeout);
    }
}
