Datalogic .NET SDK

GetAimIdentifier (Method)

 

Syntax

 

public String GetAimIdentifier(int reqID);

 

 

Class                           : DecodeHandle

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Reads the AIM identifier for the code of a data sample prior to calling a DecodeHandle.DcdRead... method or using the Datalogic.API.DecodeEvent class. It allows the application to filter incoming samples by the code id.

 

 

Parameters Table

 

Type

Parameter

Description

[in]

int

reqID

Request identifier of the request that has been satisfied with data to be read. The DecodeHandle.PostRequest... methods or Datalogic.API.DecodeEventArgs.RequestID return this identifier.

 

 

 

 

[return]

String

 

The AIM identifier.

[on error]

Empty string

 

 

 

 

Example 1

 

 

reqID = hDcd.PostRequestWait((DecodeRequest)1);

 

 if (reqID != -1)

 {

       // Obtain the string, code id and code id modifier.

       try

       {

             /* Example #9: DecodeHandle.ReadString (overload 1)

                            DecodeHandle.GetAimIdentifier()

                            DecodeHandle.GetCodeId()    */

             cID = hDcd.GetCodeId(reqID);

             strAimIdentifier = hDcd.GetAimIdentifier(reqID);

             modChar += strAimIdentifier[strAimIdentifier.Length - 1];

             codeIDMod = Convert.ToInt32(modChar, 16);

             dcdData = hDcd.ReadString(reqID);

       }

       catch (Exception)

       {

              MessageBox.Show("Error reading string!");

              return;

       }

}

 

 

Example 2

 

 

/*Example #10b: Using the code id modifier to gain additional

 * information about a decoded symbol.

 * This example returns a description, but in actual practice, using

 * the codeIDMod as an integer

 * to inform the parsing routines of the

 * decoded data would be useful.*/

 if (codeIDMod == 0)

     return "Normal";

 

 String details = "Unknown Mod";

 switch (cID)

 {

     case CodeId.AztecCode:

         details = ((CodeIdModAztec)codeIDMod).ToString();

         break;

     case CodeId.Codabar:

         details = ((CodeIdModCodabar)codeIDMod).ToString();

         break;

     case CodeId.Code128:

         details = ((CodeIdModCode128)codeIDMod).ToString();

         break;

     case CodeId.Code39:

         details = ((CodeIdModCode39)codeIDMod).ToString();

         break;

 

     //No modifiers

     case CodeId.Code93:

         break;

 

     case CodeId.Datamatrix:

         details = ((CodeIdModDataMatrix)codeIDMod).ToString();

         break;

     case CodeId.EAN13:

     case CodeId.EAN8:

     case CodeId.UPCA:

     case CodeId.UPCE:

          details = ((CodeIdModUPC_EAN)codeIDMod).ToString();

         break;

 

     //No modifiers

     case CodeId.GS1_14:

     case CodeId.GS1Expanded:

     case CodeId.GS1Limited:

         break;

 

     case CodeId.Interleaved25:

         details = ((CodeIdModInterleaved25)codeIDMod).ToString();

         break;

 

     //No modifiers

     case CodeId.Matrix25:

         break;

 

     case CodeId.Maxicode:

         details = ((CodeIdModMaxiCode)codeIDMod).ToString();

         break;

     case CodeId.MicroPDF417:

         details = ((CodeIdModMicroPDF417)codeIDMod).ToString();

         break;

     case CodeId.MSI:

         details = ((CodeIdModMSI)codeIDMod).ToString();

         break;

 

     //No modifiers

     case CodeId.PDF417:

     case CodeId.Pharmacode39:

     case CodeId.Postal:

         break;

               

     case CodeId.QRCode:

         details = ((CodeIdModQRCode)codeIDMod).ToString();

         break;

     case CodeId.Standard25:

         details = ((CodeIdModStandard25)codeIDMod).ToString();

         break;

 

     //No modifiers

     case CodeId.Trioptic:

         break;

 

     case CodeId.UCCComposite:

         details = ((CodeIdModComposite)codeIDMod).ToString();

         break;

 

     default:

         details = "Unknown Code ID";

         break;

}

return details;

 

 

 

 

See Also

DecodeEvent (Class),  ReadString(1), CodeId (Enum), Enumerations List (CodeIdModXXX enumerations), Examples #009 and #10b.

 

 

Copyright © Datalogic ADC. All Right Reserved