Commit fe27cd47 authored by Roberto Arturo Homs-Regojo's avatar Roberto Arturo Homs-Regojo

Merge branch 'wip-stop-rec' into 'master'

parents f0234126 fefc6504
This diff is collapsed.
......@@ -274,7 +274,7 @@ the preprocessor change these values to strings:
then we can use in:
sprintf_s(infoBuff, bufCharCount, "platform[%s] configuration[%s]",
__sprintfSExt(infoBuff, bufCharCount, "platform[%s] configuration[%s]",
VS_PLATFORM,
VS_CONFIGURATION);
......
This diff is collapsed.
......@@ -35,11 +35,12 @@ enum pcoAcqStatus {
pcoAcqStart,
pcoAcqRecordStart,
pcoAcqRecordEnd,
pcoAcqRecordStop,
pcoAcqRecordTimeout,
pcoAcqTransferStart,
pcoAcqTransferEnd,
pcoAcqStop,
pcoAcqTransferStop,
pcoAcqRecordTimeout,
pcoAcqWaitTimeout,
pcoAcqWaitError,
pcoAcqError,
......
......@@ -107,6 +107,13 @@ namespace Pco
void getNrEvents(int & val /Out/);
void setNrEvents(int val);
void getRecorderStopRequest(int & val /Out/);
void setRecorderStopRequest(int val);
void getLastImgFifo(int & val /Out/);
};
};
......
......@@ -540,7 +540,7 @@ int BufferCtrlObj::_xferImag_buff2lima(DWORD &dwFrameIdx, int &bufIdx)
if(dbgWaitobj)
{
char msg[256];
sprintf_s(msg, sizeof(msg), "... PROCESS PCObuff[%d] TO LIMAbuff[%d] frame[%d]", bufIdx, lima_buffer_nb, dwFrameIdx);
__sprintfSExt(msg, sizeof(msg), "... PROCESS PCObuff[%d] TO LIMAbuff[%d] frame[%d]", bufIdx, lima_buffer_nb, dwFrameIdx);
DEB_ALWAYS() << msg;
}
m_pcoData->traceAcq.nrImgAcquired = dwFrameIdx;
......@@ -714,7 +714,7 @@ int BufferCtrlObj::_xferImag()
if(dbgWaitobj)
{
char msg[512];
sprintf_s(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] recordState[%d] live[%d]", bufIdx, dwFrameFirst2assign, recording, live_mode);
__sprintfSExt(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] recordState[%d] live[%d]", bufIdx, dwFrameFirst2assign, recording, live_mode);
m_cam->m_tmpLog->add(msg); DEB_ALWAYS() << msg;
}
if( (error = _assignImage2Buffer(
......@@ -734,7 +734,7 @@ int BufferCtrlObj::_xferImag()
m_cam->_pco_GetBufferStatus(sBufNr, &dwStatusDll, &dwStatusDrv,errPco);
char msg[128];
sprintf_s(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
__sprintfSExt(msg, sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
DEB_ALWAYS() << "... PCO_GetBufferStatus: " << msg;
}
}
......@@ -769,12 +769,14 @@ int BufferCtrlObj::_xferImag()
// --------------- loop - process the N frames (dwFrameIdx <= dwRequestedFrames)
// -----------------------------------------------------------------------------------------
bool bReadRAM = false;
bool bCamRAM = m_cam->_isCameraType(camRAM);
for(dwFrameIdx = 1; dwFrameIdx <= dwRequestedFrames; )
{
if(dbgWaitobj)
{
char msg[256];
sprintf_s(msg,sizeof(msg),"... LOOP inside while dwFrameIdx[%d] <= dwRequestedFrames[%d]", dwFrameIdx, dwRequestedFrames);
__sprintfSExt(msg, sizeof(msg),"... LOOP inside while dwFrameIdx[%d] <= dwRequestedFrames[%d]", dwFrameIdx, dwRequestedFrames);
DEB_ALWAYS() << msg;
}
......@@ -819,7 +821,7 @@ int BufferCtrlObj::_xferImag()
if(!found)
{
char msg[256];
sprintf_s(msg,sizeof(msg),"... ERROR - dwFrameIdx[%d] not found in the assigned buffers",dwFrameIdx);
__sprintfSExt(msg, sizeof(msg),"... ERROR - dwFrameIdx[%d] not found in the assigned buffers",dwFrameIdx);
DEB_ALWAYS() << msg;
}
......@@ -882,7 +884,7 @@ int BufferCtrlObj::_xferImag()
if(dbgWaitobj)
{
char msg[256];
sprintf_s(msg,sizeof(msg),"... WAITOBJ [%d] found", eventRet);
__sprintfSExt(msg, sizeof(msg),"... WAITOBJ [%d] found", eventRet);
DEB_ALWAYS() << msg;
}
}
......@@ -891,7 +893,7 @@ int BufferCtrlObj::_xferImag()
{
char msg[256];
sprintf_s(msg,sizeof(msg),
__sprintfSExt(msg, sizeof(msg),
"err[0x%lx] dwStatusDll[0x%lx] dwStatusDrv[0x%lx] \n"
"sBufNr[%d] WAITOBJ[%d] dwFrameIdx[%d] iLoopsPolled[%d] msTimeout[%d]\n",
errPco, dwStatusDll, dwStatusDrv,
......@@ -923,7 +925,7 @@ int BufferCtrlObj::_xferImag()
if(dbgWaitobj)
{
char msg[256];
sprintf_s(msg, sizeof(msg), "... EVENT FIRED buffNr[%d] dwBuffFrame[%d] dwFrameIdx[%d] dwStatusDll[0x%08lx] dwStatusDrv[0x%08lx] err[0x%x], iLoopsPolled[%d]",
__sprintfSExt(msg, sizeof(msg), "... EVENT FIRED buffNr[%d] dwBuffFrame[%d] dwFrameIdx[%d] dwStatusDll[0x%08lx] dwStatusDrv[0x%08lx] err[0x%x], iLoopsPolled[%d]",
sBufNr, dwBuffFrame, dwFrameIdx, dwStatusDll, dwStatusDrv, errPco, iLoopsPolled);
DEB_ALWAYS() << msg;
}
......@@ -954,7 +956,7 @@ int BufferCtrlObj::_xferImag()
if(dbgWaitobj)
{
char msg[256];
sprintf_s(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] live[%d]", bufIdx, dwFrameFirst2assign, live_mode);
__sprintfSExt(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] live[%d]", bufIdx, dwFrameFirst2assign, live_mode);
DEB_ALWAYS() << msg;
}
......@@ -979,7 +981,7 @@ int BufferCtrlObj::_xferImag()
if(dbgWaitobj)
{
char msg[256];
sprintf_s(msg, sizeof(msg), "... BYPASSED ASSIGN BUFFER[%d] dwFrameFirst2assign[%d] dwRequestedFrames[%d] live[%d]",
__sprintfSExt(msg, sizeof(msg), "... BYPASSED ASSIGN BUFFER[%d] dwFrameFirst2assign[%d] dwRequestedFrames[%d] live[%d]",
bufIdx, dwFrameFirst2assign, dwRequestedFrames, live_mode);
DEB_ALWAYS() << msg;
}
......@@ -1010,7 +1012,80 @@ int BufferCtrlObj::_xferImag()
m_sync->setAcqFrames(dwFrameIdx);
dwFrameIdx++;
} // while(dwFrameIdx <= dwRequestedFrames).
if(live_mode && bCamRAM && m_cam->_getRecorderStopRequest() && (dwFrameIdx <= dwRequestedFrames) )
{
bReadRAM = true;
break;
}
} // for(dwFrameIdx = 1; dwFrameIdx <= dwRequestedFrames; )
// -----------------------------------------------------------------------------------------
// if the "live recording" was interrupted, begin to transfer all the images in the memory
// -----------------------------------------------------------------------------------------
if(bReadRAM)
{
int error;
DWORD _dwPcoValidImageCnt, _dwPcoMaxImageCnt;
WORD wSegment;
DWORD dwImgToRead, dwFirstImg, dwImgIdx;
WORD _wArmWidth, _wArmHeight, _wBitPerPixel;
WORD _wMaxWidth, _wMaxHeight;
m_cam->_pco_GetSizes(&_wArmWidth, &_wArmHeight, &_wMaxWidth, &_wMaxHeight, error);
m_cam->getBitsPerPixel(_wBitPerPixel);
// ------------- stop the recording and clear buffers
m_cam->_pco_SetRecordingState(0, error);
bufIdx = 0;
SHORT sBufNr = m_allocBuff.pcoAllocBufferNr[bufIdx];
m_cam->_pco_GetActiveRamSegment(wSegment, error );
m_cam->_pco_GetNumberOfImagesInSegment(wSegment, _dwPcoValidImageCnt, _dwPcoMaxImageCnt, error);
if(error) {
}
m_pcoData->dwValidImageCnt[wSegment-1] =
m_pcoData->traceAcq.nrImgRecorded = _dwPcoValidImageCnt;
m_pcoData->dwMaxImageCnt[wSegment-1] =
m_pcoData->traceAcq.maxImgCount = _dwPcoMaxImageCnt;
// ------------- save the actual image sent to lima / last "live image"
// ------------- read the img recorded (all or partial) from the oldest to the last one
m_pcoData->traceAcq.lastImgFifo = dwFrameIdx;
dwImgToRead = dwRequestedFrames - dwFrameIdx;
dwFirstImg = (_dwPcoValidImageCnt < dwImgToRead) ? 1 : _dwPcoValidImageCnt - dwImgToRead;
for(dwImgIdx = dwFirstImg; dwImgIdx <= _dwPcoValidImageCnt; dwImgIdx++)
{
// ------------- _pco_GetImageEx only allows read 1 img, so dwFirstImg = dwLastImg
m_cam->_pco_GetImageEx(
wSegment, dwImgIdx, dwImgIdx,
sBufNr, _wArmWidth, _wArmHeight, _wBitPerPixel, error);
int xferRet = _xferImag_buff2lima(dwFrameIdx, bufIdx);
//if(xferRet == pcoAcqStop) goto _EXIT_STOP;
} //for(dwImgIdx = dwFirstImg;
}
// -----------------------------------------------------------------------------------------
//---------------------------------- end of the while / all img were processed
......@@ -1021,6 +1096,13 @@ int BufferCtrlObj::_xferImag()
DEB_ALWAYS() << m_cam->_sprintComment(false, fnId, "[EXIT]");
if(bReadRAM)
{
return pcoAcqRecordStop;
}
return pcoAcqTransferEnd;
_EXIT_STOP:
......@@ -2188,7 +2270,7 @@ int BufferCtrlObj::_xferImagDoubleImage()
bufIdx = iEvent;
if(dbgWaitobj){
sprintf_s(msg, RING_LOG_BUFFER_SIZE, "... ASSIGN BUFFER[%d] frame[%d]", bufIdx, dwPcoFrameFirst2assign);
__sprintfSExt(msg, RING_LOG_BUFFER_SIZE, "... ASSIGN BUFFER[%d] frame[%d]", bufIdx, dwPcoFrameFirst2assign);
m_cam->m_tmpLog->add(msg); DEB_ALWAYS() << msg;
}
......@@ -2302,7 +2384,7 @@ _RETRY:
m_cam->_pco_GetBufferStatus(sBufNr, &dwStatusDll, &dwStatusDrv,errPco);
if((dwStatusDll != 0x80000000) || dwStatusDrv || errPco)
{
sprintf_s(msg, sizeof(msg),"SDK ERROR got frame[%d / %d] bufIdx[%d] size[%ld] dest[%p] src[%p] \n"
__sprintfSExt(msg, sizeof(msg),"SDK ERROR got frame[%d / %d] bufIdx[%d] size[%ld] dest[%p] src[%p] \n"
"dwStatusDll[%08x] dwStatusDrv[%08x] errPco[%08x] err[%s]\n",
dwPcoFrameIdx, dwPcoRequestedFrames, bufIdx,
size, ptrLimaBuffer, ptrPcoBuffer,
......@@ -2451,7 +2533,7 @@ _RETRY_WAIT:
for(int _id = 0; _id<m_cam->m_pco_buffer_nrevents; _id++)
{
flag = m_allocBuff.bufferAssignedFrameFirst[_id] == dwPcoFrameIdx ? "***" : " ";
ptr += sprintf_s(ptr, ptrMax - ptr,
ptr += __sprintfSExt(ptr, ptrMax-ptr,
"\n%s [%d] pcoBuffNr[%d] ready[%d] limaFrame[%d] limaPtr[%p] limaPtr1[%p] pcoPtr[%p] limaSize[%d] pcoSize[%d]",
flag, _id,
m_allocBuff.pcoAllocBufferNr[_id],
......
This diff is collapsed.
......@@ -973,7 +973,7 @@ void Camera::_waitForRecording(int nrFrames, DWORD &_dwValidImageCnt, DWORD &_dw
char _msg[LEN_MSG + 1];
sprintf_s(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
_traceMsg(_msg);
m_pcoData->traceAcq.fnId = fnId;
......@@ -1039,7 +1039,7 @@ void Camera::_waitForRecording(int nrFrames, DWORD &_dwValidImageCnt, DWORD &_dw
if( ((DWORD) nb_frames > _dwMaxImageCnt) ){
nb_frames_fixed = true;
sprintf_s(msgErr,LEN_ERROR_MSG,
__sprintfSExt(msgErr,LEN_ERROR_MSG,
"=== %s [%d]> ERROR INVALID NR FRAMES fixed nb_frames[%d] _dwMaxImageCnt[%d]",
fnId, __LINE__, nb_frames, _dwMaxImageCnt);
printf("%s\n", msgErr);
......@@ -1150,7 +1150,7 @@ void Camera::_waitForRecording(int nrFrames, DWORD &_dwValidImageCnt, DWORD &_dw
m_pcoData->traceAcq.endXferTimestamp = m_pcoData->msAcqXferTimestamp = getTimestamp();
sprintf_s(_msg, LEN_MSG, "%s [%d]> [EXIT] imgRecorded[%d] coc[%g] recLoopTime[%ld] "
__sprintfSExt(_msg, LEN_MSG, "%s [%d]> [EXIT] imgRecorded[%d] coc[%g] recLoopTime[%ld] "
"tout[(%ld) 0(%ld)] rec[%ld] xfer[%ld] all[%ld](ms)\n",
fnId, __LINE__, _dwValidImageCnt, msPerFrame, msNowRecordLoop, timeout, timeout0, msRecord, msXfer, msTotal);
_traceMsg(_msg);
......
This diff is collapsed.
......@@ -146,14 +146,14 @@ void Camera::_pco_GetCameraInfo(int &error){
char *ptr = validPixelRate;
char *ptrMax = ptr + sizeof(validPixelRate);
ptr += sprintf_s(ptr, ptrMax - ptr, "validRates:");
ptr += __sprintfSExt(ptr, ptrMax - ptr, "validRates:");
for(int i=0; i<4; i++)
{
_dwPixRate = m_pcoData->stcPcoDescription.dwPixelRateDESC[i];
if(_dwPixRate > 0)
{
dwPixelRateValid[iPixelRateValidNr++] = _dwPixRate;
ptr += sprintf_s(ptr, ptrMax - ptr, " [%d]",_dwPixRate);
ptr += __sprintfSExt(ptr, ptrMax - ptr, " [%d]",_dwPixRate);
}
if(dwPixelRateMax < _dwPixRate){
dwPixelRateMax = m_pcoData->dwPixelRateMax = _dwPixRate;
......
This diff is collapsed.
This diff is collapsed.
......@@ -130,7 +130,7 @@ void _pco_acq_thread_dimax(void *argin) {
BufferCtrlObj* m_buffer = m_cam->_getBufferCtrlObj();
char _msg[LEN_MSG + 1];
sprintf_s(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
m_cam->_traceMsg(_msg);
m_cam->_sprintComment(true, fnId, "[ENTRY]");
......@@ -203,7 +203,7 @@ void _pco_acq_thread_dimax(void *argin) {
if( (dwPcoRequestedFrames > _dwPcoMaxImageCnt) ){
nb_frames_fixed = true;
sprintf_s(msgErr,LEN_ERROR_MSG,
__sprintfSExt(msgErr,LEN_ERROR_MSG,
"=== %s [%d]> ERROR INVALID NR FRAMES fixed nb_frames[%d] _dwPcoMaxImageCnt[%d]",
fnId, __LINE__, dwPcoRequestedFrames, _dwPcoMaxImageCnt);
printf("%s\n", msgErr);
......@@ -338,7 +338,7 @@ void _pco_acq_thread_dimax(void *argin) {
m_pcoData->traceAcq.endXferTimestamp = m_pcoData->msAcqXferTimestamp = getTimestamp();
sprintf_s(_msg, LEN_MSG, "%s [%d]> [EXIT] imgRecorded[%d] coc[%g] recLoopTime[%ld] "
__sprintfSExt(_msg, LEN_MSG, "%s [%d]> [EXIT] imgRecorded[%d] coc[%g] recLoopTime[%ld] "
"tout[(%ld) 0(%ld)] rec[%ld] xfer[%ld] all[%ld](ms)\n",
fnId, __LINE__, _dwPcoValidImageCnt, msPerFrame, msNowRecordLoop, timeout, timeout0, msRecord, msXfer, msTotal);
m_cam->_traceMsg(_msg);
......@@ -437,7 +437,7 @@ void _pco_acq_thread_dimax_trig_single(void *argin) {
if( ((DWORD) nb_frames > _dwMaxImageCnt) ){
nb_frames_fixed = true;
sprintf_s(msgErr,LEN_ERROR_MSG,
__sprintfSExt(msgErr,LEN_ERROR_MSG,
"=== %s [%d]> ERROR INVALID NR FRAMES fixed nb_frames[%d] _dwMaxImageCnt[%d]",
fnId, __LINE__, nb_frames, _dwMaxImageCnt);
printf("%s\n", msgErr);
......@@ -585,7 +585,7 @@ void _pco_acq_thread_edge(void *argin) {
BufferCtrlObj* m_buffer = m_cam->_getBufferCtrlObj();
char _msg[LEN_MSG + 1];
sprintf_s(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
m_cam->_traceMsg(_msg);
m_cam->_sprintComment(true, fnId, "[ENTRY]");
......@@ -625,7 +625,7 @@ void _pco_acq_thread_edge(void *argin) {
m_pcoData->msAcqXfer = msXfer = msElapsedTime(tStart);
sprintf_s(_msg, LEN_MSG, "%s> [EXIT] xfer[%ld] (ms) status[%s]\n",
__sprintfSExt(_msg, LEN_MSG, "%s> [EXIT] xfer[%ld] (ms) status[%s]\n",
fnId, msXfer, sPcoAcqStatus[status]);
m_cam->_traceMsg(_msg);
......@@ -664,7 +664,7 @@ void _pco_acq_thread_dimax_live(void *argin) {
BufferCtrlObj* m_buffer = m_cam->_getBufferCtrlObj();
char _msg[LEN_MSG + 1];
sprintf_s(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
m_cam->_traceMsg(_msg);
struct stcPcoData *m_pcoData = m_cam->_getPcoData();
......@@ -698,7 +698,7 @@ void _pco_acq_thread_dimax_live(void *argin) {
// dimax xfer time
m_pcoData->msAcqXfer = msXfer = msElapsedTime(tStart);
m_pcoData->msAcqXferTimestamp = getTimestamp();
sprintf_s(_msg, LEN_MSG, "%s> [EXIT] xfer[%ld] (ms) status[%s]\n",
__sprintfSExt(_msg, LEN_MSG, "%s> [EXIT] xfer[%ld] (ms) status[%s]\n",
fnId, msXfer, sPcoAcqStatus[status]);
m_cam->_traceMsg(_msg);
......@@ -718,7 +718,7 @@ void _pco_acq_thread_ringBuffer(void *argin) {
BufferCtrlObj* m_buffer = m_cam->_getBufferCtrlObj();
char _msg[LEN_MSG + 1];
sprintf_s(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
m_cam->_traceMsg(_msg);
m_cam->_sprintComment(true, fnId, "[ENTRY]");
......@@ -787,7 +787,7 @@ void _pco_acq_thread_ringBuffer(void *argin) {
usElapsedTimeSet(usStart);
if(error) {
sprintf_s(_msg, LEN_MSG, "%s> [%d]> ERROR %s", fnId, __LINE__, msg);
__sprintfSExt(_msg, LEN_MSG, "%s> [%d]> ERROR %s", fnId, __LINE__, msg);
m_cam->_traceMsg(_msg);
//throw LIMA_HW_EXC(Error, "_pco_SetRecordingState");
}
......@@ -803,7 +803,7 @@ void _pco_acq_thread_ringBuffer(void *argin) {
m_pcoData->msAcqXferTimestamp =
getTimestamp();
sprintf_s(_msg, LEN_MSG, "%s> EXIT xfer[%ld] (ms) status[%s]",
__sprintfSExt(_msg, LEN_MSG, "%s> EXIT xfer[%ld] (ms) status[%s]",
fnId, msXfer, sPcoAcqStatus[status]);
m_cam->_traceMsg(_msg);
......@@ -857,7 +857,7 @@ void _pco_shutter_thread_edge(void *argin) {
//SyncCtrlObj* m_sync = m_cam->_getSyncCtrlObj();
char _msg[LEN_MSG + 1];
sprintf_s(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [ENTRY]", fnId);
m_cam->_traceMsg(_msg);
m_cam->_sprintComment(true, fnId, "[ENTRY]");
......@@ -865,7 +865,7 @@ void _pco_shutter_thread_edge(void *argin) {
m_cam->_pco_set_shutter_rolling_edge(error);
sprintf_s(_msg, LEN_MSG, "%s> [EXIT]", fnId);
__sprintfSExt(_msg, LEN_MSG, "%s> [EXIT]", fnId);
m_cam->_traceMsg(_msg);
//m_sync->setStarted(false); // to test
......@@ -956,15 +956,17 @@ void Camera::startAcq()
if(bOutOfRange)
{
char msg[MSG1K];
__sprintfSExt(msg, sizeof(msg)-1,
"ERROR frames OUT OF RANGE ulRequestedFrames[%ld], ulFramesMaxInSegment[%ld], wDoubleImage[%d], forced[%d]",
ulRequestedFrames, ulFramesMaxInSegment, wDoubleImage, forced);
DEB_ALWAYS() << "\nERROR frames OUT OF RANGE " << DEB_VAR4(ulRequestedFrames, ulFramesMaxInSegment, wDoubleImage, forced);
{
Event *ev = new Event(Hardware,Event::Error,Event::Camera,Event::CamNoMemory, "ERROR frames OUT OF RANGE");
_getPcoHwEventCtrlObj()->reportEvent(ev);
}
m_sync->setStarted(false);
m_sync->setExposing(pcoAcqError);
return;
DEB_ALWAYS() << msg;
m_sync->setStarted(false);
m_sync->setExposing(pcoAcqError);
throw LIMA_EXC(CameraPlugin, InvalidValue, msg);
return;
}
}
......
......@@ -625,7 +625,8 @@ void SyncCtrlObj::getStatus(HwInterface::StatusType& status)
status.acq = AcqRunning;
status.det = DetIdle;
break;
case pcoAcqRecordStop:
case pcoAcqRecordTimeout:
case pcoAcqWaitTimeout:
case pcoAcqWaitError:
......
......@@ -334,7 +334,7 @@ int BufferCtrlObj::_xferImag()
if(m_cam->_getDebug(DBG_WAITOBJ))
{
char msg[512];
sprintf_s(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] recordState[%d] live[%d]", bufIdx, dwFrameFirst2assign, recording, live_mode);
__sprintfSExt(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] recordState[%d] live[%d]", bufIdx, dwFrameFirst2assign, recording, live_mode);
m_cam->m_tmpLog->add(msg); DEB_ALWAYS() << msg;
}
......@@ -356,7 +356,7 @@ int BufferCtrlObj::_xferImag()
m_cam->_pco_GetBufferStatus(sBufNr, &dwStatusDll, &dwStatusDrv,errPco);
char msg[128];
sprintf_s(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
__sprintfSExt(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
DEB_ALWAYS() << "... PCO_GetBufferStatus: " << msg;
}
......@@ -439,7 +439,7 @@ _RETRY:
if(m_cam->_getDebug(DBG_WAITOBJ))
{
char msg[256];
sprintf_s(msg,sizeof(msg),"buffNr[%d] dwBuffFrame[%d] dwFrameIdx[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]",
__sprintfSExt(msg,sizeof(msg),"buffNr[%d] dwBuffFrame[%d] dwFrameIdx[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]",
sBufNr, dwBuffFrame, dwFrameIdx, dwStatusDll, dwStatusDrv, errPco);
DEB_ALWAYS() << "... PCO_GetBufferStatus: " << msg;
}
......@@ -460,7 +460,7 @@ _RETRY:
if(m_cam->_getDebug(DBG_WAITOBJ))
{
char msg[512];
sprintf_s(msg, sizeof(msg), "... PROCESS PCObuff[%d] TO LIMAbuff[%d] frame[%d]", bufIdx, lima_buffer_nb, dwFrameIdx);
__sprintfSExt(msg, sizeof(msg), "... PROCESS PCObuff[%d] TO LIMAbuff[%d] frame[%d]", bufIdx, lima_buffer_nb, dwFrameIdx);
DEB_ALWAYS() << msg;
}
m_pcoData->traceAcq.nrImgAcquired = dwFrameIdx;
......@@ -483,14 +483,14 @@ _RETRY:
if(m_cam->_getDebug(DBG_WAITOBJ))
{
char msg[128];
sprintf_s(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
__sprintfSExt(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
DEB_ALWAYS() << "... PCO_GetBufferStatus: " << msg;
}
// if((dwStatusDll != 0x80000000) || dwStatusDrv || errPco) {
if(0) {
char msg[MSG1K];
sprintf_s(msg,MSG1K,"SDK ERROR got frame[%d / %d] bufIdx[%d] size[%ld] dest[%p] src[%p] \n"
__sprintfSExt(msg,MSG1K,"SDK ERROR got frame[%d / %d] bufIdx[%d] size[%ld] dest[%p] src[%p] \n"
"dwStatusDll[%08x] dwStatusDrv[%08x] errPco[%08x] err[%s]\n",
dwFrameIdx, dwRequestedFrames, bufIdx,
size, ptrDest, ptrSrc,
......@@ -546,7 +546,7 @@ _RETRY:
{
char msg[128];
//ResetEvent(m_allocBuff.bufferAllocEvent[bufIdx]);
sprintf_s(msg, sizeof(msg), "... RESETING BUFFER BUFFER[%d] frame[%d] live[%d]", bufIdx, dwFrameFirst2assign, live_mode);
__sprintfSExt(msg, sizeof(msg), "... RESETING BUFFER BUFFER[%d] frame[%d] live[%d]", bufIdx, dwFrameFirst2assign, live_mode);
DEB_ALWAYS() << msg;
}
else
......@@ -555,7 +555,7 @@ _RETRY:
{
if(m_cam->_getDebug(DBG_WAITOBJ))
{
sprintf_s(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] live[%d]", bufIdx, dwFrameFirst2assign, live_mode);
__sprintfSExt(msg, sizeof(msg), "... ASSIGN BUFFER[%d] frame[%d] live[%d]", bufIdx, dwFrameFirst2assign, live_mode);
m_cam->m_tmpLog->add(msg); DEB_ALWAYS() << msg;
}
......@@ -574,7 +574,7 @@ _RETRY:
m_cam->_pco_GetBufferStatus(sBufNr, &dwStatusDll, &dwStatusDrv,errPco);
char msg[128];
sprintf_s(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
__sprintfSExt(msg,sizeof(msg),"buffNr[%d] dwStatusDll[%08lx] dwStatusDrv[%08lx] err[%x]", sBufNr, dwStatusDll, dwStatusDrv, errPco);
DEB_ALWAYS() << "... PCO_GetBufferStatus: " << msg;
}
......@@ -662,7 +662,7 @@ _RETRY_WAIT:
for(int _id = 0; _id<m_cam->m_pco_buffer_nrevents; _id++)
{
flag = m_allocBuff.bufferAssignedFrameFirst[_id] == dwFrameIdx ? "***" : " ";
ptr += sprintf_s(ptr, ptrMax - ptr,
ptr += __sprintfSExt(ptr, ptrMax - ptr,
"\n%s [%d] pcoBuffNr[%d] ready[%d] limaFrame[%d] limaPtr[%p] pcoPtr[%p] limaSize[%d] pcoSize[%d]",
flag, _id,
m_allocBuff.pcoAllocBufferNr[_id],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment