コード例 #1
0
        public static void init_ros(string[] args, string name, bool anonymous_name = false)
        {
            using (var args1 = new vectorstring())
            {
                foreach (var a in args)
                {
                    args1.Add(a);
                }

                _init_ros(args1, name, anonymous_name);
            }
        }
コード例 #2
0
        public ServiceSubscription SubscribeServiceByType(string[] service_types, ServiceSubscriptionFilter filter = null)
        {
            var filter2 = SubscribeService_LoadFilter(filter);

            var service_types2 = new vectorstring();

            foreach (string s in service_types)
            {
                service_types2.Add(s);
            }

            var sub1 = RobotRaconteurNET.WrappedSubscribeServiceByType(this, service_types2, filter2);

            return(new ServiceSubscription(sub1));
        }
コード例 #3
0
        public ServiceSubscription SubscribeService(string[] url, string username           = null,
                                                    Dictionary <string, object> credentials = null, string objecttype = null)
        {
            MessageElementData credentials2 = null;

            try
            {
                if (username == null)
                {
                    username = "";
                }
                if (credentials != null)
                {
                    credentials2 = (MessageElementData)PackVarType(credentials);
                }

                if (objecttype == null)
                {
                    objecttype = "";
                }
                vectorstring url2 = new vectorstring();
                foreach (string ss in url)
                {
                    url2.Add(ss);
                }

                var sub1 = RobotRaconteurNET.WrappedSubscribeService(this, url2, username, credentials2, objecttype);
                return(new ServiceSubscription(sub1));
            }
            finally
            {
                if (credentials2 != null)
                {
                    credentials2.Dispose();
                }
            }
        }
コード例 #4
0
        public void UpdateServiceURL(string[] url, string username = null, Dictionary <string, object> credentials = null,
                                     string objecttype             = null, bool close_connected = false)
        {
            MessageElementData credentials2 = null;

            try
            {
                if (username == null)
                {
                    username = "";
                }
                if (credentials != null)
                {
                    credentials2 = (MessageElementData)RobotRaconteurNode.s.PackVarType(credentials);
                }

                if (objecttype == null)
                {
                    objecttype = "";
                }
                vectorstring url2 = new vectorstring();
                foreach (string ss in url)
                {
                    url2.Add(ss);
                }

                _subscription.UpdateServiceURL(url2, username, credentials2, objecttype, close_connected);
            }
            finally
            {
                if (credentials2 != null)
                {
                    credentials2.Dispose();
                }
            }
        }