Пример #1
0
        /// <summary>
        /// Handles a specific set of events that cause modifications to the epoch state, such as positioning
        /// technology, machine start/stop events and map resets
        /// </summary>
        /// <param name="eventType"></param>
        /// <returns></returns>
        public override bool DoEpochStateEvent(EpochStateEvent eventType)
        {
            switch (eventType)
            {
            case EpochStateEvent.MachineStartup:
                if (_DataTime != Consts.MIN_DATETIME_AS_UTC)
                {
                    MachineTargetValueChangesAggregator.MachineStartupShutdownEvents.PutValueAtDate(_DataTime, ProductionEventType.StartEvent);
                }
                break;

            case EpochStateEvent.MachineShutdown:
                if (_DataTime != Consts.MIN_DATETIME_AS_UTC)
                {
                    MachineTargetValueChangesAggregator.MachineStartupShutdownEvents.PutValueAtDate(_DataTime, ProductionEventType.EndEvent);
                }
                break;

            case EpochStateEvent.MachineMapReset:
                // Todo: Map reset events not implemented yet
                //if (_DataTime != Consts.MIN_DATETIME_AS_UTC)
                //MachineTargetValueChangesAggregator.MapResetEvents.PutValueAtDate(_DataTime, Design);
                break;

            case EpochStateEvent.MachineInUTSMode:
                if (_DataTime != Consts.MIN_DATETIME_AS_UTC)
                {
                    PositioningTech = PositioningTech.UTS;
                    MachineTargetValueChangesAggregator.PositioningTechStateEvents.PutValueAtDate(_DataTime, PositioningTech);
                }
                break;

            default:
                throw new TRexTAGFileProcessingException($"Unknown epoch state event type: {eventType}");
            }

            return(true);
        }
Пример #2
0
        public override bool DoEpochStateEvent(EpochStateEvent eventType)
        {
            TriggeredEpochStateEvent = eventType;

            return(base.DoEpochStateEvent(eventType));
        }