GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions
fLmd.c File Reference
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <memory.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "fLmd.h"

Go to the source code of this file.

Macros

#define OFFSET__ENTRIES   250000
 

Functions

int32_t fLmdWriteBuffer (sLmdControl *, char *, uint32_t)
 
uint32_t fLmdCleanup (sLmdControl *)
 
void fLmdOffsetResize (sLmdControl *, uint32_t)
 
uint32_t fLmdOffsetSet (sLmdControl *, uint32_t)
 
uint32_t fLmdOffsetRead (sLmdControl *)
 
uint32_t fLmdOffsetWrite (sLmdControl *)
 
lmdoff_t fLmdOffsetGet (sLmdControl *, uint32_t)
 
void fLmdOffsetElements (sLmdControl *, uint32_t, uint32_t *, uint32_t *)
 
uint32_t fLmdPutOpen (sLmdControl *pLmdControl, char *Filename, sMbsFileHeader *pBuffHead, uint32_t iBytes, uint32_t iOver, uint32_t iUseOffset, uint32_t iLargeFile)
 
uint32_t fLmdPutElement (sLmdControl *pLmdControl, sMbsHeader *pHeader)
 
uint32_t fLmdPutBuffer (sLmdControl *pLmdControl, sMbsHeader *pHeader, uint32_t Items)
 
uint32_t fLmdPutClose (sLmdControl *pLmdControl)
 
uint32_t fLmdConnectMbs (sLmdControl *pLmdControl, char *Nodename, uint32_t iPort, uint32_t *iBufferBytes)
 
uint32_t fLmdInitMbs (sLmdControl *pLmdControl, char *Nodename, uint32_t iMaxBytes, uint32_t iBuffers, uint32_t iStreams, uint32_t iPort, uint32_t iTimeout)
 
uint32_t fLmdCloseMbs (sLmdControl *pLmdControl)
 
uint32_t fLmdGetMbsEvent (sLmdControl *pLmdControl, sMbsHeader **event)
 
uint32_t fLmdGetMbsBuffer (sLmdControl *pLmdControl, sMbsBufferHeader *pBuffer, uint32_t iBytes, uint32_t *iElements, uint32_t *iBytesUsed)
 
uint32_t fLmdGetOpen (sLmdControl *pLmdControl, char *Filename, sMbsFileHeader *pBuffHead, uint32_t iBytes, uint32_t iUseOffset)
 
uint32_t fLmdGetBuffer (sLmdControl *pLmdControl, sMbsHeader *pMbsHeader, uint32_t iBytes, uint32_t *iElements, uint32_t *iBytesUsed)
 
uint32_t fLmdGetElement (sLmdControl *pLmdControl, uint32_t iEvent, sMbsHeader **event)
 
uint32_t fLmdGetClose (sLmdControl *pLmdControl)
 
int32_t fLmdReadBuffer (sLmdControl *pLmdControl, char *buffer, uint32_t bytes)
 
uint64_t fLmdGetBytesWritten (sLmdControl *pLmdControl)
 
uint32_t fLmdGetSwap (sLmdControl *pLmdControl)
 
void fLmdSetWrittenEndian (sLmdControl *pLmdControl, uint32_t iE)
 
uint32_t fLmdGetWrittenEndian (sLmdControl *pLmdControl)
 
sLmdControlfLmdAllocateControl ()
 
void fLmdPrintBufferHeader (uint32_t iVerbose, sMbsBufferHeader *pMbsBufferHeader)
 
void fLmdPrintFileHeader (uint32_t iVerbose, sMbsFileHeader *pMbsFileHeader)
 
void fLmdPrintHeader (uint32_t iVerbose, sMbsHeader *pMbsHeader)
 
void fLmdPrintEvent (uint32_t iVerbose, sMbsEventHeader *pMbsEventHeader)
 
void fLmdPrintControl (uint32_t iVerbose, sLmdControl *pLmdControl)
 
void fLmdSwap4 (uint32_t *array, uint32_t items)
 
void fLmdSwap8 (uint64_t *array, uint32_t items)
 

Macro Definition Documentation

#define OFFSET__ENTRIES   250000

Definition at line 116 of file fLmd.c.

Referenced by fLmdOffsetResize().

Function Documentation

sLmdControl* fLmdAllocateControl ( )

Definition at line 872 of file fLmd.c.

Referenced by f_evt_get_open(), and f_evt_put_open().

uint32_t fLmdCleanup ( sLmdControl pLmdControl)
uint32_t fLmdCloseMbs ( sLmdControl pLmdControl)
uint32_t fLmdConnectMbs ( sLmdControl pLmdControl,
char *  Nodename,
uint32_t  iPort,
uint32_t *  iBufferBytes 
)
uint32_t fLmdGetBuffer ( sLmdControl pLmdControl,
sMbsHeader pMbsHeader,
uint32_t  iBytes,
uint32_t *  iElements,
uint32_t *  iBytesUsed 
)
uint64_t fLmdGetBytesWritten ( sLmdControl pLmdControl)
uint32_t fLmdGetClose ( sLmdControl pLmdControl)

