Esempio n. 1
0
        public async Task OnWeatherData(SensorData data)
        {
            if (this.SensorInfo == null) return;
            var o = new SensorClientData(this.SensorInfo, data);

            //Tell monitors about the new data (not the sensors)
            await this.InvokeTo<Monitor>(p => p.ClientType == ClientType.Monitor && p.TempThreshold < o.Temperature, o, "wd");

            await this.ScaleOut(o, "swd");

            //Store data on Azure Storage
            await this.StorageSet(o.SensorId, o);
        }
Esempio n. 2
0
 public async Task OnWeatherData(SensorClientData data)
 {
     await this.InvokeTo<Monitor>(p => p.ClientType == ClientType.Monitor && p.TempThreshold < data.Temperature, data, "wd");
 }