Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DaqIOLib
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
NADS-Public
DaqIOLib
Commits
44fe2a09
Commit
44fe2a09
authored
Mar 15, 2005
by
yiannis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added multi-include protection; rearranged header files
parent
f32af94e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
130 additions
and
90 deletions
+130
-90
DaqBuffer.h
DaqBuffer.h
+7
-1
DaqChannelInfo.h
DaqChannelInfo.h
+6
-0
DaqFileIO.cxx
DaqFileIO.cxx
+7
-3
DaqIOLib.vcproj
DaqIOLib.vcproj
+13
-9
DaqIo.h
DaqIo.h
+4
-15
DaqIoLib.h
DaqIoLib.h
+22
-57
DaqIoLibDefines.h
DaqIoLibDefines.h
+71
-0
daqio.cxx
daqio.cxx
+0
-5
No files found.
DaqBuffer.h
View file @
44fe2a09
#ifndef _DAQBUFFER_H_
#define _DAQBUFFER_H_
//////////////////////////////////////////////////////////////////////////////////////////
///
/// $Id: DaqBuffer.h,v 1.
1 2005/03/14 18:30:48
yiannis Exp $
/// $Id: DaqBuffer.h,v 1.
2 2005/03/14 23:05:03
yiannis Exp $
///
/// Date: December 2004
///
...
...
@@ -200,3 +203,5 @@ CDaqBuffer::Clear(void)
{
m_Data
.
clear
();
m_Count
=
0
;
}
#endif // _DAQBUFFER_H_
\ No newline at end of file
DaqChannelInfo.h
View file @
44fe2a09
#ifndef _DAQCHANNEL_H_
#define _DAQCHANNEL_H_
///////////////////////////////////////////////////////////////////////////////////////////
///
...
...
@@ -109,3 +111,6 @@ CDaqChannelInfo::GetRecSize(void) const
{
return
GetItemSize
()
*
GetItemCount
();
}
#endif // DAQCHANNEL_H_
\ No newline at end of file
DaqFileIO.cxx
View file @
44fe2a09
/////////////////////////////////////////////////////////////////////////////
///
/// DAQ low level IO Library
///
// DAQ low level IO Library
//
// $Id: DaqFileIO.cxx,v 1.9 2005/03/14 23:05:04 yiannis Exp $
// Date: March, 2005
// Author: Yiannis Papelis
//
/// \defgroup clib C++ Library
///
/// @{
///
#include "DaqIo.h"
#include "DaqIo
Lib
.h"
#include <assert.h>
///
...
...
DaqIOLib.vcproj
View file @
44fe2a09
...
...
@@ -31,19 +31,21 @@
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCLibrarianTool"
OutputFile=
"
$(OutDir)/DaqIOLib
.lib"
/>
OutputFile=
"
..\lib\DaqIOLibD
.lib"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
CommandLine=
"replace /U DaqBuffer.h ..\include
CommandLine=
"replace /U DaqIoLibDefines.h ..\include
replace /U DaqBuffer.h ..\include
replace /U DaqIo.h ..\include
replace /U DaqIoLib.h ..\include
replace /U DaqChannelInfo.h ..\include
replace /A DaqBuffer.h ..\include
replace /A DaqIo.h ..\include
replace /A DaqIoLib.h ..\include
replace /A DaqChannelInfo.h ..\include"
/>
replace /A DaqChannelInfo.h ..\include
replace /A DaqIoLibDefines.h ..\include"
/>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
...
...
@@ -77,19 +79,21 @@ replace /A DaqChannelInfo.h ..\include"/>
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCLibrarianTool"
OutputFile=
"
$(OutDir)/
DaqIOLib.lib"
/>
OutputFile=
"
..\lib\
DaqIOLib.lib"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
CommandLine=
"replace /U DaqBuffer.h ..\include
CommandLine=
"replace /U DaqIoLibDefines.h ..\include
replace /U DaqBuffer.h ..\include
replace /U DaqIo.h ..\include
replace /U DaqIoLib.h ..\include
replace /U DaqChannelInfo.h ..\include
replace /A DaqBuffer.h ..\include
replace /A DaqIo.h ..\include
replace /A DaqIoLib.h ..\include
replace /A DaqChannelInfo.h ..\include"
/>
replace /A DaqChannelInfo.h ..\include
replace /A DaqIoLibDefines.h ..\include"
/>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
...
...
@@ -116,9 +120,6 @@ replace /A DaqChannelInfo.h ..\include"/>
<File
RelativePath=
".\DaqFileIo.cxx"
>
</File>
<File
RelativePath=
".\DaqIo.cxx"
>
</File>
</Filter>
<Filter
Name=
"Header Files"
...
...
@@ -136,6 +137,9 @@ replace /A DaqChannelInfo.h ..\include"/>
<File
RelativePath=
".\DaqIoLib.h"
>
</File>
<File
RelativePath=
".\DaqIoLibDefines.h"
>
</File>
</Filter>
<Filter
Name=
"Resource Files"
...
...
DaqIo.h
View file @
44fe2a09
///////////////////////////////////////////////////////////////////////////////////////////////////
///
///
///
#include <stdio.h>
#include <string>
#include <vector>
#include <map>
#include "DaqIoLib.h"
#include "DaqBuffer.h"
#include "DaqChannelInfo.h"
#ifndef _DAQIO_H_
#define _DAQIO_H_
/////////////////////////////////////////////////////////////////////////////
///
...
...
@@ -269,4 +258,4 @@ CDaqLowLevelIo::TocFileExists() const
return
m_TocExists
;
};
///
\ No newline at end of file
#endif // _DAQIO_H_
\ No newline at end of file
DaqIoLib.h
View file @
44fe2a09
using
namespace
std
;
class
CDaqBuffer
;
class
CDaqChannelInfo
;
#define DAQ_MAGIC_NUM_VER_2_0 0x2C3D4E5F
#define DAQ_MAGIC_NUM_VER_2_1 0x2C3D4E6F
#define DAQ_MAGIC_NUM_VER_2_2 0x2C3D4E7F
#define DAQ_END_MARK 0x1A2B2C3D
#define DAQ_TOC_MAGIC_NUM 0x2C3ABCDE
typedef
unsigned
char
TDaqByte
;
typedef
vector
<
int
>
TIntVec
;
typedef
vector
<
string
>
TStrVec
;
typedef
vector
<
CDaqBuffer
>
TDataVec
;
typedef
vector
<
FILE
*>
TFileVec
;
typedef
vector
<
CDaqChannelInfo
>
TChanInfoVec
;
///////////////////////////////////////////////////////////////////////////
//
// $Id: DaqIoLib.h,v 1.2 2005/03/14 23:05:04 yiannis Exp $
// Date: March 2005
// Author: Yiannis Papelis
//
// Main include file for the DAQ I/O library
//
#ifndef __DAQIOLIB_H__
#define __DAQIOLIB_H__
#include <stdio.h>
#include <string>
#include <vector>
#include <map>
const
int
cMaxDaqRec
=
128
*
1024
;
///< maximum size of data per DAQ record
const
int
cMaxChannels
=
500
;
///< maximum number of channels we can handle
const
int
cMaxChannResyncLookahead
=
2
*
1024
;
///////////////////////////////////////////////////////////////////////////////////
///
/// This enumeration encapsulates various conversion options
/// Appropriate operators have been defined so combining options
/// can be done by using + or |
///
typedef
enum
{
eNO_OPTION
=
0
,
eEXPAND_DIFFERENTIAL
=
1
,
eFILL_MISSING
=
2
,
eINCLUDE_FRAME
=
4
,
eBINARY_FORMAT
=
32
,
eASCII_FORMAT
=
64
}
TConvertOptions
;
inline
TConvertOptions
operator
+
(
TConvertOptions
left
,
TConvertOptions
right
)
{
return
(
TConvertOptions
)((
int
)
left
+
(
int
)
right
);
}
inline
TConvertOptions
operator
|
(
TConvertOptions
left
,
TConvertOptions
right
)
{
return
(
TConvertOptions
)((
int
)
left
|
(
int
)
right
);
}
///////////////////////////////////////////////////////////////////////////////////////////
///
/// Return code used to specify the status of the end marker of the DAQ file
///
typedef
enum
{
eDAQ_EOF_OK
=
0
,
///< Found full EOF marker
eDAQ_EOF_PARTIAL_MARK
=
1
,
///< Found a partial marker
eDAQ_EOF_NOTFOUND
=
2
,
///< No EOF marker found
eDAQ_EOF_UNDEFINED
=
3
///< No information available yet
}
TDaqEofStatus
;
using
namespace
std
;
#include "DaqIoLibDefines.h"
#include "DaqBuffer.h"
#include "DaqChannelInfo.h"
#include "DaqIo.h"
#endif
\ No newline at end of file
DaqIoLibDefines.h
0 → 100644
View file @
44fe2a09
#ifndef _DAQIOLIBDEFINES_H_
#define _DAQIOLIBDEFINES_H_
//////////////////////////////////////////////////////////////////////////////
//
// $Id: DaqIoLibDefines.h,v 1.1 2005/03/14 23:05:05 yiannis Exp $
// Date: March, 2005
// Author: Yiannis Papelis
//
// General definitions for the DAQIO library
//
class
CDaqBuffer
;
class
CDaqChannelInfo
;
#define DAQ_MAGIC_NUM_VER_2_0 0x2C3D4E5F
#define DAQ_MAGIC_NUM_VER_2_1 0x2C3D4E6F
#define DAQ_MAGIC_NUM_VER_2_2 0x2C3D4E7F
#define DAQ_END_MARK 0x1A2B2C3D
#define DAQ_TOC_MAGIC_NUM 0x2C3ABCDE
typedef
unsigned
char
TDaqByte
;
typedef
vector
<
int
>
TIntVec
;
typedef
vector
<
string
>
TStrVec
;
typedef
vector
<
CDaqBuffer
>
TDataVec
;
typedef
vector
<
FILE
*>
TFileVec
;
typedef
vector
<
CDaqChannelInfo
>
TChanInfoVec
;
const
int
cMaxDaqRec
=
128
*
1024
;
///< maximum size of data per DAQ record
const
int
cMaxChannels
=
500
;
///< maximum number of channels we can handle
const
int
cMaxChannResyncLookahead
=
2
*
1024
;
///////////////////////////////////////////////////////////////////////////////////
///
/// This enumeration encapsulates various conversion options
/// Appropriate operators have been defined so combining options
/// can be done by using + or |
///
typedef
enum
{
eNO_OPTION
=
0
,
eEXPAND_DIFFERENTIAL
=
1
,
eFILL_MISSING
=
2
,
eINCLUDE_FRAME
=
4
,
eBINARY_FORMAT
=
32
,
eASCII_FORMAT
=
64
}
TConvertOptions
;
inline
TConvertOptions
operator
+
(
TConvertOptions
left
,
TConvertOptions
right
)
{
return
(
TConvertOptions
)((
int
)
left
+
(
int
)
right
);
}
inline
TConvertOptions
operator
|
(
TConvertOptions
left
,
TConvertOptions
right
)
{
return
(
TConvertOptions
)((
int
)
left
|
(
int
)
right
);
}
///////////////////////////////////////////////////////////////////////////////////////////
///
/// Return code used to specify the status of the end marker of the DAQ file
///
typedef
enum
{
eDAQ_EOF_OK
=
0
,
///< Found full EOF marker
eDAQ_EOF_PARTIAL_MARK
=
1
,
///< Found a partial marker
eDAQ_EOF_NOTFOUND
=
2
,
///< No EOF marker found
eDAQ_EOF_UNDEFINED
=
3
///< No information available yet
}
TDaqEofStatus
;
#endif //
\ No newline at end of file
daqio.cxx
deleted
100644 → 0
View file @
f32af94e
/////////////////////////////////////////////////////////////////////////////
//
// DAQ IO Library
//
//
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment