コード例 #1
0
 public SignalFeatures(string mainHeadSignalTypeName, TrackMonitorSignalAspect aspect, float distance, float speedLimit, float altitude)
 {
     MainHeadSignalTypeName = mainHeadSignalTypeName;
     Aspect     = aspect;
     Distance   = distance;
     SpeedLimit = speedLimit;
     Altitude   = altitude;
 }
コード例 #2
0
        // field validity :
        // if ItemType == SIGNAL :
        //      SignalState
        //      AllowedSpeedMpS if value > 0
        //      DistanceToTrainM
        //      Signal
        //
        // if ItemType == SPEEDPOST :
        //      AllowedSpeedMpS
        //      DistanceToTrainM
        //
        // if ItemType == STATION :
        //      DistanceToTrainM
        //
        // if ItemType == AUTHORITY :
        //      AuthorityType
        //      DistanceToTrainM
        //
        // if ItemType == REVERSAL :
        //      DistanceToTrainM
        //
        // if ItemType == OUTOFCONTROL :
        //      OutOfControlReason
        //
        // if ItemType == GENERIC_SIGNAL :
        //      DistanceToTrainM
        //      Signal


        //================================================================================================//
        /// <summary>
        /// Constructors
        /// <\summary>

        // Constructor for Signal
        public TrainPathItem(TrackMonitorSignalAspect aspect, float speed, float distance, Signal signal)
        {
            ItemType         = TrainPathItemType.Signal;
            AuthorityType    = EndAuthorityType.NoPathReserved;
            SignalState      = aspect;
            AllowedSpeedMpS  = speed;
            DistanceToTrainM = distance;
            Signal           = signal;
        }