Beispiel #1
0
        public static AlarmDataSet CreateInstance(TimeSeriesDatabase db)
        {
            Logger.WriteLine("AlarmDataSet.CreateInstance(" + db.Server.Name + ")");
            var rval = new AlarmDataSet();

            rval.m_server = db.Server;
            rval.m_db     = db;
            return(rval);
        }
Beispiel #2
0
        public static AlarmDataSet CreateInstance(BasicDBServer server = null)
        {
            AlarmDataSet rval;

            if (server == null)
            { // create from config files.
                var db = TimeSeriesDatabase.InitDatabase(new Arguments(new string[] { }));
                rval          = new AlarmDataSet();
                rval.m_server = db.Server;
            }
            else
            {// create using server
                rval          = new AlarmDataSet();
                rval.m_server = server;
            }
            return(rval);
        }
Beispiel #3
0
 public AlarmManager(TimeSeriesDatabase db)
 {
     m_server = db.Server;;
     alarmDS  = AlarmDataSet.CreateInstance(db);
 }
Beispiel #4
0
 private void LogDetails(AlarmDataSet.alarm_phone_queueRow alarm)
 {
     var tbl = alarm.Table;
     for (int c = 0; c < tbl.Columns.Count; c++)
     {
         Logger.WriteLine(tbl.Columns[c].ColumnName + ": " + alarm[c].ToString());
     }
 }
Beispiel #5
0
 private static void UpdatePiscesStatus(AlarmDataSet.alarm_phone_queueRow alarm)
 {
     alarm.status = Asterisk.Status;
     alarm.status_time = Asterisk.StatusTime;
     alarm.confirmed_by = Asterisk.ConfirmedBy;
 }