コード例 #1
0
        public void InitiateSystemExecution()
        {
            _logger.Information($"Starting execution, logging to {_dataLogFile}");
            var cdb = new CementDataServices(_dataHandle);

            _execute = new ExecuteLoading(cdb, _handlerRs232WeigthScale, _handlerRs232PowerSupply);
            _execute.CementLoadFinished += CompletedLoad;
        }
コード例 #2
0
        public ExecuteLoading(CementDataServices dbServices, HandlerRs232WeigthScale handlerRs232WeigthScale, HandlerRs232PowerSupply handlerRs232PowerSupply)
        {
            _dbServices = dbServices;
            _handlerRs232WeigthScale = handlerRs232WeigthScale;
            _handlerRs232PowerSupply = handlerRs232PowerSupply;
            _avgBuffer      = new Buffer <double>(_numReadingsForAverage);
            _executionState = ExecutionState.Init;

            _logger.Information($"Average taken over {_numReadingsForAverage} readings");
        }
コード例 #3
0
        public void SaveCementDataTest()
        {
            DataFileHandle     dataFileHandle     = new DataFileHandle(@"c:/temp/dataFile.csv");
            CementDataServices cementDataServices = new CementDataServices(dataFileHandle);

            CementData c1 = new CementData("Hole", 1.10, 1.10, ExecutionState.Loading, 2.20, 3.30, 4.40, 5.50);
            CementData c2 = new CementData("Hole", 1.11, 1.10, ExecutionState.Loading, 2.21, 3.31, 4.41, 5.51);
            CementData c3 = new CementData("Hole", 1.12, 1.10, ExecutionState.Loading, 2.22, 3.32, 4.42, 5.52);

            cementDataServices.SaveCementData(c1);
            cementDataServices.SaveCementData(c2);
            cementDataServices.SaveCementData(c3);

            dataFileHandle.Close();
        }