Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tapeIO.h
Go to the documentation of this file.
1 /*
2  * tapeIO.h
3  *
4 */
5 
6 #ifndef TAPEIOH_INCLUDED
7 
8 #define TAPEIO_OK 0
9 #define TAPEIO_ERROR (-1)
10 #define TAPEIO_EOT (-2) /* end of data (End Of Tape) */
11 
12 #define TAPEIO_STREAM 1 /* file descriptor is not a tape device */
13 #define TAPEIO_FIXED 2 /* it's a tape device in fixed block mode */
14 #define TAPEIO_VARIABLE 3 /* it's a tape device in variable block mode */
15 #define TAPEIO_PIPE 4 /* pipe or TCP socket */
16 
17 int tape_devType(int fd); /* returns one of the TAPEIO_xxxx or (-1) if error */
18 
19 int tape_write(int fd,const void*buffer,int len);
20 int tape_read(int fd,void*buffer,int len);
21 int tape_flush(int fd);
22 int tape_writeFM(int fd);
23 
24 int tape_getBlockSize(int fd,unsigned long*minSize,unsigned long*maxSize,unsigned long*recSize);
25 int tape_getState(int fd); /* returns bits defined in mtio.h: MT_BOT, etc... */
26 unsigned long tape_getPosition(int fd); /* returns current tape block number (does not work for jag tapes) */
27 
28 int tape_setBlockSize(int fd,unsigned long newBlockSize);
29 
30 int tape_rewind(int fd);
31 int tape_unload(int fd);
32 int tape_findFM(int fd,int count); /* count > 0 seeks forward, count < 0 seeks backwards */
33 
34 extern int tape_enablePipeIO; /* enable the special handing of PIPEs */
35 
36 #endif
37 /* end file */
int tape_rewind(int fd)
int tape_writeFM(int fd)
int tape_flush(int fd)
unsigned long tape_getPosition(int fd)
int tape_getState(int fd)
int tape_findFM(int fd, int count)
int tape_devType(int fd)
int tape_setBlockSize(int fd, unsigned long newBlockSize)
int tape_write(int fd, const void *buffer, int len)
int tape_read(int fd, void *buffer, int len)
int tape_enablePipeIO
int tape_getBlockSize(int fd, unsigned long *minSize, unsigned long *maxSize, unsigned long *recSize)
int tape_unload(int fd)