Beispiel #1
0
        /// <summary>
        /// Return transformed value from <paramref name="input"/> along <paramref name="flow"/> with current TransMode
        /// </summary>
        /// <param name="input"></param>
        /// <param name="flow">Direction of transformation</param>
        /// <returns></returns>
        public static double Transform(double input, TransFlow flow)
        {
            switch (transMode)
            {
            case TransMode.Transform1: return(Transform1(input, flow));

            case TransMode.Transform2: return(Transform2(input, flow));

            default: return(0);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Return transformed value from <paramref name="input"/> along <paramref name="flow"/> with TransMode 1
        /// </summary>
        /// <param name="input"></param>
        /// <param name="flow">Direction of transformation</param>
        /// <returns></returns>
        private static double Transform1(double input, TransFlow flow)
        {
            switch (flow)
            {
            case TransFlow.UserToMachine: return((input) * BaseLevel);

            case TransFlow.MachineToUser: return((input / BaseLevel));

            case TransFlow.IntervalUserToMachine: return(input * BaseLevel);

            case TransFlow.IntervalMachineToUser: return(input / BaseLevel);

            default: return(0);
            }
        }/**/