public void Refresh()
        {
            IKingpinState toProcess = Model?.KingpinState;

            if (toProcess != null)
            {
                Alias     = toProcess.Alias;
                ipAddress = toProcess.IPAddress;
                IsVirtual = toProcess.IsVirtual;

                CurrentMovementType = toProcess.CurrentMovementType;

                X       = toProcess.X;
                Y       = toProcess.Y;
                Heading = toProcess.Heading;

                DynamicLimiterStatus  = toProcess.DynamicLimiterStatus;
                NavigationStatus      = toProcess.NavigationStatus;
                PositionControlStatus = toProcess.PositionControlStatus;
                IsInFault             = toProcess.IsInFault();
            }
            else
            {
                Alias     = string.Empty;
                IPAddress = null;
                IsVirtual = false;

                CurrentMovementType = MovementType.Stationary;

                X       = float.NaN;
                Y       = float.NaN;
                Heading = float.NaN;

                DynamicLimiterStatus  = DynamicLimiterStatus.Unknown;
                NavigationStatus      = NavigationStatus.Unknown;
                PositionControlStatus = PositionControlStatus.Unknown;
                IsInFault             = false;
            }
        }
Пример #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            IKingpinState kingpinState = value as IKingpinState;

            return(kingpinState.IsInFault());
        }