DABC (Data Acquisition Backbone Core)  2.9.9
Macros | Functions | Variables
rawapin.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>
#include "rawdefn.h"
#include "rawapin.h"
#include "rawentn.h"
#include "rawapitd.h"
#include "rawapitd-gsin.h"
#include "rawapplcli.h"

Go to the source code of this file.

Macros

#define MAX_BUFSIZE   32768
 
#define MAX_LOG_FILE   64 /* max length of client log file name */
 

Functions

char * rawGetFSpName (char *)
 
int rfio_access (const char *pcFile, int iMode)
 
int rfio_cache_stat (const char *pcFile)
 
int rfio_close (int iFileId)
 
int rfio_closedir (void *dirp)
 
int rfio_endfile (int iFileId)
 
int rfio_fclose (RFILE *pRemFile)
 
int rfio_fendfile (RFILE *pRemFile)
 
int rfio_ffileid (RFILE *fRemoteFile)
 
int rfio_fnewfile (RFILE *pRemFile, char *pcFile)
 
RFILErfio_fopen (char *pcFile, char *pcOptions)
 
RFILErfio_fopen_gsidaq (char *pcFile, char *pcOptions, int iCopyMode, char *pcCopyPath, int iCopyFraction, int iMaxFile, int iPathConvention)
 
RFILErfio_fopen_gsidaq_dm (char *pcFile, char *pcOptions, char *pcDataMover, int *piDataMover, int iCopyMode, char *pcCopyPath, int iCopyFraction, int iMaxFile, int iPathConvention)
 
size_t rfio_fread (char *pcBuffer, size_t iSize, size_t iItems, RFILE *pRemFile)
 
int rfio_fstat (int iFileId, struct stat *pStatBuf)
 
size_t rfio_fwrite (const char *pcBuffer, size_t iSize, size_t iItems, RFILE *pRemFile)
 
int rfio_gsi_query (int iFileId, int iFull, int iOut, char *pInfo)
 
int rfio_lseek (int iFileId, int ilocOffset, int ilocSeekMode)
 
int rfio_mkdir (const char *path, int mode)
 
int rfio_newfile (int iFileId, char *pcFile)
 
int rfio_open (const char *pcFile, int iFlags, int iOpenMode)
 
int rfio_open_gsidaq (const char *pcFile, int iFlags, int iOpenMode, int iCopyMode, char *pcCopyPath, int iCopyFraction, int iMaxFile, int iPathConvention)
 
void * rfio_opendir (const char *dirpath)
 
int rfio_parse (char *pcFile, char **pcNode, char **pcPath)
 
void rfio_perror (const char *pUMsg)
 
ssize_t rfio_read (int iFileId, char *pcBuffer, size_t iItems)
 
void * rfio_readdir (void *dirp)
 
char * rfio_serror ()
 
int rfio_stat (const char *pcFile, struct stat *pStatBuf)
 
int rfio_unlink (const char *pcFile)
 
ssize_t rfio_write (int iFileId, const char *pcBuffer, size_t iItems)
 
int rfiosetopt (int iopt, int *pival, int ilen)
 

Variables

static char cLogClient [MAX_LOG_FILE] = ""
 
static char cNodeMaster [MAX_NODE] = ""
 
static char cNodeMover [MAX_NODE] = ""
 
static char cNodePrefix [MAX_NODE] = ""
 
static char cPrefix [MAX_FULL_FILE] = ""
 
FILE * fLogClient = NULL
 
FILE * fLogFile = NULL
 
static int iATLServer
 
static int iFileCount = 0
 
static int iFileMax = 10
 
static int iint = sizeof(int)
 
static int iLogFile = 1
 
int imySigS
 
static int iObjAttr = sizeof(srawObjAttr)
 
static int iOnlyQuery = 0
 
static int iOS64 = 0
 
static int iPortMaster = PORT_MASTER
 
static int iPortMover = PORT_MOVER
 
static int irawAPIFile = sizeof(srawAPIFile)
 
static int irawComm = sizeof(srawComm)
 
static int irawCopyCache = sizeof(srawCopyCache)
 
static int irawFileSystem = sizeof(srawFileSystem)
 
static int iSleepCacheFull = SLEEP_CACHE_FULL
 
static int iStatusLoopMax = MAXLOOP_CACHE_FULL
 
static RFILEpAPIFile [10]
 
int * piEntryList
 
static char rfio_errmsg [STATUS_LEN] = ""
 
int rfio_errno
 
int serrno
 
int tCastorVersionKey
 
int tStageHostKey
 
int tStagePortKey
 
int tSvcClassKey
 

Macro Definition Documentation

◆ MAX_LOG_FILE

#define MAX_LOG_FILE   64 /* max length of client log file name */

