Structures
All structures used across the RIK API. Select a language tab to see the definition and field types for that language.
ReaderDefinition
Configures reader connection parameters.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct ReaderDefinition
{
DeviceId DeviceId;
ProtocolType ProtocolType = PROTOCOL_TYPE_INVALID;
SerialPortSettings SerialPortSettings;
};
#pragma pack(pop)
| Field | Type | Description |
|---|---|---|
DeviceId | DeviceId | USB device identification (VID/PID/path/serial) |
ProtocolType | ProtocolType (uint8_t) | Communication protocol (default: PROTOCOL_TYPE_INVALID) |
SerialPortSettings | SerialPortSettings | Serial port configuration (only for PROTOCOL_TYPE_SERIAL_BINARY) |
ReaderDefinition readerDef;
readerDef.DeviceId.VendorId = 0x0C27;
readerDef.DeviceId.ProductId = 0x3BFA;
readerDef.ProtocolType = PROTOCOL_TYPE_FEATURE_REPORT;
auto handle = AbstractReader::CreateReaderInstance(readerDef, 3);
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential)]
public struct ReaderDefinition
{
public DeviceId DeviceId;
public ProtocolType ProtocolType;
public SerialPortSettings SerialPortSettings;
}
| Field | Type | Description |
|---|---|---|
DeviceId | DeviceId | USB device identification (VID/PID/path/serial) |
ProtocolType | ProtocolType (byte) | Communication protocol |
SerialPortSettings | SerialPortSettings | Serial port configuration (only for ProtocolType.SERIAL_BINARY) |
var readerDef = new ReaderDefinition
{
DeviceId = new DeviceId { VendorId = 0x0C27, ProductId = 0x3BFA },
ProtocolType = ProtocolType.FeatureReport
};
using var app = new Reader(readerDef);
Module: reader_integration_kit.structures
class ReaderDefinition(Structure):
_fields_ = [
("DeviceId", DeviceId),
("ProtocolType", c_uint8),
("SerialPortSettings", SerialPortSettings),
]
| Field | Type | Description |
|---|---|---|
DeviceId | DeviceId | USB device identification (VID/PID/path/serial) |
ProtocolType | c_uint8 | Communication protocol (use ProtocolType enum values) |
SerialPortSettings | SerialPortSettings | Serial port configuration (only for ProtocolType.SERIAL_BINARY) |
reader_def = ReaderDefinition(
DeviceId=DeviceId(VendorId=0x0C27, ProductId=0x3BFA),
ProtocolType=ProtocolType.FEATURE_REPORT,
SerialPortSettings=SerialPortSettings()
)
DeviceId
USB device identification. Supports three connection strategies: VID/PID, VID/PID + serial number, or USB path.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct DeviceId
{
uint16_t VendorId;
uint16_t ProductId;
char UsbPath[512];
char SerialNumber[256];
};
#pragma pack(pop)
| Field | Type | Description |
|---|---|---|
VendorId | uint16_t | USB Vendor ID (0x0C27 for rf IDEAS) |
ProductId | uint16_t | USB Product ID |
UsbPath | char[512] | Optional. Topological USB path for port-specific connection |
SerialNumber | char[256] | Optional. Distinguishes multiple readers with the same VID/PID |
DeviceId id{};
id.VendorId = 0x0C27;
id.ProductId = 0x3BFA;
std::strncpy(id.SerialNumber, "ABC123", sizeof(id.SerialNumber) - 1);
Namespace: rfIDEAS.ReaderIntegrationKit
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DeviceId
{
public ushort VendorId;
public ushort ProductId;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]
public byte[] UsbPath;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
public byte[] SerialNumber;
// Helper properties
public string UsbPathString =>
UsbPath == null ? string.Empty :
Encoding.UTF8.GetString(UsbPath).TrimEnd('\0');
public string SerialNumberString =>
SerialNumber == null ? string.Empty :
Encoding.UTF8.GetString(SerialNumber).TrimEnd('\0');
}
| Field | Type | Description |
|---|---|---|
VendorId | ushort | USB Vendor ID (0x0C27 for rf IDEAS) |
ProductId | ushort | USB Product ID |
UsbPath | byte[512] | Optional. UTF-8 byte array. Initialize with new byte[512]. Read back via UsbPathString. |
SerialNumber | byte[256] | Optional. UTF-8 byte array. Initialize with new byte[256]. Read back via SerialNumberString. |
using System.Text;
var id = new DeviceId
{
VendorId = 0x0C27,
ProductId = 0x3BFA,
UsbPath = new byte[512],
SerialNumber = new byte[256]
};
Encoding.UTF8.GetBytes("ABC123").CopyTo(id.SerialNumber, 0);
Module: reader_integration_kit.structures
class DeviceId(Structure):
_pack_ = 1
_fields_ = [
("VendorId", c_ushort),
("ProductId", c_ushort),
("UsbPath", c_char * 512),
("SerialNumber", c_char * 256),
]
| Field | Type | Description |
|---|---|---|
VendorId | c_ushort | USB Vendor ID (0x0C27 for rf IDEAS) |
ProductId | c_ushort | USB Product ID |
UsbPath | c_char * 512 | Optional. UTF-8 byte string, default zeros. Set via b"..." literal. |
SerialNumber | c_char * 256 | Optional. UTF-8 byte string, default zeros. Set via b"..." literal. |
id = DeviceId(
VendorId=0x0C27,
ProductId=0x3BFA,
SerialNumber=b"ABC123"
)
Connection Strategies
RIK selects the connection strategy based on which DeviceId fields are populated:
| Strategy | Fields Set | Behavior |
|---|---|---|
| VID/PID | VendorId + ProductId | Opens the first matching device. Non-deterministic when duplicates exist. |
| VID/PID + Serial | VendorId + ProductId + SerialNumber | Filters by USB serial number. VID/PID narrows the search. On newer rf IDEAS readers, the USB serial number matches the reader's ESN. |
| USB Path | UsbPath (VID/PID ignored) | Opens by physical port location. VID/PID and SerialNumber are ignored. Most deterministic. |
When UsbPath is set, it takes full precedence -- the connection is made purely by topological port path and all other DeviceId fields are ignored. The path format is platform-specific:
- Linux:
"B-P"or"B-P.P.P"(e.g.,"1-7","1-7.2") -- bus number and port number(s). - Windows: Location path string (e.g.,
"PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(7)"). - macOS: Hexadecimal USB location ID (e.g.,
"0x14100000"); decimal format is also accepted.
See Connection Strategies for full examples in all languages.
SerialPortSettings
Serial port communication configuration.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct SerialPortSettings
{
SerialPortBaudRate BaudRate;
SerialPortParity Parity;
SerialPortFlowControl FlowControl;
char PortName[256];
uint8_t ByteSize;
SerialPortDataBits DataBits;
SerialPortStopBits StopBits;
};
#pragma pack(pop)
| Field | Type | Description |
|---|---|---|
BaudRate | SerialPortBaudRate (uint32_t) | Communication speed |
Parity | SerialPortParity (uint8_t) | Parity bit configuration |
FlowControl | SerialPortFlowControl (uint8_t) | Flow control mode |
PortName | char[256] | Port name (e.g., "COM3", "/dev/ttyUSB0", "/dev/cu.usbserial-1410") |
ByteSize | uint8_t | Byte size |
DataBits | SerialPortDataBits (uint8_t) | Number of data bits |
StopBits | SerialPortStopBits (uint8_t) | Number of stop bits |
readerDef.SerialPortSettings.BaudRate = SERIAL_PORT_BAUD_9600;
readerDef.SerialPortSettings.Parity = SERIAL_PORT_PARITY_NONE;
std::strcpy(readerDef.SerialPortSettings.PortName, "COM3");
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct SerialPortSettings
{
public SerialPortBaudRate BaudRate;
public SerialPortParity Parity;
public SerialPortFlowControl FlowControl;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string PortName;
public int ByteSize;
public SerialPortDataBits DataBits;
public SerialPortStopBits StopBits;
}
| Field | Type | Description |
|---|---|---|
BaudRate | SerialPortBaudRate (uint) | Communication speed |
Parity | SerialPortParity (byte) | Parity bit configuration |
FlowControl | SerialPortFlowControl (byte) | Flow control mode |
PortName | string | Port name (e.g., "COM3", "/dev/ttyUSB0", "/dev/cu.usbserial-1410") |
ByteSize | int | Byte size |
DataBits | SerialPortDataBits (byte) | Number of data bits |
StopBits | SerialPortStopBits (byte) | Number of stop bits |
SerialPortSettings = new SerialPortSettings
{
PortName = "COM3",
BaudRate = SerialPortBaudRate.Baud9600,
Parity = SerialPortParity.None,
DataBits = SerialPortDataBits.Eight,
StopBits = SerialPortStopBits.One
}
Module: reader_integration_kit.structures
class SerialPortSettings(Structure):
_pack_ = 1
_fields_ = [
("BaudRate", c_uint32),
("Parity", c_uint8),
("FlowControl", c_uint8),
("PortName", c_char * 256),
("ByteSize", c_int),
("DataBits", c_uint8),
("StopBits", c_uint8),
]
| Field | Type | Description |
|---|---|---|
BaudRate | c_uint32 | Communication speed (use SerialPortBaudRate enum values) |
Parity | c_uint8 | Parity bit configuration (use SerialPortParity enum values) |
FlowControl | c_uint8 | Flow control mode (use SerialPortFlowControl enum values) |
PortName | c_char * 256 | Port name (e.g., b"COM3", b"/dev/ttyUSB0", b"/dev/cu.usbserial-1410") |
ByteSize | c_int | Byte size |
DataBits | c_uint8 | Number of data bits (use SerialPortDataBits enum values) |
StopBits | c_uint8 | Number of stop bits (use SerialPortStopBits enum values) |
settings = SerialPortSettings(
PortName=b"COM3",
BaudRate=SerialPortBaudRate.BAUD_9600,
Parity=SerialPortParity.NONE,
DataBits=SerialPortDataBits.DATA_BITS_8,
StopBits=SerialPortStopBits.ONE
)
ReaderMetadataStruct
Reader information retrieved from the device. Each field has a corresponding Has* presence flag.
Always check Has* flags before reading the corresponding field. Fields without their Has* flag set may contain empty or stale data.
- C++
- C#
- Python
Namespace: Rik
#pragma pack(push, 1)
struct ReaderMetadataStruct
{
char Processor[512]; unsigned char HasProcessor;
char HardwarePlatform[512]; unsigned char HasHardwarePlatform;
char Product[512]; unsigned char HasProduct;
char PartNumber[512]; unsigned char HasPartNumber;
char ProductLine[512]; unsigned char HasProductLine;
int ConfigurationCount; unsigned char HasConfigurationCount;
char SerialNumber[512]; unsigned char HasSerialNumber;
char ESN[512]; unsigned char HasESN;
char InstalledHardware[512]; unsigned char HasInstalledHardware;
char SupportedHardware[512]; unsigned char HasSupportedHardware;
// Hardware capability flags
unsigned char HwSupportedSamSe;
unsigned char HwSupportedRfAms;
unsigned char HwSupportedRf125;
unsigned char HwSupportedRfLegic;
unsigned char HwSupportedRfBle;
unsigned char HwSupportedNxp;
unsigned char HwSupportedRfHidBle;
unsigned char HwSupportedFelica;
unsigned char HwSupportedBeeper;
unsigned char HwSupportedNano;
unsigned char HwInstalledSamSe;
unsigned char HwInstalledRfAms;
unsigned char HwInstalledRf125;
unsigned char HwInstalledRfLegic;
unsigned char HwInstalledRfBle;
unsigned char HwInstalledNxp;
unsigned char HwInstalledRfHidBle;
unsigned char HwInstalledFelica;
unsigned char HasInstalledHardwareInfo;
char FirmwareFilename[512]; unsigned char HasFirmwareFilename;
char FirmwareVersion[512]; unsigned char HasFirmwareVersion;
// Controller firmware versions
char ControllerApplicationVersion[512]; unsigned char HasControllerApplicationVersion;
char ControllerBootloaderVersion[512]; unsigned char HasControllerBootloaderVersion;
char ControllerRadioVersion[512]; unsigned char HasControllerRadioVersion;
// Radio firmware versions
char RadioApplicationVersion[512]; unsigned char HasRadioApplicationVersion;
char RadioBootloaderVersion[512]; unsigned char HasRadioBootloaderVersion;
char RadioRadioVersion[512]; unsigned char HasRadioRadioVersion;
// Bluetooth / Security modules
char BluetoothVersion[512]; unsigned char HasBluetoothVersion;
char HidSeSamVersion[512]; unsigned char HasHidSeSamVersion;
char NxpSamVersion[512]; unsigned char HasNxpSamVersion;
char FelicaSamVersion[512]; unsigned char HasFelicaSamVersion;
// Protocol and advanced attributes
unsigned char ProtocolType;
unsigned char ReaderSupportsExtendedMode;
struct {
unsigned char ReverseAllBytesSupported;
unsigned char AsciiExtendedSupported;
unsigned char RoswellModeEnabled;
} AdvancedAttributes;
};
#pragma pack(pop)
| Field | Type | Description |
|---|---|---|
Processor | char[512] | Processor identifier |
PartNumber | char[512] | Reader part number |
SerialNumber | char[512] | Reader serial number |
ESN | char[512] | Electronic Serial Number |
ConfigurationCount | int | Number of configuration slots |
FirmwareVersion | char[512] | Firmware version string |
Has* | unsigned char | Presence flag for string/version fields (1 = present) |
HwSupported* | unsigned char | Hardware capability: whether the reader hardware supports this module |
HwInstalled* | unsigned char | Hardware capability: whether this module is installed |
HasInstalledHardwareInfo | unsigned char | 1 if hardware capability fields are populated |
ProtocolType | unsigned char | Protocol used by this reader connection |
ReaderSupportsExtendedMode | unsigned char | Read-only hardware capability flag |
AdvancedAttributes | nested struct | Read-only hardware capabilities (see below) |
AdvancedAttributes
Read-only hardware capabilities derived from the reader's internal configuration. These fields are populated automatically and cannot be changed via SetReaderConfiguration.
| Field | Type | Description |
|---|---|---|
ReverseAllBytesSupported | unsigned char | Reader hardware supports reverse-all-bytes mode |
AsciiExtendedSupported | unsigned char | Reader hardware supports ASCII extended mode |
RoswellModeEnabled | unsigned char | Roswell mode is enabled on the reader |
auto metadata = app->GetMetadataStruct();
if (metadata.HasPartNumber)
std::cout << "Part: " << metadata.PartNumber << std::endl;
if (metadata.HasFirmwareVersion)
std::cout << "Firmware: " << metadata.FirmwareVersion << std::endl;
// Hardware capabilities
if (metadata.HasInstalledHardwareInfo) {
std::cout << "BLE supported: " << (int)metadata.HwSupportedRfBle << std::endl;
std::cout << "Beeper supported: " << (int)metadata.HwSupportedBeeper << std::endl;
}
// Advanced attributes (read-only)
std::cout << "Reverse all bytes: "
<< (int)metadata.AdvancedAttributes.ReverseAllBytesSupported << std::endl;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ReaderMetadataStruct
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string Processor;
[MarshalAs(UnmanagedType.I1)] public bool HasProcessor;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string PartNumber;
[MarshalAs(UnmanagedType.I1)] public bool HasPartNumber;
// ... same pattern for string/version fields
// Hardware capability flags (bool)
public bool HwSupportedSamSe;
public bool HwSupportedRfBle;
public bool HwSupportedBeeper;
// ... (see C++ tab for full list)
public bool HasInstalledHardwareInfo;
// Protocol and advanced attributes
public byte ProtocolType;
public bool ReaderSupportsExtendedMode;
public AdvancedAttributes AdvancedAttributes;
}
| Field | Type | Description |
|---|---|---|
Processor | string | Processor identifier |
PartNumber | string | Reader part number |
SerialNumber | string | Reader serial number |
ESN | string | Electronic Serial Number |
FirmwareVersion | string | Firmware version string |
ConfigurationCount | int | Number of configurations |
Has* | bool | Presence flag for string/version fields |
HwSupported* / HwInstalled* | bool | Hardware capability flags |
HasInstalledHardwareInfo | bool | Whether hardware capability fields are populated |
ProtocolType | byte | Protocol type for this connection |
ReaderSupportsExtendedMode | bool | Read-only hardware capability |
AdvancedAttributes | AdvancedAttributes | Read-only hardware capabilities (nested struct) |
AdvancedAttributes (C#)
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct AdvancedAttributes
{
[MarshalAs(UnmanagedType.I1)] public bool ReverseAllBytesSupported;
[MarshalAs(UnmanagedType.I1)] public bool AsciiExtendedSupported;
[MarshalAs(UnmanagedType.I1)] public bool RoswellModeEnabled;
}
var metadata = app.GetMetadata();
if (metadata.HasPartNumber)
Console.WriteLine($"Part: {metadata.PartNumber}");
if (metadata.HasFirmwareVersion)
Console.WriteLine($"Firmware: {metadata.FirmwareVersion}");
// Hardware capabilities
if (metadata.HasInstalledHardwareInfo)
Console.WriteLine($"BLE supported: {metadata.HwSupportedRfBle}");
// Advanced attributes (read-only)
Console.WriteLine($"Reverse all bytes: {metadata.AdvancedAttributes.ReverseAllBytesSupported}");
Module: reader_integration_kit.structures
The raw ReaderMetadataStruct is a ctypes Structure with c_char * 512 fields and c_uint8 presence flags. In practice, get_metadata() returns a dict with only the fields where Has* is true, decoded as strings. Hardware capability fields and AdvancedAttributes are always included.
class ReaderMetadataStruct(Structure):
_pack_ = 1
_fields_ = [
("Processor", c_char * 512), ("HasProcessor", c_uint8),
("PartNumber", c_char * 512), ("HasPartNumber", c_uint8),
# ... same pattern for string/version fields
# Hardware capability flags
("HwSupportedSamSe", c_uint8),
("HwSupportedRfBle", c_uint8),
("HwSupportedBeeper", c_uint8),
# ... (see C++ tab for full list)
("HasInstalledHardwareInfo", c_uint8),
# Protocol and advanced attributes
("ProtocolType", c_uint8),
("ReaderSupportsExtendedMode", c_uint8),
("AdvancedAttributes", _AdvancedAttributes),
]
| Field | Type | Description |
|---|---|---|
Processor | c_char * 512 | Processor identifier |
PartNumber | c_char * 512 | Reader part number |
SerialNumber | c_char * 512 | Reader serial number |
ESN | c_char * 512 | Electronic Serial Number |
FirmwareVersion | c_char * 512 | Firmware version string |
ConfigurationCount | c_int | Number of configurations |
Has* | c_uint8 | Presence flag for string/version fields (1 = present) |
HwSupported* / HwInstalled* | c_uint8 | Hardware capability flags |
HasInstalledHardwareInfo | c_uint8 | Whether hardware capability fields are populated |
ProtocolType | c_uint8 | Protocol type for this connection |
ReaderSupportsExtendedMode | c_uint8 | Read-only hardware capability |
AdvancedAttributes | nested struct | Read-only hardware capabilities |
The AdvancedAttributes nested struct contains:
| Field | Type | Description |
|---|---|---|
ReverseAllBytesSupported | c_uint8 | Reader hardware supports reverse-all-bytes mode |
AsciiExtendedSupported | c_uint8 | Reader hardware supports ASCII extended mode |
RoswellModeEnabled | c_uint8 | Roswell mode is enabled on the reader |
metadata = app.get_metadata() # returns dict with present fields only
print(f"Part: {metadata.get('PartNumber')}")
print(f"Firmware: {metadata.get('FirmwareVersion')}")
# Advanced attributes are always included
advanced = metadata.get('AdvancedAttributes', {})
print(f"Reverse all bytes: {advanced.get('ReverseAllBytesSupported')}")
CardData
Represents credential data read from a card.
- C++
- C#
- Python
Namespace: Rik
class CardData
{
public:
std::vector<uint8_t> Data; // 32 bytes
unsigned int GetBitCount() const;
void SetBitCount(unsigned int bitCount);
bool IsEmpty() const;
std::string AsString();
};
| Member | Type | Description |
|---|---|---|
Data | std::vector<uint8_t> | Raw card data (32 bytes) |
GetBitCount() | unsigned int | Number of valid bits in the data |
SetBitCount() | void | Set the bit count |
IsEmpty() | bool | Returns true if bit count is zero and all data bytes are zero |
AsString() | std::string | Hex string representation of the data |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
public class CardData
{
public byte[] Data { get; }
public uint BitCount { get; }
public bool IsEmpty();
public string AsString();
public string AsHexString();
}
| Member | Type | Description |
|---|---|---|
Data | byte[] | Raw card data (32 bytes, cloned on access) |
BitCount | uint | Number of valid bits in the data |
IsEmpty() | bool | Returns true if bit count is zero and all data bytes are zero |
AsString() | string | UTF-8 decoded string representation |
AsHexString() | string | Hex string representation ("XX XX XX" format) |
Module: reader_integration_kit.structures
class CardData:
data: List[int] # 32-element list
bit_count: int # property (get/set)
def is_empty(self) -> bool: ...
def as_bytes(self) -> bytes: ...
def as_list(self) -> List[int]: ...
def as_hex_string(self) -> str: ...
| Member | Type | Description |
|---|---|---|
data | List[int] | Raw card data (32 elements) |
bit_count | int | Number of valid bits in the data (property) |
is_empty() | bool | Returns True if bit count is zero and all data bytes are zero |
as_bytes() | bytes | Raw bytes representation |
as_list() | List[int] | List of byte values |
as_hex_string() | str | Hex string representation |
Use IsEmpty() (C++/C#) or is_empty() (Python) to check whether card data was read. The method returns true when bit count is zero and all data bytes are zero, indicating no card is present.
When GetCardData is called with READ_8_BYTES / Read8Bytes, the buffer is still 32 bytes: bytes 0–7 hold data and bytes 8–31 are zero. GetBitCount() / BitCount / bit_count reports the full credential width, so a value greater than 64 means data was dropped. Prefer READ_32_BYTES / Read32Bytes. See GetCardDataSizeParameters.
LibraryInfo
ABI-safe struct containing library build and version metadata.
- C++
- C#
- Python
Namespace: Rik
struct LibraryInfo
{
char Name[256];
char InternalName[256];
char Comments[512];
char CompanyName[256];
char CompanyCopyright[512];
char LicenseText[1024];
char FileDescription[1024];
char SemVer[256];
char BuildVer[256];
char VersionString[256];
char BuildDate[256];
char BuildPlatform[256];
char BuildToolchain[256];
// ... additional build metadata fields (28 total)
};
| Key Fields | Type | Description |
|---|---|---|
Name | char[256] | Library name |
SemVer | char[256] | Semantic version string |
VersionString | char[256] | Full version string |
BuildDate | char[256] | Build date |
BuildPlatform | char[256] | Target platform |
BuildToolchain | char[256] | Compiler/toolchain used |
LibraryInfo info;
auto result = AbstractReader::GetLibraryInfo(info);
if (!result.HasException) {
std::cout << "Version: " << info.SemVer << std::endl;
}
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct LibraryInfo
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Name;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string InternalName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string Comments;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string CompanyName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string CompanyCopyright;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string LicenseText;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] public string FileDescription;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string SemVer;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string BuildVer;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string VersionString;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string BuildDate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string BuildPlatform;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string BuildToolchain;
// ... additional build metadata fields (28 total)
}
| Key Fields | Type | Description |
|---|---|---|
Name | string | Library name |
SemVer | string | Semantic version string |
VersionString | string | Full version string |
BuildDate | string | Build date |
BuildPlatform | string | Target platform |
BuildToolchain | string | Compiler/toolchain used |
var info = AbstractReader.GetLibraryInfo();
Console.WriteLine($"Version: {info.SemVer}");
Module: reader_integration_kit.structures
class LibraryInfo(Structure):
_fields_ = [
("Name", c_char * 256),
("InternalName", c_char * 256),
("Comments", c_char * 512),
("CompanyName", c_char * 256),
("CompanyCopyright", c_char * 512),
("LicenseText", c_char * 1024),
("FileDescription", c_char * 1024),
("SemVer", c_char * 256),
("BuildVer", c_char * 256),
("VersionString", c_char * 256),
("BuildDate", c_char * 256),
("BuildPlatform", c_char * 256),
("BuildToolchain", c_char * 256),
# ... additional build metadata fields (28 total)
]
| Key Fields | Type | Description |
|---|---|---|
Name | c_char * 256 | Library name |
SemVer | c_char * 256 | Semantic version string |
VersionString | c_char * 256 | Full version string |
BuildDate | c_char * 256 | Build date |
BuildPlatform | c_char * 256 | Target platform |
BuildToolchain | c_char * 256 | Compiler/toolchain used |
to_dict() decodes all fields as UTF-8 strings.
info = rik.AbstractReader.get_library_info()
print(f"Version: {info['SemVer']}")
LedConfiguration
LED state configuration.
- C++
- C#
- Python
Namespace: Rik
#pragma pack(push, 1)
struct LedConfiguration
{
LedColor Color;
bool SoftwareControlEnabled;
};
#pragma pack(pop)
| Field | Type | Description |
|---|---|---|
Color | LedColor (unsigned char) | Current LED color |
SoftwareControlEnabled | bool | Whether software LED control is active |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LedConfiguration
{
public LedColor Color;
[MarshalAs(UnmanagedType.I1)]
public bool SoftwareControlEnabled;
}
| Field | Type | Description |
|---|---|---|
Color | LedColor (byte) | Current LED color |
SoftwareControlEnabled | bool | Whether software LED control is active |
Module: reader_integration_kit.structures
class LedConfiguration(Structure):
_pack_ = 1
_fields_ = [
("color", c_uint8),
("software_control_enabled", c_bool),
]
| Field | Type | Description |
|---|---|---|
color | c_uint8 | Current LED color (use LedColor enum values) |
software_control_enabled | c_bool | Whether software LED control is active |
Python uses snake_case field names (color, software_control_enabled) for this struct.
RikResult
C API error result struct. Returned by C API functions to communicate success or failure across the ABI boundary.
- C++
- C#
- Python
Namespace: Rik
#pragma pack(push, 1)
struct RikResult
{
bool HasException;
char ExceptionType[256];
char Message[2048];
char FileName[2048];
int LineNumber;
char FunctionName[256];
bool HasProtocolException;
char ProtocolExceptionType[256];
char ProtocolMessage[2048];
char ProtocolFileName[2048];
int ProtocolLineNumber;
char ProtocolFunctionName[256];
};
#pragma pack(pop)
| Field | Type | Description |
|---|---|---|
HasException | bool | true if an error occurred |
ExceptionType | char[256] | Exception class name |
Message | char[2048] | Error description |
FileName | char[2048] | Source file where the error originated |
LineNumber | int | Source line number |
FunctionName | char[256] | Function name |
HasProtocolException | bool | true if a protocol-level error is also present |
Protocol* fields | (same types) | Protocol-level error details (same layout) |
RikResult result = Rik_Init(handle);
if (result.HasException) {
std::cerr << "Error: " << result.Message << std::endl;
if (result.HasProtocolException) {
std::cerr << "Protocol: " << result.ProtocolMessage << std::endl;
}
}
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct RikResult
{
[MarshalAs(UnmanagedType.I1)] public bool HasException;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string ExceptionType;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2048)] public string Message;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2048)] public string FileName;
public int LineNumber;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string FunctionName;
[MarshalAs(UnmanagedType.I1)] public bool HasProtocolException;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string ProtocolExceptionType;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2048)] public string ProtocolMessage;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2048)] public string ProtocolFileName;
public int ProtocolLineNumber;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string ProtocolFunctionName;
}
| Field | Type | Description |
|---|---|---|
HasException | bool | true if an error occurred |
ExceptionType | string | Exception class name |
Message | string | Error description |
FileName | string | Source file where the error originated |
LineNumber | int | Source line number |
FunctionName | string | Function name |
HasProtocolException | bool | true if a protocol-level error is also present |
Protocol* fields | (same types) | Protocol-level error details (same layout) |
Module: reader_integration_kit.structures
class RikResult(Structure):
_fields_ = [
("HasException", c_bool),
("ExceptionType", c_char * 256),
("Message", c_char * 2048),
("FileName", c_char * 2048),
("LineNumber", c_int),
("FunctionName", c_char * 256),
("HasProtocolException", c_bool),
("ProtocolExceptionType", c_char * 256),
("ProtocolMessage", c_char * 2048),
("ProtocolFileName", c_char * 2048),
("ProtocolLineNumber", c_int),
("ProtocolFunctionName", c_char * 256),
]
| Field | Type | Property Accessor | Description |
|---|---|---|---|
HasException | c_bool | has_exception | True if an error occurred |
ExceptionType | c_char * 256 | exception_type | Exception class name |
Message | c_char * 2048 | message | Error description |
FileName | c_char * 2048 | file_name | Source file where the error originated |
LineNumber | c_int | line_number | Source line number |
FunctionName | c_char * 256 | function_name | Function name |
HasProtocolException | c_bool | has_protocol_exception | True if a protocol-level error is present |
Protocol* fields | (same types) | protocol_* | Protocol-level error details (same layout) |
Snake_case property accessors decode the raw c_char buffers to UTF-8 strings.
LuidResponseInformation
Response data from a LUID query.
- C++
- C#
- Python
Namespace: Rik
struct LuidResponseInformation
{
uint16_t Luid;
uint16_t ApplicationVersionPackedBcd;
uint32_t BootloaderVersionUnpackedBcd;
};
| Field | Type | Description |
|---|---|---|
Luid | uint16_t | Logical Unit ID |
ApplicationVersionPackedBcd | uint16_t | Application version in packed BCD |
BootloaderVersionUnpackedBcd | uint32_t | Bootloader version in unpacked BCD |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LuidResponseInformation
{
public ushort Luid;
public ushort ApplicationVersionPackedBcd;
public uint BootloaderVersionUnpackedBcd;
}
| Field | Type | Description |
|---|---|---|
Luid | ushort | Logical Unit ID |
ApplicationVersionPackedBcd | ushort | Application version in packed BCD |
BootloaderVersionUnpackedBcd | uint | Bootloader version in unpacked BCD |
Module: reader_integration_kit.structures
class LuidResponseInformation(Structure):
_pack_ = 1
_fields_ = [
("Luid", c_uint16),
("ApplicationVersionPackedBcd", c_uint16),
("BootloaderVersionUnpackedBcd", c_uint32),
]
| Field | Type | Description |
|---|---|---|
Luid | c_uint16 | Logical Unit ID |
ApplicationVersionPackedBcd | c_uint16 | Application version in packed BCD |
BootloaderVersionUnpackedBcd | c_uint32 | Bootloader version in unpacked BCD |
SupportedCardTypesResult
Result of querying supported card types from a reader.
- C++
- C#
- Python
Namespace: Rik
struct SupportedCardTypesResult
{
uint32_t Count;
CardTypeInfo CardTypes[256];
};
| Field | Type | Description |
|---|---|---|
Count | uint32_t | Number of valid entries in CardTypes |
CardTypes | CardTypeInfo[256] | Fixed-size array; only the first Count entries are valid |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SupportedCardTypesResult
{
public uint Count;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
public CardTypeInfo[] CardTypes;
}
| Field | Type | Description |
|---|---|---|
Count | uint | Number of valid entries in CardTypes |
CardTypes | CardTypeInfo[] | Fixed-size array (256); only the first Count entries are valid |
Module: reader_integration_kit.structures
class SupportedCardTypesResult(Structure):
_pack_ = 1
_fields_ = [
("Count", c_uint32),
("CardTypes", CardTypeInfo * 256),
]
| Field | Type | Description |
|---|---|---|
Count | c_uint32 | Number of valid entries in CardTypes |
CardTypes | CardTypeInfo * 256 | Fixed-size array; only the first Count entries are valid |
CardTypeInfo
Describes a single card type supported by a reader. Packed size is 196 bytes (Pack = 1 / #pragma pack(1)).
- C++
- C#
- Python
Namespace: Rik (ABI struct; category/frequency types from RikCommon)
struct CardTypeInfo
{
uint16_t Value; // offset 0
char Name[128]; // offset 2
char EnumName[64]; // offset 130
RikCommon::CardCategory Category; // offset 194
RikCommon::CardFrequency Frequency; // offset 195
};
| Field | Type | Offset | Size | Description |
|---|---|---|---|---|
Value | uint16_t | 0 | 2 | Numeric card type identifier |
Name | char[128] | 2 | 128 | Human-readable card type name |
EnumName | char[64] | 130 | 64 | Enumeration constant name |
Category | RikCommon::CardCategory | 194 | 1 | Card category. See CardCategory. |
Frequency | RikCommon::CardFrequency | 195 | 1 | Card RF frequency. See CardFrequency. |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct CardTypeInfo
{
public ushort Value;
public string Name { get; }
public string EnumName { get; }
public CardCategory Category;
public CardFrequency Frequency;
}
| Field | Type | Offset | Size | Description |
|---|---|---|---|---|
Value | ushort | 0 | 2 | Numeric card type identifier |
Name | string | 2 | 128 | Human-readable card type name (read-only property) |
EnumName | string | 130 | 64 | Enumeration constant name (read-only property) |
Category | CardCategory | 194 | 1 | Card category. See CardCategory. |
Frequency | CardFrequency | 195 | 1 | Card RF frequency. See CardFrequency. |
Module: reader_integration_kit.structures
class CardTypeInfo(Structure):
_pack_ = 1
_fields_ = [
("Value", c_uint16),
("Name", c_char * 128),
("EnumName", c_char * 64),
("Category", c_uint8), # CardCategory ordinal
("Frequency", c_uint8), # CardFrequency ordinal
]
def to_dict(self) -> dict:
return {
"Value": self.Value,
"Name": self.Name.decode(...).rstrip("\x00"),
"EnumName": self.EnumName.decode(...).rstrip("\x00"),
"Category": self.Category, # int (CardCategory ordinal)
"Frequency": self.Frequency, # int (CardFrequency ordinal)
}
| Field | Type | Offset | Size | Description |
|---|---|---|---|---|
Value | c_uint16 | 0 | 2 | Numeric card type identifier |
Name | c_char * 128 | 2 | 128 | Human-readable card type name |
EnumName | c_char * 64 | 130 | 64 | Enumeration constant name |
Category | c_uint8 | 194 | 1 | Card category ordinal. See CardCategory. |
Frequency | c_uint8 | 195 | 1 | Card RF frequency ordinal. See CardFrequency. |
ReaderConfigurationStruct
Packed reader configuration (62 named fields across five blocks). C++ applications typically populate this via the ReaderConfiguration fluent builder. C# and Python use this struct directly with GetReaderConfiguration / SetReaderConfiguration.
Constants:
| Constant | Value | Description |
|---|---|---|
FAC_DIGIT_COUNT_MAX | 26 | Maximum value for FacDigitCount |
ID_DIGIT_COUNT_MAX | 26 | Maximum value for IdDigitCount |
PARITY_COUNT_MAX | 0x8E (142) | Maximum value for TotalStripLeadingParityCount and TotalStripTrailingParityCount |
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct ReaderConfigurationStruct
{
// Block1
uint8_t FacDigitCount;
uint8_t IdDigitCount;
uint8_t TotalStripLeadingParityCount;
uint8_t TotalStripTrailingParityCount;
uint8_t IdBitCount;
uint8_t ExpectedBitCount;
uint8_t IdAndFacDelimiter;
uint8_t TerminationCharacter;
uint8_t UseFixedLengthForFacAndId;
uint8_t EnforceExpectedBitCount;
uint8_t StripFacFromId;
uint8_t SendFacAfterStrippingIt;
uint8_t UseIdAndFacDelimiter;
uint8_t DisableKeystrokeTerminationCharacter;
uint8_t EnableContinuousRead;
uint8_t DisableKeystroking;
// Block2
uint16_t LegacyBitStreamTimeOutMs;
uint16_t DataHoldTimeMs;
uint16_t LockOutTimeMs;
uint16_t KeyPressTimeMs;
uint16_t KeyReleaseTimeMs;
uint8_t EnableIdExtendedPrecision;
uint8_t UseLowercaseHex;
uint8_t EnableProxProEmulation;
uint8_t EnableHexadecimalId;
uint8_t EnableHexadecimalFac;
uint8_t UseIndividualIdAndFacNumberFormats;
uint8_t UseNumericKeypad;
uint8_t ReaderSupportsReverseAllBytes;
uint8_t ReaderSupportsAsciiExtended;
uint8_t ReaderSupportsExtendedMode;
uint8_t EnableRoswellMode;
// Block3
uint8_t EnableRedLed;
uint8_t EnableGreenLed;
uint8_t EnableOemRelay;
uint8_t EnableOemBeeper;
uint8_t IsBootDevice;
uint8_t UseLeadingCharacters;
uint8_t EnabledSoftwareControlledLed;
uint8_t UseHexadecimalForBothFacAndId;
uint8_t InvertWiegandBits;
uint8_t EnableBeepOnCardRead;
uint8_t ReverseWiegandBits;
uint8_t ReverseWiegandBytes;
uint8_t UseDataInvert;
uint8_t CardGoneCharacters[2];
uint8_t LeadingCharacterCount;
uint8_t TrailingCharacterCount;
uint8_t LeadingTrailingCharacters[3];
// Block4
uint8_t UseIndividualIdAndFacFixedLengths;
uint8_t UseFixedLengthFac;
uint8_t UseFixedLengthId;
uint8_t CfgRb3;
uint8_t CfgRb4;
uint8_t EnableFacExtendedPrecision;
uint8_t AzertyKeyboardShift;
uint8_t EnableExtendedMode;
// Block5
uint8_t DisableCardConfiguration;
uint16_t CardType;
uint8_t SetHighPriorityCardType;
uint8_t JetMobileCompatibilityCharacter;
uint8_t JetMobileCharacterCount;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) (via PACKED_STRUCT_COMMON_EXPORT_BEGIN / END) — all fields are byte-aligned with no padding.
| Block | Field | Type | Description |
|---|---|---|---|
| Block1 | FacDigitCount | uint8_t | Number of FAC digits to output. Range: [0, 26]. |
| Block1 | IdDigitCount | uint8_t | Number of ID digits to output. Range: [0, 26]. |
| Block1 | TotalStripLeadingParityCount | uint8_t | Leading parity bits to strip. Range: [0, 0x8E / 142]. |
| Block1 | TotalStripTrailingParityCount | uint8_t | Trailing parity bits to strip. Range: [0, 0x8E / 142]. |
| Block1 | IdBitCount | uint8_t | Number of ID bits. |
| Block1 | ExpectedBitCount | uint8_t | Expected total bit count from reader. |
| Block1 | IdAndFacDelimiter | uint8_t | ASCII character used to separate FAC and ID output. |
| Block1 | TerminationCharacter | uint8_t | ASCII character appended at end of keystroke output. |
| Block1 | UseFixedLengthForFacAndId | uint8_t (0/1) | Pad FAC and ID to fixed digit lengths. |
| Block1 | EnforceExpectedBitCount | uint8_t (0/1) | Reject cards not matching ExpectedBitCount. |
| Block1 | StripFacFromId | uint8_t (0/1) | Remove FAC portion from ID output. |
| Block1 | SendFacAfterStrippingIt | uint8_t (0/1) | Re-emit FAC after stripping it from ID. |
| Block1 | UseIdAndFacDelimiter | uint8_t (0/1) | Insert IdAndFacDelimiter between FAC and ID. |
| Block1 | DisableKeystrokeTerminationCharacter | uint8_t (0/1) | Suppress the termination character in keystroke output. |
| Block1 | EnableContinuousRead | uint8_t (0/1) | Continuously report card presence. |
| Block1 | DisableKeystroking | uint8_t (0/1) | Suppress all keystroke output. |
| Block2 | LegacyBitStreamTimeOutMs | uint16_t | Legacy bit-stream timeout in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | DataHoldTimeMs | uint16_t | Data hold time in ms. Must be multiple of 50; range [0, 12750]. |
| Block2 | LockOutTimeMs | uint16_t | Lock-out time in ms. Must be multiple of 50; range [0, 12750]. |
| Block2 | KeyPressTimeMs | uint16_t | Key press duration in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | KeyReleaseTimeMs | uint16_t | Key release duration in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | EnableIdExtendedPrecision | uint8_t (0/1) | Enable extended precision for ID output. |
| Block2 | UseLowercaseHex | uint8_t (0/1) | Use lowercase hex digits in hexadecimal output. |
| Block2 | EnableProxProEmulation | uint8_t (0/1) | Emulate ProxPro output format. |
| Block2 | EnableHexadecimalId | uint8_t (0/1) | Output ID in hexadecimal format. |
| Block2 | EnableHexadecimalFac | uint8_t (0/1) | Output FAC in hexadecimal format. |
| Block2 | UseIndividualIdAndFacNumberFormats | uint8_t (0/1) | Apply separate number formats to ID and FAC independently. |
| Block2 | UseNumericKeypad | uint8_t (0/1) | Use numeric keypad scan codes for keystroke output. |
| Block2 | ReaderSupportsReverseAllBytes | uint8_t (0/1) | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | ReaderSupportsAsciiExtended | uint8_t (0/1) | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | ReaderSupportsExtendedMode | uint8_t (0/1) | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | EnableRoswellMode | uint8_t (0/1) | Device-preserved. Preserved by SetReaderConfiguration; not user-overridable. |
| Block3 | EnableRedLed | uint8_t (0/1) | Enable red LED. |
| Block3 | EnableGreenLed | uint8_t (0/1) | Enable green LED. |
| Block3 | EnableOemRelay | uint8_t (0/1) | Enable OEM relay output. |
| Block3 | EnableOemBeeper | uint8_t (0/1) | Enable OEM beeper. |
| Block3 | IsBootDevice | uint8_t (0/1) | Device-reported. Indicates device is in boot mode; set by reader. Not compared in equality. |
| Block3 | UseLeadingCharacters | uint8_t (0/1) | Prepend leading characters to keystroke output. |
| Block3 | EnabledSoftwareControlledLed | uint8_t (0/1) | Enable software-controlled LED. |
| Block3 | UseHexadecimalForBothFacAndId | uint8_t (0/1) | Output both FAC and ID in hexadecimal. |
| Block3 | InvertWiegandBits | uint8_t (0/1) | Invert Wiegand bit values. |
| Block3 | EnableBeepOnCardRead | uint8_t (0/1) | Beep when a card is read. |
| Block3 | ReverseWiegandBits | uint8_t (0/1) | Reverse bit order in Wiegand data. |
| Block3 | ReverseWiegandBytes | uint8_t (0/1) | Reverse byte order in Wiegand data. |
| Block3 | UseDataInvert | uint8_t (0/1) | Invert all data bits. |
| Block3 | CardGoneCharacters | uint8_t[2] | Up to 2 characters sent when card is removed. Add via AddCardGoneCharacter(). |
| Block3 | LeadingCharacterCount | uint8_t | Number of leading characters currently set (0–3 combined with trailing). |
| Block3 | TrailingCharacterCount | uint8_t | Number of trailing characters currently set (0–3 combined with leading). |
| Block3 | LeadingTrailingCharacters | uint8_t[3] | Combined leading then trailing characters. Add via AddLeadingCharacter() / AddTrailingCharacter(). |
| Block4 | UseIndividualIdAndFacFixedLengths | uint8_t (0/1) | Apply separate fixed lengths to ID and FAC. |
| Block4 | UseFixedLengthFac | uint8_t (0/1) | Pad FAC to fixed length. |
| Block4 | UseFixedLengthId | uint8_t (0/1) | Pad ID to fixed length. |
| Block4 | CfgRb3 | uint8_t | Opaque firmware configuration byte. No public meaning. |
| Block4 | CfgRb4 | uint8_t | Opaque firmware configuration byte. No public meaning. |
| Block4 | EnableFacExtendedPrecision | uint8_t (0/1) | Enable extended precision for FAC output. |
| Block4 | AzertyKeyboardShift | uint8_t (0/1) | Apply AZERTY keyboard shift mapping. |
| Block4 | EnableExtendedMode | uint8_t (0/1) | Enable extended configuration mode. |
| Block5 | DisableCardConfiguration | uint8_t (0/1) | Disable card-specific configuration. |
| Block5 | CardType | uint16_t | Card type identifier. |
| Block5 | SetHighPriorityCardType | uint8_t (0/1) | Treat CardType as high-priority. |
| Block5 | JetMobileCompatibilityCharacter | uint8_t | JetMobile compatibility character. |
| Block5 | JetMobileCharacterCount | uint8_t | JetMobile character count. |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.Configuration
[StructLayout(LayoutKind.Sequential)]
public struct ReaderConfigurationStruct
{
[MarshalAs(UnmanagedType.U1)] public byte FacDigitCount;
[MarshalAs(UnmanagedType.U1)] public byte IdDigitCount;
[MarshalAs(UnmanagedType.U1)] public byte TotalStripLeadingParityCount;
[MarshalAs(UnmanagedType.U1)] public byte TotalStripTrailingParityCount;
[MarshalAs(UnmanagedType.U1)] public byte IdBitCount;
[MarshalAs(UnmanagedType.U1)] public byte ExpectedBitCount;
[MarshalAs(UnmanagedType.U1)] public byte IdAndFacDelimiter;
[MarshalAs(UnmanagedType.U1)] public byte TerminationCharacter;
[MarshalAs(UnmanagedType.U1)] public bool UseFixedLengthForFacAndId;
[MarshalAs(UnmanagedType.U1)] public bool EnforceExpectedBitCount;
[MarshalAs(UnmanagedType.U1)] public bool StripFacFromId;
[MarshalAs(UnmanagedType.U1)] public bool SendFacAfterStrippingIt;
[MarshalAs(UnmanagedType.U1)] public bool UseIdAndFacDelimiter;
[MarshalAs(UnmanagedType.U1)] public bool DisableKeystrokeTerminationCharacter;
[MarshalAs(UnmanagedType.U1)] public bool EnableContinuousRead;
[MarshalAs(UnmanagedType.U1)] public bool DisableKeystroking;
[MarshalAs(UnmanagedType.U2)] public ushort LegacyBitStreamTimeOutMs;
[MarshalAs(UnmanagedType.U2)] public ushort DataHoldTimeMs;
[MarshalAs(UnmanagedType.U2)] public ushort LockOutTimeMs;
[MarshalAs(UnmanagedType.U2)] public ushort KeyPressTimeMs;
[MarshalAs(UnmanagedType.U2)] public ushort KeyReleaseTimeMs;
[MarshalAs(UnmanagedType.U1)] public bool EnableIdExtendedPrecision;
[MarshalAs(UnmanagedType.U1)] public bool UseLowercaseHex;
[MarshalAs(UnmanagedType.U1)] public bool EnableProxProEmulation;
[MarshalAs(UnmanagedType.U1)] public bool EnableHexadecimalId;
[MarshalAs(UnmanagedType.U1)] public bool EnableHexadecimalFac;
[MarshalAs(UnmanagedType.U1)] public bool UseIndividualIdAndFacNumberFormats;
[MarshalAs(UnmanagedType.U1)] public bool UseNumericKeypad;
[MarshalAs(UnmanagedType.U1)] public bool ReaderSupportsReverseAllBytes;
[MarshalAs(UnmanagedType.U1)] public bool ReaderSupportsAsciiExtended;
[MarshalAs(UnmanagedType.U1)] public bool ReaderSupportsExtendedMode;
[MarshalAs(UnmanagedType.U1)] public bool EnableRoswellMode;
[MarshalAs(UnmanagedType.U1)] public bool EnableRedLed;
[MarshalAs(UnmanagedType.U1)] public bool EnableGreenLed;
[MarshalAs(UnmanagedType.U1)] public bool EnableOemRelay;
[MarshalAs(UnmanagedType.U1)] public bool EnableOemBeeper;
[MarshalAs(UnmanagedType.U1)] public bool IsBootDevice;
[MarshalAs(UnmanagedType.U1)] public bool UseLeadingCharacters;
[MarshalAs(UnmanagedType.U1)] public bool EnabledSoftwareControlledLed;
[MarshalAs(UnmanagedType.U1)] public bool UseHexadecimalForBothFacAndId;
[MarshalAs(UnmanagedType.U1)] public bool InvertWiegandBits;
[MarshalAs(UnmanagedType.U1)] public bool EnableBeepOnCardRead;
[MarshalAs(UnmanagedType.U1)] public bool ReverseWiegandBits;
[MarshalAs(UnmanagedType.U1)] public bool ReverseWiegandBytes;
[MarshalAs(UnmanagedType.U1)] public bool UseDataInvert;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] CardGoneCharacters;
[MarshalAs(UnmanagedType.U1)] public byte LeadingCharacterCount;
[MarshalAs(UnmanagedType.U1)] public byte TrailingCharacterCount;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] LeadingTrailingCharacters;
[MarshalAs(UnmanagedType.U1)] public bool UseIndividualIdAndFacFixedLengths;
[MarshalAs(UnmanagedType.U1)] public bool UseFixedLengthFac;
[MarshalAs(UnmanagedType.U1)] public bool UseFixedLengthId;
[MarshalAs(UnmanagedType.U1)] public byte CfgRb3;
[MarshalAs(UnmanagedType.U1)] public byte CfgRb4;
[MarshalAs(UnmanagedType.U1)] public bool EnableFacExtendedPrecision;
[MarshalAs(UnmanagedType.U1)] public bool AzertyKeyboardShift;
[MarshalAs(UnmanagedType.U1)] public bool EnableExtendedMode;
[MarshalAs(UnmanagedType.U1)] public bool DisableCardConfiguration;
[MarshalAs(UnmanagedType.U2)] public ushort CardType;
[MarshalAs(UnmanagedType.U1)] public bool SetHighPriorityCardType;
[MarshalAs(UnmanagedType.U1)] public byte JetMobileCompatibilityCharacter;
[MarshalAs(UnmanagedType.U1)] public byte JetMobileCharacterCount;
}
C# layout is [StructLayout(LayoutKind.Sequential)] with no Pack = 1. Flag fields are bool with [MarshalAs(UnmanagedType.U1)].
| Block | Field | Type | Description |
|---|---|---|---|
| Block1 | FacDigitCount | byte | Number of FAC digits to output. Range: [0, 26]. |
| Block1 | IdDigitCount | byte | Number of ID digits to output. Range: [0, 26]. |
| Block1 | TotalStripLeadingParityCount | byte | Leading parity bits to strip. Range: [0, 0x8E / 142]. |
| Block1 | TotalStripTrailingParityCount | byte | Trailing parity bits to strip. Range: [0, 0x8E / 142]. |
| Block1 | IdBitCount | byte | Number of ID bits. |
| Block1 | ExpectedBitCount | byte | Expected total bit count from reader. |
| Block1 | IdAndFacDelimiter | byte | ASCII character used to separate FAC and ID output. |
| Block1 | TerminationCharacter | byte | ASCII character appended at end of keystroke output. |
| Block1 | UseFixedLengthForFacAndId | bool | Pad FAC and ID to fixed digit lengths. |
| Block1 | EnforceExpectedBitCount | bool | Reject cards not matching ExpectedBitCount. |
| Block1 | StripFacFromId | bool | Remove FAC portion from ID output. |
| Block1 | SendFacAfterStrippingIt | bool | Re-emit FAC after stripping it from ID. |
| Block1 | UseIdAndFacDelimiter | bool | Insert IdAndFacDelimiter between FAC and ID. |
| Block1 | DisableKeystrokeTerminationCharacter | bool | Suppress the termination character in keystroke output. |
| Block1 | EnableContinuousRead | bool | Continuously report card presence. |
| Block1 | DisableKeystroking | bool | Suppress all keystroke output. |
| Block2 | LegacyBitStreamTimeOutMs | ushort | Legacy bit-stream timeout in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | DataHoldTimeMs | ushort | Data hold time in ms. Must be multiple of 50; range [0, 12750]. |
| Block2 | LockOutTimeMs | ushort | Lock-out time in ms. Must be multiple of 50; range [0, 12750]. |
| Block2 | KeyPressTimeMs | ushort | Key press duration in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | KeyReleaseTimeMs | ushort | Key release duration in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | EnableIdExtendedPrecision | bool | Enable extended precision for ID output. |
| Block2 | UseLowercaseHex | bool | Use lowercase hex digits in hexadecimal output. |
| Block2 | EnableProxProEmulation | bool | Emulate ProxPro output format. |
| Block2 | EnableHexadecimalId | bool | Output ID in hexadecimal format. |
| Block2 | EnableHexadecimalFac | bool | Output FAC in hexadecimal format. |
| Block2 | UseIndividualIdAndFacNumberFormats | bool | Apply separate number formats to ID and FAC independently. |
| Block2 | UseNumericKeypad | bool | Use numeric keypad scan codes for keystroke output. |
| Block2 | ReaderSupportsReverseAllBytes | bool | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | ReaderSupportsAsciiExtended | bool | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | ReaderSupportsExtendedMode | bool | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | EnableRoswellMode | bool | Device-preserved. Preserved by SetReaderConfiguration; not user-overridable. |
| Block3 | EnableRedLed | bool | Enable red LED. |
| Block3 | EnableGreenLed | bool | Enable green LED. |
| Block3 | EnableOemRelay | bool | Enable OEM relay output. |
| Block3 | EnableOemBeeper | bool | Enable OEM beeper. |
| Block3 | IsBootDevice | bool | Device-reported. Indicates device is in boot mode; set by reader. Not compared in equality. |
| Block3 | UseLeadingCharacters | bool | Prepend leading characters to keystroke output. |
| Block3 | EnabledSoftwareControlledLed | bool | Enable software-controlled LED. |
| Block3 | UseHexadecimalForBothFacAndId | bool | Output both FAC and ID in hexadecimal. |
| Block3 | InvertWiegandBits | bool | Invert Wiegand bit values. |
| Block3 | EnableBeepOnCardRead | bool | Beep when a card is read. |
| Block3 | ReverseWiegandBits | bool | Reverse bit order in Wiegand data. |
| Block3 | ReverseWiegandBytes | bool | Reverse byte order in Wiegand data. |
| Block3 | UseDataInvert | bool | Invert all data bits. |
| Block3 | CardGoneCharacters | byte[] SizeConst=2 | Up to 2 characters sent when card is removed. |
| Block3 | LeadingCharacterCount | byte | Number of leading characters currently set (0–3 combined with trailing). |
| Block3 | TrailingCharacterCount | byte | Number of trailing characters currently set (0–3 combined with leading). |
| Block3 | LeadingTrailingCharacters | byte[] SizeConst=3 | Combined leading then trailing characters. |
| Block4 | UseIndividualIdAndFacFixedLengths | bool | Apply separate fixed lengths to ID and FAC. |
| Block4 | UseFixedLengthFac | bool | Pad FAC to fixed length. |
| Block4 | UseFixedLengthId | bool | Pad ID to fixed length. |
| Block4 | CfgRb3 | byte | Opaque firmware configuration byte. No public meaning. |
| Block4 | CfgRb4 | byte | Opaque firmware configuration byte. No public meaning. |
| Block4 | EnableFacExtendedPrecision | bool | Enable extended precision for FAC output. |
| Block4 | AzertyKeyboardShift | bool | Apply AZERTY keyboard shift mapping. |
| Block4 | EnableExtendedMode | bool | Enable extended configuration mode. |
| Block5 | DisableCardConfiguration | bool | Disable card-specific configuration. |
| Block5 | CardType | ushort | Card type identifier. |
| Block5 | SetHighPriorityCardType | bool | Treat CardType as high-priority. |
| Block5 | JetMobileCompatibilityCharacter | byte | JetMobile compatibility character. |
| Block5 | JetMobileCharacterCount | byte | JetMobile character count. |
Module: reader_integration_kit.structures
class ReaderConfigurationStruct(Structure):
_pack_ = 1
_fields_ = [
("FacDigitCount", c_uint8),
("IdDigitCount", c_uint8),
("TotalStripLeadingParityCount", c_uint8),
("TotalStripTrailingParityCount", c_uint8),
("IdBitCount", c_uint8),
("ExpectedBitCount", c_uint8),
("IdAndFacDelimiter", c_uint8),
("TerminationCharacter", c_uint8),
("UseFixedLengthForFacAndId", c_uint8),
("EnforceExpectedBitCount", c_uint8),
("StripFacFromId", c_uint8),
("SendFacAfterStrippingIt", c_uint8),
("UseIdAndFacDelimiter", c_uint8),
("DisableKeystrokeTerminationCharacter", c_uint8),
("EnableContinuousRead", c_uint8),
("DisableKeystroking", c_uint8),
("LegacyBitStreamTimeOutMs", c_uint16),
("DataHoldTimeMs", c_uint16),
("LockOutTimeMs", c_uint16),
("KeyPressTimeMs", c_uint16),
("KeyReleaseTimeMs", c_uint16),
("EnableIdExtendedPrecision", c_uint8),
("UseLowercaseHex", c_uint8),
("EnableProxProEmulation", c_uint8),
("EnableHexadecimalId", c_uint8),
("EnableHexadecimalFac", c_uint8),
("UseIndividualIdAndFacNumberFormats", c_uint8),
("UseNumericKeypad", c_uint8),
("ReaderSupportsReverseAllBytes", c_uint8),
("ReaderSupportsAsciiExtended", c_uint8),
("ReaderSupportsExtendedMode", c_uint8),
("EnableRoswellMode", c_uint8),
("EnableRedLed", c_uint8),
("EnableGreenLed", c_uint8),
("EnableOemRelay", c_uint8),
("EnableOemBeeper", c_uint8),
("IsBootDevice", c_uint8),
("UseLeadingCharacters", c_uint8),
("EnabledSoftwareControlledLed", c_uint8),
("UseHexadecimalForBothFacAndId", c_uint8),
("InvertWiegandBits", c_uint8),
("EnableBeepOnCardRead", c_uint8),
("ReverseWiegandBits", c_uint8),
("ReverseWiegandBytes", c_uint8),
("UseDataInvert", c_uint8),
("CardGoneCharacters", c_uint8 * 2),
("LeadingCharacterCount", c_uint8),
("TrailingCharacterCount", c_uint8),
("LeadingTrailingCharacters", c_uint8 * 3),
("UseIndividualIdAndFacFixedLengths", c_uint8),
("UseFixedLengthFac", c_uint8),
("UseFixedLengthId", c_uint8),
("CfgRb3", c_uint8),
("CfgRb4", c_uint8),
("EnableFacExtendedPrecision", c_uint8),
("AzertyKeyboardShift", c_uint8),
("EnableExtendedMode", c_uint8),
("DisableCardConfiguration", c_uint8),
("CardType", c_uint16),
("SetHighPriorityCardType", c_uint8),
("JetMobileCompatibilityCharacter", c_uint8),
("JetMobileCharacterCount", c_uint8),
]
Python sets _pack_ = 1. Flag fields are stored as c_uint8 (0 or 1), not c_bool.
| Block | Field | Type | Description |
|---|---|---|---|
| Block1 | FacDigitCount | c_uint8 | Number of FAC digits to output. Range: [0, 26]. |
| Block1 | IdDigitCount | c_uint8 | Number of ID digits to output. Range: [0, 26]. |
| Block1 | TotalStripLeadingParityCount | c_uint8 | Leading parity bits to strip. Range: [0, 0x8E / 142]. |
| Block1 | TotalStripTrailingParityCount | c_uint8 | Trailing parity bits to strip. Range: [0, 0x8E / 142]. |
| Block1 | IdBitCount | c_uint8 | Number of ID bits. |
| Block1 | ExpectedBitCount | c_uint8 | Expected total bit count from reader. |
| Block1 | IdAndFacDelimiter | c_uint8 | ASCII character used to separate FAC and ID output. |
| Block1 | TerminationCharacter | c_uint8 | ASCII character appended at end of keystroke output. |
| Block1 | UseFixedLengthForFacAndId | c_uint8 | Pad FAC and ID to fixed digit lengths. |
| Block1 | EnforceExpectedBitCount | c_uint8 | Reject cards not matching ExpectedBitCount. |
| Block1 | StripFacFromId | c_uint8 | Remove FAC portion from ID output. |
| Block1 | SendFacAfterStrippingIt | c_uint8 | Re-emit FAC after stripping it from ID. |
| Block1 | UseIdAndFacDelimiter | c_uint8 | Insert IdAndFacDelimiter between FAC and ID. |
| Block1 | DisableKeystrokeTerminationCharacter | c_uint8 | Suppress the termination character in keystroke output. |
| Block1 | EnableContinuousRead | c_uint8 | Continuously report card presence. |
| Block1 | DisableKeystroking | c_uint8 | Suppress all keystroke output. |
| Block2 | LegacyBitStreamTimeOutMs | c_uint16 | Legacy bit-stream timeout in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | DataHoldTimeMs | c_uint16 | Data hold time in ms. Must be multiple of 50; range [0, 12750]. |
| Block2 | LockOutTimeMs | c_uint16 | Lock-out time in ms. Must be multiple of 50; range [0, 12750]. |
| Block2 | KeyPressTimeMs | c_uint16 | Key press duration in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | KeyReleaseTimeMs | c_uint16 | Key release duration in ms. Must be multiple of 4; range [0, 1020]. |
| Block2 | EnableIdExtendedPrecision | c_uint8 | Enable extended precision for ID output. |
| Block2 | UseLowercaseHex | c_uint8 | Use lowercase hex digits in hexadecimal output. |
| Block2 | EnableProxProEmulation | c_uint8 | Emulate ProxPro output format. |
| Block2 | EnableHexadecimalId | c_uint8 | Output ID in hexadecimal format. |
| Block2 | EnableHexadecimalFac | c_uint8 | Output FAC in hexadecimal format. |
| Block2 | UseIndividualIdAndFacNumberFormats | c_uint8 | Apply separate number formats to ID and FAC independently. |
| Block2 | UseNumericKeypad | c_uint8 | Use numeric keypad scan codes for keystroke output. |
| Block2 | ReaderSupportsReverseAllBytes | c_uint8 | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | ReaderSupportsAsciiExtended | c_uint8 | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | ReaderSupportsExtendedMode | c_uint8 | Device-reported. Indicates device capability; set by reader. Not compared in equality. |
| Block2 | EnableRoswellMode | c_uint8 | Device-preserved. Preserved by SetReaderConfiguration; not user-overridable. |
| Block3 | EnableRedLed | c_uint8 | Enable red LED. |
| Block3 | EnableGreenLed | c_uint8 | Enable green LED. |
| Block3 | EnableOemRelay | c_uint8 | Enable OEM relay output. |
| Block3 | EnableOemBeeper | c_uint8 | Enable OEM beeper. |
| Block3 | IsBootDevice | c_uint8 | Device-reported. Indicates device is in boot mode; set by reader. Not compared in equality. |
| Block3 | UseLeadingCharacters | c_uint8 | Prepend leading characters to keystroke output. |
| Block3 | EnabledSoftwareControlledLed | c_uint8 | Enable software-controlled LED. |
| Block3 | UseHexadecimalForBothFacAndId | c_uint8 | Output both FAC and ID in hexadecimal. |
| Block3 | InvertWiegandBits | c_uint8 | Invert Wiegand bit values. |
| Block3 | EnableBeepOnCardRead | c_uint8 | Beep when a card is read. |
| Block3 | ReverseWiegandBits | c_uint8 | Reverse bit order in Wiegand data. |
| Block3 | ReverseWiegandBytes | c_uint8 | Reverse byte order in Wiegand data. |
| Block3 | UseDataInvert | c_uint8 | Invert all data bits. |
| Block3 | CardGoneCharacters | c_uint8 * 2 | Up to 2 characters sent when card is removed. |
| Block3 | LeadingCharacterCount | c_uint8 | Number of leading characters currently set (0–3 combined with trailing). |
| Block3 | TrailingCharacterCount | c_uint8 | Number of trailing characters currently set (0–3 combined with leading). |
| Block3 | LeadingTrailingCharacters | c_uint8 * 3 | Combined leading then trailing characters. |
| Block4 | UseIndividualIdAndFacFixedLengths | c_uint8 | Apply separate fixed lengths to ID and FAC. |
| Block4 | UseFixedLengthFac | c_uint8 | Pad FAC to fixed length. |
| Block4 | UseFixedLengthId | c_uint8 | Pad ID to fixed length. |
| Block4 | CfgRb3 | c_uint8 | Opaque firmware configuration byte. No public meaning. |
| Block4 | CfgRb4 | c_uint8 | Opaque firmware configuration byte. No public meaning. |
| Block4 | EnableFacExtendedPrecision | c_uint8 | Enable extended precision for FAC output. |
| Block4 | AzertyKeyboardShift | c_uint8 | Apply AZERTY keyboard shift mapping. |
| Block4 | EnableExtendedMode | c_uint8 | Enable extended configuration mode. |
| Block5 | DisableCardConfiguration | c_uint8 | Disable card-specific configuration. |
| Block5 | CardType | c_uint16 | Card type identifier. |
| Block5 | SetHighPriorityCardType | c_uint8 | Treat CardType as high-priority. |
| Block5 | JetMobileCompatibilityCharacter | c_uint8 | JetMobile compatibility character. |
| Block5 | JetMobileCharacterCount | c_uint8 | JetMobile character count. |
ExtendedConfiguration
Packed extended field-separator configuration. Namespace: RikCommon.
Constants: EXTENDED_CONFIGURATION_SIZE = 128 (serialized ToVector / FromVector buffer size, not sizeof the in-memory struct), MAX_FIELD_ENTRIES = 31, MAX_SEPARATOR_ENTRIES = 31.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct ExtendedConfiguration
{
FieldSeparatorDataHeader Header;
FieldEntry FieldEntries[MAX_FIELD_ENTRIES];
SeparatorEntry SeparatorEntries[MAX_SEPARATOR_ENTRIES];
ApplicationData AppData;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
Header | FieldSeparatorDataHeader | Header metadata |
FieldEntries | FieldEntry[31] | Up to MAX_FIELD_ENTRIES (31) field entries |
SeparatorEntries | SeparatorEntry[31] | Matching separator entries |
AppData | ApplicationData | Application-specific data |
C++ methods:
static ExtendedConfiguration FromVector(const std::vector<uint8_t>& data);
static std::vector<uint8_t> ToVector(const ExtendedConfiguration& extendedConfiguration);
bool operator==(const ExtendedConfiguration& other) const;
bool operator!=(const ExtendedConfiguration& other) const;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ExtendedConfiguration
{
public FieldSeparatorDataHeader Header;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 31)]
public FieldEntry[] FieldEntries;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 31)]
public SeparatorEntry[] SeparatorEntries;
public ReaderData AppData;
}
| Field | Type | Description |
|---|---|---|
Header | FieldSeparatorDataHeader | Header metadata |
FieldEntries | FieldEntry[] SizeConst=31 | Up to 31 field entries |
SeparatorEntries | SeparatorEntry[] SizeConst=31 | Matching separator entries |
AppData | ReaderData | Application-specific data (C++ name: ApplicationData) |
Module: reader_integration_kit.structures
class ExtendedConfiguration(ctypes.Structure):
_fields_ = [
("Header", FieldSeparatorDataHeader),
("FieldEntries", FieldEntry * 31),
("SeparatorEntries", SeparatorEntry * 31),
("AppData", ReaderData),
]
This Python struct does not set _pack_ = 1.
| Field | Type | Description |
|---|---|---|
Header | FieldSeparatorDataHeader | Header metadata |
FieldEntries | FieldEntry * 31 | Up to 31 field entries |
SeparatorEntries | SeparatorEntry * 31 | Matching separator entries |
AppData | ReaderData | Application-specific data (C++ name: ApplicationData) |
FieldSeparatorDataHeader
Header for an ExtendedConfiguration.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct FieldSeparatorDataHeader
{
uint8_t FieldSeparatorStructureVersion;
uint8_t HeaderSize;
uint8_t FieldEntrySize;
uint8_t FieldEntryCount;
uint8_t SeparatorEntrySize;
uint8_t SeparatorEntryCount;
uint8_t MaxStorageSize;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
FieldSeparatorStructureVersion | uint8_t | Structure version. Validate() requires >= 1. |
HeaderSize | uint8_t | Header size in bytes. Validate() requires == 4. |
FieldEntrySize | uint8_t | Size of each field entry. Validate() requires == 4. |
FieldEntryCount | uint8_t | Number of field entries. Validate() range [0, 31]. |
SeparatorEntrySize | uint8_t | Size of each separator entry. Validate() requires == 2. |
SeparatorEntryCount | uint8_t | Number of separator entries. Validate() range [0, 31]. |
MaxStorageSize | uint8_t | Maximum storage size. Validate() requires == 16. |
C++ methods:
static FieldSeparatorDataHeader FromVector(const std::vector<uint8_t>& data);
static std::vector<uint8_t> ToVector(const FieldSeparatorDataHeader& header);
static void Validate(const FieldSeparatorDataHeader& header);
bool operator==(const FieldSeparatorDataHeader& other) const;
bool operator!=(const FieldSeparatorDataHeader& other) const;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FieldSeparatorDataHeader
{
public byte FieldSeparatorStructureVersion;
public byte HeaderSize;
public byte FieldEntrySize;
public byte FieldEntryCount;
public byte SeparatorEntrySize;
public byte SeparatorEntryCount;
public byte MaxStorageSize;
}
| Field | Type | Description |
|---|---|---|
FieldSeparatorStructureVersion | byte | Structure version |
HeaderSize | byte | Header size in bytes |
FieldEntrySize | byte | Size of each field entry |
FieldEntryCount | byte | Number of field entries |
SeparatorEntrySize | byte | Size of each separator entry |
SeparatorEntryCount | byte | Number of separator entries |
MaxStorageSize | byte | Maximum storage size |
Module: reader_integration_kit.structures
class FieldSeparatorDataHeader(Structure):
_fields_ = [
("FieldSeparatorStructureVersion", c_uint8),
("HeaderSize", c_uint8),
("FieldEntrySize", c_uint8),
("FieldEntryCount", c_uint8),
("SeparatorEntrySize", c_uint8),
("SeparatorEntryCount", c_uint8),
("MaxStorageSize", c_uint8),
]
This Python struct does not set _pack_ = 1.
| Field | Type | Description |
|---|---|---|
FieldSeparatorStructureVersion | c_uint8 | Structure version |
HeaderSize | c_uint8 | Header size in bytes |
FieldEntrySize | c_uint8 | Size of each field entry |
FieldEntryCount | c_uint8 | Number of field entries |
SeparatorEntrySize | c_uint8 | Size of each separator entry |
SeparatorEntryCount | c_uint8 | Number of separator entries |
MaxStorageSize | c_uint8 | Maximum storage size |
FieldEntry
One extended-configuration field. ConversionType uses DataConversionType.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct FieldEntry
{
uint8_t FieldValid;
DataConversionType ConversionType;
uint8_t FixedFieldOutputLength;
uint8_t ReverseBits;
uint8_t ReverseBytes;
uint8_t FiveBMS;
uint8_t InvertBits;
uint8_t ReverseAllBytes;
uint8_t UseHash;
uint8_t HashKey;
uint8_t StartingBitPosition;
uint8_t BitCountOfField;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
FieldValid | uint8_t | Whether this entry is valid (0 or 1) |
ConversionType | DataConversionType | Output conversion. Validate() requires <= DataConversionType::OCTAL |
FixedFieldOutputLength | uint8_t | Fixed output length. Validate() range [0, 31] |
ReverseBits | uint8_t | Reverse bits (0 or 1) |
ReverseBytes | uint8_t | Reverse bytes (0 or 1) |
FiveBMS | uint8_t | Five-bit encoding (0 or 1) |
InvertBits | uint8_t | Invert bits (0 or 1) |
ReverseAllBytes | uint8_t | Reverse all bytes (0 or 1) |
UseHash | uint8_t | Apply hash (0 or 1) |
HashKey | uint8_t | Selects HashKeyA (0) or HashKeyB (1) |
StartingBitPosition | uint8_t | Starting bit of this field |
BitCountOfField | uint8_t | Number of bits in this field |
C++ methods:
static FieldEntry FromVector(const std::vector<uint8_t>& data);
static std::vector<uint8_t> ToVector(const FieldEntry& fieldEntry);
static void Validate(const FieldEntry& fieldEntry);
bool operator==(const FieldEntry& other) const;
bool operator!=(const FieldEntry& other) const;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FieldEntry
{
public byte FieldValid;
[MarshalAs(UnmanagedType.U1)]
public DataConversionType ConversionType;
public byte FixedFieldOutputLength;
public byte ReverseBits;
public byte ReverseBytes;
public byte FiveBMS;
public byte InvertBits;
public byte ReverseAllBytes;
public byte UseHash;
public byte HashKey;
public byte StartingBitPosition;
public byte BitCountOfField;
}
| Field | Type | Description |
|---|---|---|
FieldValid | byte | Whether this entry is valid (0 or 1) |
ConversionType | DataConversionType | Output conversion |
FixedFieldOutputLength | byte | Fixed output length (0–31) |
ReverseBits | byte | Reverse bits (0 or 1) |
ReverseBytes | byte | Reverse bytes (0 or 1) |
FiveBMS | byte | Five-bit encoding (0 or 1) |
InvertBits | byte | Invert bits (0 or 1) |
ReverseAllBytes | byte | Reverse all bytes (0 or 1) |
UseHash | byte | Apply hash (0 or 1) |
HashKey | byte | Selects HashKeyA (0) or HashKeyB (1) |
StartingBitPosition | byte | Starting bit of this field |
BitCountOfField | byte | Number of bits in this field |
Module: reader_integration_kit.structures
class FieldEntry(Structure):
_fields_ = [
("FieldValid", c_uint8),
("ConversionType", c_uint8),
("FixedFieldOutputLength", c_uint8),
("ReverseBits", c_uint8),
("ReverseBytes", c_uint8),
("FiveBMS", c_uint8),
("InvertBits", c_uint8),
("ReverseAllBytes", c_uint8),
("UseHash", c_uint8),
("HashKey", c_uint8),
("StartingBitPosition", c_uint8),
("BitCountOfField", c_uint8),
]
This Python struct does not set _pack_ = 1. ConversionType is stored as c_uint8; use DataConversionType IntEnum values when setting.
| Field | Type | Description |
|---|---|---|
FieldValid | c_uint8 | Whether this entry is valid (0 or 1) |
ConversionType | c_uint8 | Output conversion (DataConversionType values) |
FixedFieldOutputLength | c_uint8 | Fixed output length (0–31) |
ReverseBits | c_uint8 | Reverse bits (0 or 1) |
ReverseBytes | c_uint8 | Reverse bytes (0 or 1) |
FiveBMS | c_uint8 | Five-bit encoding (0 or 1) |
InvertBits | c_uint8 | Invert bits (0 or 1) |
ReverseAllBytes | c_uint8 | Reverse all bytes (0 or 1) |
UseHash | c_uint8 | Apply hash (0 or 1) |
HashKey | c_uint8 | Selects HashKeyA (0) or HashKeyB (1) |
StartingBitPosition | c_uint8 | Starting bit of this field |
BitCountOfField | c_uint8 | Number of bits in this field |
SeparatorEntry
One separator entry in an ExtendedConfiguration. Constant: MAX_SEPARATOR_CHARS_PER_ENTRY = 31.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct SeparatorEntry
{
uint8_t SeparatorValid;
uint8_t CharacterSize;
uint8_t VirtualCharacterCount;
uint8_t ByteOffset;
SeparatorCharacter SeparatorCharacters[MAX_SEPARATOR_CHARS_PER_ENTRY];
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
SeparatorValid | uint8_t | Whether this entry is valid. Validate() range [0, 1] |
CharacterSize | uint8_t | Bytes per character. Validate() range [1, 2] |
VirtualCharacterCount | uint8_t | Number of characters used. Validate() range [0, 31] |
ByteOffset | uint8_t | Byte offset of this separator |
SeparatorCharacters | SeparatorCharacter[31] | Character definitions |
C++ methods:
static SeparatorEntry FromVector(const std::vector<uint8_t>& data);
static std::vector<uint8_t> ToVector(const SeparatorEntry& separatorEntry);
static void Validate(const SeparatorEntry& separatorEntry);
bool operator==(const SeparatorEntry& other) const;
bool operator!=(const SeparatorEntry& other) const;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SeparatorEntry
{
public byte SeparatorValid;
public byte CharacterSize;
public byte VirtualCharacterCount;
public byte ByteOffset;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 31)]
public SeparatorCharacter[] SeparatorCharacters;
}
| Field | Type | Description |
|---|---|---|
SeparatorValid | byte | Whether this entry is valid |
CharacterSize | byte | Bytes per character (1 or 2) |
VirtualCharacterCount | byte | Number of characters used (0–31) |
ByteOffset | byte | Byte offset of this separator |
SeparatorCharacters | SeparatorCharacter[] SizeConst=31 | Character definitions |
Module: reader_integration_kit.structures
class SeparatorEntry(Structure):
_fields_ = [
("SeparatorValid", c_uint8),
("CharacterSize", c_uint8),
("VirtualCharacterCount", c_uint8),
("ByteOffset", c_uint8),
("SeparatorCharacters", SeparatorCharacter * 31),
]
This Python struct does not set _pack_ = 1.
| Field | Type | Description |
|---|---|---|
SeparatorValid | c_uint8 | Whether this entry is valid |
CharacterSize | c_uint8 | Bytes per character (1 or 2) |
VirtualCharacterCount | c_uint8 | Number of characters used (0–31) |
ByteOffset | c_uint8 | Byte offset of this separator |
SeparatorCharacters | SeparatorCharacter * 31 | Character definitions |
SeparatorCharacter
One USB keystroke in a SeparatorEntry. USBKeyScanCode is a raw HID scan code (not an enum). Validate() range for USBKeyScanCode is [0, 231].
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct SeparatorCharacter
{
uint8_t USBKeyScanCode;
uint8_t KeyModifier;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
USBKeyScanCode | uint8_t | USB HID scan code. Validate() range [0, 231] |
KeyModifier | uint8_t | Key modifier byte |
C++ methods:
static SeparatorCharacter FromVector(const std::vector<uint8_t>& data);
static std::vector<uint8_t> ToVector(const SeparatorCharacter& separatorCharacter, uint8_t charSize);
static void Validate(const SeparatorCharacter& separatorCharacter);
bool operator==(const SeparatorCharacter& other) const;
bool operator!=(const SeparatorCharacter& other) const;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SeparatorCharacter
{
public byte USBKeyScanCode;
public byte KeyModifier;
}
| Field | Type | Description |
|---|---|---|
USBKeyScanCode | byte | USB HID scan code (0–231) |
KeyModifier | byte | Key modifier byte |
Module: reader_integration_kit.structures
class SeparatorCharacter(Structure):
_fields_ = [
("USBKeyScanCode", c_uint8),
("KeyModifier", c_uint8),
]
This Python struct does not set _pack_ = 1.
| Field | Type | Description |
|---|---|---|
USBKeyScanCode | c_uint8 | USB HID scan code (0–231) |
KeyModifier | c_uint8 | Key modifier byte |
ApplicationData
Application-specific data at the end of ExtendedConfiguration. DefinitionType uses FieldDefinitionType.
C++ uses the name ApplicationData. C# and Python use the name ReaderData for the same three fields.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct ApplicationData
{
FieldDefinitionType DefinitionType;
uint8_t EnhanceSecurityFlag;
uint8_t FipsBitCount;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
DefinitionType | FieldDefinitionType | Field definition. Validate() requires <= FIPS201_245_BIT |
EnhanceSecurityFlag | uint8_t | Enhance-security flag. Validate() range [0, 1] |
FipsBitCount | uint8_t | FIPS bit count |
C++ methods:
static ApplicationData FromVector(const std::vector<uint8_t>& data);
static std::vector<uint8_t> ToVector(const ApplicationData& appData);
static void Validate(const ApplicationData& appData);
bool operator==(const ApplicationData& other) const;
bool operator!=(const ApplicationData& other) const;
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ReaderData
{
[MarshalAs(UnmanagedType.U1)]
public FieldDefinitionType DefinitionType;
public byte EnhanceSecurityFlag;
public byte FipsBitCount;
}
| Field | Type | Description |
|---|---|---|
DefinitionType | FieldDefinitionType | Field definition |
EnhanceSecurityFlag | byte | Enhance-security flag |
FipsBitCount | byte | FIPS bit count |
Module: reader_integration_kit.structures
class ReaderData(Structure):
_fields_ = [
("DefinitionType", c_uint8),
("EnhanceSecurityFlag", c_uint8),
("FipsBitCount", c_uint8),
]
This Python struct does not set _pack_ = 1. DefinitionType is stored as c_uint8; use FieldDefinitionType IntEnum values when setting.
| Field | Type | Description |
|---|---|---|
DefinitionType | c_uint8 | Field definition (FieldDefinitionType values) |
EnhanceSecurityFlag | c_uint8 | Enhance-security flag |
FipsBitCount | c_uint8 | FIPS bit count |
HashData
Two 16-byte AES keys used for hashing card ID data in extended mode, plus firmware security state. See SetReaderConfiguration for extended-mode usage. Constant: HASH_KEY_SIZE = 16.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct HashData
{
uint8_t HashKeyA[HASH_KEY_SIZE];
uint8_t HashKeyB[HASH_KEY_SIZE];
uint8_t EnhanceSecurityFirmwareState;
static bool IsKeyEmpty(const uint8_t key[HASH_KEY_SIZE]);
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
HashKeyA | uint8_t[16] | First 16-byte AES key |
HashKeyB | uint8_t[16] | Second 16-byte AES key |
EnhanceSecurityFirmwareState | uint8_t | Firmware security state |
IsKeyEmpty returns true if all 16 bytes of the provided key buffer are zero. It takes a raw 16-byte key array (e.g. hashData.HashKeyA or hashData.HashKeyB), not a HashData object.
RikCommon::HashData hd = /* ... */;
if (RikCommon::HashData::IsKeyEmpty(hd.HashKeyA)) {
// HashKeyA is all zeros
}
Namespace: rfIDEAS.ReaderIntegrationKit.Objects.ExtendedConfiguration
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct HashData
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] HashKeyA;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] HashKeyB;
public byte EnhanceSecurityFirmwareState;
}
| Field | Type | Description |
|---|---|---|
HashKeyA | byte[] SizeConst=16 | First 16-byte AES key |
HashKeyB | byte[] SizeConst=16 | Second 16-byte AES key |
EnhanceSecurityFirmwareState | byte | Firmware security state |
Module: reader_integration_kit.structures
class HashData(Structure):
_fields_ = [
("HashKeyA", c_uint8 * 16),
("HashKeyB", c_uint8 * 16),
("EnhanceSecurityFirmwareState", c_uint8),
]
This Python struct does not set _pack_ = 1.
| Field | Type | Description |
|---|---|---|
HashKeyA | c_uint8 * 16 | First 16-byte AES key |
HashKeyB | c_uint8 * 16 | Second 16-byte AES key |
EnhanceSecurityFirmwareState | c_uint8 | Firmware security state |
BlobHeader
Header for a smart-card configuration blob. Type uses BlobType.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct BlobHeader
{
BlobType Type;
uint8_t ID;
uint16_t DataLength;
uint8_t BSV;
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
Type | BlobType | Blob payload type |
ID | uint8_t | Blob identifier |
DataLength | uint16_t | Length of following data in bytes |
BSV | uint8_t | Blob structure version |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BlobHeader
{
[MarshalAs(UnmanagedType.U1)]
public BlobType Type;
public byte ID;
public ushort DataLength;
public byte BSV;
}
| Field | Type | Description |
|---|---|---|
Type | BlobType | Blob payload type |
ID | byte | Blob identifier |
DataLength | ushort | Length of following data in bytes |
BSV | byte | Blob structure version |
Module: reader_integration_kit.structures
class BlobHeader(Structure):
_pack_ = 1
_fields_ = [
("Type", c_uint8),
("ID", c_uint8),
("DataLength", c_uint16),
("BSV", c_uint8),
]
| Field | Type | Description |
|---|---|---|
Type | c_uint8 | Blob payload type (BlobType values) |
ID | c_uint8 | Blob identifier |
DataLength | c_uint16 | Length of following data in bytes |
BSV | c_uint8 | Blob structure version |
SmartCardConfigurationStruct
Packed smart-card configuration: a BlobHeader plus a data buffer. Constant: MAX_BLOB_SIZE = 4 * 0xFE = 1016.
The C++ wrapper class SmartCardConfiguration exposes GetStruct(), SetConfiguration(), operator==, and operator!=.
- C++
- C#
- Python
Namespace: RikCommon
#pragma pack(push, 1)
struct SmartCardConfigurationStruct
{
BlobHeader Header;
uint8_t Data[MAX_BLOB_SIZE];
};
#pragma pack(pop)
This struct uses #pragma pack(push, 1) — all fields are byte-aligned with no padding.
| Field | Type | Description |
|---|---|---|
Header | BlobHeader | Blob type, ID, length, and version |
Data | uint8_t[1016] | Blob payload (MAX_BLOB_SIZE) |
Namespace: rfIDEAS.ReaderIntegrationKit.Objects
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SmartCardConfigurationStruct
{
public BlobHeader Header;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4 * 0xFE)]
public byte[] Data;
}
| Field | Type | Description |
|---|---|---|
Header | BlobHeader | Blob type, ID, length, and version |
Data | byte[] SizeConst=1016 | Blob payload |
Module: reader_integration_kit.structures
class SmartCardConfigurationStruct(Structure):
_pack_ = 1
_fields_ = [
("Header", BlobHeader),
("Data", c_uint8 * (4 * 0xFE)),
]
| Field | Type | Description |
|---|---|---|
Header | BlobHeader | Blob type, ID, length, and version |
Data | c_uint8 * 1016 | Blob payload |