Пример #1
0
 public MeterDataSet()
 {
     m_resources     = new Dictionary <Type, object>();
     m_configuration = new ConfigurationDataSet();
     m_dataSeries    = new List <DataSeries>();
     m_digitals      = new List <DataSeries>();
 }
Пример #2
0
        public MeterDataSet(Event evt)
        {
            Resources            = new Dictionary <Type, object>();
            Configuration        = new ConfigurationDataSet();
            DataSeries           = new List <DataSeries>();
            Digitals             = new List <DataSeries>();
            ReportedDisturbances = new List <ReportedDisturbance>();

            using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
            {
                Meter = (new TableOperations <Meter>(connection)).QueryRecordWhere("ID = {0}", evt.MeterID);
                Meter.ConnectionFactory = () => new AdoDataConnection("systemSettings");
                CreateDbConnection      = () => new AdoDataConnection("systemSettings");
                ConnectionString        = string.Empty;
                FilePath  = (new TableOperations <DataFile>(connection)).QueryRecordWhere("FileGroupID = {0}", evt.FileGroupID).FilePath;
                FileGroup = (new TableOperations <FileGroup>(connection)).QueryRecordWhere("ID = {0}", evt.FileGroupID);
                Configuration.LineLength = (new TableOperations <Line>(connection)).QueryRecordWhere("ID = {0}", evt.LineID).Length;
                Configuration.X0         = (new TableOperations <LineImpedance>(connection)).QueryRecordWhere("LineID = {0}", evt.LineID)?.X0;
                Configuration.X1         = (new TableOperations <LineImpedance>(connection)).QueryRecordWhere("LineID = {0}", evt.LineID)?.X1;
                Configuration.R0         = (new TableOperations <LineImpedance>(connection)).QueryRecordWhere("LineID = {0}", evt.LineID)?.R0;
                Configuration.R1         = (new TableOperations <LineImpedance>(connection)).QueryRecordWhere("LineID = {0}", evt.LineID)?.R1;
                DataGroup dataGroup = ToDataGroup((new TableOperations <EventData>(connection)).QueryRecordWhere("ID = {0}", evt.EventDataID).TimeDomainData);
                DataSeries = dataGroup.DataSeries.Where(ds => ds.SeriesInfo.Channel.MeasurementType.Name != "Digital").ToList();
                Digitals   = dataGroup.DataSeries.Where(ds => ds.SeriesInfo.Channel.MeasurementType.Name == "Digital").ToList();
            }
        }
Пример #3
0
 public MeterDataSet()
 {
     Resources            = new Dictionary <Type, object>();
     Configuration        = new ConfigurationDataSet();
     DataSeries           = new List <DataSeries>();
     Digitals             = new List <DataSeries>();
     ReportedDisturbances = new List <ReportedDisturbance>();
 }
Пример #4
0
 public MeterDataSet()
 {
     m_resources             = new Dictionary <Type, object>();
     m_configuration         = new ConfigurationDataSet();
     m_dataSeries            = new List <DataSeries>();
     m_digitals              = new List <DataSeries>();
     m_disturbanceStatistics = new List <ReportedDisturbance>();
 }