Definition at line 191 of file rawapin.c.

◆ MAX_BUFSIZE

#define MAX_BUFSIZE   32768

Definition at line 231 of file rawapin.c.

Function Documentation

◆ rawGetFSpName()

char* rawGetFSpName ( char *  pcUser)

Definition at line 971 of file rawProcn.c.

◆ rfio_open()

int rfio_open ( const char *  pcFile,
int  iFlags,
int  iOpenMode 
)

Definition at line 307 of file rawapin.c.

◆ rfio_open_gsidaq()

int rfio_open_gsidaq ( const char *  pcFile,
int  iFlags,
int  iOpenMode,
int  iCopyMode,
char *  pcCopyPath,
int  iCopyFraction,
int  iMaxFile,
int  iPathConvention 
)

Definition at line 346 of file rawapin.c.

◆ rfio_endfile()

int rfio_endfile ( int  iFileId)

Definition at line 2836 of file rawapin.c.

◆ rfio_read()

ssize_t rfio_read ( int  iFileId,
char *  pcBuffer,
size_t  iItems 
)

Definition at line 2967 of file rawapin.c.

◆ rfio_write()

ssize_t rfio_write ( int  iFileId,
const char *  pcBuffer,
size_t  iItems 
)

Definition at line 3285 of file rawapin.c.

◆ rfio_newfile()

int rfio_newfile ( int  iFileId,
char *  pcFile 
)

Definition at line 3459 of file rawapin.c.

◆ rfio_close()

int rfio_close ( int  iFileId)

Definition at line 4299 of file rawapin.c.

◆ rfio_lseek()

int rfio_lseek ( int  iFileId,
int  ilocOffset,
int  ilocSeekMode 
)

Definition at line 4519 of file rawapin.c.

◆ rfio_ffileid()

int rfio_ffileid ( RFILE fRemoteFile)

Definition at line 4583 of file rawapin.c.

◆ rfio_fopen()

RFILE* rfio_fopen ( char *  pcFile,
char *  pcOptions 
)

Definition at line 4623 of file rawapin.c.

◆ rfio_fopen_gsidaq_dm()

RFILE* rfio_fopen_gsidaq_dm ( char *  pcFile,
char *  pcOptions,
char *  pcDataMover,
int *  piDataMover,
int  iCopyMode,
char *  pcCopyPath,
int  iCopyFraction,
int  iMaxFile,
int  iPathConvention 
)

Definition at line 4663 of file rawapin.c.

◆ rfio_fopen_gsidaq()

RFILE* rfio_fopen_gsidaq ( char *  pcFile,
char *  pcOptions,
int  iCopyMode,
char *  pcCopyPath,
int  iCopyFraction,
int  iMaxFile,
int  iPathConvention 
)

Definition at line 4772 of file rawapin.c.

◆ rfio_fnewfile()

int rfio_fnewfile ( RFILE pRemFile,
char *  pcFile 
)

Definition at line 4859 of file rawapin.c.

◆ rfio_fread()

size_t rfio_fread ( char *  pcBuffer,
size_t  iSize,
size_t  iItems,
RFILE pRemFile 
)

Definition at line 4928 of file rawapin.c.

◆ rfio_fwrite()

size_t rfio_fwrite ( const char *  pcBuffer,
size_t  iSize,
size_t  iItems,
RFILE pRemFile 
)

Definition at line 4966 of file rawapin.c.

◆ rfio_fendfile()

int rfio_fendfile ( RFILE pRemFile)

Definition at line 5006 of file rawapin.c.

◆ rfio_fclose()

int rfio_fclose ( RFILE pRemFile)

Definition at line 5035 of file rawapin.c.

◆ rfio_access()

int rfio_access ( const char *  pcFile,
int  iMode 
)

Definition at line 5063 of file rawapin.c.

◆ rfio_fstat()

int rfio_fstat ( int  iFileId,
struct stat *  pStatBuf 
)

Definition at line 5266 of file rawapin.c.

◆ rfio_parse()

int rfio_parse ( char *  pcFile,
char **  pcNode,
char **  pcPath 
)

Definition at line 5347 of file rawapin.c.

◆ rfio_perror()

void rfio_perror ( const char *  pUMsg)

Definition at line 5372 of file rawapin.c.

◆ rfio_serror()

char* rfio_serror ( )

Definition at line 5400 of file rawapin.c.

◆ rfio_unlink()

int rfio_unlink ( const char *  pcFile)

Definition at line 5429 of file rawapin.c.

◆ rfiosetopt()

int rfiosetopt ( int  iopt,
int *  pival,
int  ilen 
)

Definition at line 5585 of file rawapin.c.

◆ rfio_mkdir()

