public static SlicesQuery GetEmulError(int address) { SlicesQuery result = new SlicesQuery(); result.Month = 13; result.Day = 1; result.Index = 0; result.Address = address; result.EmulError = true; return(result); }
public static SlicesQuery From(DateTimeZone timeSlices, int address) { SlicesQuery result = new SlicesQuery(); timeSlices = timeSlices.AddMinutes(-30); //Это надо для правельной адрессации грана result.Month = (byte)timeSlices.Month; result.Day = (byte)timeSlices.Day; result.Index = (byte)(timeSlices.Hour * 2 + (int)((timeSlices.Minute == 0) ? 0 : 1)); result.Address = address; result.TimeSlices = timeSlices; return(result); }