Trigger Mode switching Configurations Tutorial

RFID SDK for Xamarin 2.0.1.15

Overview

This Tutorial provides a walk-through of the steps to perform Trigger Mode switching configuration using Xamarin RFID SDK

Create the Project

  • Start by creating a new project in Visual Studio. For help, see the Create Project.
  • Refer Hello RFID to prepare basic setup to work with RFID Reader and then follow this guide

Details

Trigger Mode switching API is used to move reader trigger and functionality between RFID and BARCODE

In case of RFD8500 this API works same as physical mode button thus giving software control of modes

Setting it up

First parameter is mode enum value and second parameter indicates whether SDK should take care of scanner plugin. i.e. when mode is ENUM_TRIGGER_MODE.RfidMode and second parameter is true then SDK puts reader trigger in RFID mode as well executes code to disable scanner plugin on host device.


private void SetTriggerMode(String mode)
{
    try
    {
        if (mode.Equals("Barcode"))
        {
            Reader.Config.SetTriggerMode(ENUM_TRIGGER_MODE.BarcodeMode, false);
        }
        else if (mode.Equals("RFID"))
        {
            Reader.Config.SetTriggerMode(ENUM_TRIGGER_MODE.RfidMode, false);
        }
    }
    catch (InvalidUsageException ex)
    {
        var exMessage = "EXCEPTION: InvalidUsageException" + ex.VendorMessage + ex.Info;
    }
    catch (OperationFailureException ex)
    {
        var exMessage = "EXCEPTION: OperationFailureException" + ex.VendorMessage + ex.StatusDescription + ex.Results;
    }
}
Important note: either use RFID SDK second parameter to control scanner plugin for host device or below given method but not both

Scanner Plugin

Application can control scanner functionality using DataWedge APIs

It is recommended that Application handles scanner plugin enable\disable in pause and resume activity respectively to avoid cross triggering and better control

Refer DataWedge documentation at following links

Closer look

  • Trigger Mode ENUM_TRIGGER_MODE.RfidMode moves Reader gun trigger to work for RFID functionality
  • Trigger Mode ENUM_TRIGGER_MODE.BarcodeMode moves Reader gun trigger to work for Barcode scanning functionality