HTTP Post Format - Linux API

From VentureResearchWiki
Jump to navigation Jump to search

Two types of message formats will come in inside an HTTP post message: Tag event messages and all other event messages. See the example parsers in the Appendix for more information and examples on parsing.

MIME type: application/x-www-form-urlencoded All URLENCODED messages will have the timestamp, event source (src), event priority (pri), and event specifier (spec). Tag formatted messages will contain additional parameters. Default event messages will only contain a message (msg).


Tag Messages[edit | edit source]

For a Tag message, including Tag read events and Tag aging (out of the tag table) events, the Tag message is used. The Tag message is similar to the default event message except additional parameters are used relating to RFID tag reading for ease in later system parsing.

Tag messages will always have:

src rfid
spec 0
pri info

Tag Message Format[edit | edit source]

timestamp={date&time}&pri=info&src=rfid&spec=0&dir={In/Out}&tag={TAGID}&{TagMetadata Parameters….}&{HTTP Metadata parameters }

TIMESTAMP
timestamp: YYYY-MM-DDTHH:MM:SS.FFFZ (FFF = Fractions of a second) (‘T’ & ‘Z’ are defined in ISO-8601)
PRIORITY
pri: info
SOURCE
src: rfid
SPECIFIER
spec: 0 (tag read), 1 (tag out of field)
DIRECTION
dir: “In” = Tag Coming in the field, “Out” = Tag Going out of the field.
TAGID
depends on the TAGOUTPUT parameter
tag: 303402AF8001094000000001 (RAWHEX), or
tag: urn:epc:id:sscc:0044710.1463895004 (IDURI)
TAGMETADATA PARAMETERS
depends on the TAGMETADATA parameter.
antid: ”A”,”B”,”AB”,”A1”-“A8”,”B1”-“B8”
readcnt: read cycle read count. Integer.
rssi: Integer; maximum RSSI value for this tag.
freq: frequency that this tag was read on last.
readtimestamp: timestamp at the time of the specific read; internal debug value. Used where extreme accuracy is needed, otherwise use timestamp.
GPSLAT
gpslat: latitude" (or 0 if there is no fix)
GPSLON
gpslon: longitude” (or 0 if there is no fix)
GPSLASTFIX
gpsfix: YYYY-MM-DDTHH:MM:SSZ (or 1970-01-01T00:00:00Z if there is no last fix)

POST Message Example[edit | edit source]

timestamp=2010-11-18T15:49:35.580Z&pri=info&src=rfid&spec=0&dir=In&tag=E2003412DC03011868012273&antid=B&readcnt=27&rssi=97&gpslat=33.0113448&gpslon=-96.6735697&gpsfix=2010-11-18T15:49:30Z


Event Messages[edit | edit source]

The Event Message format is for all other events that occur on that are not filtered using the ASYNCMETADATA parameter.

Event Message Format[edit | edit source]

timestamp={date&time}& pri={priority}&src={source}&spec={event spec}&msg={event data}&{HTTP Metadata parameters }

TIMESTAMP
timestamp: YYYY-MM-DDTHH:MM:SS.FFFZ (FFF = Fractions of a second) (‘T’ & ‘Z’ are defined in ISO-8601)
PRIORITY
pri: the event priority. See Appendix A for more details.
SOURCE
src: the event source.
SPECIFIER
spec: the event specifier.
MESSAGE
msg: the event message.
GPSLAT
gpslat: latitude" (or 0 if there is no fix)
GPSLON
gpslon: longitude” (or 0 if there is no fix)
GPSLASTFIX
gpsfix: YYYY-MM-DDTHH:MM:SSZ (or 1970-01-01T00:00:00Z if there is no last fix)

POST Message Example[edit | edit source]

timestamp=2010-11-18T16:28:11.140Z&pri=info&src=io&spec=0&msg=3,0&gpslat=33.0113448&gpslon=-96.6735697&gpsfix=2010-11-18T15:49:30Z