Edge Management
From RifidiWiki
Contents
- 1 Introduction
- 2 Configuration
- 3 Commands
- 4 Command Example
- 4.1 apps command example
- 4.2 readers command example
- 4.3 setproperties command example
- 4.4 apps command example
- 4.5 apps command example
- 4.6 apps command example
- 4.7 apps command example
- 4.8 apps command example
- 4.9 apps command example
- 4.10 apps command example
- 4.11 apps command example
- 4.12 apps command example
- 4.13 apps command example
- 4.14 apps command example
- 4.15 apps command example
- 4.16 apps command example
- 4.17 apps command example
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:
Response:
<?xml version="1.0" encoding="UTF-8"?> <response> <apps> <app> <id>AppService:ReadZones</id> <number>0</number> <status>STARTED</status> </app> <app> <id>AppService:SensorStatus</id> <number>1</number> <status>STARTED</status> </app> <app> <id>RifidiManagement:RifidiManagementApp</id> <number>2</number> <status>STARTED</status> </app> <app> <id>AppService:UniqueTagInterval</id> <number>3</number> <status>STARTED</status> </app> <app> <id>AppService:StableSet</id> <number>4</number> <status>STARTED</status> </app> <app> <id>AppService:LimitStableSet</id> <number>5</number> <status>STARTED</status> </app> <app> <id>AppService:UniqueTagBatchInterval</id> <number>6</number> <status>STARTED</status> </app> <app> <id>AppService:RSSI</id> <number>7</number> <status>STARTED</status> </app> <app> <id>Diagnostic:GPIO</id> <number>8</number> <status>STOPPED</status> </app> <app> <id>Diagnostic:Serial</id> <number>9</number> <status>STOPPED</status> </app> <app> <id>Diagnostic:Tags</id> <number>10</number> <status>STARTED</status> </app> <app> <id>Diagnostic:TagGenerator</id> <number>11</number> <status>STARTED</status> </app> <app> <id>Monitoring:ReadZones</id> <number>12</number> <status>STARTED</status> </app> <app> <id>Monitoring:Tags</id> <number>13</number> <status>STARTED</status> </app> <app> <id>Monitoring:SensorStatus</id> <number>14</number> <status>STARTED</status> </app> </apps> </response>
readers command example
Request (via HTTP Post/Get) "readers" command like this:
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:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response:
apps command example
Request (via HTTP Post/Get) "apps" command like this:
Response: