|
OpenSRX 0.1.0
C++ library for interfacing with Keyence SR series barcode readers
|
The repository ships with example programs under the examples/ directory. All examples use argparse for CLI argument handling and accept --ip/--port (TCP) or --serial (RS-232) to connect to the scanner.
Prints the scanner model, firmware version, and library version:
Triggers a barcode read and prints the decoded data:
Enables code vertex, center, and type appending, then triggers a read and prints all metadata fields parsed into the Code struct:
Starts an embedded FTP server, triggers a read, receives the image via FTP, and saves it as a BMP file:
Requires --local-ip (this machine's IP as reachable from the scanner).
Takes a camera snapshot (SHOT command, no barcode decode) and saves it as BMP:
Demonstrates reading and modifying scanner parameters (exposure, gain, image format, FTP settings, etc.):
A Python-based scanner simulator is provided for development and testing without physical hardware:
This opens a TCP server on port 9004 that emulates the SR-X command protocol, including simulated barcode reads with generated camera images pushed via FTP. The simulator supports all parameter read/write commands, image saving configuration, and data appending options.
To use examples with the simulator: