Example #1
0
        public RoutingInfo(
            IWriteData d,
            IMachineGroupName machineGroupName,
            IReadDataAccess readDb,
            IMazakLogReader logR,
            BlackMaple.MachineFramework.JobDB jDB,
            BlackMaple.MachineFramework.JobLogDB jLog,
            IWriteJobs wJobs,
            IQueueSyncFault queueSyncFault,
            IDecrementPlanQty decrement,
            bool check,
            BlackMaple.MachineFramework.FMSSettings settings)
        {
            writeDb              = d;
            readDatabase         = readDb;
            fmsSettings          = settings;
            jobDB                = jDB;
            logReader            = logR;
            log                  = jLog;
            _writeJobs           = wJobs;
            _decr                = decrement;
            _machineGroupName    = machineGroupName;
            queueFault           = queueSyncFault;
            CheckPalletsUsedOnce = check;

            _copySchedulesTimer          = new System.Timers.Timer(TimeSpan.FromMinutes(4.5).TotalMilliseconds);
            _copySchedulesTimer.Elapsed += (sender, args) => RecopyJobsToSystem();
            _copySchedulesTimer.Start();
        }
Example #2
0
 public LogDataWeb(string path,
                   BlackMaple.MachineFramework.JobLogDB log,
                   BlackMaple.MachineFramework.JobDB jobDB,
                   BlackMaple.MachineFramework.ISendMaterialToExternalQueue sendToExternal,
                   IReadDataAccess readDB,
                   MazakQueues queues,
                   BlackMaple.MachineFramework.FMSSettings settings)
 {
     _path           = path;
     _log            = log;
     _jobDB          = jobDB;
     _readDB         = readDB;
     _queues         = queues;
     _settings       = settings;
     _sendToExternal = sendToExternal;
     _shutdown       = new AutoResetEvent(false);
     _newLogFile     = new AutoResetEvent(false);
     _recheckQueues  = new AutoResetEvent(false);
     if (System.IO.Directory.Exists(path))
     {
         _thread = new Thread(new ThreadStart(ThreadFunc));
         _thread.Start();
         _watcher          = new FileSystemWatcher(_path);
         _watcher.Filter   = "*.csv";
         _watcher.Created += (sender, evt) =>
                             _newLogFile.Set();
         //_watcher.Changed += (sender, evt) => _newLogFile.Set();
         _watcher.EnableRaisingEvents = true;
         Log.Debug("Watching {path} for new CSV files", _path);
     }
 }
Example #3
0
 public LogDataVerE(BlackMaple.MachineFramework.JobLogDB log,
                    BlackMaple.MachineFramework.JobDB jobDB,
                    BlackMaple.MachineFramework.ISendMaterialToExternalQueue send,
                    IReadDataAccess readDB,
                    MazakQueues queues,
                    BlackMaple.MachineFramework.FMSSettings settings)
 {
     _log            = log;
     _jobDB          = jobDB;
     _readDB         = readDB;
     _queues         = queues;
     _sendToExternal = send;
     FMSSettings     = settings;
     _lock           = new object();
     _timer          = new System.Timers.Timer(TimeSpan.FromMinutes(1).TotalMilliseconds);
     _timer.Elapsed += HandleElapsed;
     _timer.Start();
 }
Example #4
0
        public MakinoDB(DBTypeEnum dbType, string dbConnStr, StatusDB status,
                        BlackMaple.MachineFramework.JobLogDB log)
        {
            _status = status;
            _logDb  = log;
            switch (dbType)
            {
            case DBTypeEnum.SqlLocal:
                _db = new System.Data.SqlClient.SqlConnection("Data Source = (localdb)\\MSSQLLocalDB; Initial Catalog = Makino;");
                _db.Open();
                dbo = "dbo.";
                break;

            case DBTypeEnum.SqlConnStr:
                _db = new System.Data.SqlClient.SqlConnection(dbConnStr);
                _db.Open();
                dbo = "dbo.";
                break;
            }
        }
Example #5
0
 public MakinoToJobMap(BlackMaple.MachineFramework.JobLogDB log)
 {
     _logDb = log;
 }