Beispiel #1
0
        //public static Signal Constant(IContext context, ValueStructure value)
        //{
        //    Signal s = new Signal(context, value);
        //    s.Label = "Constant_" + value.ToString();
        //    s.AddConstraint(Properties.ConstantSignalProperty.Instance);
        //    return s;
        //}

        public static bool IsConstant(Signal signal)
        {
            if (signal == null)
            {
                throw new ArgumentNullException("signal");
            }

            return(signal.AskForFlag(StdAspect.ConstantFlag) == FlagState.Enabled);
            //return signal.AskForProperty("Constant", "Std");
        }
Beispiel #2
0
        //public static Signal Constant(IContext context, ValueStructure value)
        //{
        //    Signal s = new Signal(context, value);
        //    s.Label = "Constant_" + value.ToString();
        //    s.AddConstraint(Properties.ConstantSignalProperty.Instance);
        //    return s;
        //}
        public static bool IsConstant(Signal signal)
        {
            if(signal == null)
                throw new ArgumentNullException("signal");

            return signal.AskForFlag(StdAspect.ConstantFlag) == FlagState.Enabled;
            //return signal.AskForProperty("Constant", "Std");
        }