Rifidi Management API Jumpstart

From RifidiWiki

Jump to: navigation, search

Create a RifidiApp

  • 1. Create a RifidiApp. First, be sure to set up a developer environment using these steps.

Then check the developer guide for creating your own Rifidi App. Check the section starting at "Importing a Project Template" on page 5 for how to do this.

After your application is set up, you'll have to choose how you want to receive your tags. Tags that are read by RFID readers will be inserted into an event processing engine called Esper. There are a few different ways to receive these tags, as outlined here:

Import Services

  • 2. You can use one of the default services to send and receive tags. You can see a description of the default services here.

You can also see an example of the two services in action in the "Northwind" example (specifically, the "ReadZoneMonitoringService" and the "StableSetService"). See the developer's guide for an overview of the Northwind example. The source code for the example (which can be imported as a project) is in the "apps" folder of the SDK.

Taking the ReadZoneMonitoringService as an example, a method will be called on designated classes whenever a tag arrives or departs. You can find out the ID of this tag (as well as other useful information) and then do whatever you wish with it, including writing the event to a cloud or to social media.

Create Custom Esper Rules

  • 3. You can also write your own custom Esper rules, usually in concert with the ReadZoneMonitoringService. You can find out how to create custom Esper rules at the Custom Esper Rules Jumpstart page.

Add Third Party Libraries

