예제 #1
0
 /// <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;
 }
예제 #2
0
 /// <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;
 }