Difference between revisions of "Generic User Guide"

From RifidiWiki

Jump to: navigation, search
(TCP/IP Inteferace)
(TCP/IP Inteferace)
Line 11: Line 11:
 
Commands
 
Commands
 
There are no commands for the Generic reader.  Instead, it will listen for data coming in to the specified ServerSocket in this format:
 
There are no commands for the Generic reader.  Instead, it will listen for data coming in to the specified ServerSocket in this format:
*ID:(tag ID)|Antenna:(antenna)|Timestamp:(millis since epoch) Note: Ensure to include newline break at the end such as “\n”
+
*ID:(tag ID)|Antenna:(antenna)|Timestamp:(millis since epoch) <b>Note: Ensure to include newline break at the end such as “\n”</b>
 
It is assumed the tags being read in are Gen2 tags.  All data will be formed into a TagReadEvent and put into Esper.   
 
It is assumed the tags being read in are Gen2 tags.  All data will be formed into a TagReadEvent and put into Esper.   
 
If you like, you can specify other information which can be added into the TagReadEvent.  Simply add more key:value pairs, separated by pipes.  For instance, if you wanted to give the Speed and RSSI values as well as the regular values, you could format the incoming messages like this:
 
If you like, you can specify other information which can be added into the TagReadEvent.  Simply add more key:value pairs, separated by pipes.  For instance, if you wanted to give the Speed and RSSI values as well as the regular values, you could format the incoming messages like this:

Revision as of 12:05, 5 January 2017

Introduction

The Generic Reader Adapter is provided for any device where you are looking for a simple way to connect and pass data (such as tag data) to the Rifidi Edge Server. Ways in which we have used the Generic adapter is with handheld and smartphone applications. This reader will open up a ServerSocket at the port specified, and it will receive data in according to a certain format that is outlined below. It has no properties except for the port, and it has no commands. You can either send the data directly, if the reader supports pushing and the data can be formatted as you choose, or you can write a small module that will receive data from the reader and send it to the Generic reader from there. If you need to get a handheld reader to work with Rifidi Edge, use this as a base. The general outline to create a Generic Reader Session can be found in the ‘Rifidi Getting Started Guide’. The only differences are the properties set which are outlined below. Properties

TCP/IP Inteferace

For TCP/IP, there is only one property for the Generic reader: the port. When you start the reader, it will create and start a TCP ServerSocket at this port.

  • Port: The port that the ServerSocket will listen to.
  • setproperties Generic_1 Port 2121

Commands There are no commands for the Generic reader. Instead, it will listen for data coming in to the specified ServerSocket in this format:

  • ID:(tag ID)|Antenna:(antenna)|Timestamp:(millis since epoch) Note: Ensure to include newline break at the end such as “\n”

It is assumed the tags being read in are Gen2 tags. All data will be formed into a TagReadEvent and put into Esper. If you like, you can specify other information which can be added into the TagReadEvent. Simply add more key:value pairs, separated by pipes. For instance, if you wanted to give the Speed and RSSI values as well as the regular values, you could format the incoming messages like this:

  • ID:(tag ID)|Antenna:(antenna)|Timestamp:(millis since epoch)|Speed:(speed value)|RSSI:(rssi value)

So an incoming tag might look like this:

  • ID:350009080001|Antenna:1|Timestamp:123456789|Speed:.03|RSSI:885.7

Any values besides the ID, Antenna, and Timestamp will go in the ExtraInformation, which is a String:String hashmap. The value will be inserted as a value for the corresponding key (so, “Speed” would be inserted with the key “Speed” and the value “0.3”.

Rest

Personal tools