GPIO Tutorial

From RifidiWiki

Revision as of 03:53, 5 March 2012 by Matt (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Getting Started

This page will give a very brief explanation of how to use the GPIO interface for a given reader. For this example we will use an LLRP reader.

Steps

1. Reference the abstract GPIO service in spring and filter it by the reader type that you would like to control. In this case, we would like the LLRP GPIO service, so our block of spring code will look like this:

<osgi:reference id="llrpGPIOService"
		interface="org.rifidi.edge.sensors.AbstractGPIOService"
		filter="(reader=LLRP)" />

2. Inject it into your application class, like so:

       <bean id="SampleApp" class="com.sample.app.SampleApp">
		<constructor-arg index="0" value="Sample" />
		<constructor-arg index="1" value="SampleApp" />
		<property name="readZoneMonitoringService" ref="readZoneMonitoringService" />
		<property name="gpoController" ref="llrpGPIOService" />
	</bean>

3. In the

Personal tools