#include <stdio.h>
#include "sMbs.h"
#include "f_stccomm.h"
Go to the source code of this file.
#define GETLMD__EOFILE 5 |
Definition at line 30 of file fLmd.h.
Referenced by f_evt_get_event(), fLmdGetBuffer(), and fLmdGetElement().
#define GETLMD__NOBUFFER 7 |
Definition at line 32 of file fLmd.h.
Referenced by f_evt_get_event(), and fLmdGetElement().
#define GETLMD__NOFILE 2 |
Definition at line 28 of file fLmd.h.
Referenced by fLmdGetOpen().
#define GETLMD__NOLMDFILE 4 |
Definition at line 29 of file fLmd.h.
Referenced by fLmdGetBuffer(), fLmdGetOpen(), and fLmdOffsetRead().
#define GETLMD__NOMORE 6 |
Definition at line 31 of file fLmd.h.
Referenced by f_evt_get_event(), and fLmdGetElement().
#define GETLMD__OUTOF_RANGE 9 |
Definition at line 34 of file fLmd.h.
Referenced by fLmdGetElement().
#define GETLMD__SIZE_ERROR 10 |
Definition at line 35 of file fLmd.h.
Referenced by fLmdGetElement().
#define GETLMD__TOOBIG 8 |
Definition at line 33 of file fLmd.h.
Referenced by fLmdGetElement().
#define LMD__CLOSE_ERR 3 |
Definition at line 27 of file fLmd.h.
Referenced by fLmdGetClose().
#define LMD__FAILURE 1 |
Definition at line 26 of file fLmd.h.
Referenced by fLmdConnectMbs(), fLmdGetBuffer(), fLmdGetMbsBuffer(), fLmdInitMbs(), fLmdOffsetWrite(), fLmdPutBuffer(), fLmdPutClose(), and fLmdPutElement().
#define LMD__SUCCESS 0 |
Definition at line 25 of file fLmd.h.
Referenced by fLmdCleanup(), fLmdConnectMbs(), fLmdGetBuffer(), fLmdGetClose(), fLmdGetElement(), fLmdGetMbsBuffer(), fLmdGetMbsEvent(), fLmdGetOpen(), fLmdInitMbs(), fLmdOffsetRead(), fLmdOffsetSet(), fLmdOffsetWrite(), fLmdPutBuffer(), fLmdPutClose(), fLmdPutElement(), and fLmdPutOpen().
#define LMD__TIMEOUT 50 |
Definition at line 36 of file fLmd.h.
Referenced by f_evt_get_event(), and fLmdGetMbsBuffer().
#define PORT__STREAM 6002 |
Definition at line 42 of file fLmd.h.
Referenced by fLmdCloseMbs(), fLmdConnectMbs(), and fLmdGetMbsBuffer().
#define PORT__TRANS 6000 |
Definition at line 41 of file fLmd.h.
Referenced by fLmdConnectMbs().
#define PUTLMD__EXCEED 104 |
Definition at line 40 of file fLmd.h.
Referenced by fLmdPutBuffer(), and fLmdPutElement().
#define PUTLMD__FILE_EXIST 101 |
Definition at line 37 of file fLmd.h.
Referenced by fLmdPutOpen().
#define PUTLMD__OPEN_ERR 103 |
Definition at line 39 of file fLmd.h.
Referenced by fLmdPutOpen().
#define PUTLMD__TOOBIG 102 |
Definition at line 38 of file fLmd.h.
Referenced by fLmdPutElement().
sLmdControl* fLmdAllocateControl | ( | ) |
Definition at line 872 of file fLmd.c.
Referenced by f_evt_get_open(), and f_evt_put_open().
uint32_t fLmdCloseMbs | ( | sLmdControl * | ) |
Definition at line 405 of file fLmd.c.
References f_stc_close(), f_stc_write(), fLmdCleanup(), sLmdControl::iPort, sLmdControl::iTCP, sLmdControl::iTCPowner, sLmdControl::pMbsFileHeader, PORT__STREAM, and sLmdControl::pTCP.
Referenced by f_evt_get_close().
uint32_t fLmdConnectMbs | ( | sLmdControl * | , | |
char * | , | |||
uint32_t | , | |||
uint32_t * | ||||
) |
Definition at line 329 of file fLmd.c.
References sLmdControl::cFile, f_stc_connectserver(), f_stc_read(), fLmdCleanup(), fLmdSwap4(), sLmdControl::iBufferWords, sLmdControl::iInternBuffer, sLmdControl::iPort, sLmdControl::iSwap, sLmdControl::iTCP, sLmdControl::iTCPowner, LMD__FAILURE, LMD__GET_EVENTS, LMD__SUCCESS, sLmdControl::pBuffer, PORT__STREAM, PORT__TRANS, sLmdControl::pTCP, and STC__SUCCESS.
uint32_t fLmdGetBuffer | ( | sLmdControl * | , | |
sMbsHeader * | , | |||
uint32_t | , | |||
uint32_t * | , | |||
uint32_t * | ||||
) |
Definition at line 598 of file fLmd.c.
References sLmdControl::cFile, fLmdOffsetElements(), fLmdReadBuffer(), fLmdSwap4(), GETLMD__EOFILE, GETLMD__NOLMDFILE, sLmdControl::iBufferWords, sLmdControl::iBytes, sMbsFileHeader::iElements, sLmdControl::iElements, sLmdControl::iLeftWords, sMbsFileHeader::iMaxWords, sLmdControl::iOffsetEntries, sLmdControl::iSwap, sMbsHeader::iType, sMbsHeader::iWords, LMD__FAILURE, LMD__SUCCESS, LMD__TYPE_FILE_INDEX_101_2, sLmdControl::pBuffer, sLmdControl::pMbsFileHeader, and sLmdControl::pMbsHeader.
uint64_t fLmdGetBytesWritten | ( | sLmdControl * | ) |
Definition at line 815 of file fLmd.c.
References sLmdControl::iBufferWords, sLmdControl::iBytes, sLmdControl::iElements, sLmdControl::iLeftWords, sLmdControl::iOffsetSize, sLmdControl::pOffset4, and sLmdControl::pOffset8.
uint32_t fLmdGetClose | ( | sLmdControl * | ) |
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 * | , | |
uint32_t | , | |||
sMbsHeader ** | ||||
) |
Definition at line 710 of file fLmd.c.
References sLmdControl::cFile, sLmdControl::fFile, fLmdOffsetGet(), fLmdReadBuffer(), fLmdSwap4(), GETLMD__EOFILE, GETLMD__NOBUFFER, GETLMD__NOMORE, GETLMD__OUTOF_RANGE, GETLMD__SIZE_ERROR, GETLMD__TOOBIG, sLmdControl::iBufferWords, sLmdControl::iBytes, sLmdControl::iElements, sMbsFileHeader::iElements, sLmdControl::iLeftWords, sLmdControl::iOffsetEntries, sLmdControl::iSwap, sMbsHeader::iWords, LMD__NO_INDEX, LMD__SUCCESS, sLmdControl::pBuffer, sLmdControl::pMbsFileHeader, and sLmdControl::pMbsHeader.
Referenced by f_evt_get_event().
uint32_t fLmdGetMbsBuffer | ( | sLmdControl * | , | |
sMbsBufferHeader * | , | |||
uint32_t | , | |||
uint32_t * | , | |||
uint32_t * | ||||
) |
Definition at line 445 of file fLmd.c.
References sLmdControl::cFile, f_stc_read(), f_stc_write(), fLmdSwap4(), sLmdControl::iBufferWords, sLmdControl::iBytes, sLmdControl::iLeftWords, sLmdControl::iPort, sLmdControl::iSwap, sLmdControl::iTCP, sLmdControl::iTcpTimeout, LMD__FAILURE, LMD__SUCCESS, LMD__TIMEOUT, sLmdControl::pBuffer, sLmdControl::pMbsFileHeader, PORT__STREAM, STC__SUCCESS, and STC__TIMEOUT.
Referenced by fLmdGetMbsEvent().
uint32_t fLmdGetMbsEvent | ( | sLmdControl * | , | |
sMbsHeader ** | ||||
) |
Definition at line 422 of file fLmd.c.
References fLmdGetMbsBuffer(), sLmdControl::iElements, sLmdControl::iLeftWords, sMbsHeader::iWords, LMD__SUCCESS, sLmdControl::pBuffer, and sLmdControl::pMbsHeader.
Referenced by f_evt_get_event().
uint32_t fLmdGetOpen | ( | sLmdControl * | , | |
char * | , | |||
sMbsFileHeader * | , | |||
uint32_t | , | |||
uint32_t | ||||
) |
Definition at line 505 of file fLmd.c.
References sLmdControl::cFile, sLmdControl::cHeader, sLmdControl::fFile, fLmdCleanup(), fLmdGetClose(), fLmdOffsetRead(), fLmdPrintFileHeader(), fLmdReadBuffer(), fLmdSwap4(), fLmdSwap8(), GETLMD__NOFILE, GETLMD__NOLMDFILE, sLmdControl::iBufferWords, sLmdControl::iBytes, sMbsFileHeader::iEndian, sLmdControl::iInternBuffer, sLmdControl::iInternHeader, sLmdControl::iLeftWords, sMbsFileHeader::iMaxWords, sMbsFileHeader::iOffsetSize, sLmdControl::iOffsetSize, sLmdControl::iSwap, sMbsFileHeader::iTableOffset, sMbsFileHeader::iType, sMbsFileHeader::iUsedWords, l, LMD__INDEX, LMD__INTERNAL_HEADER, LMD__SUCCESS, LMD__TYPE_FILE_HEADER_101_1, sLmdControl::pBuffer, sLmdControl::pMbsFileHeader, and sLmdControl::pMbsHeader.
Referenced by f_evt_get_open().
uint32_t fLmdGetSwap | ( | sLmdControl * | ) |
Definition at line 851 of file fLmd.c.
References sLmdControl::iSwap.
uint32_t fLmdGetWrittenEndian | ( | sLmdControl * | ) |
Definition at line 865 of file fLmd.c.
References sMbsFileHeader::iWrittenEndian, LMD__ENDIAN_UNKNOWN, and sLmdControl::pMbsFileHeader.
uint32_t fLmdInitMbs | ( | sLmdControl * | , | |
char * | , | |||
uint32_t | , | |||
uint32_t | , | |||
uint32_t | , | |||
uint32_t | , | |||
uint32_t | ||||
) |
Definition at line 382 of file fLmd.c.
References sLmdControl::cFile, sLmdControl::iBufferWords, sLmdControl::iInternBuffer, sLmdControl::iPort, sLmdControl::iTCP, sLmdControl::iTCPowner, sLmdControl::iTcpTimeout, LMD__FAILURE, LMD__SUCCESS, sLmdControl::pBuffer, sLmdControl::pTCP, and s_tcpcomm::socket.
Referenced by f_evt_get_open().
void fLmdPrintBufferHeader | ( | uint32_t | , | |
sMbsBufferHeader * | ||||
) |
Definition at line 1054 of file fLmd.c.
References sMbsBufferHeader::iBuffer, sMbsBufferHeader::iElements, sMbsBufferHeader::iMaxWords, sMbsBufferHeader::iTimeSpecNanoSec, sMbsBufferHeader::iTimeSpecSec, sMbsBufferHeader::iType, and sMbsBufferHeader::iUsedWords.
void fLmdPrintControl | ( | uint32_t | , | |
sLmdControl * | ||||
) |
Definition at line 1104 of file fLmd.c.
References sLmdControl::cFile, fLmdPrintEvent(), fLmdPrintFileHeader(), sLmdControl::iBufferWords, sLmdControl::iBytes, sLmdControl::iElements, sLmdControl::iLeftWords, sLmdControl::pMbsFileHeader, and sLmdControl::pMbsHeader.
void fLmdPrintEvent | ( | uint32_t | , | |
sMbsEventHeader * | ||||
) |
Definition at line 1093 of file fLmd.c.
References sMbsEventHeader::iEventNumber, sMbsEventHeader::iTrigger, sMbsEventHeader::iType, and sMbsEventHeader::iWords.
Referenced by fLmdPrintControl().
void fLmdPrintFileHeader | ( | uint32_t | , | |
sMbsFileHeader * | ||||
) |
Definition at line 1068 of file fLmd.c.
References sMbsFileHeader::iElements, sMbsFileHeader::iMaxWords, sMbsFileHeader::iOffsetSize, sMbsFileHeader::iTableOffset, sMbsFileHeader::iTimeSpecNanoSec, sMbsFileHeader::iTimeSpecSec, sMbsFileHeader::iType, and sMbsFileHeader::iUsedWords.
Referenced by fLmdGetOpen(), and fLmdPrintControl().
void fLmdPrintHeader | ( | uint32_t | , | |
sMbsHeader * | ||||
) |
Definition at line 1084 of file fLmd.c.
References sMbsHeader::iType, and sMbsHeader::iWords.
uint32_t fLmdPutBuffer | ( | sLmdControl * | , | |
sMbsHeader * | , | |||
uint32_t | ||||
) |
Definition at line 248 of file fLmd.c.
References fLmdOffsetSet(), fLmdWriteBuffer(), sLmdControl::iBytes, sMbsFileHeader::iElements, sLmdControl::iElements, sMbsFileHeader::iMaxWords, sLmdControl::iOffsetEntries, sLmdControl::iOffsetSize, sMbsHeader::iWords, LMD__FAILURE, LMD__SUCCESS, sLmdControl::pMbsFileHeader, and PUTLMD__EXCEED.
Referenced by f_evt_put_buffer().
uint32_t fLmdPutClose | ( | sLmdControl * | ) |
Definition at line 297 of file fLmd.c.
References sLmdControl::fFile, fLmdCleanup(), fLmdGetClose(), fLmdOffsetWrite(), fLmdWriteBuffer(), sLmdControl::iBufferWords, sLmdControl::iBytes, sLmdControl::iLeftWords, sLmdControl::iOffsetEntries, sMbsFileHeader::iTableOffset, LMD__FAILURE, LMD__SUCCESS, sLmdControl::pBuffer, and sLmdControl::pMbsFileHeader.
Referenced by f_evt_put_close().
uint32_t fLmdPutElement | ( | sLmdControl * | , | |
sMbsHeader * | ||||
) |
Definition at line 189 of file fLmd.c.
References fLmdOffsetSet(), fLmdWriteBuffer(), sLmdControl::iBufferWords, sLmdControl::iBytes, sMbsFileHeader::iElements, sLmdControl::iElements, sLmdControl::iLeftWords, sMbsFileHeader::iMaxWords, sLmdControl::iOffsetEntries, sLmdControl::iOffsetSize, sMbsHeader::iWords, LMD__FAILURE, LMD__SUCCESS, sLmdControl::pBuffer, sLmdControl::pMbsFileHeader, sLmdControl::pMbsHeader, PUTLMD__EXCEED, and PUTLMD__TOOBIG.
Referenced by f_evt_put_event().
uint32_t fLmdPutOpen | ( | sLmdControl * | , | |
char * | , | |||
sMbsFileHeader * | , | |||
uint32_t | , | |||
uint32_t | , | |||
uint32_t | , | |||
uint32_t | ||||
) |
Definition at line 119 of file fLmd.c.
References sLmdControl::cFile, sLmdControl::fFile, fLmdCleanup(), fLmdOffsetResize(), fLmdWriteBuffer(), sLmdControl::iBufferWords, sLmdControl::iBytes, sMbsFileHeader::iEndian, sLmdControl::iInternBuffer, sLmdControl::iInternHeader, sLmdControl::iLeftWords, sMbsFileHeader::iOffsetSize, sLmdControl::iOffsetSize, sMbsFileHeader::iTimeSpecNanoSec, sMbsFileHeader::iTimeSpecSec, sMbsFileHeader::iType, sMbsFileHeader::iUsedWords, LMD__INDEX, LMD__LARGE_FILE, LMD__NO_OVERWRITE, LMD__STANDARD_HEADER, LMD__SUCCESS, sLmdControl::pBuffer, sLmdControl::pMbsFileHeader, PUTLMD__FILE_EXIST, and PUTLMD__OPEN_ERR.
Referenced by f_evt_put_open().
int32_t fLmdReadBuffer | ( | sLmdControl * | , | |
char * | , | |||
uint32_t | ||||
) |
Definition at line 800 of file fLmd.c.
References sLmdControl::fFile.
Referenced by fLmdGetBuffer(), fLmdGetElement(), fLmdGetOpen(), and fLmdOffsetRead().
void fLmdSetWrittenEndian | ( | sLmdControl * | , | |
uint32_t | ||||
) |
Definition at line 858 of file fLmd.c.
References sMbsFileHeader::iWrittenEndian, and sLmdControl::pMbsFileHeader.
void fLmdSwap4 | ( | uint32_t * | , | |
uint32_t | ||||
) |
Definition at line 1118 of file fLmd.c.
Referenced by fLmdConnectMbs(), fLmdGetBuffer(), fLmdGetElement(), fLmdGetMbsBuffer(), fLmdGetOpen(), and fLmdOffsetRead().
void fLmdSwap8 | ( | uint64_t * | , | |
uint32_t | ||||
) |
Definition at line 1132 of file fLmd.c.
Referenced by fLmdGetOpen(), and fLmdOffsetRead().
void fLmdVerbose | ( | sLmdControl * | , | |
uint32_t | ||||
) |