Example #1
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for losssetup
                var tcdQ4 = from tcd in db.LOSSetups
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (LOSSetup tcd in tcdQ4)
                {
                    BsonDocument doc = buildLossSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for sensitivities
                var tcdQ = from tcd in db.RSSISetups
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (RSSISetup tcd in tcdQ)
                {
                    BsonDocument doc = buildRssiSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #2
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;
            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for losssetup
                var tcdQ4 = from tcd in db.LOSSetups
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (LOSSetup tcd in tcdQ4)
                {
                    BsonDocument doc = buildLossSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for sensitivities
                var tcdQ = from tcd in db.RSSISetups
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (RSSISetup tcd in tcdQ)
                {
                    BsonDocument doc = buildRssiSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return count;
        }
Example #3
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;
            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for channel data
                var tcdQ4 = from tcd in db.TxSetupChannelDatas
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (TxSetupChannelData tcd in tcdQ4)
                {
                    BsonDocument doc = buildSetupChannelData(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for matrix
                var tcdQ = from tcd in db.TxMatrices
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (TxMatrix tcd in tcdQ)
                {
                    BsonDocument doc = buildMatrix(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return count;
        }
Example #4
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp module VCC setup
                var tcdQ4 = from tcd in db.VCCSetups
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (VCCSetup tcd in tcdQ4)
                {
                    BsonDocument doc = buildVccSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp module power consumption test
                var tcdQ = from tcd in db.TempSetups
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (TempSetup tcd in tcdQ)
                {
                    BsonDocument doc = buildTempSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #5
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;
            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp module VCC setup
                var tcdQ4 = from tcd in db.VCCSetups
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (VCCSetup tcd in tcdQ4)
                {
                    BsonDocument doc = buildVccSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp module power consumption test
                var tcdQ = from tcd in db.TempSetups
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (TempSetup tcd in tcdQ)
                {
                    BsonDocument doc = buildTempSetup(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return count;
        }
Example #6
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for channel data
                var tcdQ4 = from tcd in db.TxSetupChannelDatas
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (TxSetupChannelData tcd in tcdQ4)
                {
                    BsonDocument doc = buildSetupChannelData(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for matrix
                var tcdQ = from tcd in db.TxMatrices
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (TxMatrix tcd in tcdQ)
                {
                    BsonDocument doc = buildMatrix(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #7
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;
            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for rxAmplitudeTest
                var tcdQ4 = from tcd in db.RxAmplitudeTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (RxAmplitudeTest tcd in tcdQ4)
                {
                    BsonDocument doc = buildRxAmplitudeTest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for sensitivities
                var tcdQ = from tcd in db.Sensitivities
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (Sensitivity tcd in tcdQ)
                {
                    BsonDocument doc = buildSensitivity(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for rssitests
                var tcdQ2 = from tcd in db.RSSITests
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (RSSITest tcd in tcdQ2)
                {
                    BsonDocument doc = buildRSSITest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for lostest
                var tcdQ3 = from tcd in db.LOSTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (LOSTest tcd in tcdQ3)
                {
                    BsonDocument doc = buildLOSTest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

            }
            return count;
        }
Example #8
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for rxAmplitudeTest
                var tcdQ4 = from tcd in db.RxAmplitudeTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (RxAmplitudeTest tcd in tcdQ4)
                {
                    BsonDocument doc = buildRxAmplitudeTest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for sensitivities
                var tcdQ = from tcd in db.Sensitivities
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (Sensitivity tcd in tcdQ)
                {
                    BsonDocument doc = buildSensitivity(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for rssitests
                var tcdQ2 = from tcd in db.RSSITests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (RSSITest tcd in tcdQ2)
                {
                    BsonDocument doc = buildRSSITest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp  for lostest
                var tcdQ3 = from tcd in db.LOSTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (LOSTest tcd in tcdQ3)
                {
                    BsonDocument doc = buildLOSTest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #9
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp module VCC test
                var tcdQ4 = from tcd in db.ModuleVccTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (ModuleVccTest tcd in tcdQ4)
                {
                    BsonDocument doc = buildVccTest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp module power consumption test
                var tcdQ = from tcd in db.ModulePowerConsumptionTests
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (ModulePowerConsumptionTest tcd in tcdQ)
                {
                    BsonDocument doc = buildPowerConsumption(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp module mSA temperature test
                var tcdQ2 = from tcd in db.ModuleMSATemperatureTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (ModuleMSATemperatureTest tcd in tcdQ2)
                {
                    BsonDocument doc = buildMSATemperature(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #10
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;
            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp module VCC test
                var tcdQ4 = from tcd in db.ModuleVccTests
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (ModuleVccTest tcd in tcdQ4)
                {
                    BsonDocument doc = buildVccTest(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp module power consumption test
                var tcdQ = from tcd in db.ModulePowerConsumptionTests
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (ModulePowerConsumptionTest tcd in tcdQ)
                {
                    BsonDocument doc = buildPowerConsumption(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }

                // Retrieve data updated after timestamp module mSA temperature test
                var tcdQ2 = from tcd in db.ModuleMSATemperatureTests
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (ModuleMSATemperatureTest tcd in tcdQ2)
                {
                    BsonDocument doc = buildMSATemperature(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return count;
        }
 public override int processTestData(DateTime start, DateTime end)
 {
     int count = 0;
     using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
     {
         // Retrieve data updated after timestamp  for channel data
         var tcdQ4 = from tcd in db.PowerCalBeforeTxSet
                     where tcd.Timestamp >= start && tcd.Timestamp < end
                     select tcd;
         foreach (KAIAM.DataAccess.PowerCalBeforeTx tcd in tcdQ4)
         {
             BsonDocument doc = buildPowerCal(tcd);
             saveDoc(doc);
             Application.DoEvents();
             count++;
         }
     }
     return count;
 }
Example #12
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp  for channel data
                var tcdQ4 = from tcd in db.PowerCheckAssemblySet
                            where tcd.TimeStamp >= start && tcd.TimeStamp < end
                            select tcd;
                foreach (KAIAM.DataAccess.PowerCheckAssembly tcd in tcdQ4)
                {
                    BsonDocument doc = buildPowerCal(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #13
0
 // Helper function to speed up DUT retrieval by caching it in the local dictionary
 public DUT getDUT(Guid dutId)
 {
     if (DUTs.ContainsKey(dutId))
     {
         return(DUTs[dutId]);
     }
     else
     {
         using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
         {
             var dut = (from d in db.DUTs where d.Id == dutId select d);
             if (dut.Any())
             {
                 DUTs.Add(dutId, dut.First());
                 return(dut.First());
             }
         }
     }
     return(null);
 }
Example #14
0
 // Helper function to speed up rack retrieval by caching it in the local dictionary
 public Rack getRack(Guid rackId)
 {
     if (racks.ContainsKey(rackId))
     {
         return(racks[rackId]);
     }
     else
     {
         using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
         {
             var rack = (from d in db.Racks where d.Id == rackId select d);
             if (rack.Any())
             {
                 racks.Add(rackId, rack.First());
                 return(rack.First());
             }
         }
     }
     return(null);
 }
Example #15
0
 // Helper function to speed up part family retrieval by caching it in the local dictionary
 private PartFamily getPartFamily(Guid partFamilyId)
 {
     if (partFamilies.ContainsKey(partFamilyId))
     {
         return(partFamilies[partFamilyId]);
     }
     else
     {
         using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
         {
             var partFamily = (from d in db.PartFamilySet where d.Id == partFamilyId select d);
             if (partFamily.Any())
             {
                 partFamilies.Add(partFamilyId, partFamily.First());
                 return(partFamily.First());
             }
         }
     }
     return(null);
 }
Example #16
0
        public override int processTestData(DateTime start, DateTime end)
        {
            int count = 0;

            using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
            {
                // Retrieve data updated after timestamp
                var tcdQ = from tcd in db.Packouts
                           where tcd.TimeStamp >= start && tcd.TimeStamp < end
                           select tcd;
                foreach (KAIAM.DataAccess.Packout tcd in tcdQ)
                {
                    BsonDocument doc = buildMongoObject(tcd);
                    saveDoc(doc);
                    Application.DoEvents();
                    count++;
                }
            }
            return(count);
        }
Example #17
0
 // Helper function to speed up DUT retrieval by caching it in the local dictionary
 public DUT getDUT(Guid dutId)
 {
     if (DUTs.ContainsKey(dutId))
     {
         return DUTs[dutId];
     }
     else
     {
         using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
         {
             var dut = (from d in db.DUTs where d.Id == dutId select d);
             if (dut.Any())
             {
                 DUTs.Add(dutId, dut.First());
                 return dut.First();
             }
         }
     }
     return null;
 }
Example #18
0
 // Helper function to speed up rack retrieval by caching it in the local dictionary
 public Rack getRack(Guid rackId)
 {
     if (racks.ContainsKey(rackId))
     {
         return racks[rackId];
     }
     else
     {
         using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
         {
             var rack = (from d in db.Racks where d.Id == rackId select d);
             if (rack.Any())
             {
                 racks.Add(rackId, rack.First());
                 return rack.First();
             }
         }
     }
     return null;
 }
Example #19
0
        // Helper function to speed up device retrieval by caching it in the local dictionary
        private Device getDevice(Guid deviceId, OutputPart outputPart)
        {
            if (devices.ContainsKey(deviceId))
            {
                return devices[deviceId];
            }
            else
            {
                using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
                {
                    var device = (from d in db.Devices where d.Id == deviceId select d);
                    if (device.Any())
                    {
                        Device dev = device.First();

                        if (outputPart != null && !outputParts.ContainsKey(outputPart.Id))
                        {
                            outputParts.Add(outputPart.Id, outputPart);
                        }
                        devices.Add(deviceId, device.First());

                        String cm = "Kaiam";
                        if (device.First().ContractManufacturer != null)
                        {
                            cm = device.First().ContractManufacturer.Name;
                        }
                        contrManufs.Add(deviceId, cm);

                        foreach (var br in device.First().BatchRequest.OrderBy(it => it.TimeStampRequested))
                        {
                            if (!batchRequests.ContainsKey(deviceId))
                            {
                                batchRequests.Add(deviceId, new List<_BatchRequest>());
                            }
                            batchRequests[deviceId].Add(new _BatchRequest { date = br.TimeStampRequested, name = br.Name });
                        }

                        // Deterimine tosa, rosa, pbda
                        try
                        {
                            if (device.First().AssemblyRecords.Any())
                            {
                                foreach (var assrec in device.First().AssemblyRecords)
                                {
                                    if (assrec.AssemblyItems.Any())
                                    {
                                        foreach (var assitm in assrec.AssemblyItems)
                                        {
                                            if (assitm != null && assitm.BOMItem != null && assitm.BOMItem.InfeedPart != null)
                                            {
                                                if (!tosarosas.ContainsKey(deviceId))
                                                {
                                                    tosarosas.Add(deviceId, new Dictionary<String, String>());
                                                }
                                                var asstype = assitm.BOMItem.InfeedPart.Name;
                                                var assnumber = assitm.SerialNumber;
                                                tosarosas[deviceId].Add(asstype, assnumber);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        catch (Exception exc)
                        {
                            Program.log("ERROR: TOSA ROSA " + exc.Message);
                        }

                        return device.First();
                    }
                }
            }
            return null;
        }
Example #20
0
 public override int processTestData(DateTime start, DateTime end)
 {
     int count = 0;
     using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
     {
         // Retrieve data updated after timestamp
         var tcdQ = from tcd in db.Packouts
                    where tcd.TimeStamp >= start && tcd.TimeStamp < end
                    select tcd;
         foreach (KAIAM.DataAccess.Packout tcd in tcdQ)
         {
             BsonDocument doc = buildMongoObject(tcd);
             saveDoc(doc);
             Application.DoEvents();
             count++;
         }
     }
     return count;
 }
Example #21
0
        // Helper function to speed up device retrieval by caching it in the local dictionary
        private Device getDevice(Guid deviceId, OutputPart outputPart)
        {
            if (devices.ContainsKey(deviceId))
            {
                return(devices[deviceId]);
            }
            else
            {
                using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
                {
                    var device = (from d in db.Devices where d.Id == deviceId select d);
                    if (device.Any())
                    {
                        Device dev = device.First();

                        if (outputPart != null && !outputParts.ContainsKey(outputPart.Id))
                        {
                            outputParts.Add(outputPart.Id, outputPart);
                        }
                        devices.Add(deviceId, device.First());

                        String cm = "Kaiam";
                        if (device.First().ContractManufacturer != null)
                        {
                            cm = device.First().ContractManufacturer.Name;
                        }
                        contrManufs.Add(deviceId, cm);

                        foreach (var br in device.First().BatchRequest.OrderBy(it => it.TimeStampRequested))
                        {
                            if (!batchRequests.ContainsKey(deviceId))
                            {
                                batchRequests.Add(deviceId, new List <_BatchRequest>());
                            }
                            batchRequests[deviceId].Add(new _BatchRequest {
                                date = br.TimeStampRequested, name = br.Name
                            });
                        }

                        // Deterimine tosa, rosa, pbda
                        try
                        {
                            if (device.First().AssemblyRecords.Any())
                            {
                                foreach (var assrec in device.First().AssemblyRecords)
                                {
                                    if (assrec.AssemblyItems.Any())
                                    {
                                        foreach (var assitm in assrec.AssemblyItems)
                                        {
                                            if (assitm != null && assitm.BOMItem != null && assitm.BOMItem.InfeedPart != null)
                                            {
                                                if (!tosarosas.ContainsKey(deviceId))
                                                {
                                                    tosarosas.Add(deviceId, new Dictionary <String, String>());
                                                }
                                                var asstype   = assitm.BOMItem.InfeedPart.Name;
                                                var assnumber = assitm.SerialNumber;
                                                tosarosas[deviceId].Add(asstype, assnumber);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        catch (Exception exc)
                        {
                            Program.log("ERROR: TOSA ROSA " + exc.Message);
                        }

                        return(device.First());
                    }
                }
            }
            return(null);
        }
Example #22
0
 // Helper function to speed up part family retrieval by caching it in the local dictionary
 private PartFamily getPartFamily(Guid partFamilyId)
 {
     if (partFamilies.ContainsKey(partFamilyId))
     {
         return partFamilies[partFamilyId];
     }
     else
     {
         using (KAIAMDataTestContainer db = new KAIAMDataTestContainer(Program.connString))
         {
             var partFamily = (from d in db.PartFamilySet where d.Id == partFamilyId select d);
             if (partFamily.Any())
             {
                 partFamilies.Add(partFamilyId, partFamily.First());
                 return partFamily.First();
             }
         }
     }
     return null;
 }