Version 1.2

From RifidiWiki

Jump to: navigation, search

What's new in version 1.2

Functionality

  • First class support for Rifidi Applications. In 1.1 applications were no more than OSGi bundles which hooked into Esper. In 1.2, can make use of the new Application API which provides many services which make it easier to make powerful RFID applications. For more information see the Developer’s guide included in the SDK release.
  • ActiveMQ configuration is now more flexible. The configuration is provided via an xml file and the previously used system properties have been removed.
  • Improved LLRP flexibility. LLRP configuration can now be done via XML files rather than commands.
  • Serial barcode reader support
  • Generic reader adapter for allowing connection to readers which specific reader adapters are not provided for.
  • Diagnostic commands for determining if the Edge Server is connected to readers and processing tags.

Example of Rifidi Applications

One of the great improvements with 1.2 is the 'Rifidi Application'. Rifidi Applications make it much easier to create RFID applications that run on top of the Rifidi Edge Server. The following is a simple example that prints a line when a tag arrives and when it departs. There are more examples inside the SDK release, including a completely re-worked Northwind example!

package test;

import java.util.concurrent.TimeUnit;

import org.rifidi.edge.core.app.api.AbstractRifidiApp;
import org.rifidi.edge.core.app.api.service.tagmonitor.ReadZone;
import org.rifidi.edge.core.app.api.service.tagmonitor.ReadZoneMonitoringService;
import org.rifidi.edge.core.app.api.service.tagmonitor.ReadZoneSubscriber;
import org.rifidi.edge.core.services.notification.data.TagReadEvent;

/**
 * A simple app to monitor a read zone
 * @author Kyle Neumeier
 *
 */
public class MyApp extends AbstractRifidiApp implements ReadZoneSubscriber{

	/**A service to monitor a read zone*/
	private ReadZoneMonitoringService readzoneService;
	
	public MyApp(String group, String name) {
		super(group, name);
	}

	@Override
	protected void _start() {
		ReadZone zone = getReadZones().get("dockdoor");
		readzoneService.subscribe(this, zone, 10f, TimeUnit.SECONDS);
	}


	@Override
	protected void _stop() {
		readzoneService.unsubscribe(this);
	}

	@Override
	public void initialize() {
	}

	@Override
	public void tagArrived(TagReadEvent tag) {
		System.out.println("TAG ARRIVED!: " + tag);		
	}

	@Override
	public void tagDeparted(TagReadEvent tag) {
		System.out.println("TAG DEPARTED!: " + tag);
	}

	/**
	 * @param readzoneService the readzoneService to set
	 */
	public void setReadzoneService(ReadZoneMonitoringService readzoneService) {
		this.readzoneService = readzoneService;
	}
	
}

Properties

We've added a couple new properties that can be added to the system properties when you run the edge server

  • org.rifidi.ui.notify. If set to true, tags will be delivered to Workbench over a JMS topic. If set to false, the tags will not be put onto JMS. Not sending tags improves performance. It is set to true by default.
  • org.rifidi.home This set set to the home directory (where the 'applications' folder and the 'config' directory reside). It is useful to change this when you are developing applications in eclipse to the SDK directory so that your configuration files can be stored within eclipse. It is set to 'user.dir' by default.

Commands

We have added several new OSGi commands to help diagnose common problems with your applications. For example:

  • tagrate prints out how many tags per second the edge server is currently reading
  • currenttags [readerID] prints out a list of tags that can be currently seen by the given reader

For a full list of commands, see the User's Guide

Documentation

We now provide a User's Guide that describes many aspects of running, configuring, and administrating the Rifidi Edge Server.

In addition, we provide a Developer's Guide that explains how to write Rifidi Applications using our new API.

Personal tools