int rfio_mkdir ( const char *  path,
int  mode 
)

Definition at line 5607 of file rawapin.c.

◆ rfio_opendir()

void* rfio_opendir ( const char *  dirpath)

Definition at line 5632 of file rawapin.c.

◆ rfio_readdir()

void* rfio_readdir ( void *  dirp)

Definition at line 5657 of file rawapin.c.

◆ rfio_closedir()

int rfio_closedir ( void *  dirp)

Definition at line 5682 of file rawapin.c.

◆ rfio_stat()

int rfio_stat ( const char *  pcFile,
struct stat *  pStatBuf 
)

Definition at line 5825 of file rawapin.c.

◆ rfio_cache_stat()

int rfio_cache_stat ( const char *  pcFile)

Definition at line 5934 of file rawapin.c.

◆ rfio_gsi_query()

int rfio_gsi_query ( int  iFileId,
int  iFull,
int  iOut,
char *  pInfo 
)

Definition at line 6062 of file rawapin.c.

Variable Documentation

◆ fLogClient

FILE* fLogClient = NULL

Definition at line 190 of file rawapin.c.

◆ cLogClient

char cLogClient[MAX_LOG_FILE] = ""
static

Definition at line 192 of file rawapin.c.

◆ iLogFile

int iLogFile = 1
static

Definition at line 197 of file rawapin.c.

◆ iOS64

int iOS64 = 0
static

Definition at line 198 of file rawapin.c.

◆ piEntryList

int* piEntryList

Definition at line 215 of file rawapin.c.

◆ imySigS

int imySigS

Definition at line 216 of file rawapin.c.

◆ fLogFile

FILE* fLogFile = NULL

Definition at line 217 of file rawapin.c.

◆ serrno

int serrno

Definition at line 220 of file rawapin.c.

◆ rfio_errno

int rfio_errno

Definition at line 221 of file rawapin.c.

◆ tStageHostKey

int tStageHostKey

Definition at line 222 of file rawapin.c.

◆ tStagePortKey

int tStagePortKey

Definition at line 223 of file rawapin.c.

◆ tSvcClassKey

int tSvcClassKey

Definition at line 224 of file rawapin.c.

◆ tCastorVersionKey

int tCastorVersionKey

Definition at line 225 of file rawapin.c.

◆ rfio_errmsg

char rfio_errmsg[STATUS_LEN] = ""
static

Definition at line 229 of file rawapin.c.

◆ iint

int iint = sizeof(int)
static

Definition at line 232 of file rawapin.c.

◆ irawComm

int irawComm = sizeof(srawComm)
static

Definition at line 233 of file rawapin.c.

◆ iObjAttr

int iObjAttr = sizeof(srawObjAttr)
static

Definition at line 234 of file rawapin.c.

◆ irawFileSystem

int irawFileSystem = sizeof(srawFileSystem)
static

Definition at line 235 of file rawapin.c.

◆ irawCopyCache

int irawCopyCache = sizeof(srawCopyCache)
static

Definition at line 236 of file rawapin.c.

◆ irawAPIFile

int irawAPIFile = sizeof(srawAPIFile)
static

Definition at line 237 of file rawapin.c.

◆ iOnlyQuery

int iOnlyQuery = 0
static

Definition at line 239 of file rawapin.c.

◆ cPrefix

char cPrefix[MAX_FULL_FILE] = ""
static

Definition at line 240 of file rawapin.c.

◆ cNodePrefix

char cNodePrefix[MAX_NODE] = ""
static

Definition at line 241 of file rawapin.c.

◆ cNodeMaster

char cNodeMaster[MAX_NODE] = ""
static

Definition at line 242 of file rawapin.c.

◆ cNodeMover

char cNodeMover[MAX_NODE] = ""
static

Definition at line 243 of file rawapin.c.

◆ iPortMaster

int iPortMaster = PORT_MASTER
static

Definition at line 244 of file rawapin.c.

◆ iPortMover

int iPortMover = PORT_MOVER
static

Definition at line 245 of file rawapin.c.

◆ iATLServer

int iATLServer
static

Definition at line 246 of file rawapin.c.

◆ iStatusLoopMax

int iStatusLoopMax = MAXLOOP_CACHE_FULL
static

Definition at line 249 of file rawapin.c.

◆ iSleepCacheFull

int iSleepCacheFull = SLEEP_CACHE_FULL
static

Definition at line 251 of file rawapin.c.

◆ iFileCount

int iFileCount = 0
static

Definition at line 253 of file rawapin.c.

◆ iFileMax

int iFileMax = 10
static

Definition at line 254 of file rawapin.c.

◆ pAPIFile

RFILE* pAPIFile[10]
static
Initial value:
=
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}

Definition at line 255 of file rawapin.c.