DMdFdOpen | 75
DMdFdOpen
Purpose Use
DMdFdOpen
to access a DOME device if the device file
is already open.
Syntax
DMdDev DMdFdOpen (fd)
Return value Device handle if successful; otherwise,
NULL
.
Description
DMdFdOpen()
opens the DOME device specified by the
open file descriptor
fd
and returns the device handle that
provides access to the device. To close the DOME device,
use the
Close()
member function (page 76) of the returned
device handle.
Errors If
DMdFdOpen()
returns
NULL
, an error message prints
to
stderr
.
Example This example opens the DOME device
/dev/
m2pci
0.0
.
#include "domeMd.h"
DMdDev
dev;
DLong
fd;
fd = open ("/dev/m2pci0.0", O_RDWR);
if (fd == -1)
exit (-1);
dev = DMdFdOpen (fd);
.
.
.
(*dev->Close) (dev);
See also
DMdOpen, Close, DMdDev Structure
Parameter Type
Name
Description
DLong
fd
File descriptor of the opened
device file
Summary of Contents for Dome DX/PCI
Page 6: ......