/// <summary>
 /// Constructor should be used for test code only.
 /// </summary>
 internal LoRaDeviceRegistry(NetworkServerConfiguration configuration,
                             IMemoryCache cache,
                             LoRaDeviceAPIServiceBase loRaDeviceAPIService,
                             ILoRaDeviceFactory deviceFactory, LoRaDeviceCache deviceCache)
     : this(configuration, cache, loRaDeviceAPIService, deviceFactory, deviceCache,
            NullLoggerFactory.Instance, NullLogger <LoRaDeviceRegistry> .Instance)
 {
 }
Esempio n. 2
0
 internal JoinDeviceLoader(IoTHubDeviceInfo ioTHubDevice, ILoRaDeviceFactory deviceFactory, LoRaDeviceCache deviceCache, ILogger <JoinDeviceLoader> logger)
 {
     this.ioTHubDevice  = ioTHubDevice;
     this.deviceFactory = deviceFactory;
     this.deviceCache   = deviceCache;
     this.logger        = logger;
     this.canCache      = true;
 }
Esempio n. 3
0
 public LoRaDeviceFactory(NetworkServerConfiguration configuration,
                          ILoRaDataRequestHandler dataRequestHandler,
                          ILoRaDeviceClientConnectionManager connectionManager,
                          LoRaDeviceCache loRaDeviceCache,
                          ILoggerFactory loggerFactory,
                          ILogger <LoRaDeviceFactory> logger,
                          Meter meter)
 {
     this.configuration      = configuration;
     this.dataRequestHandler = dataRequestHandler;
     this.connectionManager  = connectionManager;
     this.loggerFactory      = loggerFactory;
     this.logger             = logger;
     this.meter           = meter;
     this.loRaDeviceCache = loRaDeviceCache;
 }
 internal DeviceLoaderSynchronizer(
     DevAddr devAddr,
     LoRaDeviceAPIServiceBase loRaDeviceAPIService,
     ILoRaDeviceFactory deviceFactory,
     NetworkServerConfiguration configuration,
     LoRaDeviceCache deviceCache,
     HashSet <ILoRaDeviceInitializer> initializers,
     ILogger <DeviceLoaderSynchronizer> logger)
 {
     this.loRaDeviceAPIService = loRaDeviceAPIService;
     this.deviceFactory        = deviceFactory;
     this.configuration        = configuration;
     this.devAddr         = devAddr;
     this.loraDeviceCache = deviceCache;
     this.initializers    = initializers;
     this.logger          = logger;
     this.state           = LoaderState.QueryingDevices;
     this.queueLock       = new object();
     this.queuedRequests  = new List <LoRaRequest>();
 }
 public LoRaDeviceRegistry(
     NetworkServerConfiguration configuration,
     IMemoryCache cache,
     LoRaDeviceAPIServiceBase loRaDeviceAPIService,
     ILoRaDeviceFactory deviceFactory,
     LoRaDeviceCache deviceCache,
     ILoggerFactory loggerFactory,
     ILogger <LoRaDeviceRegistry> logger)
 {
     this.configuration        = configuration;
     this.cache                = cache;
     this.loRaDeviceAPIService = loRaDeviceAPIService;
     this.deviceFactory        = deviceFactory;
     this.loggerFactory        = loggerFactory;
     this.logger               = logger;
     this.initializers         = new HashSet <ILoRaDeviceInitializer>();
     DevAddrReloadInterval     = TimeSpan.FromSeconds(30);
     this.getOrCreateLoadingDevicesRequestQueueLock = new object();
     this.getOrCreateJoinDeviceLoaderLock           = new object();
     this.deviceCache = deviceCache;
 }