Exemple #1
0
 public LMInstrument MatchByPort(int Port)
 {
     return((LMInstrument)this.Find(i =>
     {
         if (i is LMInstrument)
         {
             LMInstrument lm = (LMInstrument)i;
             return lm.port == Port;
         }
         else
         {
             return false;
         }
     }
                                    ));
 }
Exemple #2
0
        // get the LM ranking position (0, 1, 2, etc)
        public int RankPositionInList(LMInstrument inst)
        {
            int idx = 0;

            for (int i = 0; i < this.Count; i++)
            {
                if (this[i] is LMInstrument)
                {
                    if (this[i].Equals(inst))
                    {
                        return(idx);
                    }
                    else
                    {
                        idx++;
                    }
                }
            }
            return(-1);
        }
Exemple #3
0
 public static bool SocketBased(this LMInstrument lm)
 {
     return(lm.id.SRType.IsSocketBasedLM());
 }