Commit a52cf8ed authored by Roberto Arturo Homs-Regojo's avatar Roberto Arturo Homs-Regojo Committed by GitHub

Wip forced fifo (#4)

* included ForcedFifo in recording mode for large nr of frames
* fifo / multiple events / forcedFifo without resetEvent
parent 2bcbd92f
......@@ -22,36 +22,119 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
IF(WIN32)
SET(NAME "pco")
set(NAME "pco")
set(PCO_SDKWIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sdkPco" CACHE PATH "location of pco sdk-win")
set(PCO_SDKLIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sdkPcoLin" CACHE PATH "location of pco sdk-lin")
SET(PCO_SDK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sdkPco" CACHE PATH "location of pco sdk")
#============================================================================
#============================================================================
#Sources
SET(${NAME}_srcs src/PcoCamera.cpp src/PcoInterface.cpp src/PcoDetInfoCtrlObj.cpp
src/PcoSyncCtrlObj.cpp src/PcoRoiCtrlObj.cpp
src/PcoBufferCtrlObj.cpp src/PcoHwEventCtrlObj.cpp
src/PcoCameraUtils.cpp src/PcoCameraSdk.cpp)
IF(WIN32)
#Sources
SET(${NAME}_srcs src/PcoCamera.cpp src/PcoInterface.cpp src/PcoDetInfoCtrlObj.cpp
src/PcoSyncCtrlObj.cpp src/PcoRoiCtrlObj.cpp
src/PcoBufferCtrlObj.cpp src/PcoHwEventCtrlObj.cpp
src/PcoCameraUtils.cpp src/PcoCameraSdk.cpp)
ADD_LIBRARY(lima${NAME} SHARED ${${NAME}_srcs})
ADD_LIBRARY(lima${NAME} SHARED ${${NAME}_srcs})
TARGET_INCLUDE_DIRECTORIES(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
TARGET_INCLUDE_DIRECTORIES(lima${NAME} PUBLIC "${PCO_SDK_DIR}/include")
TARGET_INCLUDE_DIRECTORIES(lima${NAME} PUBLIC "${PCO_SDK_DIR}")
TARGET_INCLUDE_DIRECTORIES(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
TARGET_INCLUDE_DIRECTORIES(lima${NAME} PUBLIC "${PCO_SDKWIN_DIR}/include")
TARGET_INCLUDE_DIRECTORIES(lima${NAME} PUBLIC "${PCO_SDKWIN_DIR}")
#LIBRARY
FIND_LIBRARY(PCO_LIB_CAM SC2_Cam ${PCO_SDK_DIR}/lib64)
#LIBRARY
FIND_LIBRARY(PCO_LIB_CAM SC2_Cam ${PCO_SDKWIN_DIR}/lib64)
TARGET_LINK_LIBRARIES(lima${NAME} limacore)
TARGET_LINK_LIBRARIES(lima${NAME} ${PCO_LIB_CAM})
TARGET_LINK_LIBRARIES(lima${NAME} limacore)
TARGET_LINK_LIBRARIES(lima${NAME} ${PCO_LIB_CAM})
limatools_set_library_soversion(lima${NAME} "VERSION")
SET_TARGET_PROPERTIES(lima${NAME} PROPERTIES PREFIX "lib")
INSTALL(TARGETS lima${NAME} DESTINATION lib)
limatools_set_library_soversion(lima${NAME} "VERSION")
SET_TARGET_PROPERTIES(lima${NAME} PROPERTIES PREFIX "lib")
INSTALL(TARGETS lima${NAME} DESTINATION lib)
IF(LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Pco")
IF(LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Pco")
ENDIF()
ENDIF()
ENDIF()
\ No newline at end of file
#============================================================================
#============================================================================
if(UNIX)
#Current location of linux sdk, on the branch linux_dev.v123 the 09/06/17
set(PCO_SDK_LIB_DIR "${PCO_SDKLIN_DIR}/pco_common/pco_lib" CACHE PATH "location of pco sdklib-lin")
#set(SISO_LIB_DIR "${SISODIR5}/lib64" CACHE PATH "sisolib")
set(SISO_LIB_DIR "/opt/SiliconSoftware/Runtime5.2.2/lib64" CACHE PATH "sisolib")
#Sources
set(${NAME}_srcs
src/PcoBinCtrlObj.cpp
src/PcoBufferCtrlObj.cpp
src/PcoCamera.cpp
src/PcoCameraSdk.cpp
src/PcoCameraSdkLin.cpp
src/PcoCameraSip.cpp
src/PcoCameraUtils.cpp
src/PcoDetInfoCtrlObj.cpp
src/PcoHwEventCtrlObj.cpp
src/PcoInterface.cpp
src/PcoRoiCtrlObj.cpp
src/PcoSyncCtrlObj.cpp
)
add_library(lima${NAME} SHARED ${${NAME}_srcs})
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(lima${NAME} PUBLIC "${PCO_SDKLIN_DIR}/include")
target_include_directories(lima${NAME} PUBLIC "${PCO_SDKWIN_DIR}/include")
#LIBRARIES
# libfglib5.so => /opt/SiliconSoftware/Runtime5.2.2/lib/libfglib5.so (0x00007f4c7459e000)
# libclsersis.so => /opt/SiliconSoftware/Runtime5.2.2/lib/libclsersis.so (0x00007f4c74496000)
# libhaprt.so => /opt/SiliconSoftware/Runtime5.2.2/lib/libhaprt.so (0x00007f4c7435f000)
# link_directories(${SISO_LIB_DIR})
# ----- find_library
find_library(PCO_CAM_ME4_LIB pcocam_me4 ${PCO_SDK_LIB_DIR})
find_library(PCO_FILE_LIB pcofile ${PCO_SDK_LIB_DIR})
find_library(PCO_LOG_LIB pcolog ${PCO_SDK_LIB_DIR})
find_library(PCO_FUNC_LIB reorderfunc ${PCO_SDK_LIB_DIR})
find_library(SISO_LIB_FGLIB5 fglib5 ${SISO_LIB_DIR})
find_library(SISO_LIB_CLSERSIS clsersis ${SISO_LIB_DIR})
find_library(SISO_LIB_HAPRT haprt ${SISO_LIB_DIR})
find_library(PCO_PTHREAD_LIB pthread)
# ----- target_link_libraries
target_link_libraries(lima${NAME} limacore)
target_link_libraries(lima${NAME} ${PCO_CAM_ME4_LIB})
target_link_libraries(lima${NAME} ${PCO_FILE_LIB})
target_link_libraries(lima${NAME} ${PCO_LOG_LIB})
target_link_libraries(lima${NAME} ${PCO_FUNC_LIB})
target_link_libraries(lima${NAME} ${SISO_LIB_FGLIB5})
target_link_libraries(lima${NAME} ${SISO_LIB_CLSERSIS})
target_link_libraries(lima${NAME} ${SISO_LIB_HAPRT})
target_link_libraries(lima${NAME} ${PCO_PTHREAD_LIB})
limatools_set_library_soversion(lima${NAME} "VERSION")
install(TARGETS lima${NAME} LIBRARY DESTINATION lib)
if(LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Pco")
endif()
endif()
#============================================================================
#============================================================================
......@@ -713,6 +713,10 @@
RelativePath="..\..\..\..\setId"
>
</File>
<File
RelativePath="..\..\..\..\src\unused.txt"
>
</File>
<File
RelativePath="..\..\..\..\useSdk116"
>
......
This diff is collapsed.
......@@ -130,6 +130,7 @@ typedef struct __timeb64 TIME_USEC;
#define DWORD_MAX 0xffffffff
#define INT_DWORD_MAX 4294967295
#define ERR_SIZE 256
#define ERRMSG_SIZE (256+128)
......
......@@ -104,6 +104,10 @@ namespace lima
int _xferImagMultDoubleImage();
int _xferImagDoubleImage();
int _xferImag();
int _xferImag_buff2lima(DWORD &dwFrameIdx, int &bufIdx);
int _xferImag_getImage();
int _xferImag_getImage_edge();
int _xferImagMult();
......
......@@ -56,6 +56,7 @@
#define CAMINFO_BLOCK (0x1LL << 0)
#define CAMINFO_UNSORTED (0x1LL << 1)
#define CAMINFO_LOG (0x1LL << 2)
#define CAMINFO_ACQ (0x1LL << 3)
#define CAMINFO_PIXELRATE (0x1LL << 8)
#define CAMINFO_ADC (0x1LL << 9)
......@@ -105,8 +106,16 @@
#define DBG_DUMMY_IMG 0x00000100
#define DBG_WAITOBJ 0x00000200
#define DBG_XFER_IMG 0x00000400
#define DBG_TRACE_FIFO 0x00000800
#define DBG_ROI 0x00001000
#define DBG_FN1 0x00010000
#define DBG_FN2 0x00020000
#define DBG_FN3 0x00040000
#define DBG_FN4 0x00080000
//---------------------------------------
//--------------------------------------- test cmd mode
......@@ -167,6 +176,9 @@ struct stcSegmentInfo
DWORD dwMaxImageCnt;
};
//================================================================
// LINUX
//================================================================
......@@ -222,10 +234,12 @@ enum capsDesc
};
enum timestampFmt {Iso=1, IsoHMS, FnFull, FnDate};
enum timestampFmt {Iso=1, IsoHMS, FnFull, FnDate, IsoMilliSec};
char *getTimestamp(timestampFmt fmtIdx, time_t xtime = 0) ;
time_t getTimestamp();
//================================================================
//================================================================
struct stcFrame
{
BOOL changed;
......@@ -238,6 +252,9 @@ struct stcFrame
};
//================================================================
//================================================================
#define RING_LOG_BUFFER_SIZE 64
class ringLog
{
......@@ -264,6 +281,11 @@ private:
struct data *buffer;
};
//================================================================
//================================================================
struct stcTemp
{
short sCcd, sCam, sPower;
......@@ -272,13 +294,65 @@ struct stcTemp
short sDefaultCoolSet;
};
//================================================================
//================================================================
struct stcLongLongStr
{
long long value;
const char *desc;
};
//================================================================
//================================================================
typedef struct {
DWORD nrImgRecorded;
DWORD maxImgCount;
int nrImgRequested;
int nrImgRequested0;
int nrImgAcquired;
long msTotal, msRecord, msRecordLoop, msXfer, msTout;
long msStartAcqStart, msStartAcqEnd, msStartAcqNow;
int checkImgNrPco, checkImgNrPcoTimestamp, checkImgNrLima, checkImgNrOrder;
#define LEN_TRACEACQ_TRHEAD 11
//long msThreadBeforeXfer, msThreadAfterXfer, msThreadEnd;
//long msThread[LEN_TRACEACQ_TRHEAD];
long msReserved[15-LEN_TRACEACQ_TRHEAD];
struct stcLongLongStr usTicks[LEN_TRACEACQ_TRHEAD];
double msImgCoc;
double sExposure, sDelay;
time_t endRecordTimestamp;
time_t endXferTimestamp;
const char *fnId;
const char *fnIdXfer;
const char *sPcoStorageRecorderMode;
int iPcoStorageMode, iPcoRecorderSubmode;
int iPcoBinHorz, iPcoBinVert;
int iPcoRoiX0, iPcoRoiX1, iPcoRoiY0, iPcoRoiY1;
const char *sPcoTriggerMode;
const char *sLimaTriggerMode;
int iPcoTriggerMode;
const char *sPcoAcqMode;
int iPcoAcqMode;
double dLimaExposure, dLimaDelay;
int iPcoExposure, iPcoExposureBase;
int iPcoDelay, iPcoDelayBase;
char msg[LEN_TRACEACQ_MSG+1];
time_t fnTimestampEntry, fnTimestampExit;
int nrErrors;
void traceMsg(char *s);
} STC_traceAcq;
//================================================================
//================================================================
#define SIZEARR_stcPcoHWIOSignal 10
#define SIZESTR_PcoHWIOSignal 1024
......@@ -392,64 +466,7 @@ struct stcPcoData
long msAcqRec, msAcqXfer, msAcqTout, msAcqTnow, msAcqAll;
time_t msAcqRecTimestamp, msAcqXferTimestamp, msAcqToutTimestamp, msAcqTnowTimestamp;
struct stcTraceAcq{
DWORD nrImgRecorded;
DWORD maxImgCount;
int nrImgRequested;
int nrImgRequested0;
int nrImgAcquired;
long msTotal, msRecord, msRecordLoop, msXfer, msTout;
long msStartAcqStart, msStartAcqEnd, msStartAcqNow;
int checkImgNrPco, checkImgNrPcoTimestamp, checkImgNrLima;
#define LEN_TRACEACQ_TRHEAD 11
//long msThreadBeforeXfer, msThreadAfterXfer, msThreadEnd;
//long msThread[LEN_TRACEACQ_TRHEAD];
long msReserved[15-LEN_TRACEACQ_TRHEAD];
struct stcLongLongStr usTicks[LEN_TRACEACQ_TRHEAD];
double msImgCoc;
double sExposure, sDelay;
time_t endRecordTimestamp;
time_t endXferTimestamp;
const char *fnId;
const char *fnIdXfer;
const char *sPcoStorageRecorderMode;
int iPcoStorageMode, iPcoRecorderSubmode;
int iPcoBinHorz, iPcoBinVert;
int iPcoRoiX0, iPcoRoiX1, iPcoRoiY0, iPcoRoiY1;
const char *sPcoTriggerMode;
const char *sLimaTriggerMode;
int iPcoTriggerMode;
const char *sPcoAcqMode;
int iPcoAcqMode;
double dLimaExposure, dLimaDelay;
int iPcoExposure, iPcoExposureBase;
int iPcoDelay, iPcoDelayBase;
char msg[LEN_TRACEACQ_MSG+1];
time_t fnTimestampEntry, fnTimestampExit;
int nrErrors;
void traceMsg(char *s);
} traceAcq;
STC_traceAcq traceAcq;
DWORD dwPixelRate, dwPixelRateRequested;
double fTransferRateMHzMax;
......@@ -608,6 +625,30 @@ namespace lima
class BufferCtrlObj;
class SyncCtrlObj;
class VideoCtrlObj;
class Camera;
//--------------------------------------- class CehckImgNr
class CheckImgNr
{
public:
CheckImgNr(Camera *cam);
~CheckImgNr();
void init(STC_traceAcq *traceAcq);
void update(int iLimaFrame, void *ptrImage);
;
private:
Camera *m_cam;
STC_traceAcq *m_traceAcq;
bool checkImgNr;
int pcoImgNrDiff;
int pcoImgNrOrder;
int pcoImgNrLast;
int alignmentShift;
};
//--------------------------------------- class Camera
class DLL_EXPORT Camera : public HwMaxImageSizeCallbackGen
{
friend class Interface;
......@@ -616,6 +657,7 @@ namespace lima
friend class RoiCtrlObj;
friend class BinCtrlObj;
friend class BufferCtrlObj;
friend class CheckImgNr;
DEB_CLASS_NAMESPC(DebModCamera,"Camera","Pco");
public:
......@@ -743,6 +785,9 @@ namespace lima
bool m_isArmed;
long long m_state;
int m_pco_buffer_nrevents;
bool bRecorderForcedFifo;
//----------------------------------
Camera::Status m_status;
......@@ -813,6 +858,8 @@ namespace lima
ringLog *m_msgLog;
ringLog *m_tmpLog;
CheckImgNr *m_checkImgNr;
char *mybla, *myblamax;
char *mytalk, *mytalkmax;
......@@ -830,7 +877,6 @@ namespace lima
DWORD _getCameraSerialNumber() ;
void _checkImgNrInit(bool &checkImgNr, int &imgNrDiff, int &alignmentShift);
const char *_xlatPcoCode2Str(int code, enumTblXlatCode2Str table, int &err);
const char *xlatCode2Str(int code, struct stcXlatCode2Str *stc);
......@@ -1088,6 +1134,12 @@ namespace lima
void setBitAlignment(std::string &i_sn);
void getBitAlignment(std::string &o_sn);
void getRecorderForcedFifo(int & val);
void setRecorderForcedFifo(int val);
void getNrEvents(int & val);
void setNrEvents(int val);
}; // class camera
} // namespace pco
} // namespace lima
......
......@@ -30,7 +30,8 @@
#include "lima/HwInterface.h"
enum pcoAcqStatus {
pcoAcqIdle = 0,
pcoAcqOK = 0,
pcoAcqIdle,
pcoAcqStart,
pcoAcqRecordStart,
pcoAcqRecordEnd,
......
......@@ -16,6 +16,7 @@ LOG="./doc/VERSION.log"
DT=`date +"%Y/%m/%d %H:%M:%S"`
PCOLIMAVER=`head -1 VERSION`
PCOREV=`git log -n 1 --date=iso --format=format:"rev[%ad] head[%h][%H] ref[%d]" HEAD || echo "ERROR"`
LIMAREV=`cd ../.. ; git log -n 1 --date=iso --format=format:"rev[%ad] head[%h][%H] ref[%d]" HEAD || echo "ERROR"`
PROCLIBREV=`cd ../../third-party/Processlib ; git log -n 1 --date=iso --format=format:"rev[%ad] head[%h][%H] ref[%d]" HEAD || echo "ERROR"`
......@@ -26,6 +27,7 @@ SPECREV=`cd ../../applications/spec ; git log -n 1 --date=iso --format=format:"r
{
head -1 ${SDK_WIN_H}
head -1 ${SDK_LIN_H}
echo "#define PCO_LIMA_VERSION \"\$Id: PCOLIMA [${PCOLIMAVER}] \$\""
echo "#define PCO_GIT_VERSION \"\$Id: PCO ${PCOREV} at [${DT}] \$\""
echo "#define LIMA_GIT_VERSION \"\$Id: LIMA ${LIMAREV} at [${DT}] \$\""
echo "#define PROCLIB_GIT_VERSION \"\$Id: PROCLIB ${PROCLIBREV} at [${DT}] \$\""
......
......@@ -101,6 +101,12 @@ namespace Pco
void setBitAlignment(std::string &i_sn);
void getBitAlignment(std::string &o_sn /Out/);
void getRecorderForcedFifo(int & val /Out/);
void setRecorderForcedFifo(int val);
void getNrEvents(int & val /Out/);
void setNrEvents(int val);
};
};
......
This diff is collapsed.
......@@ -99,14 +99,15 @@ const char* _timestamp_pcocamera() {return ID_FILE_TIMESTAMP ;}
char * _timestamp_gitversion(char *buffVersion, int len)
{
sprintf_s(buffVersion, len, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
sprintf_s(buffVersion, len, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
PCO_GIT_VERSION,
PCO_SDK_VERSION,
PROCLIB_GIT_VERSION,
LIBCONFIG_GIT_VERSION,
LIMA_GIT_VERSION,
TANGO_GIT_VERSION,
SPEC_GIT_VERSION
SPEC_GIT_VERSION,
PCO_LIMA_VERSION
);
return buffVersion;
}
......@@ -879,16 +880,25 @@ void Camera::prepareAcq()
// ----------------------------------------- storage mode (recorder + sequence)
if(_isCameraType(Dimax | Pco4k | Pco2k)) {
enumPcoStorageMode mode;
enumPcoStorageMode mode;
int forced;
if((trig_mode == ExtTrigSingle) && (iRequestedFrames > 0)) {
mode = RecRing;
} else {
// live video requested frames = 0
mode = (iRequestedFrames > 0) ? RecSeq : Fifo;
}
getRecorderForcedFifo(forced);
DEB_TRACE() << "\n>>> set storage/recorder mode - DIMAX 2K 4K: " << DEB_VAR1(mode);
if((trig_mode == ExtTrigSingle) && (iRequestedFrames > 0))
{
mode = RecRing;
}
else if(forced || iRequestedFrames == 0)
{
mode = Fifo;
}
else
{ // live video requested frames = 0
mode = RecSeq;
}
DEB_TRACE() << "\n>>> set storage/recorder mode - DIMAX 2K 4K: " << DEB_VAR1(mode);
_pco_SetStorageMode_SetRecorderSubmode(mode, error);
PCO_THROW_OR_TRACE(error, "_pco_SetStorageMode_SetRecorderSubmode") ;
......@@ -1141,10 +1151,12 @@ int Camera::PcoCheckError(int line, const char *file, int err, const char *fn, c
if (err != 0) {
sprintf_s(tmpMsg1,LEN_TMP_MSG,"ERROR - PCOfn[%s]", fn);
msgLog(tmpMsg);
DWORD dwErr = err;
m_pcoData->pcoError = err;
msg = m_pcoData->pcoErrorMsg;
memset(msg,0,ERR_SIZE);
PCO_GetErrorText(dwErr, msg, ERR_SIZE-14);
lg = strlen(msg);
......@@ -1180,7 +1192,7 @@ char* Camera::_PcoCheckError(int line, const char *file, int err, int &error, co
PCO_GetErrorText(err, lastErrorMsg, ERR_SIZE-14);
//strncpy_s(msg, ERR_SIZE, lastErrorMsg, _TRUNCATE);
strncpy_s(msg, ERR_SIZE, lastErrorMsg, ERR_SIZE);
strncpy_s(msg, ERR_SIZE, lastErrorMsg, ERR_SIZE-1);
lg = strlen(msg);
......@@ -1557,39 +1569,6 @@ const char *Camera::_getCameraSubTypeStr()
//=================================================================================================
//=================================================================================================
//=================================================================================================
//=================================================================================================
void Camera::_checkImgNrInit(bool &checkImgNr, int &imgNrDiff, int &alignmentShift){
DEB_MEMBER_FUNCT();
DEF_FNID;
checkImgNr = false;
imgNrDiff = 1;
alignmentShift = 0;
int err;
WORD wTimeStampMode;
_pco_GetTimestampMode(wTimeStampMode, err);
if(wTimeStampMode == 0) return;
checkImgNr = true;
int alignment;
_pco_GetBitAlignment(alignment);
if(alignment == 0)
alignmentShift = (16 - m_pcoData->stcPcoDescription.wDynResDESC);
else
alignmentShift = 0;
return;
}
//=================================================================================================
//=================================================================================================
......
......@@ -846,6 +846,7 @@ Camera::Camera(const char *params)
m_pcoData->traceAcqClean();
m_checkImgNr = new CheckImgNr(this);
// properties: params
......
......@@ -373,6 +373,11 @@ const char * Camera::_pco_SetRecordingState(int state, int &err){
DEB_TRACE() << fnId << ": PCO_SetRecordingState " << DEB_VAR1(wRecState_new);
PCO_FN2(err, msg,PCO_SetRecordingState, m_handle, wRecState_new);
PCO_PRINT_ERR(err, msg); if(err) return msg;
if(_getDebug(DBG_TRACE_FIFO))
{
printf("---TRACE - PCO_SetRecordingState[%d]\n", wRecState_new);
}
}
if(wRecState_new)
......@@ -1379,9 +1384,7 @@ unsigned long Camera::_pco_GetNumberOfImagesInSegment_MaxCalc(int segmentPco)
unsigned long framesMax;
if(_isCameraType(Edge)) {
return LONG_MAX;
}
//if(_isCameraType(Edge)) {return LONG_MAX;}
if(!_isCameraType(Dimax | Pco2k | Pco4k)) {
......@@ -3183,6 +3186,12 @@ void Camera::_pco_GetImageEx(WORD wSegment, DWORD dw1stImage,
PCO_CHECK_ERROR(err, "PCO_GetImageEx");
if(err)
{
_pco_GetStorageMode_GetRecorderSubmode();
DEB_ALWAYS() << "ERROR: "
<< DEB_VAR3(dw1stImage, dwLastImage, m_pcoData->storage_str)
<< "\n " << DEB_VAR5(wSegment, sBufNr, wXRes,wYRes, wBitPerPixel);
PCO_THROW_OR_TRACE(err, "PCO_GetImageEx") ;
}
return;
......@@ -3208,6 +3217,15 @@ void Camera::_pco_GetBufferStatus(SHORT sBufNr, DWORD* dwStatusDll,
#else
err = PCO_GetBufferStatus(m_handle, sBufNr, dwStatusDll, dwStatusDrv);
#if 0
if(_getDebug(DBG_WAITOBJ))
{
char msg[512];
sprintf_s(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, *dwStatusDll, *dwStatusDrv, err);
DEB_ALWAYS() << "... PCO_GetBufferStatus: " << msg;
}
#endif
PCO_CHECK_ERROR(err, "PCO_GetBufferStatus");
if(err)
{
......
......@@ -73,7 +73,10 @@ void Camera::_pco_SetImageParameters(int &error){
int iLenParam = 0;
DWORD dwFlags = 0;
dwFlags = _isCameraType(Edge) ?
int forcedFifo = 0;
getRecorderForcedFifo(forcedFifo);
dwFlags = (_isCameraType(Edge) || forcedFifo) ?
IMAGEPARAMETERS_READ_WHILE_RECORDING :
IMAGEPARAMETERS_READ_FROM_SEGMENTS;
......@@ -87,6 +90,10 @@ void Camera::_pco_SetImageParameters(int &error){
PCO_FN6(error, pcoFn,PCO_SetImageParameters, m_handle, wXres, wYres, dwFlags, param, iLenParam);
if(_getDebug(DBG_TRACE_FIFO))
{
printf("---TRACE - PCO_SetImageParameters dwFlags[0x%lx]\n", dwFlags);
}
if(error)
{
DEB_ALWAYS() << "ERROR: \n" << DEB_VAR2(pcoFn, error);
......
......@@ -256,7 +256,7 @@ void Camera::getTraceAcq(std::string &o_sn)
"* fnId[%s] nrEvents[%d]\n"
"* ... fnIdXfer[%s]\n",
m_pcoData->traceAcq.fnId,
PCO_BUFFER_NREVENTS,
m_pco_buffer_nrevents,
m_pcoData->traceAcq.fnIdXfer);
ptr += sprintf_s(ptr, ptrMax - ptr, "* ... testCmdMode [0x%llx]\n", m_pcoData->testCmdMode);
......@@ -380,10 +380,11 @@ void Camera::getTraceAcq(std::string &o_sn)
totTime, xferSpeed, framesPerSec);
ptr += sprintf_s(ptr, ptrMax - ptr,
"* ... checkImgNr pco[%d] lima[%d] diff[%d]\n",
"* ... checkImgNr pco[%d] lima[%d] diff[%d] order[%d]\n",
m_pcoData->traceAcq.checkImgNrPco,
m_pcoData->traceAcq.checkImgNrLima,
m_pcoData->traceAcq.checkImgNrPco - m_pcoData->traceAcq.checkImgNrLima);
m_pcoData->traceAcq.checkImgNrPco - m_pcoData->traceAcq.checkImgNrLima,
m_pcoData->traceAcq.checkImgNrOrder);
ptr += sprintf_s(ptr, ptrMax - ptr,
"%s\n", m_pcoData->traceAcq.msg);
......@@ -751,7 +752,12 @@ void Camera::getDebugIntTypes(std::string &o_sn)
_PRINT_DBG( DBG_DUMMY_IMG ) ;
_PRINT_DBG( DBG_WAITOBJ ) ;
_PRINT_DBG( DBG_XFER_IMG ) ;
_PRINT_DBG( DBG_TRACE_FIFO ) ;
_PRINT_DBG( DBG_ROI ) ;
_PRINT_DBG( DBG_FN1 ) ;
_PRINT_DBG( DBG_FN2 ) ;
_PRINT_DBG( DBG_FN3 ) ;
_PRINT_DBG( DBG_FN4 ) ;
o_sn = buff;
......@@ -858,3 +864,38 @@ void Camera::setBitAlignment(std::string &i_sn)
return;
}
//====================================================================
// SIP - attrib
//====================================================================
void Camera::setRecorderForcedFifo(int val)
{
DEB_MEMBER_FUNCT();
bRecorderForcedFifo = !! val;
}
void Camera::getRecorderForcedFifo(int &val)
{
DEB_MEMBER_FUNCT();
val = bRecorderForcedFifo;
}
//====================================================================
// SIP - attrib
//====================================================================
void Camera::setNrEvents(int