Beispiel #1
0
 public static void set(this global::System.Collections.BitArray ba, int firstIndex, int lastIndex)
 {
     for (int i = firstIndex; i < lastIndex; i++)
     {
         ba.Set(i, true);
     }
 }
Beispiel #2
0
 public Priorizer(int priorityCount, int channelCount)
 {
     this.channelCount = channelCount;
     requests          = new global::System.Collections.BitArray[priorityCount];
     for (int i = 0; i < priorityCount; i++)
     {
         requests[i] = new global::System.Collections.BitArray(channelCount);
     }
     lastChannel = channelCount - 1;
 }
Beispiel #3
0
        public static void Fetch(SmsBase sms, ref string source)
        {
            sms._serviceCenterNumber = PopServiceCenterAddress(ref source);
            sms._pduType             = PopByte(ref source);

            global::System.Collections.BitArray bits = new global::System.Collections.BitArray(new byte[] { sms._pduType });
            sms.ReplyPathExists          = bits[7];
            sms.UserDataStartsWithHeader = bits[6];
            sms.StatusReportIndication   = bits[5];
            sms.ValidityPeriodFormat     = (ValidityPeriodFormat)(sms._pduType & 0x18);
            sms.Direction = (SmsDirection)(sms._pduType & 1);
        }
Beispiel #4
0
        public static int nextSetBit(this global::System.Collections.BitArray ba, int firstIndex)
        {
            int idx = firstIndex;

            while (idx < ba.Count)
            {
                if (ba.Get(idx))
                {
                    return(idx);
                }
                idx++;
            }
            return(-1);
        }
Beispiel #5
0
 public static void clear(this global::System.Collections.BitArray ba, int index)
 {
     ba.Set(index, false);
 }
Beispiel #6
0
 public static void set(this global::System.Collections.BitArray ba, int index)
 {
     ba.Set(index, true);
 }
Beispiel #7
0
 public static int size(this global::System.Collections.BitArray ba)
 {
     return(ba.Count);
 }