Esempio n. 1
0
        private void GenerateShortArrayBuffer_Single()
        {
            while (IsGenerateShortArrayBuffer)
            {
                byte[]   item;
                ushort[] shortCheck = new ushort[1];


                while (ParsedQueue.TryTake(out item))
                {
                    ushort[] shortArray = new ushort[144];
                    Buffer.BlockCopy(item, 288, shortCheck, 0, 2);
                    Buffer.BlockCopy(item, shortCheck[0] * 18, shortArray, shortCheck[0] * 18, 18);
                    bool is511Checked = false;
                    foreach (var check511 in shortArray)
                    {
                        if (check511 == 511)
                        {
                            is511Checked = true;
                            continue;
                        }
                    }
                    if (is511Checked)
                    {
                        continue;
                    }
                    ShortArrayQueue.Add(shortArray);
                }
            }
        }
Esempio n. 2
0
        private void GenerateShortArrayBuffer_SingleCoin1()
        {
            #region BinaryCheck
            ushort[] binaryCheck = new ushort[16];
            binaryCheck[0]  = 0b0000_0000_0000_0001;
            binaryCheck[1]  = 0b0000_0000_0000_0010;
            binaryCheck[2]  = 0b0000_0000_0000_0100;
            binaryCheck[3]  = 0b0000_0000_0000_1000;
            binaryCheck[4]  = 0b0000_0000_0001_0000;
            binaryCheck[5]  = 0b0000_0000_0010_0000;
            binaryCheck[6]  = 0b0000_0000_0100_0000;
            binaryCheck[7]  = 0b0000_0000_1000_0000;
            binaryCheck[8]  = 0b0000_0001_0000_0000;
            binaryCheck[9]  = 0b0000_0010_0000_0000;
            binaryCheck[10] = 0b0000_0100_0000_0000;
            binaryCheck[11] = 0b0000_1000_0000_0000;
            binaryCheck[12] = 0b0001_0000_0000_0000;
            binaryCheck[13] = 0b0010_0000_0000_0000;
            binaryCheck[14] = 0b0100_0000_0000_0000;
            binaryCheck[15] = 0b1000_0000_0000_0000;
            #endregion
            while (IsGenerateShortArrayBuffer)
            {
                byte[] item;



                while (ParsedQueue.TryTake(out item))
                {
                    ushort[] shortArray  = new ushort[148];
                    ushort[] shortArray2 = new ushort[144];



                    Buffer.BlockCopy(item, 0, shortArray, 0, 296);
                    ushort check = shortArray[144];
                    //ushort[] test = new ushort[8] { shortArray[0], shortArray[9], shortArray[18], shortArray[27], shortArray[72], shortArray[81], shortArray[90], shortArray[99] };
                    int i = 0;
                    foreach (var b in binaryCheck)
                    {
                        if ((b & check) == 0)
                        {
                            for (int j = 0; j < 9; ++j)
                            {
                                shortArray[j + 9 * (i)] = 0;
                            }
                        }
                        ++i;
                    }


                    ShortArrayQueue.Add(shortArray[0..144]);
Esempio n. 3
0
        private void GenerateShortArrayBuffer_Coin()
        {
            while (IsGenerateShortArrayBuffer)
            {
                byte[]   item;
                ushort[] shortArray = new ushort[144];


                while (ParsedQueue.TryTake(out item))
                {
                    Buffer.BlockCopy(item, 0, shortArray, 0, 288);
                    foreach (var check511 in shortArray)
                    {
                        if (check511 == 511)
                        {
                            continue;
                        }
                    }
                    ShortArrayQueue.Add(shortArray);
                }
            }
        }