Sample Rifidi Management API Application with SDK

  • 5. Here is where one can find the sources for the sample Rifidi Management API Application (coming soon Fall 2014). The use case for the stops a reader session when a group of tags arrive at a front door (one to one) and/or back door (one to many relationship). A user/application can then start a session via Rest management API to begin looking for teh next group of tags to arrive Rifidi MQTT App using Rifidi SDK
  • Full set of Rifidi Management API Commands via Rest can be found Edge_Management

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configurationStore>
    <services>
        <attributes>
            <entry>
                <key>ROSpecID</key>
                <value>1</value>
            </entry>
        </attributes>
        <factoryID>LLRP-Push-Stop</factoryID>
        <serviceID>LLRP_Push_Stop_1</serviceID>
    </services>
    <services>
        <attributes>
            <entry>
                <key>TagType</key>
                <value>2</value>
            </entry>
        </attributes>
        <factoryID>Alien-Poll</factoryID>
        <serviceID>Alien_Poll_1</serviceID>
    </services>
    <services>
        <attributes>
            <entry>
                <key>ROSpecID</key>
                <value>1</value>
            </entry>
        </attributes>
        <factoryID>LLRP-Poll</factoryID>
        <serviceID>LLRP_Poll_1</serviceID>
    </services>
    <services>
        <attributes>
            <entry>
                <key>ROSpecID</key>
                <value>1</value>
            </entry>
        </attributes>
        <factoryID>LLRP-Configure</factoryID>
        <serviceID>LLRP_Configure_1</serviceID>
    </services>
    <services>
        <attributes>
            <entry>
                <key>PersistTime</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>Password</key>
                <value>password</value>
            </entry>
            <entry>
                <key>IpAddress</key>
                <value>127.0.0.1</value>
            </entry>
            <entry>
                <key>ExternalOutput</key>
                <value>0</value>
            </entry>
            <entry>
                <key>ReaderNumber</key>
                <value>0</value>
            </entry>
            <entry>
                <key>MaxNumConnectionAttempts</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>DisplayName</key>
                <value>Alien_F_Door</value>
            </entry>
            <entry>
                <key>IOStreamPort</key>
                <value>54322</value>
            </entry>
            <entry>
                <key>ReconnectionInterval</key>
                <value>500</value>
            </entry>
            <entry>
                <key>Port</key>
                <value>40000</value>
            </entry>
            <entry>
                <key>NotifyPort</key>
                <value>54321</value>
            </entry>
            <entry>
                <key>InvertExternalOutput</key>
                <value>OFF</value>
            </entry>
            <entry>
                <key>Username</key>
                <value>alien</value>
            </entry>
            <entry>
                <key>InvertExternalInput</key>
                <value>OFF</value>
            </entry>
            <entry>
                <key>RFAttenuation</key>
                <value>0</value>
            </entry>
        </attributes>
        <factoryID>Alien</factoryID>
        <serviceID>Front_Door_1</serviceID>
        <sessionDTOs>
            <commands>
                <commandID>Alien_Poll_1</commandID>
                <interval>1000</interval>
                <processID>0</processID>
                <timeUnit>MILLISECONDS</timeUnit>
            </commands>
            <ID>1</ID>
            <status>PROCESSING</status>
        </sessionDTOs>
    </services>
    <services>
        <attributes>
            <entry>
                <key>PersistTime</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>Password</key>
                <value>password</value>
            </entry>
            <entry>
                <key>IpAddress</key>
                <value>127.0.0.1</value>
            </entry>
            <entry>
                <key>ExternalOutput</key>
                <value>0</value>
            </entry>
            <entry>
                <key>ReaderNumber</key>
                <value>0</value>
            </entry>
            <entry>
                <key>MaxNumConnectionAttempts</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>DisplayName</key>
                <value>Alien_B_Door_1</value>
            </entry>
            <entry>
                <key>IOStreamPort</key>
                <value>54322</value>
            </entry>
            <entry>
                <key>ReconnectionInterval</key>
                <value>500</value>
            </entry>
            <entry>
                <key>Port</key>
                <value>50000</value>
            </entry>
            <entry>
                <key>NotifyPort</key>
                <value>54321</value>
            </entry>
            <entry>
                <key>InvertExternalOutput</key>
                <value>OFF</value>
            </entry>
            <entry>
                <key>Username</key>
                <value>alien</value>
            </entry>
            <entry>
                <key>InvertExternalInput</key>
                <value>OFF</value>
            </entry>
            <entry>
                <key>RFAttenuation</key>
                <value>0</value>
            </entry>
        </attributes>
        <factoryID>Alien</factoryID>
        <serviceID>Back_Door_1</serviceID>
        <sessionDTOs>
            <commands>
                <commandID>Alien_Poll_1</commandID>
                <interval>1000</interval>
                <processID>0</processID>
                <timeUnit>MILLISECONDS</timeUnit>
            </commands>
            <ID>1</ID>
            <status>CREATED</status>
        </sessionDTOs>
    </services>
    <services>
        <attributes>
            <entry>
                <key>PersistTime</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>Password</key>
                <value>password</value>
            </entry>
            <entry>
                <key>IpAddress</key>
                <value>127.0.0.1</value>
            </entry>
            <entry>
                <key>ExternalOutput</key>
                <value>0</value>
            </entry>
            <entry>
                <key>ReaderNumber</key>
                <value>0</value>
            </entry>
            <entry>
                <key>MaxNumConnectionAttempts</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>DisplayName</key>
                <value>Alien_B_Door_2</value>
            </entry>
            <entry>
                <key>IOStreamPort</key>
                <value>54322</value>
            </entry>
            <entry>
                <key>ReconnectionInterval</key>
                <value>500</value>
            </entry>
            <entry>
                <key>Port</key>
                <value>60000</value>
            </entry>
            <entry>
                <key>NotifyPort</key>
                <value>54321</value>
            </entry>
            <entry>
                <key>InvertExternalOutput</key>
                <value>OFF</value>
            </entry>
            <entry>
                <key>Username</key>
                <value>alien</value>
            </entry>
            <entry>
                <key>InvertExternalInput</key>
                <value>OFF</value>
            </entry>
            <entry>
                <key>RFAttenuation</key>
                <value>0</value>
            </entry>
        </attributes>
        <factoryID>Alien</factoryID>
        <serviceID>Back_Door_2</serviceID>
        <sessionDTOs>
            <commands>
                <commandID>Alien_Poll_1</commandID>
                <interval>1000</interval>
                <processID>0</processID>
                <timeUnit>MILLISECONDS</timeUnit>
            </commands>
            <ID>1</ID>
            <status>CREATED</status>
        </sessionDTOs>
    </services>
</configurationStore>
Personal tools