Ejemplo n.º 1
0
        public UC7S3_Filter(BlockingCollection <double> filterCollection, IData dataInterface, ConvertAlgo conv)
        {
            _filterCollection = filterCollection;
            DataInterface     = dataInterface;

            convertAlgo  = conv;
            BPFilterList = new List <double>();

            GraphFiltredList = new List <double>();
            BPRawList        = new List <double>();
        }
Ejemplo n.º 2
0
        public DataTreatment(BlockingCollection <RawData> collection, ConvertAlgo conv) //Database data
        {
            _collection      = collection;
            ConvertAlgorithm = conv;
            // Database = data;

            FullList           = new List <RawData>();
            ConvertedDataList  = new List <ConvertedData>();
            DownsampledRawList = new List <RawData>();
            GraphList          = new List <ConvertedData>();
        }
Ejemplo n.º 3
0
        public UC7S3_Filter(BlockingCollection <ConvertedData> filterCollection, DataTreatment datatreatment, IData dataInterface, ConvertAlgo conv)
        {
            _filterCollection = filterCollection;
            datatreatment_    = datatreatment;
            DataInterface     = dataInterface;

            convertAlgo  = conv;
            BPFilterList = new List <ConvertedData>();
            FilterThread = new Thread(FilterData);

            GraphFiltredList = new List <ConvertedData>();
        }
Ejemplo n.º 4
0
        public Form1()
        {
            BlockingCollection <RawData> rawData = new BlockingCollection <RawData>();
            DAQ daq = new DAQ();

            converter = new ConvertAlgo();
            IDAQ transducerdaq = new TransducerDAQ(daq, rawData);

            dataTreatment = new DataTreatment(rawData, converter);
            Measure       = new UC2M2_UC3M3_Measure(transducerdaq, dataTreatment);
            InitializeComponent();
            dataTreatment.Attach(this); // Lars
            GUIgraphList = new List <ConvertedData>();
        }
Ejemplo n.º 5
0
        //
        //

        //public DataTreatment(BlockingCollection<RawData> collection, BlockingCollection<RawData> graphCollection,BlockingCollection<RawData> filterCollection, IData iData, ConvertAlgo conv)
        public DataTreatment(BlockingCollection <RawData> collection, BlockingCollection <RawData> graphCollection, IData iData, ConvertAlgo conv, IZeroAdjustment zeroAdjustment)
        {
            _collection      = collection;
            _graphCollection = graphCollection;
            //_filterCollection = filterCollection;

            DataInterface       = iData;
            AdjustmentInterface = zeroAdjustment;

            ConvertAlgorithm = conv;

            FullList           = new List <RawData>();
            DownsampledRawList = new List <RawData>();
            GraphList          = new List <ConvertedData>();
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            BlockingCollection <RawData> rawCollection   = new BlockingCollection <RawData>();
            BlockingCollection <RawData> graphCollection = new BlockingCollection <RawData>();
            DAQ         daq         = new DAQ();
            ConvertAlgo convertAlgo = new ConvertAlgo();

            IDAQ          transducerdaq = new TransducerDAQ(daq, rawCollection);
            DataTreatment dataTreatment = new DataTreatment(rawCollection, graphCollection, convertAlgo, );
            IMeasure      measurement   = new UC2M2_UC3M3_Measure(transducerdaq, dataTreatment);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainGUI(dataTreatment));
        }
Ejemplo n.º 7
0
        static void Main()
        {
            BlockingCollection <double> rawCollection         = new BlockingCollection <double>();
            BlockingCollection <double> graphCollection       = new BlockingCollection <double>();
            BlockingCollection <double> calibrationCollection = new BlockingCollection <double>();
            BlockingCollection <double> alarmCollection       = new BlockingCollection <double>();
            BlockingCollection <double> filterCollection      = new BlockingCollection <double>();

            DAQ               daq         = new DAQ();
            ConvertAlgo       convertAlgo = new ConvertAlgo();
            BloodPressureAlgo bpAlgo      = new BloodPressureAlgo();
            PulseAlgo         pulseAlgo   = new PulseAlgo();

            IDAQ       transducerdaq = new TransducerDAQ(daq, rawCollection, calibrationCollection);
            IData      data          = new Database();
            IAlarmType alarmType     = new HighAlarm();
            ILimits    limits        = new UC9S5_Limits();


            IAlarm  alarm                      = new UC5S1_Alarm(alarmCollection, limits, alarmType, bpAlgo);
            IFilter filter                     = new UC7S3_Filter(filterCollection, data, convertAlgo);
            UC1M1_ZeroAdjustment uc1           = new UC1M1_ZeroAdjustment(calibrationCollection, transducerdaq);
            DataTreatment        dataTreatment = new DataTreatment(rawCollection, graphCollection, filterCollection, alarmCollection, convertAlgo, data, alarm, uc1);
            IMeasure             measurement   = new UC2M2_UC3M3_Measure(transducerdaq, dataTreatment, alarm, filter);
            ICalibrate           calibrate     = new UC6S2_Calibrate(calibrationCollection, transducerdaq, data);
            IZeroAdjustment      zero          = new UC1M1_ZeroAdjustment(calibrationCollection, transducerdaq);
            IPulse pulse = new UC8S4_Pulse(dataTreatment, pulseAlgo);
            ISave  save  = new UC4M4_SaveData(data, dataTreatment);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ZeroAdjustmentGUI   zeroAdjustment = new ZeroAdjustmentGUI(zero);
            CalibrateGUI        calibrateGUI   = new CalibrateGUI(calibrate, measurement);
            LoginToCalibrateGUI login          = new LoginToCalibrateGUI(calibrateGUI);
            SaveDataGUI         saveGUI        = new SaveDataGUI(save);
            ChangeLimitsGUI     limitsGUI      = new ChangeLimitsGUI(limits);
            MainGUI             gui            = new MainGUI(dataTreatment, measurement, login, zeroAdjustment, alarm, pulse, bpAlgo, filter, saveGUI, limitsGUI, calibrateGUI);

            Application.Run(gui);
        }
Ejemplo n.º 8
0
        //
        //

        //public DataTreatment(BlockingCollection<RawData> collection, BlockingCollection<RawData> graphCollection, BlockingCollection<RawData> filterCollection, IData iData, ConvertAlgo conv)
        public DataTreatment(BlockingCollection <double> collection, BlockingCollection <double> graphCollection, BlockingCollection <double> filterCollection,
                             BlockingCollection <double> alarmCollection, ConvertAlgo conv, IData data, IAlarm alarm, UC1M1_ZeroAdjustment adj)
        {
            _collection       = collection;
            _graphCollection  = graphCollection;
            _filterCollection = filterCollection;
            _alarmCollection  = alarmCollection;

            DataInterface = data;
            //_filterCollection = filterCollection;
            AlarmController      = alarm;
            AdjustmentController = adj;


            //DataInterface = iData;
            ConvertAlgorithm = conv;

            FullList           = new List <double>();
            DownsampledRawList = new List <double>();
            GraphList          = new List <double>();
            PulseList          = new List <double>();
        }