pco-1.408

minor tools / added ident.exe for cpInstall
- _xferImag_getImage_edge() / TESTCMDMODE_EDGE_XFER (0x2) test mode without events for edge gold usb
- logsbackup.bat, logsoff.bat, logson.bat (manage PCO log files)
- minor debug / trace / ...
- extraction of the imgNr and date/time from the timestamp of the image
- fix division by 0 when camera subType is not defined
- included checkImgNr in _xferImag_getImage_edge and _xferImag
- minor / format / trace
- usb3
- fixed the procedure for pco edge usb / different from pco edge
  cameralink
-- start record before assign buffer
-- force cancel images always before record off / to avoid go to unknow
  state of the cam
-- long tests done with edge/cameralink
- added function _isRunAfterAssign() in order to manage the start record for all types
- minor: moved basic pco sdk fuctions to PcoCameraSdk.cpp (partial)
- long tests done with edge/usb3 OK
- sip fix getMaxWidthHeight to int
- talk / included getVersion file
- minor / names
- vc project / included sip files
parent 3813b028
@echo off
c:
cd C:\ProgramData\pco
@echo off & for /F "tokens=1-4 delims=/ " %%A in ('date/t') do (
set DateDay=%%A
set DateMonth=%%B
set DateYear=%%C
)
@echo off & for /F "tokens=1-4 delims=: " %%D in ('time/t') do (
set DateHour=%%D
set DateMin=%%E
)
set CurrentDate=%DateYear%-%DateMonth%-%DateDay%-%DateHour%%DateMin%
echo %CurrentDate%
md %CurrentDate%
copy *.log %CurrentDate%
copy *.txt %CurrentDate%
copy *.ini %CurrentDate%
@echo off
c:
cd C:\ProgramData\pco
@echo off & for /F "tokens=1-4 delims=/ " %%A in ('date/t') do (
set DateDay=%%A
set DateMonth=%%B
set DateYear=%%C
)
@echo off & for /F "tokens=1-4 delims=: " %%D in ('time/t') do (
set DateHour=%%D
set DateMin=%%E
)
set CurrentDate=%DateYear%-%DateMonth%-%DateDay%-%DateHour%%DateMin%
echo %CurrentDate%
md %CurrentDate%
move *.log %CurrentDate%
move *.txt %CurrentDate%
copy *.ini %CurrentDate%
rem =========================================
echo %CurrentDate% > PCO_CDlg.txt
echo %CurrentDate% > PCO_Conv.txt
echo %CurrentDate% > SC2_Cam.txt
@echo off
c:
cd C:\ProgramData\pco
@echo off & for /F "tokens=1-4 delims=/ " %%A in ('date/t') do (
set DateDay=%%A
set DateMonth=%%B
set DateYear=%%C
)
@echo off & for /F "tokens=1-4 delims=: " %%D in ('time/t') do (
set DateHour=%%D
set DateMin=%%E
)
set CurrentDate=%DateYear%-%DateMonth%-%DateDay%-%DateHour%%DateMin%
echo %CurrentDate%
md %CurrentDate%
move *.log %CurrentDate%
move *.txt %CurrentDate%
copy *.ini %CurrentDate%
rem =========================================
echo %CurrentDate% > PCO_CDlg.log
echo %CurrentDate% > PCO_Conv.log
echo %CurrentDate% > SC2_Cam.log
......@@ -497,6 +497,10 @@
RelativePath="..\..\..\..\src\PcoCamera.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\PcoCameraSdk.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\PcoCameraUtils.cpp"
>
......@@ -625,6 +629,10 @@
<Filter
Name="doc"
>
<File
RelativePath="..\..\..\..\cpInstall"
>
</File>
<File
RelativePath="..\..\..\..\doc\index.rst"
>
......@@ -678,6 +686,18 @@
>
</File>
</Filter>
<Filter
Name="sip"
>
<File
RelativePath="..\..\..\..\sip\PcoCamera.sip"
>
</File>
<File
RelativePath="..\..\..\..\sip\PcoInterface.sip"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
......
......@@ -5,26 +5,39 @@ REMDIR="/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco"
REMHOST="blissadm@lid00a"
#LOCDIR="/c/blissadm/git/pco/Lima/install"
LOCDIR="../../install"
LOCDIR_BAT="./bat"
TMPDIR="/t/rhoms1"
DLL="Lima/liblimapco.dll"
LOG="./doc/VERSION.log"
DT=`date +"%Y-%m-%d_%H%M%S"`
INSTALL="install-${DT}"
INSTALLBETA="install-beta"
INSTALLBETA_OLD="install-beta-${DT}"
echo ${INSTALL} > ${LOCDIR}/INSTALL_VERSION.txt
{
echo ${INSTALL}
echo
./ident.exe ${LOCDIR}/${DLL}
}> ${LOCDIR}/INSTALL_VERSION.txt
scp -r ${LOCDIR}/ ${REMHOST}:${REMDIR}/${INSTALL}
mkdir -p ${TMPDIR}/${INSTALL}/bat
cp -r ${LOCDIR}/ ${TMPDIR}/${INSTALL}
cp ${LOCDIR_BAT}/*.bat ${TMPDIR}/${INSTALL}/bat
mv ${TMPDIR}/${INSTALLBETA} ${TMPDIR}/${INSTALLBETA_OLD}
cp -r ${LOCDIR}/ ${TMPDIR}/${INSTALLBETA}
mkdir -p ${TMPDIR}/${INSTALLBETA}/bat
cp ${LOCDIR_BAT}/*.bat ${TMPDIR}/${INSTALLBETA}/bat
scp -r ${TMPDIR}/${INSTALL} ${REMHOST}:${REMDIR}
{
echo
date "+%Y/%m/%d %H:%M:%S =========================================="
echo "scp: copied local directory to segfs and /tmp_14_days:"
echo "from: [${LOCDIR}/]"
echo "from: [${LOCDIR}/] and [${LOCDIR_BAT}/]"
echo " to: [${REMHOST}:${REMDIR}/${INSTALL}]"
echo " to: [${TMPDIR}/${INSTALL}]"
echo " to: [${TMPDIR}/${INSTALLBETA}]"
......
2016/06/07 19:17:26 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-07_191718]
to: [/t/rhoms1/install-2016-06-07_191718]
to: [/t/rhoms1/install-beta]
- tmp save
- sip fix getMaxWidthHeight to int
- talk / included getVersion file
- minor / names
- vc project / included sip files
2016/06/07 15:28:06 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-07_152754]
to: [/t/rhoms1/install-2016-06-07_152754]
to: [/t/rhoms1/install-beta]
2016/06/07 15:27:12 ==========================================
#define PCO_SDK_VERSION "$Id: PCOSDK [1.18] $"
#define PCO_GIT_VERSION "$Id: PCO rev[2016-06-07 15:25:42 +0200] head[c705778][c705778f9bff94c5d366010bdd20777af55a9f74] ref[ (HEAD, master)] at [2016/06/07 15:27:12] $"
#define LIMA_GIT_VERSION "$Id: LIMA rev[2016-05-19 15:11:55 +0200] head[d0008e7][d0008e7c9e7ff688079bce4ea9ec79531d9b5df2] ref[ (HEAD, origin/core-1.4, core-1.4)] at [2016/06/07 15:27:12] $"
#define PROCLIB_GIT_VERSION "$Id: PROCLIB rev[2016-01-15 15:44:08 +0100] head[3a08863][3a0886386e57a24ced072832d321d2dc43449e0b] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/06/07 15:27:12] $"
#define LIBCONFIG_GIT_VERSION "$Id: LIBCONFIG rev[2013-02-07 18:08:29 +0100] head[89c411a][89c411a541d4ab4d66257ccb85749853fd685cbb] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/06/07 15:27:12] $"
#define TANGO_GIT_VERSION "$Id: TANGO rev[2016-06-02 14:44:15 +0200] head[479c51e][479c51e847021563cdca895d6a213ca98cf43ec4] ref[ (HEAD, github/master, github/HEAD, master)] at [2016/06/07 15:27:12] $"
#define SPEC_GIT_VERSION "$Id: SPEC rev[2016-05-19 13:58:33 +0200] head[a5b9be5][a5b9be5efd7916a28cf0ab06fcc6f17e19194605] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/06/07 15:27:12] $"
2016/06/07 15:05:10 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-07_150503]
to: [/t/rhoms1/install-2016-06-07_150503]
to: [/t/rhoms1/install-beta]
- temp save
- added function _isRunAfterAssign() in order to manage the start record for all types
- minor - moved basic pco sdk fuctions to PcoCameraSdk.cpp (partial)
-- long tests done with edge/usb3 OK
2016/06/06 17:29:24 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-06_172917]
to: [/t/rhoms1/install-2016-06-06_172917]
to: [/t/rhoms1/install-beta]
- temp save
- fixed the procedure for pco edge usb / different from pco edge cameralink
-- start record before assign buffer
-- force cancel images always before record off / to avoid go to unknow state of the cam
-- long tests done with edge/cameralink OK
2016/06/03 18:50:43 ==========================================
#define PCO_SDK_VERSION "$Id: PCOSDK [1.18] $"
#define PCO_GIT_VERSION "$Id: PCO rev[2016-06-03 18:49:38 +0200] head[675a78b][675a78bace6241a0164190d26c3c0da2886ecaa1] ref[ (HEAD, gitlab/master, master)] at [2016/06/03 18:50:43] $"
#define LIMA_GIT_VERSION "$Id: LIMA rev[2016-05-19 15:11:55 +0200] head[d0008e7][d0008e7c9e7ff688079bce4ea9ec79531d9b5df2] ref[ (HEAD, origin/core-1.4, core-1.4)] at [2016/06/03 18:50:43] $"
#define PROCLIB_GIT_VERSION "$Id: PROCLIB rev[2016-01-15 15:44:08 +0100] head[3a08863][3a0886386e57a24ced072832d321d2dc43449e0b] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/06/03 18:50:43] $"
#define LIBCONFIG_GIT_VERSION "$Id: LIBCONFIG rev[2013-02-07 18:08:29 +0100] head[89c411a][89c411a541d4ab4d66257ccb85749853fd685cbb] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/06/03 18:50:43] $"
#define TANGO_GIT_VERSION "$Id: TANGO rev[2016-06-02 14:44:15 +0200] head[479c51e][479c51e847021563cdca895d6a213ca98cf43ec4] ref[ (HEAD, github/master, github/HEAD, master)] at [2016/06/03 18:50:43] $"
#define SPEC_GIT_VERSION "$Id: SPEC rev[2016-05-19 13:58:33 +0200] head[a5b9be5][a5b9be5efd7916a28cf0ab06fcc6f17e19194605] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/06/03 18:50:43] $"
2016/06/03 17:48:13 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-03_174800]
to: [/t/rhoms1/install-2016-06-03_174800]
to: [/t/rhoms1/install-beta]
- temp save
- extraction of the imgNr and date/time from the timestamp of the image
- fix division by 0 when camera subType is not defined
- included checkImgNr in _xferImag_getImage_edge and _xferImag
- minor / format / trace
2016/06/02 15:55:50 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-02_155543]
to: [/t/rhoms1/install-2016-06-02_155543]
to: [/t/rhoms1/install-beta]
- minor / temp save
2016/06/02 12:07:02 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-06-02_120655]
to: [/t/rhoms1/install-2016-06-02_120655]
to: [/t/rhoms1/install-beta]
- _xferImag_getImage_edge() / TESTCMDMODE_EDGE_XFER (0x2) test mode without events for edge gold usb
- logsbackup.bat, logsoff.bat, logson.bat (manage PCO log files)
- minor debug / trace / ...
2016/05/24 12:57:49 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/]
to: [blissadm@lid00a:/segfs/bliss/projects/LIMA/build/depot_win/win_vc9/pco/install-2016-05-24_125743]
to: [/t/rhoms1/install-2016-05-24_125743]
to: [/t/rhoms1/install-beta]
---> pco-win64-1.407_install-2016-05-24_125743
2016/05/24 12:55:59 ==========================================
#define PCO_SDK_VERSION "$Id: PCOSDK [1.18] $"
#define PCO_GIT_VERSION "$Id: PCO rev[2016-05-24 12:47:57 +0200] head[c47cc53][c47cc53af7e62ff8285bf7699a3bb62c5c24ec13] ref[ (HEAD, gitlab/master, master)] at [2016/05/24 12:55:58] $"
#define LIMA_GIT_VERSION "$Id: LIMA rev[2016-05-19 15:11:55 +0200] head[d0008e7][d0008e7c9e7ff688079bce4ea9ec79531d9b5df2] ref[ (HEAD, origin/core-1.4, core-1.4)] at [2016/05/24 12:55:58] $"
#define PROCLIB_GIT_VERSION "$Id: PROCLIB rev[2016-01-15 15:44:08 +0100] head[3a08863][3a0886386e57a24ced072832d321d2dc43449e0b] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/05/24 12:55:58] $"
#define LIBCONFIG_GIT_VERSION "$Id: LIBCONFIG rev[2013-02-07 18:08:29 +0100] head[89c411a][89c411a541d4ab4d66257ccb85749853fd685cbb] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/05/24 12:55:58] $"
#define TANGO_GIT_VERSION "$Id: TANGO rev[2016-05-24 12:54:20 +0200] head[e26b1cd][e26b1cd59239701d195f5a9b980097f3362e6b04] ref[ (HEAD, github/master, github/HEAD, master)] at [2016/05/24 12:55:58] $"
#define SPEC_GIT_VERSION "$Id: SPEC rev[2016-05-19 13:58:33 +0200] head[a5b9be5][a5b9be5efd7916a28cf0ab06fcc6f17e19194605] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2016/05/24 12:55:58] $"
2016/05/23 17:57:03 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/]
......@@ -409,7 +528,7 @@ from: [../../install/]
$Id: comp[2016/02/24 12:30:14] file[2016/02/24 12:03:31] [..\..\..\..\src\PcoCamera.cpp] $
- pco / included the control of aligment of the 12b data to 16b
- pco / included the control of alignment of the 12b data to 16b
- enabled the pixelRate control in pco 2K and 4K
- minor changes in talk cmd
......
......@@ -4,6 +4,16 @@
#===================================================
#===================================================
2016/06/06 17:29:24 ==========================================
- long tests done with pco gold /cameralink (wid19edge - 64b)
+++ total nrImages[32768][pco: 32768 lima: 32768 diff: 0] expTime[0.0001] execTime[822.088] fps[39.8595][40.5825] sn[62000031] [2016/06/06 19:30:31]
2016/06/03 17:48:13 ==========================================
- long tests done with pco edge/cameralink (wid19edge - 64b)
+++ total nrImages[32768][pco: 32768 lima: 32768 diff: 0] expTime[0.0001] execTime[666.811] fps[49.1414][50.3204] sn[429][2016/06/03 18:57:46]
#===================================================
# 2016/05/20
# update the working test version with usb3 / pco edge gold
......
File added
......@@ -52,9 +52,9 @@
#define ERR_SIZE 256
#define ERRMSG_SIZE (256+128)
#define MODEL_TYPE_SIZE 32
#define MODEL_SUBTYPE_SIZE 32
#define INTERFACE_TYPE_SIZE 32
#define MODEL_TYPE_SIZE 64
#define MODEL_SUBTYPE_SIZE 64
#define INTERFACE_TYPE_SIZE 64
#define CAMERA_NAME_SIZE 128
#define MSG_SIZE 512
#define BUFF_XLAT_SIZE 128
......@@ -125,5 +125,7 @@ typedef int tPvErr;
#define PCO_FN4(er,mg, fn, x1, x2, x3, x4) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( (x1),(x2),(x3),(x4) ), #fn ) ; }
#define PCO_FN5(er,mg, fn, x1, x2, x3, x4, x5) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( (x1),(x2),(x3),(x4),(x5) ), #fn ) ; }
char * _sprintComment(char *comment, char *comment1 ="" , char *comment2 ="" );
int _get_imageNr_from_imageTimestamp(void *buf,int shift);
int _get_time_from_imageTimestamp(void *buf,int shift,SYSTEMTIME *st);
#endif
......@@ -84,6 +84,7 @@ namespace lima
int _xferImag();
int _xferImag_getImage();
int _xferImag_getImage_edge();
int _xferImagMult();
void * BufferCtrlObj::_getLimaBuffer(int lima_buffer_nb, Sync::Status &status);
void _pcoAllocBuffersFree();
......
......@@ -61,12 +61,21 @@
//---------------------------------------
//--------------------------------------- test cmd mode
#define TESTCMDMODE_DIMAX_XFERMULTI 0x00000001 // _pco_acq_thread_dimax dimax: xferMulti or xfer
#define TESTCMDMODE_2 0x00000002
#define TESTCMDMODE_4 0x00000004
#define TESTCMDMODE_8 0x00000008
#define TESTCMDMODE_10 0x00000010
#define TESTCMDMODE_PCO2K_XFER_WAITOBJ 0x00000020 // _pco_acq_thread_dimax dimax: xferMulti or xfer
#define TESTCMDMODE_DIMAX_XFERMULTI (0x00000001 << 0) // _pco_acq_thread_dimax dimax: xferMulti or xfer
#define TESTCMDMODE_EDGE_XFER (0x00000001 << 1) // change EDGE xfer
#define TESTCMDMODE_2 (0x00000001 << 2)
#define TESTCMDMODE_3 (0x00000001 << 3)
#define TESTCMDMODE_4 (0x00000001 << 4)
#define TESTCMDMODE_PCO2K_XFER_WAITOBJ (0x00000001 << 5) // _pco_acq_thread_dimax dimax: xferMulti or xfer
#define TESTCMDMODE_6 (0x00000001 << 6)
#define TESTCMDMODE_7 (0x00000001 << 7)
#define TESTCMDMODE_8 (0x00000001 << 8)
//---------------------------------------
//--------------------------------------- camera state
#define CAMSTATE_RECORD_STATE (0x00000001 << 0) // record state
//---------------------------------------
......@@ -200,7 +209,7 @@ struct stcPcoData {
double cocRunTime; /* cam operation code - delay & exposure time & readout in s*/
double frameRate;
WORD activeRamSegment; /* active ram segment */
WORD wActiveRamSegment; /* active ram segment */
//WORD m_acq_mode;
bool bExtTrigEnabled;
......@@ -239,6 +248,7 @@ struct stcPcoData {
int nrImgAcquired;
long msTotal, msRecord, msRecordLoop, msXfer, msTout;
long msStartAcqStart, msStartAcqEnd;
int checkImgNrPco, checkImgNrLima;
#define LEN_TRACEACQ_TRHEAD 11
//long msThreadBeforeXfer, msThreadAfterXfer, msThreadEnd;
......@@ -311,12 +321,13 @@ enum enumStop {
};
enum enumPcoFamily {
Dimax = 1<<0,
Edge = 1<<1,
EdgeGL = 1<<2,
EdgeRolling = 1<<3,
Pco2k = 1<<4,
Pco4k = 1<<5,
Dimax = 1<<0,
Edge = 1<<1,
EdgeGL = 1<<2,
EdgeRolling = 1<<3,
Pco2k = 1<<4,
Pco4k = 1<<5,
EdgeUSB = 1<<6,
};
......@@ -393,7 +404,6 @@ namespace lima
double pcoGetCocRunTime() { return m_pcoData->cocRunTime; }
double pcoGetFrameRate() { return m_pcoData->frameRate; }
WORD pcoGetActiveRamSegment() {return m_pcoData->activeRamSegment;}
BufferCtrlObj* _getBufferCtrlObj() { return m_buffer;}
SyncCtrlObj* _getSyncCtrlObj() { return m_sync;}
......@@ -402,7 +412,6 @@ namespace lima
char* _PcoCheckError(int line, char *file, int err, int&error, char *fn = "***") ;
int pcoGetError() {return m_pcoData->pcoError;}
char *_pcoSet_RecordingState(int state, int &error);
int dumpRecordedImages(int &nrImages, int &error);
bool _isCameraType(int tp);
......@@ -443,33 +452,24 @@ namespace lima
bool m_isArmed;
long long m_state;
//----------------------------------
int PcoCheckError(int line, char *file, int err, char *fn = "***");
void _allocBuffer();
char *_talk(char *cmd, char *output, int lg);
char *_pco_SetTriggerMode_SetAcquireMode(int &error);
char *_pco_SetStorageMode_SetRecorderSubmode(enumPcoStorageMode, int &error);
int _pco_GetStorageMode_GetRecorderSubmode();
char *_pco_SetDelayExposureTime(int &error);
char *_pco_SetCamLinkSetImageParameters(int &error);
char *_pco_GetCameraType(int &error);
char *_pco_GetTemperatureInfo(int &error);
void _pco_GetPixelRate(DWORD &pixRate, DWORD &pixRateNext, int &error);
void _presetPixelRate(DWORD &pixRate, int &error);
//char *_pco_SetCameraSetup(DWORD dwSetup, int &error);
bool _get_shutter_rolling_edge(int &error);
void _set_shutter_rolling_edge(bool roling, int &error);
void _init();
void _init_edge();
void _init_dimax();
char *_pco_SetTransferParameter_SetActiveLookupTable(int &error);
char *_pco_SetPixelRate(int &error);
char *_pco_GetCOCRuntime(int &error);
char *_pco_SetMetaDataMode(WORD wMetaDataMode, int &error);
bool _isValid_pixelRate(DWORD dwPixelRate);
......@@ -487,18 +487,10 @@ namespace lima
void _set_ImageType(ImageType curr_image_type);
void _get_DetectorType(std::string& det_type);
void _get_MaxImageSize(Size& max_image_size);
void _pco_GetHWIOSignal(int &error);
void _pco_SetHWIOSignal(int sigNum, int &error);
void _pco_initHWIOSignal(int mode, int &error);
unsigned long long _getDebug(unsigned long long mask);
ringLog *m_msgLog;
ringLog *m_tmpLog;
int _pco_GetADCOperation(int &adc_working, int &adc_max);
int _pco_SetADCOperation(int adc_new, int &adc_working);
int _pco_GetImageTiming(double &frameTime, double &expTime, double &sysDelay, double &sysJitter, double &trigDelay );
int _pco_GetBitAlignment(int &alignment);
int _pco_SetBitAlignment(int alignment);
char *_checkLogFiles(bool firstCall = false);
char *_camInfo(char *ptr, char *ptrMax, long long int flag);
......@@ -513,8 +505,46 @@ namespace lima
DWORD _getCameraSerialNumber() ;
void _checkImgNrInit(bool &checkImgNr, int &imgNrDiff, int &alignmentShift);
char *_xlatPcoCode2Str(int code, enumTblXlatCode2Str table, int &err);
bool _getCameraState(long long flag);
void _setCameraState(long long flag, bool val);
bool _isRunAfterAssign();
public:
//----------- pco sdk functions
WORD _pco_GetActiveRamSegment(); // {return m_pcoData->wActiveRamSegment;}
char *_pco_SetRecordingState(int state, int &error);
char *_pco_SetTriggerMode_SetAcquireMode(int &error);
char *_pco_SetStorageMode_SetRecorderSubmode(enumPcoStorageMode, int &error);
int _pco_GetStorageMode_GetRecorderSubmode();
char *_pco_SetDelayExposureTime(int &error);
char *_pco_SetCamLinkSetImageParameters(int &error);
char *_pco_GetCameraType(int &error);
char *_pco_GetTemperatureInfo(int &error);
void _pco_GetPixelRate(DWORD &pixRate, DWORD &pixRateNext, int &error);
//char *_pco_SetCameraSetup(DWORD dwSetup, int &error);
char *_pco_SetTransferParameter_SetActiveLookupTable(int &error);
char *_pco_SetPixelRate(int &error);
char *_pco_GetCOCRuntime(int &error);
char *_pco_SetMetaDataMode(WORD wMetaDataMode, int &error);
void _pco_GetHWIOSignal(int &error);
void _pco_SetHWIOSignal(int sigNum, int &error);
void _pco_initHWIOSignal(int mode, int &error);
int _pco_GetADCOperation(int &adc_working, int &adc_max);
int _pco_SetADCOperation(int adc_new, int &adc_working);
int _pco_GetImageTiming(double &frameTime, double &expTime, double &sysDelay, double &sysJitter, double &trigDelay );
int _pco_GetBitAlignment(int &alignment);
int _pco_SetBitAlignment(int alignment);
};
}
}
......
......@@ -45,8 +45,15 @@
#define CAMINFO_CAMERALINK (0x1LL << 16)
#define CAMINFO_CAMERATYPE (0x1LL << 17)
#define FILE_PCO_DLL "liblimapco.dll"
#define FILENAME_INSTALL_VERSION "INSTALL_VERSION"
#define FILEEXT_INSTALL_VERSION "txt"
char * _getComputerName(char *infoBuff, DWORD bufCharCount);
char * _getUserName(char *infoBuff, DWORD bufCharCount);
char * _getVSconfiguration(char *infoBuff, DWORD bufCharCount);
char * _getPcoSdkVersion(char *infoBuff, int strLen);
char * _getDllPath(const char* pzFileName, char *path, size_t strLen);
#endif
......@@ -18,7 +18,7 @@ namespace Pco
void getMaxWidthHeight(unsigned long& width,unsigned long& height /Out/);
void getMaxWidthHeight(unsigned int& width,unsigned int& height /Out/);
void getBytesPerPixel(unsigned int& pixbytes /Out/);
int getNbAcquiredFrames();
char *talk(char *cmd);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -245,7 +245,7 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
char *tok[NRTOK];
int tokNr;
char *ptr, *ptrMax;
int segmentPco = m_pcoData->activeRamSegment;
int segmentPco = m_pcoData->wActiveRamSegment;
int segmentArr = segmentPco -1;
ptr = output; *ptr = 0;
......@@ -277,6 +277,13 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
return output;
}
//----------------------------------------------------------------------------------------------------------
key = keys[ikey] = "getVersionFile";
keys_desc[ikey++] = "(R) reads INSTALL_VERSION.txt";
if(_stricmp(cmd, key) == 0){
_getDllPath(FILE_PCO_DLL, ptr, ptrMax -ptr);
return output;
}
//----------------------------------------------------------------------------------------------------------
key = keys[ikey] = "expDelayTime";
keys_desc[ikey++] = "(R) exposure and delay time";
......@@ -347,7 +354,7 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
return output;
}
ptr += sprintf_s(ptr, ptrMax - ptr, "%ld", pcoGetFramesMax(m_pcoData->activeRamSegment));
ptr += sprintf_s(ptr, ptrMax - ptr, "%ld", pcoGetFramesMax(m_pcoData->wActiveRamSegment));
return output;
}
......@@ -456,6 +463,8 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
PCO_BUFFER_NREVENTS,
m_pcoData->traceAcq.fnIdXfer);
ptr += sprintf_s(ptr, ptrMax - ptr, "* ... testCmdMode [0x%llx]\n", m_pcoData->testCmdMode);
ptr += sprintf_s(ptr, ptrMax - ptr,
"* msExposure[%g] msDelay[%g]\n",
m_pcoData->traceAcq.sExposure * 1000.,
......@@ -537,17 +546,22 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
for(int _i = 0; _i < LEN_TRACEACQ_TRHEAD; _i++){
ptr += sprintf_s(ptr, ptrMax - ptr,
"* ... usTicks[%d][%5.3f] (ms) (%s)\n",
_i, m_pcoData->traceAcq.usTicks[_i].value/1000.,
m_pcoData->traceAcq.usTicks[_i].desc);
char *desc = m_pcoData->traceAcq.usTicks[_i].desc;
if(desc != NULL) {
ptr += sprintf_s(ptr, ptrMax - ptr,
"* ... usTicks[%d][%5.3f] (ms) (%s)\n",
_i, m_pcoData->traceAcq.usTicks[_i].value/1000.,
desc);
}
}
_timet = m_pcoData->traceAcq.endRecordTimestamp;
ptr += sprintf_s(ptr, ptrMax - ptr,
"* msImgCoc[%.3g] fps[%.3g] msTout[%ld] msTotal[%ld]\n",
m_pcoData->traceAcq.msImgCoc, 1000. / m_pcoData->traceAcq.msImgCoc,
m_pcoData->traceAcq.msImgCoc,
1000. / m_pcoData->traceAcq.msImgCoc,
m_pcoData->traceAcq.msTout,
m_pcoData->traceAcq.msTotal);
......@@ -566,6 +580,12 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
"* ... xferTimeTot[%g s] xferSpeed[%g MB/s][%g fps]\n",
totTime, xferSpeed, framesPerSec);
ptr += sprintf_s(ptr, ptrMax - ptr,
"* ... checkImgNr pco[%d] lima[%d] diff[%d]\n",
m_pcoData->traceAcq.checkImgNrPco,
m_pcoData->traceAcq.checkImgNrLima,
m_pcoData->traceAcq.checkImgNrPco - m_pcoData->traceAcq.checkImgNrLima);
ptr += sprintf_s(ptr, ptrMax - ptr,
"%s\n", m_pcoData->traceAcq.msg);
......@@ -730,6 +750,24 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
}
//----------------------------------------------------------------------------------------------------------
key = keys[ikey] = "getCheckImgNrResults";
keys_desc[ikey++] = "(R) get the last checkImgNr results";
if(_stricmp(cmd, key) == 0){
//int alignment;
bool syntax = false;
//char *res;
ptr += sprintf_s(ptr, ptrMax - ptr,
"pco: %d lima: %d diff: %d",
m_pcoData->traceAcq.checkImgNrPco,
m_pcoData->traceAcq.checkImgNrLima,
m_pcoData->traceAcq.checkImgNrPco - m_pcoData->traceAcq.checkImgNrLima);
return output;
}
//----------------------------------------------------------------------------------------------------------
key = keys[ikey] = "testFrameFirst0";
......@@ -973,6 +1011,14 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
return output;
}
//----------------------------------------------------------------------------------------------------------
key = keys[ikey] = "camSN";
keys_desc[ikey++] = "(R) cam serial number";
if(_stricmp(cmd, key) == 0){
ptr += sprintf_s(ptr, ptrMax - ptr, "%d", _getCameraSerialNumber());
return output;
}
//----------------------------------------------------------------------------------------------------------
key = keys[ikey] = "lastError";
keys_desc[ikey++] = "(R) last PCO SDK error";
......@@ -1156,9 +1202,7 @@ char *Camera::_talk(char *_cmd, char *output, int lg){
if(_stricmp(cmd, key) == 0){
char *comment = str_trim(cmdBuffAux + strlen(cmd));
ptr += sprintf_s(ptr, ptrMax - ptr,
"\n=================================================\n--- %s [%s]\n",
getTimestamp(Iso), comment);
ptr += sprintf_s(ptr, ptrMax - ptr, _sprintComment(comment) );
DEB_ALWAYS() << output ;
return output;
......@@ -1610,6 +1654,57 @@ int _getFileVerStruct(const TCHAR* pzFileName, int* ima, int* imi, int* imb, TCH
return 0;
}
#define LEN_DRIVE 7
#define LEN_DIR MAX_PATH
//====================================================================
//====================================================================
char * _getDllPath(const char* pzFileName, char *path, size_t strLen)
{
errno_t err;
char drive[LEN_DRIVE+1];
char dir[LEN_DIR+1];
char _pathFn[MAX_PATH+1];
char _pathFnInstall[MAX_PATH+1];
char *ptr;
size_t nr;
FILE *stream;
*path = 0;
GetModuleFileName(GetModuleHandle(pzFileName), _pathFn, MAX_PATH);
err = _splitpath_s(_pathFn, drive, LEN_DRIVE, dir, LEN_DIR, NULL, 0, NULL, 0);
size_t l = strlen(dir);
ptr = dir + l -2;
while(*ptr != '\\') ptr--;
*ptr = 0;
ptr = path;
err = _makepath_s(_pathFnInstall, MAX_PATH, drive, dir, FILENAME_INSTALL_VERSION, FILEEXT_INSTALL_VERSION);
printf("----- path[%s] path1[%s] drive[%s] dir[%s]\n", _pathFn, _pathFnInstall, drive, dir);
nr = sprintf_s(ptr, strLen-1,"%s\n", _pathFnInstall);
ptr += nr;
strLen -= nr;
err = fopen_s( &stream, _pathFnInstall, "r" );
#if 0
if(err == 0) {
if( fgets( path, strLen, stream ) == NULL){
*ptr = 0;
}
}