/// <summary> /// Set Gen2Target /// </summary> /// <param name="val"></param> /// <returns>object</returns> private object SetCustomGen2Target(Object val) { PARAM_ThingMagicTargetStrategy target = new PARAM_ThingMagicTargetStrategy(); target.ThingMagicTargetStrategyValue = (ENUM_ThingMagicC1G2TargetStrategy)val; PARAM_Gen2CustomParameters custGen2 = new PARAM_Gen2CustomParameters(); custGen2.ThingMagicTargetStrategy = target; PARAM_ThingMagicProtocolConfiguration protocolConfig = new PARAM_ThingMagicProtocolConfiguration(); protocolConfig.Gen2CustomParameters = custGen2; MSG_SET_READER_CONFIG msgSetConfig = new MSG_SET_READER_CONFIG(); MSG_SET_READER_CONFIG_RESPONSE msgSetConfigResp; msgSetConfig.AddCustomParameter(protocolConfig); try { msgSetConfigResp = (MSG_SET_READER_CONFIG_RESPONSE)SendLlrpMessage(msgSetConfig); } catch (Exception ex) { throw new ReaderException(ex.Message); } return val; }
/// <summary> /// Set ISO18K6BProtocolConfigurationParams /// </summary> /// <param name="val"></param> /// <param name="type">enum</param> /// <returns>object</returns> private object SetCustomISO18K6BProtocolConfigurationParams(ISO18K6BProtocolConfigurationParams type, Object val) { PARAM_ISO18K6BCustomParameters custIso18k6b = new PARAM_ISO18K6BCustomParameters(); //Build iso18k6b protocol configuration params switch(type) { case ISO18K6BProtocolConfigurationParams.Delimiter: PARAM_ThingMagicISO180006BDelimiter delimiter = new PARAM_ThingMagicISO180006BDelimiter(); delimiter.ISO18K6BDelimiter = (ENUM_ThingMagicCustom18K6BDelimiter)val; custIso18k6b.ThingMagicISO180006BDelimiter = delimiter; break; case ISO18K6BProtocolConfigurationParams.ModulationDepth: PARAM_ThingMagicISO18K6BModulationDepth modulationDepth = new PARAM_ThingMagicISO18K6BModulationDepth(); modulationDepth.ISO18K6BModulationDepth = (ENUM_ThingMagicCustom18K6BModulationDepth)val; custIso18k6b.ThingMagicISO18K6BModulationDepth = modulationDepth; break; case ISO18K6BProtocolConfigurationParams.LinkFrequency: PARAM_ThingMagicISO18K6BLinkFrequency linkFrequency = new PARAM_ThingMagicISO18K6BLinkFrequency(); linkFrequency.ISO18K6BLinkFrequency = (ENUM_ThingMagicCustom18K6BLinkFrequency)val; custIso18k6b.ThingMagicISO18K6BLinkFrequency = linkFrequency; break; } PARAM_ThingMagicProtocolConfiguration protocolConfig = new PARAM_ThingMagicProtocolConfiguration(); protocolConfig.ISO18K6BCustomParameters = custIso18k6b; MSG_SET_READER_CONFIG msgSetConfig = new MSG_SET_READER_CONFIG(); MSG_SET_READER_CONFIG_RESPONSE msgSetConfigResp; msgSetConfig.AddCustomParameter(protocolConfig); try { msgSetConfigResp = (MSG_SET_READER_CONFIG_RESPONSE)SendLlrpMessage(msgSetConfig); } catch (Exception ex) { throw new ReaderException(ex.Message); } return val; }
/// <summary> /// Set Gen2Q /// </summary> /// <param name="val"></param> /// <returns>object</returns> private object SetCustomGen2Q(Object val) { PARAM_Gen2Q q = new PARAM_Gen2Q(); if (val is Gen2.StaticQ) { q.Gen2QType = ENUM_QType.Static; q.InitQValue = ((Gen2.StaticQ)val).InitialQ; } else { q.Gen2QType = ENUM_QType.Dynamic; q.InitQValue = 0; } PARAM_Gen2CustomParameters custGen2 = new PARAM_Gen2CustomParameters(); custGen2.Gen2Q = q; PARAM_ThingMagicProtocolConfiguration protocolConfig = new PARAM_ThingMagicProtocolConfiguration(); protocolConfig.Gen2CustomParameters = custGen2; MSG_SET_READER_CONFIG msgSetConfig = new MSG_SET_READER_CONFIG(); MSG_SET_READER_CONFIG_RESPONSE msgSetConfigResp; msgSetConfig.AddCustomParameter(protocolConfig); try { msgSetConfigResp = (MSG_SET_READER_CONFIG_RESPONSE)SendLlrpMessage(msgSetConfig); } catch (Exception ex) { throw new ReaderException(ex.Message); } return val; }