Esempio n. 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;
         }
     }
                                    ));
 }
Esempio n. 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);
        }
Esempio n. 3
0
 public static bool SocketBased(this LMInstrument lm)
 {
     return(lm.id.SRType.IsSocketBasedLM());
 }