示例#1
0
 public void RegisterDeviceDriver(DeviceDriverRegistryEntry deviceDriver)
 {
     lock (_lock)
     {
         Registry.Add(deviceDriver);
     }
 }
示例#2
0
 public void AddDeviceDriver(DeviceDriverRegistryEntry deviceDriver)
 {
     DeviceDrivers.Add(deviceDriver);
 }
示例#3
0
        public Device Initialize(DeviceDriverRegistryEntry deviceDriverRegistryEntry, Device parent, BaseDeviceConfiguration configuration = null, HardwareResources resources = null)
        {
            var deviceDriver = deviceDriverRegistryEntry.Factory();

            return(Initialize(deviceDriver, parent, configuration, resources, deviceDriverRegistryEntry));
        }
示例#4
0
        public Device Initialize(BaseDeviceDriver deviceDriver, Device parent, BaseDeviceConfiguration configuration = null, HardwareResources resources = null, DeviceDriverRegistryEntry deviceDriverRegistryEntry = null)
        {
            var device = new Device()
            {
                DeviceDriver = deviceDriver,
                DeviceDriverRegistryEntry = deviceDriverRegistryEntry,
                Status        = DeviceStatus.Initializing,
                Parent        = parent,
                Configuration = configuration,
                Resources     = resources,
                DeviceService = this,

                //Name = string.Empty,
            };

            StartDevice(device);

            return(device);
        }