Example #1
0
        public BleStream Open(BleService service, OpenConfiguration openConfig)
        {
            Throw.If.Null(service).Null(openConfig);

            openConfig = openConfig.Clone();
            openConfig.SetOption(OpenOption.BleService, service);
            return(Open(openConfig));
        }
Example #2
0
        /// <exclude/>
        protected BleStream(BleDevice device, BleService service)
            : base(device)
        {
            Throw.If.Null(service).False(service.Device == device);
            Service = service;

            ReadTimeout  = 3000;
            WriteTimeout = 3000;
        }
Example #3
0
        public virtual bool TryGetService(BleUuid uuid, out BleService service)
        {
            foreach (var s in GetServices())
            {
                if (s.Uuid == uuid)
                {
                    service = s; return(true);
                }
            }

            service = null; return(false);
        }
Example #4
0
 public BleStream Open(BleService service)
 {
     return(Open(service, new OpenConfiguration()));
 }