Commit 8d8a5c56 authored by Roberto Arturo Homs-Regojo's avatar Roberto Arturo Homs-Regojo

Merge branch 'sytle' into 'master'

Sytle

See merge request !7
parents 02b21195 21806c73
Pipeline #12069 failed with stages
in 1 minute and 58 seconds
......@@ -21,65 +21,48 @@ You can also find some useful information about the camera
models/prerequisite/installation/configuration/compilation in the
PCO camera plugin \<camera-pco\> section.
Properties
==========
Property name Mandatory Default value Description
---------------- ----------- --------------- --------------------------------------------------------------------
debug\_control No 0 Enable/Disble the debug (0/1)
debug\_module No 0 To set the debug module list (in hex format 0x....)
- None = 0x001
- Common = 0x002
- Hardware = 0x004
- HardwareSerial = 0x008
- Control = 0x010
- Espia = 0x020
- EspiaSerial = 0x040
- Focla = 0x080
- Camera = 0x100
- CameraCom = 0x200
- Test = 0x400
- Application = 0x800
debug\_format No 0 To set the debug format (in hex format 0x....)
- DateTime = 0x001
- Thread = 0x002
- Module = 0x004
- Obj = 0x008
- Funct = 0x010
- FileLine = 0x020
- Type = 0x040
- Indent = 0x080
- Color = 0x100
debug\_type No 0 To set the debug type (in hex format 0x....)
- Fatal = 0x001
- Error = 0x002
- Warning = 0x004
- Trace = 0x008
- Funct = 0x010
- Param = 0x020
- Return = 0x040
- Always = 0x080
params No empty List of parameters/options (one per line)
- sn = \<camera serial number\>
(
if it is 0 or doesn't exist, the first camera found will be opened
if the serial number is not found, OpenCam will fail
)
- trigSingleMulti = 1
(
enable TriggerSingleMulti as TriggerMulti for compability
with SPEC START
)
- xMinSize = 1
(
enable correction for the X minimum size for the CLHS firmware bug
)
- bitAligment = \<MSB | LSB\>
(
bit aligment of the image data, i.e. for 12b:
[MSB - xxxx xxxx xxxx 0000]
[LSB - 0000 xxxx xxxx xxxx]
)
**Properties**
Property name | Mandatory | Default value | Description
------------- | --------- | ------------- | -----------
debug\_control | No | 0 | Enable/Disble the debug (0/1)
debug\_module | No | 0 | To set the debug module list (in hex format 0x....)
. | . | . | - None = 0x001
. | . | . | - Common = 0x002
. | . | . | - Hardware = 0x004
. | . | . | - HardwareSerial = 0x008
. | . | . | - Control = 0x010
. | . | . | - Espia = 0x020
. | . | . | - EspiaSerial = 0x040
. | . | . | - Focla = 0x080
. | . | . | - Camera = 0x100
. | . | . | - CameraCom = 0x200
. | . | . | - Test = 0x400
. | . | . | - Application = 0x800
debug\_format | No | 0 | To set the debug format (in hex format 0x....)
. | . | . | - DateTime = 0x001
. | . | . | - Thread = 0x002
. | . | . | - Module = 0x004
. | . | . | - Obj = 0x008
. | . | . | - Funct = 0x010
. | . | . | - FileLine = 0x020
. | . | . | - Type = 0x040
. | . | . | - Indent = 0x080
. | . | . | - Color = 0x100
debug\_type | No | 0 | To set the debug type (in hex format 0x....)
. | . | . | - Fatal = 0x001
. | . | . | - Error = 0x002
. | . | . | - Warning = 0x004
. | . | . | - Trace = 0x008
. | . | . | - Funct = 0x010
. | . | . | - Param = 0x020
. | . | . | - Return = 0x040
. | . | . | - Always = 0x080
params | No | empty | List of parameters/options (one per line)
. | . | . | - sn = \<camera serial number\> (if it is 0 or doesn't exist, the first camera found will be opened) (if the serial number is not found, OpenCam will fail)
. | . | . | - trigSingleMulti = 1 (enable TriggerSingleMulti as TriggerMulti for compability with SPEC START)
. | . | . | - xMinSize = 1 (enable correction for the X minimum size for the CLHS firmware bug)
. | . | . | - bitAligment = \<MSB or LSB\> (bit aligment of the image data, i.e. for 12b: (MSB - xxxx xxxx xxxx 0000) (LSB - 0000 xxxx xxxx xxxx))
......
2019/06/27 19:32:22 ==========================================
#define PCO_SDK_WIN_VERSION "$Id: PCOSDK_WIN [1.23] $"
#define PCO_SDK_LIN_VERSION "$Id: PCOSDK_LIN [pcoDev.1.1.14] $"
#define PCO_GIT_VERSION "$Id: PCO rev[2019-04-25 18:18:51 +0200] head[3decc7b][3decc7b375a7c9ba5bdb385dab568ec5ed63c2cb] ref[ (HEAD -> sytle, master)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima/camera/pco] $"
#define LIMA_GIT_VERSION "$Id: LIMA rev[2019-06-26 18:23:14 +0200] head[4dc67845][4dc67845beacff954622af761532b8fc618add8e] ref[ (HEAD -> tmp-nogsl)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima] $"
#define PROCLIB_GIT_VERSION "$Id: PROCLIB rev[2019-01-18 10:01:50 +0100] head[e327bd4][e327bd4df46572e606a614cfcdf165b04da5f69b] ref[ (HEAD, tag: v1.6.0)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima/third-party/Processlib] $"
#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 [2019/06/27 19:32:21] [] $"
#define HDF5_GIT_VERSION "$Id: HDF5 rev[2019-04-25 18:18:51 +0200] head[3decc7b][3decc7b375a7c9ba5bdb385dab568ec5ed63c2cb] ref[ (HEAD -> sytle, master)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima/camera/pco] $"
#define BITSHUFFLE_GIT_VERSION "$Id: BITSHUFFLE rev[2017-11-09 08:44:35 -0800] head[9ffba9d][9ffba9de83036a91d345fa2f62fcaedf55f54c5f] ref[ (HEAD, tag: 0.3.4)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima/third-party/bitshuffle] $"
#define TANGO_GIT_VERSION "$Id: TANGO rev[2019-02-07 12:30:06 +0100] head[9a88145][9a88145bf0ef63ea079dc0db9904d9ef6dd25918] ref[ (HEAD, tag: v1.8.0)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima/applications/tango/python] $"
#define SPEC_GIT_VERSION "$Id: SPEC rev[2018-10-09 10:13:21 +0200] head[91d21e0][91d21e0b8cc84f16de506b8a2b57d4c31f37b0f2] ref[ (HEAD, origin/master, origin/HEAD, master)] at [2019/06/27 19:32:21] [/c/Users/homsrego/git/lima/applications/spec] $"
2018/11/07 17:36:17 ==========================================
scp: copied local directory to segfs and /tmp_14_days:
from: [../../install/] and [./bat/]
......
......@@ -148,6 +148,7 @@ DECLARE_HANDLE(HWND);
//-------------------- win
#ifndef __linux__
# define UNUSED
# define PATH_MAX MAX_PATH
#endif
//-------------------- linux / win
......
......@@ -1187,8 +1187,8 @@ namespace lima
void getDebugInt(std::string &o_sn);
void setDebugInt(std::string &i_sn);
void setTest(int val);
void getTest(int &val);
void setTest(std::string &i_sn);
void getTest(std::string &o_sn);
void setTimestampMode(int mode);
void getTimestampMode(int &mode);
......@@ -1223,6 +1223,11 @@ void _pco_time2dwbase(double exp_time, DWORD &dwExp, WORD &wBase);
int __sprintfSExt(char *ptr, size_t nrMax, const char *format, ...);
char *str_trim_left(char *s);
char *str_trim_right(char *s);
char *str_trim(char *s);
char *str_toupper(char *s);
//================================================================
// LINUX
//================================================================
......
......@@ -94,8 +94,8 @@ namespace Pco
void getDebugInt(std::string &o_sn /Out/);
void setDebugInt(std::string &i_sn);
void setTest(int val) ;
void getTest(int &val /Out/) ;
void setTest(std::string &i_sn) ;
void getTest(std::string &o_sn /Out/) ;
void setTimestampMode(int mode);
void getTimestampMode(int &mode /Out/);
......
......@@ -65,11 +65,6 @@ const char *_timestamp_pcodetinfoctrlobj();
const char *_timestamp_pcocamerautils();
const char *_timestamp_pcoroictrlobj();
char *str_trim_left(char *s);
char *str_trim_right(char *s);
char *str_trim(char *s);
char *str_toupper(char *s);
char *_split_date(const char *s);
int __xlat_date(char *s1, char &ptrTo, int lenTo);
char *_xlat_date(char *s1, char *s2, char *s3);
......
......@@ -755,30 +755,6 @@ void Camera::getDebugIntTypes(std::string &o_sn)
o_sn = buff;
}
//====================================================================
// SIP - attrib
//====================================================================
void Camera::setTest(int val)
{
DEB_MEMBER_FUNCT();
int val0 = val;
val *= 2;
DEB_ALWAYS() << DEB_VAR2(val0, val);
}
void Camera::getTest(int &val)
{
DEB_MEMBER_FUNCT();
int valIn;
valIn = val;
val += 10;
DEB_ALWAYS() << DEB_VAR2(valIn, val);
}
//====================================================================
// SIP - attrib
//====================================================================
......@@ -1159,3 +1135,100 @@ void Camera::getParamsInfo(std::string &o_sn)
o_sn = buff;
}
//====================================================================
// SIP - attrib
//====================================================================
#define NRTOK 10
void Camera::setTest(std::string &i_sn)
{
DEB_MEMBER_FUNCT();
const char *cmd, *cmd0;
char msg[MSG1K];
int ikey = 0;
const char *tok[NRTOK];
int tokNr;
char *ptr = msg;
char *ptrMax = msg + sizeof(msg);
cmd0 = i_sn.c_str();
strncpy_s(buff, sizeof(buff), cmd0, sizeof(buff) - 1);
cmd = str_trim(buff);
tokNr = -1;
if (*cmd)
{
char *tokContext;
for (int i = 0; i < NRTOK; i++)
{
if ((tok[i] = strtok_s((char *)cmd, " ", &tokContext)) == NULL)
break;
cmd = NULL;
tokNr = i;
}
cmd = tok[0];
}
tokNr++;
// DEB_ALWAYS() << DEB_VAR2(cmd0, tokNr);
if (tokNr == 0)
return;
//------------------------------------------------
// syntax: mode 0x123
// mode 0x1234
//------------------------------------------------
if (_stricmp(cmd, "mode") == 0)
{
ptr += __sprintfSExt(ptr, ptrMax - ptr, "testCmdMode [0x%llx]",
m_pcoData->testCmdMode);
if (tokNr > 1)
{
int nr;
unsigned long long _testCmdMode;
nr = sscanf_s(tok[1], "0x%llx", &_testCmdMode);
if (nr == 1)
{
m_pcoData->testCmdMode = _testCmdMode;
ptr += __sprintfSExt(ptr, ptrMax - ptr, " changed OK> ");
}
else
{
ptr += __sprintfSExt(ptr, ptrMax - ptr,
" ERROR - NOT changed> ");
}
ptr += __sprintfSExt(ptr, ptrMax - ptr, "testCmdMode [0x%llx]",
m_pcoData->testCmdMode);
}
DEB_ALWAYS() << msg;
return;
}
//------------------------------------------------
//------------------------------------------------
//------------------------------------------------
// NOT FOUND
//------------------------------------------------
DEB_ALWAYS() << " command NOT FOUND " << cmd0;
}
void Camera::getTest(std::string &o_sn)
{
DEB_MEMBER_FUNCT();
char *ptr = buff;
char *ptrMax = buff + sizeof(buff);
ptr += __sprintfSExt(ptr, ptrMax - ptr, "valid commands:\n");
o_sn = buff;
}
//====================================================================
//====================================================================
......@@ -168,7 +168,7 @@ time_t getTimestamp()
//(..\..\..\..\src\PcoCamera.cpp) $
#define LEN_BUFF_DATE 128
#define LEN_BUFF_PATH 260 // Same as MAX_PATH under Windows
#define LEN_BUFF_PATH PATH_MAX // 260 in win
#define TOKNR_DT 5
int __xlat_date(char *s1, char &ptrTo, int lenTo)
......@@ -2737,7 +2737,7 @@ char *_getDllPath(const char *pzFileName, char *path, size_t strLen)
# pragma comment(lib, "version.lib")
# define LEN_DRIVE 7
# define LEN_DIR MAX_PATH
# define LEN_DIR PATH_MAX
//====================================================================
//====================================================================
......@@ -2747,8 +2747,8 @@ char *_getDllPath(const char *pzFileName, char *path, size_t strLen)
char drive[LEN_DRIVE + 1];
char dir[LEN_DIR + 1];
char _pathFn[MAX_PATH + 1];
char _pathFnInstall[MAX_PATH + 1];
char _pathFn[PATH_MAX + 1];
char _pathFnInstall[PATH_MAX + 1];
char *ptr;
size_t nr;
FILE *stream;
......@@ -2761,7 +2761,7 @@ char *_getDllPath(const char *pzFileName, char *path, size_t strLen)
return path;
# endif
GetModuleFileName(GetModuleHandle(pzFileName), _pathFn, MAX_PATH);
GetModuleFileName(GetModuleHandle(pzFileName), _pathFn, PATH_MAX);
err =
_splitpath_s(_pathFn, drive, LEN_DRIVE, dir, LEN_DIR, NULL, 0, NULL, 0);
......@@ -2773,7 +2773,7 @@ char *_getDllPath(const char *pzFileName, char *path, size_t strLen)
*ptr = 0;
ptr = path;
err = _makepath_s(_pathFnInstall, MAX_PATH, drive, dir,
err = _makepath_s(_pathFnInstall, PATH_MAX, drive, dir,
FILENAME_INSTALL_VERSION, FILEEXT_INSTALL_VERSION);
printf("----- path[%s] path1[%s] drive[%s] dir[%s]\n", _pathFn,
_pathFnInstall, drive, dir);
......
......@@ -609,12 +609,12 @@ class PcoClass(PyTango.DeviceClass):
}],
'test':
[[PyTango.DevLong,
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ_WRITE],
{
'unit': 'N/A',
'format': '%d',
'format': '%s',
'description': 'test'
}],
......
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