使用Google Native Client(NaCl)的并行端口访问 [英] Parallel port access using Google native Client (NaCl)

查看:145
本文介绍了使用Google Native Client(NaCl)的并行端口访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个 Chrome应用,该支持打印到与计算机通过并行端口.我发现Chrome应用程序不能使用任何种类的NPAPI插件,因此这些都不是问题.剩下的选项似乎是NaCl或PPAPI插件.但是PPAPI或Pepper或NaCl(我对它们中的任何一个都不很熟悉,并且可能在错误的上下文中使用它们)是否支持对并行端口的访问?是否可以编写支持并行端口通信的PPAPI插件? 感谢您的时间和精力.

I am trying to write a Chrome app that would support printing to old printers connected to the computer via the parallel port. I found out that Chrome apps can not use any kind of NPAPI plugins so those are out of the question. The remaining option seems to be NaCl or PPAPI plugin. But does PPAPI or pepper or NaCl (I am not very familiar with any of them and am probably using them in the wrong context) support access to the parallel port? Can a PPAPI plugin be written, which supports parallel port communication? Thanks for your time and efforts.

推荐答案

您通常可以像写入文件一样写入并行端口. (距离我上次做这件事已经过去了几十年)

You can usually write to the parallel port like to a file. (it's a few decades since I did this the last time myself though)

使用/dev/lp0作为文件名
另请参见 https://superuser.com/questions/301753/如何直接在ubuntu中打印到lpt端口

in Linux use /dev/lp0 as file name
see also https://superuser.com/questions/301753/how-do-i-print-directly-to-lpt-port-in-ubuntu

在Windows LPT0

另请参阅
* https://developers.google.com/native-client /dev/devguide/coding/file-io

see also
* https://developers.google.com/native-client/dev/devguide/coding/file-io

编辑
我认为允许chrome打包的应用访问本地文件系统.
如果该区域仅限于沙盒区域,则可能不允许访问并行端口.
使用NaCl似乎支持无限访问本地文件,因此这可能会起作用.

EDIT
I thought chrome packaged apps are allowed to access the local file system.
If that is limited to a sandboxed area it may not allow access to the parallel port.
Using NaCl seems to support unlimited access to local files, so this will probably work.

这篇关于使用Google Native Client(NaCl)的并行端口访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