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
96d45782
Commit
96d45782
authored
Oct 17, 2016
by
IOWA\dheitbri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for KPMG_RS1_Main
parent
62fe9a63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
10 deletions
+24
-10
DaqFileIO.cxx
DaqFileIO.cxx
+22
-8
DaqIOLib.vcxproj
DaqIOLib.vcxproj
+1
-1
DaqIo.h
DaqIo.h
+1
-1
No files found.
DaqFileIO.cxx
View file @
96d45782
...
...
@@ -2,7 +2,7 @@
///
// DAQ low level IO Library
//
// $Id: DaqFileIO.cxx,v 1.2
3 2016/04/19 21:05:50 iowa\cschwarz
Exp $
// $Id: DaqFileIO.cxx,v 1.2
4 2016/10/17 13:04:28 IOWA\dheitbri
Exp $
// Date: March, 2005
// Author: Yiannis Papelis
//
...
...
@@ -15,7 +15,10 @@
#include <io.h>
using
namespace
std
;
#ifdef WIN32
#pragma warning(push)
#pragma warning(disable: 4996)
#endif
///
/// Small dummy function to act as the default callback
///
...
...
@@ -499,7 +502,8 @@ CDaqLowLevelIo::ResyncFrame(
void
CDaqLowLevelIo
::
Close
(
void
)
{
fclose
(
m_pFile
);
if
(
m_pFile
)
fclose
(
m_pFile
);
m_pFile
=
0
;
...
...
@@ -1307,7 +1311,7 @@ CDaqLowLevelIo::LowLevelDataRead(
memset
(((
char
*
)
pTempSpace
)
+
size
,
0
,
fullSize
-
size
);
}
daqBuf
.
Append
(
pTempSpace
,
fullSize
,
ch
.
GetItemCount
());
if
(
pFrameList
&&
pFrameList
->
size
()
>
needChan
[
chId
])
if
(
pFrameList
&&
(
int
)
pFrameList
->
size
()
>
needChan
[
chId
])
{
(
*
pFrameList
)[
needChan
[
chId
]].
push_back
(
curFrame
);
}
...
...
@@ -1580,7 +1584,8 @@ CDaqLowLevelIo::GetFullData(
TConvertOptions
option
,
int
frm1
,
///< First frame to sample, or -1 for first in file
int
frm2
,
///< Last frame to sample, or -1 for last in file
vector
<
TIntVec
>*
pFrmList
)
///< Where to store frame sequences
vector
<
TIntVec
>*
pFrmList
,
int
maxDiffLook
)
///< Where to store frame sequences
{
char
buf
[
256
];
// buffer for writing messages
...
...
@@ -1698,6 +1703,10 @@ CDaqLowLevelIo::GetFullData(
// have none
//
if
(
frm1
!=
GetFirstFrame
()
)
{
int
endFrame
=
GetFirstFrame
();
if
(
maxDiffLook
>
0
){
endFrame
=
max
(
frm1
-
maxDiffLook
,
endFrame
);
}
for
(
size_t
idx
=
0
;
idx
<
pChnList
->
size
();
idx
++
)
{
if
(
m_Channels
[(
*
pChnList
)[
idx
]].
GetCapRate
()
<
0
)
{
// Search backwards from frame frm1 until
...
...
@@ -1707,12 +1716,15 @@ CDaqLowLevelIo::GetFullData(
int
candFrame
=
frm1
;
int
theChan
=
(
*
pChnList
)[
idx
];
while
(
!
done
&&
candFrame
>=
GetFirstFrame
()
)
{
while
(
!
done
&&
candFrame
>=
endFrame
)
{
ReadFrameHeader
(
candFrame
,
curFrame
,
numChan
,
bytesSkipped
);
ReadChannelDataForOneFrame
(
numChan
,
theChan
,
latestData
[
idx
],
pTempSpace
,
done
);
candFrame
--
;
}
if
(
!
done
)
{
if
(
candFrame
<
endFrame
){
done
=
true
;
}
if
(
!
done
&&
endFrame
<
0
)
{
m_LastError
=
"could not find any data for var channel; possible internal error"
;
return
false
;
}
...
...
@@ -2082,5 +2094,7 @@ CDaqLowLevelIo::ReadFrameHeader(
frameToRead
=
-
1
;
// no seeking needed after a resync
}
}
#ifdef WIN32
#pragma warning(pop)
#endif
/// @}
DaqIOLib.vcxproj
View file @
96d45782
...
...
@@ -69,7 +69,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
...
...
DaqIo.h
View file @
96d45782
...
...
@@ -29,7 +29,7 @@ public:
bool
LowLevelDataCopy
(
const
TIntVec
*
chans
,
TFileVec
&
dest
,
TConvertOptions
options
=
eBINARY_FORMAT
+
eINCLUDE_FRAME
);
bool
GetFullData
(
const
TIntVec
*
chans
,
TDataVec
&
data
,
TConvertOptions
option
=
eNO_OPTION
,
int
firstFrame
=
-
1
,
int
lastFrame
=
-
1
,
std
::
vector
<
TIntVec
>*
pFrameList
=
0
);
int
firstFrame
=
-
1
,
int
lastFrame
=
-
1
,
std
::
vector
<
TIntVec
>*
pFrameList
=
0
,
int
maxDiffLook
=
-
1
);
bool
Open
(
const
std
::
string
&
);
///< Open the file
void
GetChannels
(
TChanInfoVec
&
channels
)
const
;
///< Return info about channels
...
...
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