reader-integration-kit 1.4.2__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reader_integration_kit/__init__.py +12 -0
- reader_integration_kit/enum/__init__.py +28 -0
- reader_integration_kit/enum/beep_duration.py +12 -0
- reader_integration_kit/enum/beep_volume.py +15 -0
- reader_integration_kit/enum/ble_data_type.py +12 -0
- reader_integration_kit/enum/blob_type.py +27 -0
- reader_integration_kit/enum/checkpoint_type.py +13 -0
- reader_integration_kit/enum/data_conversion_type.py +12 -0
- reader_integration_kit/enum/field_definition_type.py +14 -0
- reader_integration_kit/enum/led_color.py +15 -0
- reader_integration_kit/enum/protocol_type.py +14 -0
- reader_integration_kit/enum/proximity_card_type.py +166 -0
- reader_integration_kit/enum/reader_module_id.py +13 -0
- reader_integration_kit/enum/reader_module_state.py +12 -0
- reader_integration_kit/enum/serial_port_baud_rate.py +15 -0
- reader_integration_kit/enum/serial_port_data_bits.py +10 -0
- reader_integration_kit/enum/serial_port_flow_control.py +11 -0
- reader_integration_kit/enum/serial_port_parity.py +10 -0
- reader_integration_kit/enum/serial_port_stop_bits.py +9 -0
- reader_integration_kit/enum/transparent_mode_state.py +11 -0
- reader_integration_kit/enum/transparent_mode_status.py +11 -0
- reader_integration_kit/errors/__init__.py +4 -0
- reader_integration_kit/errors/reader_exception.py +58 -0
- reader_integration_kit/facade/__init__.py +882 -0
- reader_integration_kit/lib/ReaderIntegrationKit.dll +0 -0
- reader_integration_kit/structures/__init__.py +36 -0
- reader_integration_kit/structures/blob_header.py +54 -0
- reader_integration_kit/structures/bluetooth_firmware_version.py +35 -0
- reader_integration_kit/structures/card_data.py +77 -0
- reader_integration_kit/structures/card_type_info.py +51 -0
- reader_integration_kit/structures/device_id.py +12 -0
- reader_integration_kit/structures/extended_configuration.py +32 -0
- reader_integration_kit/structures/felica_sam_firmware_version.py +38 -0
- reader_integration_kit/structures/field_entry.py +120 -0
- reader_integration_kit/structures/field_separator_data_header.py +83 -0
- reader_integration_kit/structures/hash_data.py +55 -0
- reader_integration_kit/structures/hid_se_sam_firmware_version.py +38 -0
- reader_integration_kit/structures/led_configuration.py +13 -0
- reader_integration_kit/structures/library_info.py +74 -0
- reader_integration_kit/structures/luid_response_information.py +44 -0
- reader_integration_kit/structures/microcontroller_firmware_version.py +38 -0
- reader_integration_kit/structures/nxp_sam_firmware_version.py +38 -0
- reader_integration_kit/structures/reader_configuration.py +171 -0
- reader_integration_kit/structures/reader_data.py +49 -0
- reader_integration_kit/structures/reader_definition.py +14 -0
- reader_integration_kit/structures/reader_metadata_struct.py +195 -0
- reader_integration_kit/structures/rik_result.py +71 -0
- reader_integration_kit/structures/separator_character.py +44 -0
- reader_integration_kit/structures/separator_entry.py +73 -0
- reader_integration_kit/structures/serial_port_settings.py +45 -0
- reader_integration_kit/structures/smart_card_configuration.py +34 -0
- reader_integration_kit-1.4.2.dist-info/METADATA +139 -0
- reader_integration_kit-1.4.2.dist-info/RECORD +56 -0
- reader_integration_kit-1.4.2.dist-info/WHEEL +5 -0
- reader_integration_kit-1.4.2.dist-info/licenses/rfIDEAS_EULA.txt +281 -0
- reader_integration_kit-1.4.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
from ctypes import Structure, c_bool, c_char, c_int
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class RikResult(Structure):
|
|
5
|
+
"""
|
|
6
|
+
Result structure for Reader layer operations.
|
|
7
|
+
Contains both reader-level and protocol-level exception information.
|
|
8
|
+
"""
|
|
9
|
+
_fields_ = [
|
|
10
|
+
("HasException", c_bool),
|
|
11
|
+
("ExceptionType", c_char * 256),
|
|
12
|
+
("Message", c_char * 2048),
|
|
13
|
+
("FileName", c_char * 2048),
|
|
14
|
+
("LineNumber", c_int),
|
|
15
|
+
("FunctionName", c_char * 256),
|
|
16
|
+
("HasProtocolException", c_bool),
|
|
17
|
+
("ProtocolExceptionType", c_char * 256),
|
|
18
|
+
("ProtocolMessage", c_char * 2048),
|
|
19
|
+
("ProtocolFileName", c_char * 2048),
|
|
20
|
+
("ProtocolLineNumber", c_int),
|
|
21
|
+
("ProtocolFunctionName", c_char * 256),
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def has_exception(self):
|
|
26
|
+
return self.HasException
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def exception_type(self):
|
|
30
|
+
return self.ExceptionType.decode('utf-8') if self.ExceptionType else None
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def message(self):
|
|
34
|
+
return self.Message.decode('utf-8') if self.Message else None
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def file_name(self):
|
|
38
|
+
return self.FileName.decode('utf-8') if self.FileName else None
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def line_number(self):
|
|
42
|
+
return self.LineNumber
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def function_name(self):
|
|
46
|
+
return self.FunctionName.decode('utf-8') if self.FunctionName else None
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def has_protocol_exception(self):
|
|
50
|
+
return self.HasProtocolException
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def protocol_exception_type(self):
|
|
54
|
+
return self.ProtocolExceptionType.decode('utf-8') if self.ProtocolExceptionType else None
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def protocol_message(self):
|
|
58
|
+
return self.ProtocolMessage.decode('utf-8') if self.ProtocolMessage else None
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def protocol_file_name(self):
|
|
62
|
+
return self.ProtocolFileName.decode('utf-8') if self.ProtocolFileName else None
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def protocol_line_number(self):
|
|
66
|
+
return self.ProtocolLineNumber
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def protocol_function_name(self):
|
|
70
|
+
return self.ProtocolFunctionName.decode('utf-8') if self.ProtocolFunctionName else None
|
|
71
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from ctypes import Structure, c_uint8
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
class SeparatorCharacter(Structure):
|
|
5
|
+
_fields_ = [
|
|
6
|
+
("USBKeyScanCode", c_uint8),
|
|
7
|
+
("KeyModifier", c_uint8)
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
def __init__(self, *args: Any, **kw: Any):
|
|
11
|
+
super().__init__()
|
|
12
|
+
self.USBKeyScanCode = kw.get("USBKeyScanCode", args[0] if len(args) > 0 else 0)
|
|
13
|
+
self.KeyModifier = kw.get("KeyModifier", args[1] if len(args) > 1 else 0)
|
|
14
|
+
|
|
15
|
+
def __str__(self):
|
|
16
|
+
return (
|
|
17
|
+
f"USBKeyScanCode: {self.USBKeyScanCode}\n"
|
|
18
|
+
f"KeyModifier: {self.KeyModifier}\n"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def __repr__(self):
|
|
22
|
+
return self.__str__()
|
|
23
|
+
|
|
24
|
+
def __eq__(self, other):
|
|
25
|
+
return (
|
|
26
|
+
self.USBKeyScanCode == other.USBKeyScanCode
|
|
27
|
+
and self.KeyModifier == other.KeyModifier
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
def __ne__(self, other):
|
|
31
|
+
return not self.__eq__(other)
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
return {
|
|
35
|
+
"USBKeyScanCode": self.USBKeyScanCode,
|
|
36
|
+
"KeyModifier": self.KeyModifier
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_bytes(cls, byte_array):
|
|
41
|
+
return cls(USBKeyScanCode=byte_array[0], KeyModifier=byte_array[1])
|
|
42
|
+
|
|
43
|
+
def to_bytes(self):
|
|
44
|
+
return bytes([self.USBKeyScanCode, self.KeyModifier])
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from ctypes import Structure, c_uint8
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from reader_integration_kit.structures.separator_character import SeparatorCharacter
|
|
5
|
+
|
|
6
|
+
class SeparatorEntry(Structure):
|
|
7
|
+
_fields_ = [
|
|
8
|
+
("SeparatorValid", c_uint8),
|
|
9
|
+
("CharacterSize", c_uint8),
|
|
10
|
+
("VirtualCharacterCount", c_uint8),
|
|
11
|
+
("ByteOffset", c_uint8),
|
|
12
|
+
("SeparatorCharacters", SeparatorCharacter * 31)
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def __init__(self, *args: Any, **kw: Any):
|
|
16
|
+
super().__init__()
|
|
17
|
+
self.SeparatorValid = kw.get("SeparatorValid", args[0] if len(args) > 0 else 0)
|
|
18
|
+
self.CharacterSize = kw.get("CharacterSize", args[1] if len(args) > 1 else 0)
|
|
19
|
+
self.VirtualCharacterCount = kw.get("VirtualCharacterCount", args[2] if len(args) > 2 else 0)
|
|
20
|
+
self.ByteOffset = kw.get("ByteOffset", args[3] if len(args) > 3 else 0)
|
|
21
|
+
self.SeparatorCharacters = (SeparatorCharacter * 31)(*kw.get("SeparatorCharacters", [SeparatorCharacter()]*31))
|
|
22
|
+
|
|
23
|
+
def __str__(self):
|
|
24
|
+
separator_chars_str = '\n'.join([f'Separator character {i}: \n{str(self.SeparatorCharacters[i])}' for i in range(self.VirtualCharacterCount)])
|
|
25
|
+
return (
|
|
26
|
+
f"SeparatorValid: {self.SeparatorValid}\n"
|
|
27
|
+
f"CharacterSize: {self.CharacterSize}\n"
|
|
28
|
+
f"VirtualCharacterCount: {self.VirtualCharacterCount}\n"
|
|
29
|
+
f"ByteOffset: {self.ByteOffset}\n"
|
|
30
|
+
f"SeparatorCharacters: \n{separator_chars_str}\n"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
def __repr__(self):
|
|
34
|
+
return self.__str__()
|
|
35
|
+
|
|
36
|
+
def __eq__(self, other):
|
|
37
|
+
return (
|
|
38
|
+
self.SeparatorValid == other.SeparatorValid
|
|
39
|
+
and self.CharacterSize == other.CharacterSize
|
|
40
|
+
and self.VirtualCharacterCount == other.VirtualCharacterCount
|
|
41
|
+
and self.ByteOffset == other.ByteOffset
|
|
42
|
+
and all(self.SeparatorCharacters[i] == other.SeparatorCharacters[i] for i in range(self.VirtualCharacterCount))
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def __ne__(self, other):
|
|
46
|
+
return not self.__eq__(other)
|
|
47
|
+
|
|
48
|
+
def to_dict(self):
|
|
49
|
+
return {
|
|
50
|
+
"SeparatorValid": self.SeparatorValid,
|
|
51
|
+
"CharacterSize": self.CharacterSize,
|
|
52
|
+
"VirtualCharacterCount": self.VirtualCharacterCount,
|
|
53
|
+
"ByteOffset": self.ByteOffset,
|
|
54
|
+
"SeparatorCharacters": [self.SeparatorCharacters[i].to_dict() for i in range(self.VirtualCharacterCount)]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_bytes(cls, byte_array):
|
|
59
|
+
return cls(
|
|
60
|
+
SeparatorValid=byte_array[0],
|
|
61
|
+
CharacterSize=byte_array[1],
|
|
62
|
+
VirtualCharacterCount=byte_array[2],
|
|
63
|
+
ByteOffset=byte_array[3],
|
|
64
|
+
SeparatorCharacters=[SeparatorCharacter.from_bytes(byte_array[4 + i*2: 6 + i*2]) for i in range(31)]
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def to_bytes(self):
|
|
68
|
+
return bytes([
|
|
69
|
+
self.SeparatorValid,
|
|
70
|
+
self.CharacterSize,
|
|
71
|
+
self.VirtualCharacterCount,
|
|
72
|
+
self.ByteOffset
|
|
73
|
+
]) + b''.join([self.SeparatorCharacters[i].to_bytes() for i in range(31)])
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from ctypes import Structure, c_int, c_char, c_uint32, c_uint8, memset, memmove, addressof
|
|
2
|
+
|
|
3
|
+
from reader_integration_kit.enum.serial_port_baud_rate import SerialPortBaudRate
|
|
4
|
+
from reader_integration_kit.enum.serial_port_data_bits import SerialPortDataBits
|
|
5
|
+
from reader_integration_kit.enum.serial_port_flow_control import SerialPortFlowControl
|
|
6
|
+
from reader_integration_kit.enum.serial_port_parity import SerialPortParity
|
|
7
|
+
from reader_integration_kit.enum.serial_port_stop_bits import SerialPortStopBits
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SerialPortSettings(Structure):
|
|
11
|
+
_pack_ = 1 # Ensure no padding between fields for native compatibility
|
|
12
|
+
_fields_ = [
|
|
13
|
+
("BaudRate", c_uint32),
|
|
14
|
+
("Parity", c_uint8),
|
|
15
|
+
("FlowControl", c_uint8),
|
|
16
|
+
("PortName", c_char * 256),
|
|
17
|
+
("ByteSize", c_int),
|
|
18
|
+
("DataBits", c_uint8),
|
|
19
|
+
("StopBits", c_uint8),
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
def __init__(self, *args, **kw):
|
|
23
|
+
super().__init__(*args, **kw)
|
|
24
|
+
self.BaudRate = 0
|
|
25
|
+
self.Parity = 0
|
|
26
|
+
self.FlowControl = 0
|
|
27
|
+
self.ByteSize = 0
|
|
28
|
+
self.DataBits = 0
|
|
29
|
+
self.StopBits = 0
|
|
30
|
+
self.port_name = "" # Use property setter to initialize PortName
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def port_name(self):
|
|
34
|
+
return bytes(self.PortName).decode('utf-8').rstrip('\x00')
|
|
35
|
+
|
|
36
|
+
@port_name.setter
|
|
37
|
+
def port_name(self, value):
|
|
38
|
+
encoded = value.encode('utf-8')
|
|
39
|
+
if len(encoded) > 255:
|
|
40
|
+
raise ValueError("PortName too long (max 255 bytes)")
|
|
41
|
+
base_addr = addressof(self)
|
|
42
|
+
field_offset = type(self).PortName.offset
|
|
43
|
+
field_addr = base_addr + field_offset
|
|
44
|
+
memset(field_addr, 0, 256)
|
|
45
|
+
memmove(field_addr, encoded, len(encoded))
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from ctypes import Structure, c_uint8
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from reader_integration_kit.structures.blob_header import BlobHeader
|
|
5
|
+
|
|
6
|
+
class SmartCardConfigurationStruct(Structure):
|
|
7
|
+
_pack_ = 1
|
|
8
|
+
_fields_ = [
|
|
9
|
+
("Header", BlobHeader),
|
|
10
|
+
("Data", c_uint8 * (4 * 0xFE)),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
def __init__(self, *args: Any, **kw: Any):
|
|
14
|
+
super().__init__()
|
|
15
|
+
self.Header = kw.get("Header", args[0] if len(args) > 0 else BlobHeader())
|
|
16
|
+
self.Data = kw.get("Data", args[1] if len(args) > 1 else (c_uint8 * (4 * 0xFE))())
|
|
17
|
+
|
|
18
|
+
def __str__(self):
|
|
19
|
+
return (f"SmartCardConfigurationStruct:\n" +
|
|
20
|
+
f"Header:\n{self.Header}" +
|
|
21
|
+
f"Data: {list(self.Data)}\n"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def __eq__(self, other):
|
|
25
|
+
return self.Header == other.Header and self.Data[:] == other.Data[:]
|
|
26
|
+
|
|
27
|
+
def __ne__(self, other):
|
|
28
|
+
return not self.__eq__(other)
|
|
29
|
+
|
|
30
|
+
def to_dict(self):
|
|
31
|
+
return {
|
|
32
|
+
"Header": self.Header.to_dict(),
|
|
33
|
+
"Data": list(self.Data),
|
|
34
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: reader-integration-kit
|
|
3
|
+
Version: 1.4.2
|
|
4
|
+
Summary: A Python wrapper for the rfIDEAS Reader Integration Kit library
|
|
5
|
+
Home-page: https://docs.rfideas.com/rik/
|
|
6
|
+
Author: rf IDEAS, Inc.
|
|
7
|
+
Author-email: appdev@rfideas.com
|
|
8
|
+
Project-URL: Documentation, https://docs.rfideas.com/rik/
|
|
9
|
+
Project-URL: Homepage, https://www.rfideas.com
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: License :: Other/Proprietary License
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Requires-Python: >=3.8
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: rfIDEAS_EULA.txt
|
|
18
|
+
Requires-Dist: setuptools>=42
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: author-email
|
|
21
|
+
Dynamic: classifier
|
|
22
|
+
Dynamic: description
|
|
23
|
+
Dynamic: description-content-type
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: project-url
|
|
27
|
+
Dynamic: requires-dist
|
|
28
|
+
Dynamic: requires-python
|
|
29
|
+
Dynamic: summary
|
|
30
|
+
|
|
31
|
+
# Reader Integration Kit - Python Binding
|
|
32
|
+
|
|
33
|
+
A Python wrapper for the rf IDEAS Reader Integration Kit native library. This package enables Python
|
|
34
|
+
applications to communicate with rf IDEAS readers using a high-level reader interface.
|
|
35
|
+
|
|
36
|
+
## Supported Platforms
|
|
37
|
+
|
|
38
|
+
This package ships platform-tagged wheels for all supported architectures.
|
|
39
|
+
`pip` automatically selects the correct wheel for your operating system and CPU:
|
|
40
|
+
|
|
41
|
+
| Platform / Architecture | Wheel tag |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Linux x86_64 | `manylinux_*_x86_64` |
|
|
44
|
+
| Linux ARM64 (generic aarch64 and Raspberry Pi 5) | `manylinux_*_aarch64` |
|
|
45
|
+
| Linux 32-bit ARM hard-float (ARMhf / armv7) | `manylinux_*_armv7l` |
|
|
46
|
+
| Windows x86_64 | `win_amd64` |
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
Install from PyPI with a single command — no need to pick a platform-specific package name:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
pip install reader-integration-kit
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Raspberry Pi 5 runtime detection
|
|
57
|
+
|
|
58
|
+
The `linux_aarch64` wheel bundles both the Pi 5-optimized and the generic ARM64 native library.
|
|
59
|
+
The correct variant is selected automatically at import time by reading `/proc/device-tree/model`.
|
|
60
|
+
You can override this for testing with the `RIK_ARM_VARIANT` environment variable:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
RIK_ARM_VARIANT=pi5 python my_script.py # force Pi 5 variant
|
|
64
|
+
RIK_ARM_VARIANT=generic python my_script.py # force generic variant
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Backward-compatible package names
|
|
68
|
+
|
|
69
|
+
Users upgrading from the old per-platform package names (e.g.
|
|
70
|
+
`reader-integration-kit-linux-x86-64`) will be automatically redirected to this unified
|
|
71
|
+
package via pip's dependency resolution — no manual action is required.
|
|
72
|
+
|
|
73
|
+
### Prerequisites
|
|
74
|
+
|
|
75
|
+
- Windows 10/11 (x64), Linux x64, or Linux ARM64 / ARMhf (Ubuntu 24.04+ or equivalent)
|
|
76
|
+
- A connected rf IDEAS reader (USB or serial), e.g. WaveID
|
|
77
|
+
- Python 3.8 or later
|
|
78
|
+
- On Linux, appropriate udev rules may be required for USB reader access
|
|
79
|
+
|
|
80
|
+
## Usage
|
|
81
|
+
|
|
82
|
+
Import the `reader_integration_kit` module and create an instance of `Reader`. The facade uses
|
|
83
|
+
handles to manage reader instances, allowing you to interact with multiple readers concurrently.
|
|
84
|
+
|
|
85
|
+
### WaveID Reader Example
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import reader_integration_kit.facade as reader
|
|
89
|
+
from reader_integration_kit.structures import ReaderDefinition, DeviceId, SerialPortSettings
|
|
90
|
+
from reader_integration_kit.enum import ProtocolType, BeepDuration, BeepVolume
|
|
91
|
+
|
|
92
|
+
# Create a reader definition for WaveID
|
|
93
|
+
reader_def = ReaderDefinition(
|
|
94
|
+
DeviceId=DeviceId(VendorId=0x0c27, ProductId=0x3bfa),
|
|
95
|
+
ProtocolType=ProtocolType.FEATURE_REPORT,
|
|
96
|
+
SerialPortSettings=SerialPortSettings()
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
# Create a WaveID reader instance
|
|
100
|
+
with reader.Reader(reader_def, retry_count=3) as waveid:
|
|
101
|
+
# Initialize the reader
|
|
102
|
+
waveid.init()
|
|
103
|
+
|
|
104
|
+
# Get reader metadata (populated lazily on first access)
|
|
105
|
+
metadata_dict = waveid.get_metadata()
|
|
106
|
+
print(f"Part Number: {metadata_dict.get('PartNumber', 'N/A')}")
|
|
107
|
+
|
|
108
|
+
# Force refresh metadata from device
|
|
109
|
+
metadata_dict = waveid.get_metadata(force_refresh=True)
|
|
110
|
+
|
|
111
|
+
# Beep the reader
|
|
112
|
+
waveid.beep(2, BeepDuration.BEEP_DURATION_SHORT)
|
|
113
|
+
|
|
114
|
+
# Get beeper volume
|
|
115
|
+
volume = waveid.get_beeper_volume()
|
|
116
|
+
print(f"Beeper Volume: {volume}")
|
|
117
|
+
|
|
118
|
+
# Set beeper volume
|
|
119
|
+
waveid.set_beeper_volume(BeepVolume.BEEP_VOLUME_HIGH)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Note:** The `Reader` class manages reader handles internally. Each instance corresponds to
|
|
123
|
+
a single reader handle. You can create multiple `Reader` instances to interact with multiple readers
|
|
124
|
+
simultaneously. Resources are automatically released when exiting the context manager (`with`
|
|
125
|
+
statement) or when the object is garbage collected.
|
|
126
|
+
|
|
127
|
+
## Documentation
|
|
128
|
+
|
|
129
|
+
For integration guides and complete API reference, see the
|
|
130
|
+
[rf IDEAS Documentation](https://docs.rfideas.com/rik/).
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
This package is proprietary software distributed by rf IDEAS, Inc. Use of this package is subject to
|
|
135
|
+
the End-User License Agreement (EULA) included with the package. See the included `rfIDEAS_EULA.txt` for
|
|
136
|
+
full terms and conditions.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
Copyright rf IDEAS, Inc. All rights reserved.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
reader_integration_kit/__init__.py,sha256=LnQ5YxChqpVVhO7P18fv9LFxISIipLVx7BdA__dFaRE,168
|
|
2
|
+
reader_integration_kit/enum/__init__.py,sha256=JBQr1NBTBJm3sJhmA58lwwokfo9pCRjoASTz56TuhiQ,1825
|
|
3
|
+
reader_integration_kit/enum/beep_duration.py,sha256=L69Gqlpps5_ltTI0scpebxJgCy5uzkTdEsRShVdzwwo,246
|
|
4
|
+
reader_integration_kit/enum/beep_volume.py,sha256=s9gYbjY4u2-JQD3s0EE6evI1yhba0QqAPehk9K59qEo,319
|
|
5
|
+
reader_integration_kit/enum/ble_data_type.py,sha256=XwUNYp83vKAHfhzswmxUzJCjWlMKi-2uvsVP43GJdfA,238
|
|
6
|
+
reader_integration_kit/enum/blob_type.py,sha256=hmfsNstOewBYQN0we1DrP5Y2QJHOLWJ2Sh7MqXTNdTo,614
|
|
7
|
+
reader_integration_kit/enum/checkpoint_type.py,sha256=j5rCpdwobI7T0PjdOhWWPOGjJK-dAGoELYECsMcfm0A,277
|
|
8
|
+
reader_integration_kit/enum/data_conversion_type.py,sha256=ldxdTFW6CEcmY38jaJyVSGRvkkECjOqW_ZKwHDY0Dkk,259
|
|
9
|
+
reader_integration_kit/enum/field_definition_type.py,sha256=4hz5mvr3eP9hjJcimxNIDMJROlnaHdeAc7yCf2COxcM,337
|
|
10
|
+
reader_integration_kit/enum/led_color.py,sha256=FXCSZQdVz4z3yYpnx0JCEXVlJknAXZyPc20NjC-e0U0,281
|
|
11
|
+
reader_integration_kit/enum/protocol_type.py,sha256=-1mhzcY3Vnn7u_oJ1iQKTCt1Xd-h-DoxLiiOCom4rVs,280
|
|
12
|
+
reader_integration_kit/enum/proximity_card_type.py,sha256=7cN3PZ-8UkMfwEujawTZ5Ypa6wtbHyBuLf-RmmK-liI,4182
|
|
13
|
+
reader_integration_kit/enum/reader_module_id.py,sha256=zRSEeE4H1pAH_UcOxzOgGmefMpeYwYDCt0tAoEgdDYE,295
|
|
14
|
+
reader_integration_kit/enum/reader_module_state.py,sha256=KygIv7AMqNvFOnh0TbyT45mLrNX6YCgqNOYEQkXBaLM,237
|
|
15
|
+
reader_integration_kit/enum/serial_port_baud_rate.py,sha256=qJDcPusKVYQaEnP0yF3LTuuriiGXr8o741Tt3axm8xg,292
|
|
16
|
+
reader_integration_kit/enum/serial_port_data_bits.py,sha256=51QM1S4EKCAgEikuP7a_cykN2wiRXzJqITgcnPdLNEQ,159
|
|
17
|
+
reader_integration_kit/enum/serial_port_flow_control.py,sha256=7bgcdDzcn4CUCFgqAFstP3CAPZGP8ydZNj57mEZPlJ4,189
|
|
18
|
+
reader_integration_kit/enum/serial_port_parity.py,sha256=1k2SF0qny_D9nO9yYzATl0EUz-FPqbrG_7qwf-gW8L8,126
|
|
19
|
+
reader_integration_kit/enum/serial_port_stop_bits.py,sha256=c0FLQn9C6TIpDQbWcfu3WLHOkXR5eaCehXAkpsPN3OM,123
|
|
20
|
+
reader_integration_kit/enum/transparent_mode_state.py,sha256=IVwY3bkInxQmxX3Bzip24XO4usdFDNePZ1VlTSbQ7XE,231
|
|
21
|
+
reader_integration_kit/enum/transparent_mode_status.py,sha256=4E2yjZpPHrsSiyDQYfLmPimMXZpQQRpzwliZEbEI5oo,231
|
|
22
|
+
reader_integration_kit/errors/__init__.py,sha256=19IOnV3-emL0hZIMoYnUniHudgV2roWjJ1zQTAOYSpU,107
|
|
23
|
+
reader_integration_kit/errors/reader_exception.py,sha256=tGPmTpw4zi7QeRfI3c7ko0Tppnunmc9Rq7AewEPWHf4,2205
|
|
24
|
+
reader_integration_kit/facade/__init__.py,sha256=930gSsra1XyIwRcOT1yDpklMlUh_w57_q9lnzF_ktSo,37330
|
|
25
|
+
reader_integration_kit/lib/ReaderIntegrationKit.dll,sha256=08T3BL0oLXUHs7S8fJm61ir_FmX244AZV7Bzq4lh60M,1681760
|
|
26
|
+
reader_integration_kit/structures/__init__.py,sha256=Q3U3VQ7CqipXU2ahQaM9_Y6esWY_-Uz8jhvR_bCRX4Y,2736
|
|
27
|
+
reader_integration_kit/structures/blob_header.py,sha256=l40zHqws2APeYv0C8OaoP3d_c7-hirEri60H13qpsHQ,1796
|
|
28
|
+
reader_integration_kit/structures/bluetooth_firmware_version.py,sha256=JtN1crXXCZ_FtH9DFcqeB2wu-SBRZNpPziok5qrnPA0,1152
|
|
29
|
+
reader_integration_kit/structures/card_data.py,sha256=nwNZpRGLgesPiEFyTcHX0l2Z3hjLzPLZrOI0D6D4gxQ,2241
|
|
30
|
+
reader_integration_kit/structures/card_type_info.py,sha256=gQKKNvn2jlJRe-k_OB4jASgSNy90k07Y_HHe-p_I9_o,1773
|
|
31
|
+
reader_integration_kit/structures/device_id.py,sha256=k2tORHCv3SpgY7MeYYTxBTnc1ppELcyIQNREHnk-ow8,255
|
|
32
|
+
reader_integration_kit/structures/extended_configuration.py,sha256=2GJjs_Y6fAYhLULvkNT8Z0DvzXuOVNp7VLgiz51q2o8,1461
|
|
33
|
+
reader_integration_kit/structures/felica_sam_firmware_version.py,sha256=Z1yg0CXkh4dUgw7_4wCnGnn1fjWmO3S4wvbUDQ_0NKY,1304
|
|
34
|
+
reader_integration_kit/structures/field_entry.py,sha256=RoXYfETArcx24CFHG_g6J08gheD2R4PxGHNXzSGP634,5032
|
|
35
|
+
reader_integration_kit/structures/field_separator_data_header.py,sha256=3IWqSi3deQRehu9y-s0WUx6wznJmYJChITcjxnRbjiQ,3477
|
|
36
|
+
reader_integration_kit/structures/hash_data.py,sha256=gwKd8Hnq1iCyFgnTd-8-0sxLyJ6ewgOVbwjbYZxD2GY,2016
|
|
37
|
+
reader_integration_kit/structures/hid_se_sam_firmware_version.py,sha256=oV6_fjw8MIJsidIm4qXfy5buhC5K_B5KMI7st8JX1vs,1237
|
|
38
|
+
reader_integration_kit/structures/led_configuration.py,sha256=mPn-Dk8F9dcbIFo4slCaSNs5JCchVLnbQIFZmdDKH7A,420
|
|
39
|
+
reader_integration_kit/structures/library_info.py,sha256=eQRyA3MCR3uJ5nlkdG7em9EC_YAH73MbxRmHu7KvxYo,3670
|
|
40
|
+
reader_integration_kit/structures/luid_response_information.py,sha256=r96UcTAG8UI57iFLMPx27-T2oM7RhzhBEkVwNOBuLJ8,1820
|
|
41
|
+
reader_integration_kit/structures/microcontroller_firmware_version.py,sha256=N1O3oMOsjdztxXhCY43kP9EMxd1nwUfeHV2ISsRCBzI,1343
|
|
42
|
+
reader_integration_kit/structures/nxp_sam_firmware_version.py,sha256=MxJPizFDmoIYW1dctWAx3yuIKMsp1FaUJg1JWBrJyNY,1212
|
|
43
|
+
reader_integration_kit/structures/reader_configuration.py,sha256=gOB43HKviqo34WDENPSukjonDBN2mk2oyEpSiTdbRrw,8672
|
|
44
|
+
reader_integration_kit/structures/reader_data.py,sha256=LMW46Qi0LaSahxQxc3ik0K2rO6Jk3Y3c_AkDB2L7SGY,1787
|
|
45
|
+
reader_integration_kit/structures/reader_definition.py,sha256=a4QGtc0V71b3zJ6mFnkYkTA3RKq1M3fB7PWvDNx_Djw,420
|
|
46
|
+
reader_integration_kit/structures/reader_metadata_struct.py,sha256=3Rvp4raj9bGHSur_1Vr1hykYEs35dsZ-YeHxCrXEfpM,9591
|
|
47
|
+
reader_integration_kit/structures/rik_result.py,sha256=CP2krRfK-reGmoMwFLSRGkQRvZtpcH22DTA_XOXWRkM,2107
|
|
48
|
+
reader_integration_kit/structures/separator_character.py,sha256=_xEGXi_tNBT3v4yuCn8HbyZQfH9Nn18ZBNxZWhX6wzk,1253
|
|
49
|
+
reader_integration_kit/structures/separator_entry.py,sha256=mL4PcVE5XhE4xUCaThkb_KaYBRADb6-D7U2657Df9Rc,3010
|
|
50
|
+
reader_integration_kit/structures/serial_port_settings.py,sha256=ef7n4QTXWopBItTi6FYRgeZgCkbdhLmRmmAiS8fYMrY,1682
|
|
51
|
+
reader_integration_kit/structures/smart_card_configuration.py,sha256=jhB0LLl4oOt_FSCdy_L6iMRGNS_QugtowuTvWgVYfBs,1030
|
|
52
|
+
reader_integration_kit-1.4.2.dist-info/licenses/rfIDEAS_EULA.txt,sha256=3ys0lZp_osLz7TmKsLWsY6UX3rHvfmpDeyCMSztNp14,19390
|
|
53
|
+
reader_integration_kit-1.4.2.dist-info/METADATA,sha256=z7BmAIx6XAZ6pu0bPMPJjIE9UHYRHV6tlvdsJZqc8kA,4924
|
|
54
|
+
reader_integration_kit-1.4.2.dist-info/WHEEL,sha256=GjDPPQwEcripVP6P2r3RxLa-h5Lb9ifGB7FYYtbLDT0,98
|
|
55
|
+
reader_integration_kit-1.4.2.dist-info/top_level.txt,sha256=K6Z4idV-ujuFpJSFQgiY_LM5IzNEa6juAmENqnKFcB0,23
|
|
56
|
+
reader_integration_kit-1.4.2.dist-info/RECORD,,
|