public ValueStatistics() { LastProcessedTimestap = DateTime.UtcNow; statValues = new List<StatValue>(); statValues.Add(new StatValue(0, LastProcessedTimestap)); lastEvent = lastOn = lastOff = new StatValue(0, LastProcessedTimestap); historyValues = new TsList<StatValue>(); historyValues.Add(lastEvent); }
public ValueStatistics() { LastProcessedTimestap = DateTime.UtcNow; statValues = new List <StatValue>(); statValues.Add(new StatValue(0, LastProcessedTimestap)); lastEvent = lastOn = lastOff = new StatValue(0, LastProcessedTimestap); historyValues = new TsList <StatValue>(); historyValues.Add(lastEvent); }
public void ProgramAdd(ProgramBlock program) { automationPrograms.Add(program); program.EnabledStateChanged += program_EnabledStateChanged; program.Engine.SetHost(homegenie); RaiseProgramModuleEvent(program, Properties.ProgramStatus, "Added"); if (isEngineEnabled && program.IsEnabled) { program.Engine.StartScheduler(); } }
public void ProgramAdd(ProgramBlock program) { automationPrograms.Add(program); program.EnabledStateChanged += program_EnabledStateChanged; program.Engine.SetHost(homegenie); // Initialize state RaiseProgramModuleEvent(program, Properties.ProgramStatus, "Idle"); if (program.IsEnabled) { StartProgramEvaluator(program); } }
private Store GetStore(string storeName) { var store = storeList.Find(s => s.Name == storeName); // create store if does not exists if (store == null) { store = new Store(storeName); storeList.Add(store); } return(store); }
public ValueStatistics() { LastProcessedTimestap = DateTime.UtcNow; statValues = new List <StatValue>(); statValues.Add(new StatValue(0, LastProcessedTimestap)); lastEvent = lastOn = lastOff = new StatValue(0, LastProcessedTimestap); historyValues.Add(lastEvent); while (historyValues.Count > historyLimit) { historyValues.RemoveAt(historyValues.Count - 1); } }
public void ProgramAdd(ProgramBlock program) { program.SetHost(homegenie); automationPrograms.Add(program); program.EnabledStateChanged += program_EnabledStateChanged; // // in case of c# script preload assembly from generated .dll if (program.Type.ToLower() == "csharp" && !program.AssemblyLoad()) { program.ScriptErrors = "Program update is required."; } // // Initialize state RaiseProgramModuleEvent(program, Properties.PROGRAM_STATUS, "Idle"); if (program.IsEnabled) { StartProgramEvaluator(program); } }