Edge Management

From RifidiWiki

Revision as of 21:26, 24 September 2014 by Manuel transcends (Talk | contribs)

Jump to: navigation, search

Introduction

Prior to Rifidi 3.1 (coming Fall 2014) Edge Management is available through RMI (currently used by Rifidi Workbench if looking for code examples). Starting in 3.1 Edge Management is now accessible though Restful Services (leveraging Restlet plugin. Restlet allows all Rifidi Edge Management operations available through workbench to be accessible via Restful Services.

The types of operations available through Restful Services include:

  • All "session" commands (for stopping and starting reader/sensor sessions)
  • ExecuteCommand and deleteCommand (for commands supported by a sensor such as a tag read)
  • Readers (for getting a list of readers/sensors available on Edge Server instance)
  • Commands (for issuing command line operations such as saving the Edge Server Configuration currently in memory)
  • Get and Set Properties (for setting and getting sensor properties such as Setting the LLRP Reader Configuration dynamically)
  • Create Reader (for creating a new reader connection)
  • Managing Rifidi Applications (for stopping/starting, listing and deploying Rifidi Apps)

Additional features can be found on Restlet User Guide

Configuration

In rifidiserver.ini - A full list of Rifidi Edge configuartion parameters can be found Edge_Server_Configuration

  • Port can be set

-Dorg.rifidi.restlet.port=8111

  • Restlet starts by default this can be changed

-Dorg.rifidi.restlet.enabled=true


Source for Restful Rifidi Management Commands - https://transcends.svn.cloudforge.com/rifidi/rifidi/trunk/org.rifidi.edge/src/org/rifidi/edge/rest/

Commands

List of available Rifidi API Commands

Note: Please refer to the Rifidi Edge Source Rifidi Edge/Workbench Source SVN and JavaDocs Edge_Server_API for details on how these commands function

  • apps - returns a list of available applications
  • readers - returns a list of readers/senors managed by the Edge Server
  • commands - returns a list of available commands
  • readerstatus/{readerID} - retuns teh status of a given reader/sensor
  • startsession/{readerID}/{sessionID} - starts a session for a given reader/sensor and returns status code (such as successful)
  • stopsession/{readerID}/{sessionID} - stops a session for a given reader/sensor and returns status code (such as successful)
  • createsession/{readerID} - creates a session (with corresponding reader/sensor configuration) and returns status code (such as successful)
  • deletesession/{readerID}/{sessionID} - deletes a session and returns status code (such as successful)
  • executecommand/{readerID}/{sessionID}/{commandID}/{repeatInterval} - Executes a command for a given
  • getproperties/{readerID} - returns the reader/sensor properties
  • setproperties/{readerID}/{properties}" - sets the reader/sensor properties
  • createreader/{readerType}/{properties} -creates a reader/sensor configuration
  • startapp/{appID} - starts a Rifidi Application
  • stopapp/{appID} - stops a Rifidi Application
  • commandtypes - returns a list of available command types
  • readertypes - returns a list of available reader/sensor types (such as LLRP, Alien, BarCode etc..)
  • save - Saves the current state of the Edge Server configuration (such as created readers/sensors, modified properties etc..

Command Example

Note: localhost can be substituted with IP address/Host name of Rifidi Edge Server. Port can be changed in Rifidi configuration

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:


readers command example

Request (via HTTP Post/Get) "readers" command like this:

http://localhost:8111/readers

Response:

<response>
<sensors>
<sensor>
<serviceID>Alien_1</serviceID>
<factoryID>Alien</factoryID>
</sensor>
<sensor>
<serviceID>Alien_2</serviceID>
<factoryID>Alien</factoryID>
</sensor>
</sensors>
</response>

setproperties command example

Request (via HTTP Post/Get) setproperties" like this (splitting all property key/value pairs by a semicolon):

http://localhost:8111/setproperties/Alien_1/MaxNumConnectionAttempts=11;DisplayName=Alien_Name

Response


<response><message>Success</message></response>

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:


apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

apps command example

Request (via HTTP Post/Get) "apps" command like this:

http://localhost:8111/apps

Response:

Personal tools