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_windows_x86_64-1.0.1.tar.gz (643.7 kB 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_windows_x86_64-1.0.1.tar.gz.

File metadata

File hashes

Hashes for reader_integration_kit_windows_x86_64-1.0.1.tar.gz
Algorithm Hash digest
SHA256 586d7da96a10c43baf2df1f4e99b20e10e88e9f70a4d9d920e939577148cdfee
MD5 72569b258277cfbf9850987e72d74b61
BLAKE2b-256 a8ae0e0a5fd3a6b08d1402f40cb144a75b1c6fa1f670208cf0fd1e460c8d5359

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reader_integration_kit_windows_x86_64-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 549d1b9828a43d5606c5a247e2693007e0264e8e6e2ef39534dff5b14312e4aa
MD5 17f5b7e81d83f0eb8a348f974dba53fd
BLAKE2b-256 83504b180d913d10208b688e1fa8edb7d758ffadbd53049b180480ff2831af36

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