using System.Linq; using Microsoft.AspNet.SignalR; using System.Collections.Generic; using WeatherService.Devices; using WeatherService.Remote; using WeatherService.Values; namespace WeatherService.SignalR { public class WeatherHub : Hub { public List GetDevices() { return WeatherServiceCommon.GetDevices(); } public ReadingBase GetLatestReading(string deviceAddress, WeatherValueType valueType) { return WeatherServiceCommon.GetLatestReading(deviceAddress, valueType); } public DeviceHistory GetDeviceHistory(string deviceAddress) { return WeatherServiceCommon.GetDeviceHistory(deviceAddress); } public List>> GetDeviceHistoryByValueType(WeatherValueType valueType) { return WeatherServiceCommon.GetDeviceHistoryByValueType(valueType).ToList(); } public List>> GetWindSpeedHistory(int groupIntervalMinutes) { return WeatherServiceCommon.GetWindSpeedHistory(groupIntervalMinutes).ToList(); } public List> GetWindDirectionHistory() { return WeatherServiceCommon.GetWindDirectionHistory().ToList(); } } }