Esempio n. 1
0
        public static MSG_GET_READER_CAPABILITIES_RESPONSE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_GET_READER_CAPABILITIES_RESPONSE)null);
            }
            ArrayList arrayList = new ArrayList();
            MSG_GET_READER_CAPABILITIES_RESPONSE capabilitiesResponse = new MSG_GET_READER_CAPABILITIES_RESPONSE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)capabilitiesResponse.msgType)
            {
                cursor -= 16;
                return((MSG_GET_READER_CAPABILITIES_RESPONSE)null);
            }
            capabilitiesResponse.msgLen     = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            capabilitiesResponse.msgID      = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            capabilitiesResponse.LLRPStatus = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            capabilitiesResponse.GeneralDeviceCapabilities = PARAM_GeneralDeviceCapabilities.FromBitArray(ref bit_array, ref cursor, length);
            capabilitiesResponse.LLRPCapabilities          = PARAM_LLRPCapabilities.FromBitArray(ref bit_array, ref cursor, length);
            capabilitiesResponse.RegulatoryCapabilities    = PARAM_RegulatoryCapabilities.FromBitArray(ref bit_array, ref cursor, length);
            ushort num1 = 1;

            while (num1 != (ushort)0)
            {
                num1 = (ushort)0;
                PARAM_C1G2LLRPCapabilities llrpCapabilities1 = PARAM_C1G2LLRPCapabilities.FromBitArray(ref bit_array, ref cursor, length);
                if (llrpCapabilities1 != null)
                {
                    ++num1;
                    capabilitiesResponse.AirProtocolLLRPCapabilities.Add((IParameter)llrpCapabilities1);
                }
                PARAM_C1G2LLRPCapabilities llrpCapabilities2;
                while ((llrpCapabilities2 = PARAM_C1G2LLRPCapabilities.FromBitArray(ref bit_array, ref cursor, length)) != null)
                {
                    capabilitiesResponse.AirProtocolLLRPCapabilities.Add((IParameter)llrpCapabilities2);
                }
            }
            int  num2;
            bool flag;

            do
            {
                num2 = cursor;
                flag = false;
                ICustom_Parameter customParameter = CustomParamDecodeFactory.DecodeCustomParameter(ref bit_array, ref cursor, length);
                if (customParameter != null && capabilitiesResponse.AddCustomParameter(customParameter))
                {
                    flag = true;
                }
            }while (flag);
            cursor = num2;
            return(capabilitiesResponse);
        }
Esempio n. 2
0
        public static MSG_GET_ACCESSSPECS_RESPONSE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_GET_ACCESSSPECS_RESPONSE)null);
            }
            ArrayList arrayList1 = new ArrayList();
            MSG_GET_ACCESSSPECS_RESPONSE accessspecsResponse = new MSG_GET_ACCESSSPECS_RESPONSE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)accessspecsResponse.msgType)
            {
                cursor -= 16;
                return((MSG_GET_ACCESSSPECS_RESPONSE)null);
            }
            accessspecsResponse.msgLen     = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            accessspecsResponse.msgID      = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            accessspecsResponse.LLRPStatus = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            ArrayList        arrayList2 = new ArrayList();
            PARAM_AccessSpec paramAccessSpec;

            while ((paramAccessSpec = PARAM_AccessSpec.FromBitArray(ref bit_array, ref cursor, length)) != null)
            {
                arrayList2.Add((object)paramAccessSpec);
            }
            if (arrayList2.Count > 0)
            {
                accessspecsResponse.AccessSpec = new PARAM_AccessSpec[arrayList2.Count];
                for (int index = 0; index < arrayList2.Count; ++index)
                {
                    accessspecsResponse.AccessSpec[index] = (PARAM_AccessSpec)arrayList2[index];
                }
            }
            return(accessspecsResponse);
        }
        public static MSG_CLOSE_CONNECTION_RESPONSE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_CLOSE_CONNECTION_RESPONSE)null);
            }
            ArrayList arrayList = new ArrayList();
            MSG_CLOSE_CONNECTION_RESPONSE connectionResponse = new MSG_CLOSE_CONNECTION_RESPONSE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)connectionResponse.msgType)
            {
                cursor -= 16;
                return((MSG_CLOSE_CONNECTION_RESPONSE)null);
            }
            connectionResponse.msgLen     = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            connectionResponse.msgID      = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            connectionResponse.LLRPStatus = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            return(connectionResponse);
        }
Esempio n. 4
0
        public static MSG_ERROR_MESSAGE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_ERROR_MESSAGE)null);
            }
            ArrayList         arrayList       = new ArrayList();
            MSG_ERROR_MESSAGE msgErrorMessage = new MSG_ERROR_MESSAGE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)msgErrorMessage.msgType)
            {
                cursor -= 16;
                return((MSG_ERROR_MESSAGE)null);
            }
            msgErrorMessage.msgLen     = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            msgErrorMessage.msgID      = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            msgErrorMessage.LLRPStatus = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            return(msgErrorMessage);
        }
        public static MSG_ENABLE_ROSPEC_RESPONSE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_ENABLE_ROSPEC_RESPONSE)null);
            }
            ArrayList arrayList = new ArrayList();
            MSG_ENABLE_ROSPEC_RESPONSE enableRospecResponse = new MSG_ENABLE_ROSPEC_RESPONSE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)enableRospecResponse.msgType)
            {
                cursor -= 16;
                return((MSG_ENABLE_ROSPEC_RESPONSE)null);
            }
            enableRospecResponse.msgLen     = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            enableRospecResponse.msgID      = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            enableRospecResponse.LLRPStatus = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            return(enableRospecResponse);
        }
