Пример #1
0
        public bool onConnectionHeaderReceived(Connection conn, Header header)
        {
            bool ret = false;

            if (header.Values.Contains("topic"))
            {
                TransportSubscriberLink sub_link = new TransportSubscriberLink();
                ret  = sub_link.initialize(conn);
                ret &= sub_link.handleHeader(header);
            }
            else if (header.Values.Contains("service"))
            {
                IServiceClientLink iscl = new IServiceClientLink();
                ret  = iscl.initialize(conn);
                ret &= iscl.handleHeader(header);
            }
            else
            {
                EDB.WriteLine("got a connection for a type other than topic or service from [" + conn.RemoteString +
                              "]. Fail.");
                return(false);
            }
            //EDB.WriteLine("CONNECTED [" + val + "]. WIN.");
            return(ret);
        }
Пример #2
0
            public ServiceCallback(ServicePublication <MReq, MRes> sp, ServiceCallbackHelper <MReq, MRes> _helper, byte[] buf, int num_bytes, IServiceClientLink link, bool has_tracked_object, object tracked_object)

            {
                isp = sp;
                if (isp != null && _helper != null)
                {
                    isp.helper = _helper;
                }
                buffer            = buf;
                _numBytes         = num_bytes;
                this.link         = link;
                _hasTrackedObject = has_tracked_object;
                _trackedObject    = tracked_object;
            }
Пример #3
0
 public ServiceCallback(ServiceCallbackHelper <MReq, MRes> _helper, byte[] buf, int num_bytes, IServiceClientLink link, bool has_tracked_object, object tracked_object)
     : this(null, _helper, buf, num_bytes, link, has_tracked_object, tracked_object)
 {
 }
Пример #4
0
 internal override void removeServiceClientLink(IServiceClientLink iServiceClientLink)
 {
     lock (client_links_mutex)
         client_links.Remove(iServiceClientLink);
 }
Пример #5
0
 internal override void addServiceClientLink(IServiceClientLink iServiceClientLink)
 {
     lock (client_links_mutex)
         client_links.Add(iServiceClientLink);
 }
Пример #6
0
        public override void processRequest(ref byte[] buf, int num_bytes, IServiceClientLink link)
        {
            CallbackInterface cb = new ServiceCallback(this, helper, buf, num_bytes, link, has_tracked_object, tracked_object);

            callback.addCallback(cb, ROS.getPID());
        }
Пример #7
0
 public virtual void processRequest(ref byte[] buffer, int size, IServiceClientLink iServiceClientLink)
 {
     throw new NotImplementedException();
 }
Пример #8
0
 internal virtual void removeServiceClientLink(IServiceClientLink iServiceClientLink)
 {
     throw new NotImplementedException();
 }