06.01.2015 Views

INfinity 510 Protocol Reference Guide - Sirit

INfinity 510 Protocol Reference Guide - Sirit

INfinity 510 Protocol Reference Guide - Sirit

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3 - Command Overview<br />

COMMAND RESPONSES<br />

Get Command Response<br />

Set Command Response<br />

Exec Command Response<br />

Error Responses<br />

As shown in the previous section, the reader supports three types of<br />

commands: Get, Set and Exec. The response to all commands is either OK<br />

or an error message.<br />

For a Get command the successful response is ok followed by the value of<br />

the variable. For example, if the com.serial.baudrate variable has<br />

the value 57600, the command to get the value of this variable and its<br />

response would be:<br />

> com.serial.baudrate<br />

ok 57600<br />

For a set command the successful response is simply ok. For example, to<br />

set the value of the info.location variable to dock door #21, the<br />

command and its response would be:<br />

> info.location = dock door #21<br />

< ok<br />

An Exec action executes a reader function. For an Exec command, the<br />

successful response is ok followed by data returned by the function. The<br />

data returned is different for each function. For example, to exec (execute)<br />

the function tag.read_id() to obtain the tag id of a tag in the field, the<br />

command and its response would be:<br />

> tag.read_id()<br />

ok tag_id=0x300102030405060708090a0b<br />

In the event a command fails, an error is returned. For example, setting the<br />

value of the tag.reporting.depart_time to 1 will produce the<br />

error.parser.value_out_of_range response because the range of<br />

acceptable values for tag.reporting.depart_time is from 100 to 25000 milliseconds.<br />

> tag.reporting.depart_time = 1<br />

error.parser.value_out_of_range<br />

The errors returned by the reader are contained in the error namespace. All<br />

possible errors in the error name space are shown in the Errors Namespace<br />

chapter.<br />

<strong>INfinity</strong> <strong>510</strong> <strong>Protocol</strong> <strong>Reference</strong> <strong>Guide</strong> 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!