SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 209 | Next

Syed A. Ahson and Mohammad Ilyas

"RFID Handbook: Applications, Technology, Security, and Privacy"

A device is made active by calling open and released by
calling close.
5.2.9.2 open()
The routine open() opens a device as a ?¬?le for reading, writing, or updating, and returns a
?¬?le descriptor for that ?¬?le. The arguments to open are the device name and the type of
access. In general, open can only open preexisting devices and ?¬?les. Files cannot be created
with open.
The return value of this call is a ?¬?le descriptor number, or ERROR if a ?¬?le name is not
speci?¬?ed, the device does not exist, no ?¬?le descriptors are available, or the driver returns
ERROR.
5.2.9.3 close()
The routine close() closes the speci?¬?ed ?¬?le and frees the ?¬?le descriptor. It calls the device
driver-speci?¬?c function to do the work.
The return value is the status of the driver close routine, or ERROR if the ?¬?le descriptor is
invalid.
5.2.9.4 ioctl()
The ioctl call provides an interface to device-speci?¬?c con?¬?guration function and performs
an IO control function on the device. The control functions used by SDLR device
drivers are de?¬?ned in the header ?¬?le io.h. Most requests are passed on to the driver for
handling. Since the availability of ioctl functions is driver speci?¬?c, these functions are
implemented separately for each speci?¬?c device.
The return value is the return value of the driver, or ERROR if the ?¬?le descriptor does not
exist.


Pages:
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221