InOut的条形码/RFID接口

inout-scan的Python项目详细描述


输入扫描

从串行端口读取条形码的命令deamon 将它们转发给API。在

Usage: inout_scan [OPTIONS] COMMAND [ARGS]...

  Gather bar codes from a scanner connected to the serial port and pass them
  to the InOut API. A local cache is maintained to be able to handle
  communication problems. Use the flush command to communicate unsubmitted
  bar codes.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  flush  Flush unsubmitted data to the api
  scan   Listen for strings from a barcode scanner connected to the...

扫描

^{pr2}$

冲洗

Usage: inout_scan flush [OPTIONS]

  Flush unsubmitted data to the api

Options:
  --api_url TEXT  InOut API url.  [required]
  --api_key TEXT  InOut API key.
  --help          Show this message and exit.

不使用条形码扫描仪进行测试

要在未连接条形码的情况下测试软件,请使用虚拟 条形码扫描仪。这可以通过使用socat来完成:

$ socat  -d -d  PTY PTY
2020/05/15 10:44:48 socat[47219] N PTY is /dev/pts/32020/05/15 10:44:48 socat[47219] N PTY is /dev/pts/42020/05/15 10:44:48 socat[47219] N starting data transfer loop with FDs [5,5] and [7,7]

它将输出伪终端名称。让它继续运行。在

在另一个终端中,运行inout_scan

$ inout_scan scan --serial_port /dev/pts/4  --api_url 'https://inout.example.com' --scanner fake_scanner

现在,将字符串发送到隧道的另一端/dev/pts/3,即:

$ seq 11000|whileread nr;doecho"mybadge$nr" > /dev/pts/3; sleep 1;done

历史

0.1.0(2020-05-13)

  • PyPI的第一个版本。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java我可以使用Hibernate连接不同的数据库并从表中导入数据吗?没有预定义的对象类   java为什么getBoundsInLocal获取错误的坐标?   java在处理并发哈希映射时必须使用锁   java将过滤的JTable数据导出到文本文件   从命令行编译java不使用库   Java使用方法和构造函数绘制图形   java理解优先级队列中的排序方法   尝试解密文件时,java CipherInputStream为空   在Java中将字符串解析为长字符串   java我想在raspberry pi重新启动时在crontabe中执行arecord命令   弹性搜索弹性搜索Lucene公式的Java计算   java使用apachepoi和docx4j读取doc文件   swing显示JavaGUI是否需要特殊处理?   java使用字符串进行数学运算   java在SpringMVC中用JSP初始化菜单项选择表单数据的最佳方法   无多线程的java多客户端程序   swing如何在Java中对BuffereImage进行去饱和?   java在安卓中创建自定义地图