Metadata-Version: 2.1
Name: reader-integration-kit-linux-x86-64
Version: 1.0.1
Summary: A Python wrapper for the rfIDEAS Reader Integration Kit library
Home-page: UNKNOWN
Author: rf IDEAS, Inc.
Author-email: appdev@rfideas.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: EULA.txt

# 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:

```sh
pip install .
```

Or, if you want to install the package from AWS CodeArtifact, use the following command:
```shell
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

```python
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:

```sh
python -m unittest discover -s tests
```

## License

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