Definition at line 789 of file fLmd.c.

References sLmdControl::fFile, fLmdCleanup(), LMD__CLOSE_ERR, and LMD__SUCCESS.

Referenced by f_evt_get_close(), fLmdGetOpen(), and fLmdPutClose().

uint32_t fLmdGetElement ( sLmdControl pLmdControl,
uint32_t  iEvent,
sMbsHeader **  event 
)
uint32_t fLmdGetMbsBuffer ( sLmdControl pLmdControl,
sMbsBufferHeader pBuffer,
uint32_t  iBytes,
uint32_t *  iElements,
uint32_t *  iBytesUsed 
)
uint32_t fLmdGetMbsEvent ( sLmdControl pLmdControl,
sMbsHeader **  event 
)
uint32_t fLmdGetOpen ( sLmdControl pLmdControl,
char *  Filename,
sMbsFileHeader pBuffHead,
uint32_t  iBytes,
uint32_t  iUseOffset 
)
uint32_t fLmdGetSwap ( sLmdControl pLmdControl)

Definition at line 851 of file fLmd.c.

References sLmdControl::iSwap.

uint32_t fLmdGetWrittenEndian ( sLmdControl pLmdControl)
uint32_t fLmdInitMbs ( sLmdControl pLmdControl,
char *  Nodename,
uint32_t  iMaxBytes,
uint32_t  iBuffers,
uint32_t  iStreams,
uint32_t  iPort,
uint32_t  iTimeout 
)
void fLmdOffsetElements ( sLmdControl pLmdControl,
uint32_t  bytes,
uint32_t *  elements,
uint32_t *  used 
)
lmdoff_t fLmdOffsetGet ( sLmdControl pLmdControl,
uint32_t  index 
)

Definition at line 1011 of file fLmd.c.

References sLmdControl::pOffset4, and sLmdControl::pOffset8.

Referenced by fLmdGetElement().

uint32_t fLmdOffsetRead ( sLmdControl pLmdControl)
void fLmdOffsetResize ( sLmdControl pLmdControl,
uint32_t  firstValue 
)
uint32_t fLmdOffsetSet ( sLmdControl pLmdControl,
uint32_t  lwords 
)
uint32_t fLmdOffsetWrite ( sLmdControl pLmdControl)
void fLmdPrintBufferHeader ( uint32_t  iVerbose,
sMbsBufferHeader pMbsBufferHeader 
)
void fLmdPrintControl ( uint32_t  iVerbose,
sLmdControl pLmdControl 
)
void fLmdPrintEvent ( uint32_t  iVerbose,
sMbsEventHeader pMbsEventHeader 
)
void fLmdPrintFileHeader ( uint32_t  iVerbose,
sMbsFileHeader pMbsFileHeader 
)
void fLmdPrintHeader ( uint32_t  iVerbose,
sMbsHeader pMbsHeader 
)

Definition at line 1084 of file fLmd.c.

References sMbsHeader::iType, and sMbsHeader::iWords.

uint32_t fLmdPutBuffer ( sLmdControl pLmdControl,
sMbsHeader pHeader,
uint32_t  Items 
)
uint32_t fLmdPutClose ( sLmdControl pLmdControl)
uint32_t fLmdPutElement ( sLmdControl pLmdControl,
sMbsHeader pHeader 
)
uint32_t fLmdPutOpen ( sLmdControl pLmdControl,
char *  Filename,
sMbsFileHeader pBuffHead,
uint32_t  iBytes,
uint32_t  iOver,
uint32_t  iUseOffset,
uint32_t  iLargeFile 
)
int32_t fLmdReadBuffer ( sLmdControl pLmdControl,
char *  buffer,
uint32_t  bytes 
)

Definition at line 800 of file fLmd.c.

References sLmdControl::fFile.

Referenced by fLmdGetBuffer(), fLmdGetElement(), fLmdGetOpen(), and fLmdOffsetRead().

void fLmdSetWrittenEndian ( sLmdControl pLmdControl,
uint32_t  iE 
)

Definition at line 858 of file fLmd.c.

References sMbsFileHeader::iWrittenEndian, and sLmdControl::pMbsFileHeader.

void fLmdSwap4 ( uint32_t *  array,
uint32_t  items 
)
void fLmdSwap8 ( uint64_t *  array,
uint32_t  items 
)

Definition at line 1132 of file fLmd.c.

Referenced by fLmdGetOpen(), and fLmdOffsetRead().

int32_t fLmdWriteBuffer ( sLmdControl pLmdControl,
char *  buffer,
uint32_t  bytes 
)

Definition at line 807 of file fLmd.c.

References sLmdControl::fFile.

Referenced by fLmdOffsetWrite(), fLmdPutBuffer(), fLmdPutClose(), fLmdPutElement(), and fLmdPutOpen().