Exemplo n.º 1
0
 public LogTranslation(BlackMaple.MachineFramework.JobDB jDB,
                       BlackMaple.MachineFramework.JobLogDB logDB,
                       MazakSchedulesAndLoadActions mazakSch,
                       BlackMaple.MachineFramework.FMSSettings settings,
                       Action <LogEntry> onMazakLogMessage)
 {
     _jobDB          = jDB;
     _log            = logDB;
     _mazakSchedules = mazakSch;
     _settings       = settings;
     _onMazakLog     = onMazakLogMessage;
     _jobs           = new Dictionary <string, JobPlan>();
 }
Exemplo n.º 2
0
        public WriteJobs(
            IWriteData d,
            IReadDataAccess readDb,
            IHoldManagement h,
            BlackMaple.MachineFramework.JobDB jDB,
            BlackMaple.MachineFramework.JobLogDB jLog,
            FMSSettings settings,
            bool check,
            bool useStarting,
            string progDir
            )
        {
            writeDb                     = d;
            readDatabase                = readDb;
            hold                        = h;
            jobDB                       = jDB;
            log                         = jLog;
            CheckPalletsUsedOnce        = check;
            UseStartingOffsetForDueDate = useStarting;
            fmsSettings                 = settings;
            ProgramDirectory            = progDir;

            var sch = jobDB.LoadMostRecentSchedule();

            if (sch.Jobs != null)
            {
                foreach (var j in sch.Jobs)
                {
                    for (int proc = 1; proc <= j.NumProcesses; proc++)
                    {
                        for (int path = 1; path <= j.GetNumPaths(proc); path++)
                        {
                            foreach (var stop in j.GetMachiningStop(proc, path))
                            {
                                if (!string.IsNullOrEmpty(stop.StationGroup))
                                {
                                    _machineGroupName = stop.StationGroup;
                                    goto foundGroup;
                                }
                            }
                        }
                    }
                }
                foundGroup :;
            }
        }
Exemplo n.º 3
0
 public WriteJobs(
     IWriteData d,
     IReadDataAccess readDb,
     IHoldManagement h,
     BlackMaple.MachineFramework.JobDB jDB,
     BlackMaple.MachineFramework.JobLogDB jLog,
     FMSSettings settings,
     bool check,
     bool useStarting
     )
 {
     writeDb                     = d;
     readDatabase                = readDb;
     hold                        = h;
     jobDB                       = jDB;
     log                         = jLog;
     CheckPalletsUsedOnce        = check;
     UseStartingOffsetForDueDate = useStarting;
     fmsSettings                 = settings;
 }