예제 #1
0
        public void TestSeclureCloudStorge()
        {
            var st = new SeclureCloudStorge();
            var r  = new List <SensorAcqResult>();
            var s  = NewSensor(28);

            s.FactorTypeTable = "T_THEMES_DEFORMATION_CRACK";
            SensorData d = new SensorData(new double[] { 0.2 }, new double[] { 2.5 }, new double[] { 2.5 });

            r.Add(new SensorAcqResult {
                AcqTime = DateTime.Now, ErrorCode = (int)Errors.SUCCESS, Data = d, Sensor = s
            });

            s = NewSensor(36);
            s.FactorTypeTable = "T_THEMES_ENVI_SEEPAGE";
            d = new SensorData(new double[] { 23 }, new double[] { 23 }, new double[] { 23 });
            r.Add(new SensorAcqResult {
                AcqTime = DateTime.Now, ErrorCode = (int)Errors.SUCCESS, Data = d, Sensor = s
            });

            s = NewSensor(12);
            s.FactorTypeTable = "T_THEMES_STRESS_STRAIN_PORE_WATER_PRESSURE";
            d = new SensorData(new double[] { 23 }, new double[] { 23 }, new double[] { 23 });
            r.Add(new SensorAcqResult
            {
                AcqTime   = DateTime.Now,
                ErrorCode = (int)Errors.SUCCESS,
                Data      = d,
                Sensor    = s
            });

            st.ProcessResult(r);
        }
예제 #2
0
        public void TestSeclureCloudStorge()
        {
            var st = new SeclureCloudStorge();
            var r  = new DACTaskResult();
            var s  = NewSensor(ProtocolType.Voltage, SafetyFactor.DeformationCrack);

            s.FactorTypeTable = "T_THEMES_DEFORMATION_CRACK";
            ISensorData d = new VoltageData(0.2, 2.5)
            {
                //AcqTime = DateTime.Now,
                //ResultCode = 0,
                //Sensor = s
            };

            r.AddSensorResult(new SensorAcqResult
            {
                ErrorCode = (int)Errors.SUCCESS,
                Data      = d,
                Sensor    = s
            });

            s = NewSensor(ProtocolType.Pressure_MPM, SafetyFactor.Seepage);
            s.FactorTypeTable = "T_THEMES_ENVI_SEEPAGE";
            d = new SeepageData(23)
            {
                //AcqTime = DateTime.Now,
                //ResultCode = 0,
                //Sensor = s
            };
            r.AddSensorResult(new SensorAcqResult
            {
                ErrorCode = (int)Errors.SUCCESS,
                Data      = d,
                Sensor    = s
            });

            s = NewSensor(ProtocolType.Pressure_MPM, SafetyFactor.StressStrainPoreWaterPressure);
            s.FactorTypeTable = "T_THEMES_STRESS_STRAIN_PORE_WATER_PRESSURE";
            d = new PressureData(23, 23)
            {
                //AcqTime = DateTime.Now,
                //ResultCode = 0,
                //Sensor = s
            };
            r.AddSensorResult(new SensorAcqResult
            {
                ErrorCode = (int)Errors.SUCCESS,
                Data      = d,
                Sensor    = s
            });
            r.Finished = DateTime.Now;
            r.Task     = new DACTask()
            {
                DtuID = 2,
            };
            r.DtuCode = "20150202";
            st.ProcessResult(r);
        }