Skip to content

Commit

Permalink
Some more clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Nov 29, 2018
1 parent dd14a66 commit b34c484
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ Object constructor. Connects to the reader:
* `"tmr:///com2"` is a typical format to connect to a serial based module on Windows COM2
* `"tmr:///dev/ttyUSB0"` is a typical format to connect to a USB device named ttyUSB0 on a Unix system
* `"llrp://192.198.1.100"` is a typical format to connect to an Ethernet device (works on Linux only)
* *baudrate* defines the desired communication speed.
* *baudrate* defines the desired communication speed of the serial port.
Supported values include 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600 and 115200 (default).
This parameter is not allowed for network-connected readers.

For example:
```python
reader = mercury.Reader("tmr:///dev/ttyUSB0", baudrate=9600)
```
or
```python
reader = mercury.Reader("tmr://192.168.1.101")
```

#### reader.get_temperature()
Returns the chip temperature in degrees of Celsius.
Expand Down Expand Up @@ -215,8 +220,26 @@ Represents a read of an RFID tag:
* *user_mem_data* contains the User bank data bytes
* *reserved_mem_data* contains the Reserved bank data bytes

```python
print(tag.epc)
b'E2000087071401930700D206'
print(tag.antenna)
2
print(tag.read_count)
2
print(tag.rssi)
-65
print(tag.user_mem_data)
bytearray(b'\x00\x00\x00...')
```

The string representation (`repr`) of the tag data is its EPC.

```python
print(tag)
b'E2000087071401930700D206'
```

Please note that the bank data bytes need to be requested via the *bank* parameter
of the reader.*set_read_plan* function. Data not requested will not be read.

Expand Down
2 changes: 1 addition & 1 deletion setup-win.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# FIXME: make sure the patch matches the mercuryapi version you have
mercuryapi = "mercuryapi-1.31.0.33/c/src/"

setup(name="mercuryapi", version="0.5",
setup(name="mercuryapi", version="0.4.1",
ext_modules=[Extension("mercury",
[mercuryapi + "api/hex_bytes.c",
mercuryapi + "api/llrp_reader.c",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# python3 setup.py build

from setuptools import setup, Extension
setup(name="mercuryapi", version="0.4",
setup(name="mercuryapi", version="0.4.1",
ext_modules=[Extension("mercury",
sources=["mercury.c"],
libraries=["mercuryapi", "ltkc", "ltkctm"],
Expand Down

0 comments on commit b34c484

Please sign in to comment.