Esempio n. 6
0
        public static MSG_SET_READER_CONFIG_RESPONSE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_SET_READER_CONFIG_RESPONSE)null);
            }
            ArrayList arrayList = new ArrayList();
            MSG_SET_READER_CONFIG_RESPONSE readerConfigResponse = new MSG_SET_READER_CONFIG_RESPONSE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)readerConfigResponse.msgType)
            {
                cursor -= 16;
                return((MSG_SET_READER_CONFIG_RESPONSE)null);
            }
            readerConfigResponse.msgLen     = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            readerConfigResponse.msgID      = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            readerConfigResponse.LLRPStatus = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            return(readerConfigResponse);
        }
        public static MSG_GET_READER_CONFIG_RESPONSE FromBitArray(
            ref BitArray bit_array,
            ref int cursor,
            int length)
        {
            if (cursor > length)
            {
                return((MSG_GET_READER_CONFIG_RESPONSE)null);
            }
            ArrayList arrayList1 = new ArrayList();
            MSG_GET_READER_CONFIG_RESPONSE readerConfigResponse = new MSG_GET_READER_CONFIG_RESPONSE();

            cursor += 6;
            if ((int)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 10) != (int)readerConfigResponse.msgType)
            {
                cursor -= 16;
                return((MSG_GET_READER_CONFIG_RESPONSE)null);
            }
            readerConfigResponse.msgLen         = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            readerConfigResponse.msgID          = (uint)(ulong)Util.CalculateVal(ref bit_array, ref cursor, 32);
            readerConfigResponse.LLRPStatus     = PARAM_LLRPStatus.FromBitArray(ref bit_array, ref cursor, length);
            readerConfigResponse.Identification = PARAM_Identification.FromBitArray(ref bit_array, ref cursor, length);
            ArrayList arrayList2 = new ArrayList();
            PARAM_AntennaProperties antennaProperties;

            while ((antennaProperties = PARAM_AntennaProperties.FromBitArray(ref bit_array, ref cursor, length)) != null)
            {
                arrayList2.Add((object)antennaProperties);
            }
            if (arrayList2.Count > 0)
            {
                readerConfigResponse.AntennaProperties = new PARAM_AntennaProperties[arrayList2.Count];
                for (int index = 0; index < arrayList2.Count; ++index)
                {
                    readerConfigResponse.AntennaProperties[index] = (PARAM_AntennaProperties)arrayList2[index];
                }
            }
            ArrayList arrayList3 = new ArrayList();
            PARAM_AntennaConfiguration antennaConfiguration;

            while ((antennaConfiguration = PARAM_AntennaConfiguration.FromBitArray(ref bit_array, ref cursor, length)) != null)
            {
                arrayList3.Add((object)antennaConfiguration);
            }
            if (arrayList3.Count > 0)
            {
                readerConfigResponse.AntennaConfiguration = new PARAM_AntennaConfiguration[arrayList3.Count];
                for (int index = 0; index < arrayList3.Count; ++index)
                {
                    readerConfigResponse.AntennaConfiguration[index] = (PARAM_AntennaConfiguration)arrayList3[index];
                }
            }
            readerConfigResponse.ReaderEventNotificationSpec = PARAM_ReaderEventNotificationSpec.FromBitArray(ref bit_array, ref cursor, length);
            readerConfigResponse.ROReportSpec                = PARAM_ROReportSpec.FromBitArray(ref bit_array, ref cursor, length);
            readerConfigResponse.AccessReportSpec            = PARAM_AccessReportSpec.FromBitArray(ref bit_array, ref cursor, length);
            readerConfigResponse.LLRPConfigurationStateValue = PARAM_LLRPConfigurationStateValue.FromBitArray(ref bit_array, ref cursor, length);
            readerConfigResponse.KeepaliveSpec               = PARAM_KeepaliveSpec.FromBitArray(ref bit_array, ref cursor, length);
            ArrayList arrayList4 = new ArrayList();
            PARAM_GPIPortCurrentState portCurrentState;

            while ((portCurrentState = PARAM_GPIPortCurrentState.FromBitArray(ref bit_array, ref cursor, length)) != null)
            {
                arrayList4.Add((object)portCurrentState);
            }
            if (arrayList4.Count > 0)
            {
                readerConfigResponse.GPIPortCurrentState = new PARAM_GPIPortCurrentState[arrayList4.Count];
                for (int index = 0; index < arrayList4.Count; ++index)
                {
                    readerConfigResponse.GPIPortCurrentState[index] = (PARAM_GPIPortCurrentState)arrayList4[index];
                }
            }
            ArrayList          arrayList5 = new ArrayList();
            PARAM_GPOWriteData paramGpoWriteData;

            while ((paramGpoWriteData = PARAM_GPOWriteData.FromBitArray(ref bit_array, ref cursor, length)) != null)
            {
                arrayList5.Add((object)paramGpoWriteData);
            }
            if (arrayList5.Count > 0)
            {
                readerConfigResponse.GPOWriteData = new PARAM_GPOWriteData[arrayList5.Count];
                for (int index = 0; index < arrayList5.Count; ++index)
                {
                    readerConfigResponse.GPOWriteData[index] = (PARAM_GPOWriteData)arrayList5[index];
                }
            }
            readerConfigResponse.EventsAndReports = PARAM_EventsAndReports.FromBitArray(ref bit_array, ref cursor, length);
            int  num;
            bool flag;

            do
            {
                num  = cursor;
                flag = false;
                ICustom_Parameter customParameter = CustomParamDecodeFactory.DecodeCustomParameter(ref bit_array, ref cursor, length);
                if (customParameter != null && readerConfigResponse.AddCustomParameter(customParameter))
                {
                    flag = true;
                }
            }while (flag);
            cursor = num;
            return(readerConfigResponse);
        }