Example #1
0
        public static string Relay(RelayName channel, SignalName sensor)
        {
            var rv = sensor.ToString();

            switch (sensor)
            {
            case SignalName.Feedback:
            {
                switch (channel)
                {
                case RelayName.Kv1:
                    rv = "k3";
                    break;

                case RelayName.Kv2:
                    rv = "k2";
                    break;

                case RelayName.Kv8:
                    rv = "k4";
                    break;

                case RelayName.Kv9:
                    rv = "k6";
                    break;

                case RelayName.Kv10:
                    //rv = "k6";
                    rv = "k5";
                    break;

                case RelayName.Kv11:
                    rv = "k1";
                    break;
                }
            }
            break;
            }

            const string kParent = "relay";

            return((sensor == SignalName.Empty ? string.Format("{0}.{1}", kParent, channel) : string.Format("{0}.{1}.{2}", kParent, channel, rv)).ToLower());
        }
Example #2
0
        /**********************************************************/

        override public void addToDictionary(Dictionary <string, OadrSignal> signals)
        {
            signals.Add(SignalName.ToString(), this);

            signals.Add(SignalNameEnumeratedType.simple.ToString(), this);
        }