///


  /// 获取车地通讯数据的校验码
  ///

  /// 校验数组
  /// 校验数据长度
  /// 返回int型校验值
  private int IsValidCdData(byte[] bData, int iLen)
  {
   ushort usResult = 0;
   byte bByteData;
   int  iCurrBit, iOther;

   usResult = 0;

   if (iLen <= 0) return 0;

   for (int iIndex = 0; iIndex < iLen; iIndex++)
   {
    bByteData = bData[iIndex + 4];//偏移前4个字节 A T & 类型
    for (int iBit = 0; iBit < 8; iBit++)
    {
     if (bByteData > 127) iCurrBit = 1;
     else iCurrBit = 0;

     bByteData <<= 1;

     if (usResult > 0x7fff) iOther = 1;
     else iOther = 0;

     if (iCurrBit + iOther == 1) iCurrBit = 1;
     else iCurrBit = 0;

     usResult <<= 1;

     if (iCurrBit == 1) usResult ^= 0x1021;
    }
   }
   return usResult;
  }