示例#1
0
 public ServiceCallback(ServicePublication <MReq, MRes> sp, ServiceCallbackHelper <MReq, MRes> _helper, byte[] buf, IServiceClientLink link)
 {
     this.isp = sp;
     if (this.isp != null && _helper != null)
     {
         this.isp.helper = _helper;
     }
     this.buffer = buf;
     this.link   = link;
 }
示例#2
0
 public AdvertiseServiceOptions(string service, ServiceFunction <MReq, MRes> serviceCallback)
 {
     this.Service     = service;
     ServiceCallback  = serviceCallback;
     Helper           = new ServiceCallbackHelper <MReq, MRes>(serviceCallback);
     RequestDataType  = new MReq().MessageType.Replace("/Request", "__Request");
     ResponseDataType = new MRes().MessageType.Replace("/Response", "__Response");
     SrvType          = RequestDataType.Replace("__Request", "");
     Md5Sum           = RosService.Generate(SrvType).MD5Sum();
 }
示例#3
0
 public AdvertiseServiceOptions(string service, ServiceFunction <MReq, MRes> serviceCallback)
 {
     this.service = service;
     srv_func     = serviceCallback;
     helper       = new ServiceCallbackHelper <MReq, MRes>(serviceCallback);
     req_datatype = new MReq().MessageType.Replace("/Request", "__Request");
     res_datatype = new MRes().MessageType.Replace("/Response", "__Response");
     SrvType      = req_datatype.Replace("__Request", "");
     datatype     = SrvType;
     md5sum       = RosService.Generate(SrvType).MD5Sum();
 }
示例#4
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)
 {
     this.isp = sp;
     if (this.isp != null && _helper != null)
     {
         this.isp.helper = _helper;
     }
     this.buffer            = buf;
     this._numBytes         = num_bytes;
     this.link              = link;
     this._hasTrackedObject = has_tracked_object;
     this._trackedObject    = tracked_object;
 }
示例#5
0
        public ServicePublication(string name, string md5Sum, string datatype, string reqDatatype, string resDatatype, ServiceCallbackHelper <MReq, MRes> helper, ICallbackQueue callback)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            this.name         = name;
            this.md5sum       = md5Sum;
            this.dataType     = datatype;
            this.req_datatype = reqDatatype;
            this.res_datatype = resDatatype;
            this.helper       = helper;
            this.callback     = callback;
        }
示例#6
0
        public ServicePublication(string name, string md5Sum, string datatype, string reqDatatype, string resDatatype, ServiceCallbackHelper <MReq, MRes> helper, ICallbackQueue callback, object trackedObject)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            this.name           = name;
            this.md5sum         = md5Sum;
            this.datatype       = datatype;
            this.req_datatype   = reqDatatype;
            this.res_datatype   = resDatatype;
            this.helper         = helper;
            this.callback       = callback;
            this.tracked_object = trackedObject;

            if (trackedObject != null)
            {
                has_tracked_object = true;
            }
        }
示例#7
0
 public ServiceCallback(ServiceCallbackHelper <MReq, MRes> _helper, byte[] buf, IServiceClientLink link)
     : this(null, _helper, buf, link)
 {
 }
示例#8
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)
 {
 }