示例#1
0
        public async Task <EnvironmentMonitorSensorReading> GetSensor(string sensorip, string sensorname)
        {
            EnvironmentMonitorReading reading = await _service.GetReading($"http://{sensorip}/");;

            foreach (EnvironmentMonitorSensorReading sensor in reading.Sensors)
            {
                if (sensor.Name.Equals(sensorname, StringComparison.InvariantCultureIgnoreCase))
                {
                    return(sensor);
                }
            }

            return(new EnvironmentMonitorSensorReading());
        }
示例#2
0
        public async Task <EnvironmentMonitorSystem> GetSystem(string sensorip)
        {
            EnvironmentMonitorReading reading = await _service.GetReading($"http://{sensorip}/");;

            return(reading.System);
        }