Skip to main content

A Python wrapper for the rfIDEAS Reader Integration Kit library

Reason this release was yanked:

This release has critical bugs. Please update to a working version.

Project description

Reader Integration Kit Python Binding

This package provides Python bindings for the rf IDEAS Reader Integration Kit library. It allows you to interact with the Reader Integration Kit library using Python, enabling you to control and configure rf IDEAS readers using a high-level reader interface.

Installation

To install the package, use the following command:

pip install .

Or, if you want to install the package from AWS CodeArtifact, use the following command:

pip install reader_integration_kit

Usage

To use the package, import the reader_integration_kit module and create an instance of Reader. The facade uses handles to manage reader instances, allowing you to interact with multiple readers concurrently.

WaveID Reader Example

import reader_integration_kit.facade as reader
from reader_integration_kit.structures import ReaderDefinition, DeviceId, SerialPortSettings
from reader_integration_kit.enum import ProtocolType, BeepDuration, BeepVolume

# Create a reader definition for WaveID
reader_def = ReaderDefinition(
    DeviceId=DeviceId(VendorId=0x0c27, ProductId=0x3bfa),
    ProtocolType=ProtocolType.FEATURE_REPORT,
    SerialPortSettings=SerialPortSettings()
)

# Create a WaveID reader instance
with reader.Reader(reader_def, retry_count=3) as waveid:
    # Initialize the reader
    waveid.init()
    
    # Get reader metadata (populated lazily on first access)
    metadata_dict = waveid.get_metadata()
    print(f"Part Number: {metadata_dict.get('PartNumber', 'N/A')}")
    
    # Force refresh metadata from device
    metadata_dict = waveid.get_metadata(force_refresh=True)
    
    # Beep the reader
    waveid.beep(2, BeepDuration.BEEP_DURATION_SHORT)
    
    # Get beeper volume
    volume = waveid.get_beeper_volume()
    print(f"Beeper Volume: {volume}")
    
    # Set beeper volume
    waveid.set_beeper_volume(BeepVolume.BEEP_VOLUME_HIGH)

Note: The Reader class manages reader handles internally. Each instance corresponds to a single reader handle. You can create multiple reader instances to interact with multiple readers simultaneously. The reader instance is automatically cleaned up when the object is destroyed or when using context managers (with statement).

Available Classes

Reader

  • Reader(reader_definition, retry_count=3) - Constructor that creates a WaveID reader instance
  • init() - Initialize the reader (metadata is populated lazily on first access)
  • get_metadata(force_refresh=False) - Get metadata as a dictionary (populated lazily on first access)
  • refresh_metadata() - Explicitly refresh metadata from device
  • beep(count, duration) - Beep the reader
  • get_beeper_volume() - Get the beeper volume
  • set_beeper_volume(volume) - Set the beeper volume

Testing

To run the tests, use the following command:

python -m unittest discover -s tests

License

See the LICENSE file for license rights and limitations (proprietary, rights reserved).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reader_integration_kit_linux_x86_64-1.0.1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file reader_integration_kit_linux_x86_64-1.0.1.tar.gz.

File metadata

File hashes

Hashes for reader_integration_kit_linux_x86_64-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f22bf55e4ca993fde00f5cb1480848b3e231e42e4b630282af78482dd1fb614b
MD5 656aef837dba533de5b053486544c128
BLAKE2b-256 8ec0417424ac03d4d1036ac509d4fed6ef5eba36b8940dc44f0a170907142ed9

See more details on using hashes here.

File details

Details for the file reader_integration_kit_linux_x86_64-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for reader_integration_kit_linux_x86_64-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f4d2ad3cd717f2f81c9f5c4b8640ca3eb3980421ad19abed6f4ff06dc8c2a03
MD5 e3b4b5b664151073e1b554bb16bb767b
BLAKE2b-256 384358f04805bc7e3953b834b67257e031cd9d131211c6c2f00f7f0dfa2b9bd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page