由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Windows Device Driver和Application之间的通讯
相关主题
Can i register a ssc driver (a serial interface device) to (转载)Free books for driver programming
有熟悉NDIS driver的吗? (转载)JAVA programmer = car driver
__init 是什么意思scala有好的redis driver吗?
有什么可以将 doc, txt jpg, ppt转成 pdf 的包么?scala driver for c* is coming news from twitter
cannot start a windows service if my driver links with certain lib fileubuntu 16.04上1070不work
Windows IO driver处理IRP问题请教智能指针shared_ptr implementation问题
现在貌似很多网站(e.g. microsoft, android in eclipse)都是通过download manager提供下载driver等文件,这么做有什么优势?有人听说过AirWatch吗?什么是MDM和MAM?
linux kernel问题How does YAHOO calculate RSI? (转载)
相关话题的讨论汇总
话题: device话题: driver话题: windows话题: drivers
进入Programming版参与讨论
1 (共1页)
k***r
发帖数: 4260
1
如果我有多个device driver需要穿很多数据给一个user space application,并且有
一些数据要传回
device drivers,一般用什么机制通讯呢?driver的东西没做过。谢谢
a****l
发帖数: 8211
2
driver is not something special, it is basicaly just an application that
runs at different level.

【在 k***r 的大作中提到】
: 如果我有多个device driver需要穿很多数据给一个user space application,并且有
: 一些数据要传回
: device drivers,一般用什么机制通讯呢?driver的东西没做过。谢谢

k***r
发帖数: 4260
3
I remember drivers do have some restrictions, or something that makes
it more difficult to do certain things.
Is it practical/easy to use a client socket or a named pipe to send
data to user space apps? Thanks.

【在 a****l 的大作中提到】
: driver is not something special, it is basicaly just an application that
: runs at different level.

a****l
发帖数: 8211
4
it's almost always possible to communicate in any way, the only question is
that whether this certain method fits your application need.

【在 k***r 的大作中提到】
: I remember drivers do have some restrictions, or something that makes
: it more difficult to do certain things.
: Is it practical/easy to use a client socket or a named pipe to send
: data to user space apps? Thanks.

k***r
发帖数: 4260
5
Both sockets and named pipes should work for my needs. Is there
any preferences between the two, in terms of ease of development
in the context of device drivers?
I remember DeviceIoControl and related function is the way to
communicate between apps and drivers. No?

is

【在 a****l 的大作中提到】
: it's almost always possible to communicate in any way, the only question is
: that whether this certain method fits your application need.

m*****e
发帖数: 4193
6
If bulky data, use shared memory.

【在 k***r 的大作中提到】
: 如果我有多个device driver需要穿很多数据给一个user space application,并且有
: 一些数据要传回
: device drivers,一般用什么机制通讯呢?driver的东西没做过。谢谢

y*****a
发帖数: 171
7
device drivers are implemented as "files" in both windows and linux. if your
communication can be implemented as standard file I/O operation, then use "
read/write" after you "open" the device drive in linux (windows must have
the corresponding functions). otherwise, you have to implement a special
device I/O control function, and then call this function in your user
application.
device drivers can also directly write to use application, however, it is a
little bit complicated because device dri
k***r
发帖数: 4260
8
Shared memory isn't a stream and i think it is sometimes awkward to use.
For example, after writing new data to shared memory, you'll need to
use another mechanism to signal the reader... I prefer a stream interface
such as a socket or a pipe because of this. Or am I missing anything?

【在 m*****e 的大作中提到】
: If bulky data, use shared memory.
s******e
发帖数: 431
9
For simple app->driver communication, use IOCTL. For bulky driver->app
communication, use shared memory. There is an article about sharing memory
between driver and app from osronline.
http://www.osronline.com/article.cfm?id=39

【在 k***r 的大作中提到】
: 如果我有多个device driver需要穿很多数据给一个user space application,并且有
: 一些数据要传回
: device drivers,一般用什么机制通讯呢?driver的东西没做过。谢谢

1 (共1页)
进入Programming版参与讨论
相关主题
How does YAHOO calculate RSI? (转载)cannot start a windows service if my driver links with certain lib file
请教template和factory有啥区别?Windows IO driver处理IRP问题
map是用什么data structure来implement的?现在貌似很多网站(e.g. microsoft, android in eclipse)都是通过download manager提供下载driver等文件,这么做有什么优势?
再来讨论一直算法课的作业吧linux kernel问题
Can i register a ssc driver (a serial interface device) to (转载)Free books for driver programming
有熟悉NDIS driver的吗? (转载)JAVA programmer = car driver
__init 是什么意思scala有好的redis driver吗?
有什么可以将 doc, txt jpg, ppt转成 pdf 的包么?scala driver for c* is coming news from twitter
相关话题的讨论汇总
话题: device话题: driver话题: windows话题: drivers