22
Developer Conference 2007 Partnering to Develop Powerful Solutions RFID App Development James Peternel Software Engineer Lead

RFID App Development James Peternel Software Engineer Lead

  • Upload
    guido

  • View
    34

  • Download
    0

Embed Size (px)

DESCRIPTION

RFID App Development James Peternel Software Engineer Lead. Overview. Developing an RFID application in C# VS 2005 Basic functions and event handlers Focus on IF61 reader. Create Basic Project in C#. Select Windows Application. RFID References. Add RFID class references to your project. - PowerPoint PPT Presentation

Citation preview

Page 1: RFID App Development James Peternel Software Engineer Lead

Developer Conference 2007

Partnering to Develop Powerful Solutions

RFID App DevelopmentJames Peternel

Software Engineer Lead

Page 2: RFID App Development James Peternel Software Engineer Lead

Slide 2 Developer Conference 2007

Overview

Developing an RFID application in C# VS 2005Basic functions and event handlersFocus on IF61 reader

Page 3: RFID App Development James Peternel Software Engineer Lead

Slide 3 Developer Conference 2007

Create Basic Project in C#

Select Windows Application

Page 4: RFID App Development James Peternel Software Engineer Lead

Slide 4 Developer Conference 2007

RFID References

Add RFID class references to your project

Page 5: RFID App Development James Peternel Software Engineer Lead

Slide 5 Developer Conference 2007

RFID References

using Intermec.DataCollection.RFID;

Page 6: RFID App Development James Peternel Software Engineer Lead

Slide 6 Developer Conference 2007

Now lets add the basic features to your app

Create reader objectAdd Event HandlersAdd Tag Handlers

Page 7: RFID App Development James Peternel Software Engineer Lead

Slide 7 Developer Conference 2007

Create RFID Object

LocalHoststring tConnection = "TCP://" + "127.0.0.1" + ":2189";

Defaultsbrdr = new BRIReader(null, tConnection);

With OptionsRead buffer sizeEvent buffer size

BRIReader.LoggerOptionsAdv LogOp = new BRIReader.LoggerOptionsAdv();LogOp.LogFilePath = ".\\IDLClassDebugLog.txt";LogOp.ShowNonPrintableChars = true;brdr = new BRIReader(this, tConnection, 22000, 2000,LogOp);

Page 8: RFID App Development James Peternel Software Engineer Lead

Slide 8 Developer Conference 2007

Create Event Handlersprivate int AddEventHandlers() { //********************************************************************* // Add the event handler to handle the tag events and trigger pulls. // Not all of these are used but added as samples of what are available. //*********************************************************************

try {

this.brdr.EventHandlerRadio += new Radio_EventHandlerAdv(brdr_EventHandlerRadio); this.brdr.EventHandlerTag += new Tag_EventHandlerAdv(brdr_EventHandlerTag);

this.brdr.EventHandlerGPIO += new GPIO_EventHandlerAdv(Form1_EventHandlerGPIO); } catch { return -1; } return 0; }

Page 9: RFID App Development James Peternel Software Engineer Lead

Slide 9 Developer Conference 2007

Tag Event Handler

this.brdr.StartReadingTags(null, "COUNT ANT", BRIReader.TagReportOptions.EVENT);

void brdr_EventHandlerTag(object sender, EVTADV_Tag_EventArgs EvtArgs){ //********************************************************************* // This function process any tag that is returned as an event. // This function is in use when you send a READ with REPORT=EVENT //********************************************************************* bool bStatus = false;

RspCount = 1; RspMsgList[1] = EvtArgs.DataString.ToString();

bStatus = CheckIfTagIDIsInDBase(RspMsgList[1]);}

Page 10: RFID App Development James Peternel Software Engineer Lead

Slide 10 Developer Conference 2007

Polling For Tags (Report=No)

this.brdr.StartReadingTags(null, "COUNT ANT", BRIReader.TagReportOptions.POLL);

bStatus = brdr.PollTags();

foreach (Tag tt in brdr.Tags){ RspCount++; RspMsgList[RspCount] = tt.ToString(); if (tt.TagFields.ItemCount > 0) { foreach (TagField tf in tt.TagFields.FieldArray) { RspMsgList[RspCount] += " "; RspMsgList[RspCount] += tf.ToString(); } } }

Page 11: RFID App Development James Peternel Software Engineer Lead

Slide 11 Developer Conference 2007

Add GPIO Event Handler

void Form1_EventHandlerGPIO(object sender, EVTADV_GPIO_EventArgs EvtArgs)

{ //process gpio trigger events if (EvtArgs.TriggerNameString.Equals("ENTER_ON")) { //your code here } else if (EvtArgs.TriggerNameString.Equals("EXIT_ON")) { //your code here }}

Page 12: RFID App Development James Peternel Software Engineer Lead

Slide 12 Developer Conference 2007

How to Install App on IF61

Create .zip file with your .exe and any dll files.Create userapp.conf file

AUTOSTART=falseRUNAFTERINSTALL=falseCMDLINE=./ConsoleApplication2.exe

Add userapp.conf file to the .zip fileFor Java you will need to add full path information

Page 13: RFID App Development James Peternel Software Engineer Lead

Slide 13 Developer Conference 2007

IF61: Network Configuration Menu

Select Common link

Page 14: RFID App Development James Peternel Software Engineer Lead

Slide 14 Developer Conference 2007

IF61: Network Configuration->Common

Add Syslog Destination (IP or localhost)

Page 15: RFID App Development James Peternel Software Engineer Lead

Slide 15 Developer Conference 2007

IF61: Network->Services

Make sure you have FTP server enabled

Page 16: RFID App Development James Peternel Software Engineer Lead

Slide 16 Developer Conference 2007

IF61: Edgeware Applications

Go to Edgeware Applications and select Application Control link

Page 17: RFID App Development James Peternel Software Engineer Lead

Slide 17 Developer Conference 2007

IF61: Edgeware Applications-> Application Control

Check the Redirect output from user applications to the system log box

Page 18: RFID App Development James Peternel Software Engineer Lead

Slide 18 Developer Conference 2007

IF61: Edgeware Applications -> Install User Application Select .zip or .tar

file to upload

Page 19: RFID App Development James Peternel Software Engineer Lead

Slide 19 Developer Conference 2007

IF61: Edgeware Applications -> Application Control

To run your application just click ACTION

Page 20: RFID App Development James Peternel Software Engineer Lead

Slide 20 Developer Conference 2007

IF61: Edgeware Applications -> Application Control

To update your application, click Uninstall and then install the new zip file

Page 21: RFID App Development James Peternel Software Engineer Lead

Slide 21 Developer Conference 2007

Run app on IF61

Can monitor your application using an app such as KLog.exe or TcpipWin32.exe, both shareware, use at your own risk.

Make sure you kill your firewall. It may block this.

Page 22: RFID App Development James Peternel Software Engineer Lead

Slide 22 Developer Conference 2007

Thank you.