GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 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 <sys/types.h>
#include <sys/stat.h>
#include "fLmd.h"
#include "f_ut_time.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 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 68 of file fLmd.c.

Referenced by fLmdOffsetResize().

Function Documentation

sLmdControl* fLmdAllocateControl ( )

Definition at line 765 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 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 682 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 744 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 907 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 974 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 693 of file fLmd.c.

References sLmdControl::fFile.

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

void fLmdSetWrittenEndian ( sLmdControl pLmdControl,
uint32_t  iE 
)

Definition at line 751 of file fLmd.c.

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

void fLmdSwap4 ( uint32_t *  array,
uint32_t  items 
)

Definition at line 1003 of file fLmd.c.

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

void fLmdSwap8 ( uint64_t *  array,
uint32_t  items 
)

Definition at line 1013 of file fLmd.c.

Referenced by fLmdGetOpen(), and fLmdOffsetRead().

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

Definition at line 700 of file fLmd.c.

References sLmdControl::fFile.

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