public DevicesController( IDeviceCommunicationService deviceCommunicationService, DeviceCommunicationExtJsWeb.GpsCommunicationService.IGpsCommunicationContract gpsCommunicationContract, IDeviceRepository deviceRepository, IPacketRepository packetRepository, IEventRepository eventRepository, ICurrentEventRepository currentEventRepository, IRequstAckCommandRepository requstAckCommandRepository, ICacheDataRepository cacheDataRepository, IDeviceStateDocuments deviceStateDocuments, IDailyMileageRepository dailyMileageRepository, IGeoPointRepository geoPointRepository, ILogDocuments logDocuments) { DeviceCommunicationService = deviceCommunicationService; DeviceRepository = deviceRepository; PacketRepository = packetRepository; EventRepository = eventRepository; CurrentEventRepository = currentEventRepository; RequstAckCommandRepository = requstAckCommandRepository; CacheDataRepository = cacheDataRepository; DeviceStateDocuments = deviceStateDocuments; GpsCommunicationContract = gpsCommunicationContract; DailyMileageRepository = dailyMileageRepository; GeoPointRepository = geoPointRepository; LogDocuments = logDocuments; }
public ReadBatteryAndFirmwareCommand(ILogger <ReadBatteryAndFirmwareCommand> logger, IDeviceLockManager deviceLockManager, DatabaseContext databaseContext, IDeviceCommunicationService deviceService, IJobManager jobManager, IJobCancellationToken cancellationToken) { this.logger = logger; this.deviceLockManager = deviceLockManager; this.databaseContext = databaseContext; this.deviceService = deviceService; this.jobManager = jobManager; this.cancellationToken = cancellationToken.ShutdownToken; }
public DetectSensorCommand(ILogger <DetectSensorCommand> logger, IDeviceCommunicationService deviceService, IDeviceLockManager deviceLockManager, DatabaseContext databaseContext, LogEntryHandler logEntryHandler, IJobCancellationToken cancellationToken) { this.logger = logger; this.deviceLockManager = deviceLockManager; this.databaseContext = databaseContext; this.logEntryHandler = logEntryHandler; this.deviceService = deviceService; this.cancellationToken = cancellationToken.ShutdownToken; }
public DetectDeviceCommand(ILogger <DetectDeviceCommand> logger, IDeviceLockManager deviceLockManager, DatabaseContext databaseContext, IDeviceCommunicationService deviceService, IOptions <JsonOptions> options, LogEntryHandler logEntryHandler, IJobCancellationToken cancellationToken) { this.logger = logger; this.databaseContext = databaseContext; this.deviceService = deviceService; this.logEntryHandler = logEntryHandler; this.deviceLockManager = deviceLockManager; this.jsonSerializerOptions = options.Value.JsonSerializerOptions; this.cancellationToken = cancellationToken.ShutdownToken; }
public static Task <DeviceInfo> GetDeviceInfoAsync(this IDeviceCommunicationService deviceCommunicationService, Device device, CancellationToken cancellationToken = default) => deviceCommunicationService.GetDeviceInfoAsync(new IPEndPoint(IPAddress.Parse(device.IPAddress), device.Port), cancellationToken);
public static Task <ValuesInfo> GetValuesAsync(this IDeviceCommunicationService deviceCommunicationService, Device device, string sensorAddress, CancellationToken cancellationToken = default) => deviceCommunicationService.GetValuesAsync(new IPEndPoint(IPAddress.Parse(device.IPAddress), device.Port), sensorAddress, cancellationToken);
public static Task <IEnumerable <SensorInfo> > ScanAsync(this IDeviceCommunicationService deviceCommunicationService, Device device, CancellationToken cancellationToken = default) => deviceCommunicationService.ScanAsync(new IPEndPoint(IPAddress.Parse(device.IPAddress), device.Port), cancellationToken);