[wip] rolling sw

[wip] tests clang-format-8
[wip] Cpco logs
[wip] Update README.md
parent 679e5bc1
Pipeline #10512 failed with stages
in 1 minute and 53 seconds
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
...
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
# This would be nice to have but seems to also (mis)align function parameters
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
# This option is "deprecated and is retained for backwards compatibility."
# AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IndentCaseLabels: false
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60000
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
...
---
Checks: '*, -google-runtime-references, -hicpp-no-array-decay, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, -cppcoreguidelines-pro-bounds-pointer-arithmetic, -fuchsia*,-readability-else-after-return,-readability-avoid-const-params-in-decls,-hicpp-signed-bitwise,-cppcoreguidelines-pro-bounds-constant-array-index,-llvm-header-guard,-readability-static-accessed-through-instance,-google-readability-todo'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: none
...
......@@ -12,6 +12,153 @@ This is the LImA plugin for Pco cameras.
### Camera python
PCO Tango device
================
This is the reference documentation of the PCO Tango device.
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]
)
Attributes
==========
Attribute name RW Type Description
---------------------- ---- ----------- -----------------------------------------------------------------------------------
acqTimeoutRetry rw DevLong Maximum Timeout retries during acq (0 - infinite)
adc rw DevLong Number of working ADC's
adcMax ro DevLong Maximum number of ADC's
binInfo ro DevLong PCO hw binning info
bitAlignment rw DevString Bit alignment
- MSB (0)
- LSB (1)
bytesPerPixel ro DevLong Bytes per Pixel
camerasFound ro DevString List of cameras found during the Open search
camInfo ro DevString General camera parameters information
camName ro DevString Camera Name
camNameBase ro DevString Camera Name (Pco)
camNameEx ro DevString Camera Name, Interface, Sensor
camType ro DevString Camera Type
cdiMode rw DevLong Correlated Double Imaging Mode
- enabled/disabled = 1/0 (rw)
- not allowed = -1 (ro)
clXferPar ro DevString General CameraLink parameters
cocRunTime ro DevDouble cocRunTime (s) - only valid after the camera is armed
coolingTemperature ro DevDouble Cooling Temperature
debugInt rw DevString PCO plugin internal debug level (hex format: 0x....)
debugIntTypes r0 DevString PCO plugin internal debug types
doubleImageMode rw DevLong Double Image Mode
- enabled/disabled = 1/0 (rw)
- not allowed = -1 (ro)
firmwareInfo ro DevString Firmware info
frameRate ro DevDouble Framerate, calculated as: 1/cocRunTime (1/s)
info ro DevString General camera parameters information
lastError ro DevString The last PCO error message
lastImgAcquired ro DevLong Last image acquired (during recording)
lastImgRecorded ro DevLong Last image recorded (during recording)
logMsg ro DevString Last Log msgs
logPcoEnabled ro DevLong PCO logs are enabled
maxNbImages ro DevLong The maximum number of images which can be acquired by the camera (recording mode)
pixelRate ro DevLong Actual Pixel Rate (Hz)
pixelRateInfo ro DevString Pixel Rate information
pixelRateValidValues ro DevString Allowed Pixel Rates
recorderForcedFifo rw DevLong Forced Fifo Mode (**only for recording cams**)
roiInfo ro DevString PCO ROI info
roiLastFixed ro DevString Last fixed ROI info
rollingShutter rw DevLong Rolling Shutter Mode (**only for some types of EDGE**)
- 1 = ROLLING
- 2 = GLOBAL
- 4 = GLOBAL RESET
rollingShutterInfo ro DevString Rolling Shutter info
temperatureInfo ro DevString Temperature info
timestampMode rw DevLong Timestamp mode
- 0 = none
- 1 = BCD coded stamp in the first 14 pixel
- 2 = BCD coded stamp in the first 14 pixel + ASCII text
- 3 = ASCII text (**only for some cameras**)
traceAcq ro DevString Debug information for some types of acq
version ro DevString Version information of the plugin
versionAtt ro DevString Version of att file
versionSdk ro DevString PCO SDK Release
Commands
========
Command name Arg. in Arg. out Description
------------------------ ---------------- -------------------- ------------------------------------------------
Init DevVoid DevVoid Do NOT use
State DevVoid DevLong Return the device state
Status DevVoid DevString Return the device state as a string
getAttrStringValueList DevString: DevVarStringArray: Return the authorized string value list for
Attribute name String value list a given attribute name
talk DevString DevString **WARNING**: use this command for test only,
This is a backdoor cmd and it can distrub Lima
conda install -c esrf-bcu lima-camera-pco
### Camera tango device server
......
This diff is collapsed.
......@@ -31,27 +31,29 @@ namespace lima
{
namespace Pco
{
/*******************************************************************
* \class BinCtrlObj
* \brief Control object providing Pco Bin interface
*******************************************************************/
class DLL_EXPORT BinCtrlObj : public HwBinCtrlObj
{
DEB_CLASS_NAMESPC(DebModCamera, "BinCtrlObj", "Pco");
/*******************************************************************
* \class BinCtrlObj
* \brief Control object providing Pco Bin interface
*******************************************************************/
class DLL_EXPORT BinCtrlObj : public HwBinCtrlObj
{
DEB_CLASS_NAMESPC(DebModCamera, "BinCtrlObj", "Pco");
public:
BinCtrlObj(Camera& cam);
virtual ~BinCtrlObj() {}
virtual void setBin(const Bin& bin);
virtual void getBin(Bin& bin);
//allow all binning
virtual void checkBin(Bin& bin);
private:
Camera& m_cam;
public:
BinCtrlObj(Camera &cam);
virtual ~BinCtrlObj()
{
}
virtual void setBin(const Bin &bin);
virtual void getBin(Bin &bin);
// allow all binning
virtual void checkBin(Bin &bin);
private:
Camera &m_cam;
};
};
} // namespace Pco
} // namespace lima
......
......@@ -31,102 +31,111 @@
#define PCO_MAX_NR_ALLOCATED_BUFFERS 8
struct stcAllocBuff {
bool pcoAllocBufferDone;
bool createEventsDone;
SHORT pcoAllocBufferNr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // bufnrM buffer number allocated by PCO_AllocateBuffer
WORD *pcoAllocBufferPtr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated by PCO_AllocateBuffer
DWORD dwPcoAllocBufferSize[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated by PCO_AllocateBuffer
WORD *limaAllocBufferPtr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated by Lima
WORD *limaAllocBufferPtr1[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated by Lima
DWORD dwLimaAllocBufferSize[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated by Lima
int limaAllocBufferNr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer nr allocated by Lima
int limaAllocBufferNr1[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer nr allocated by Lima
DWORD dwStatus[8]; // PCO_AddBufferEx status/error return
//HANDLE bufferAllocEvent[PCO_MAX_NR_ALLOCATED_BUFFERS];
void* bufferAllocEvent[PCO_MAX_NR_ALLOCATED_BUFFERS];
DWORD bufferAssignedFrameFirst[PCO_MAX_NR_ALLOCATED_BUFFERS];
DWORD bufferAssignedFrameLast[PCO_MAX_NR_ALLOCATED_BUFFERS];
int bufferReady[PCO_MAX_NR_ALLOCATED_BUFFERS];
struct stcAllocBuff
{
bool pcoAllocBufferDone;
bool createEventsDone;
SHORT pcoAllocBufferNr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // bufnrM buffer
// number allocated by
// PCO_AllocateBuffer
WORD *pcoAllocBufferPtr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated
// by
// PCO_AllocateBuffer
DWORD dwPcoAllocBufferSize
[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated by
// PCO_AllocateBuffer
WORD *limaAllocBufferPtr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated
// by Lima
WORD *limaAllocBufferPtr1[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer allocated
// by Lima
DWORD dwLimaAllocBufferSize[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer
// allocated by
// Lima
int limaAllocBufferNr[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer nr allocated
// by Lima
int limaAllocBufferNr1[PCO_MAX_NR_ALLOCATED_BUFFERS]; // buffer nr allocated
// by Lima
DWORD dwStatus[8]; // PCO_AddBufferEx status/error return
// HANDLE bufferAllocEvent[PCO_MAX_NR_ALLOCATED_BUFFERS];
void *bufferAllocEvent[PCO_MAX_NR_ALLOCATED_BUFFERS];
DWORD bufferAssignedFrameFirst[PCO_MAX_NR_ALLOCATED_BUFFERS];
DWORD bufferAssignedFrameLast[PCO_MAX_NR_ALLOCATED_BUFFERS];
int bufferReady[PCO_MAX_NR_ALLOCATED_BUFFERS];
};
namespace lima
{
namespace Pco
{
class Camera;
class SyncCtrlObj;
class Interface;
//int Camera::pcoGetError();
class DLL_EXPORT BufferCtrlObj : public SoftBufferCtrlObj
namespace Pco
{
friend class Interface;
friend class Camera;
DEB_CLASS_NAMESPC(DebModCamera,"BufferCtrlObj","Pco");
private:
Camera* m_cam;
struct stcPcoData *m_pcoData;
SoftBufferCtrlObj::Sync *m_bufferSync;
Cond cond;
struct stcAllocBuff m_allocBuff;
unsigned long m_frames_per_buffer;
//-------------------------------------------------------------
int m_frame[2];
SyncCtrlObj* m_sync;
int m_requestStop, m_requestStopRetry;
int m_ImageBufferSize;
public:
BufferCtrlObj(Camera *cam);
void prepareAcq();
void startAcq();
//void getStatus(int &err,bool& exposing) {err = m_status,exposing = m_exposing;}
void getStatus(int &err) {err = m_cam->pcoGetError();}
//void setStatus(int status) {m_status = status;}
void _setNewFrameReady(int iLimaFrame);
int _xferImagMultDoubleImage();
int _xferImagDoubleImage();
int _xferImag();
int _xferImag_buff2lima(DWORD &dwFrameIdx, int &bufIdx);
int _xferImag_getImage();
int _xferImag_getImage_edge();
int _xferImagMult();
void *_getLimaBuffer(int lima_buffer_nb, Sync::Status &status);
void _pcoAllocBuffersFree();
void _pcoAllocBuffersInfo(int &nr, DWORD &size);
void *_getFrameBufferPtr(int nb_frame, int &nb_allocated_buffers);
private:
int _assignImage2Buffer(DWORD &dwFrameFirst, DWORD &dwFrameLast,
DWORD dwRequestedFrames, int bufIdx, bool live_mode, WORD wDoubleImage=0);
void _pcoAllocBuffers(bool max = false);
//-------------------------------------------------------------
};
}
}
class Camera;
class SyncCtrlObj;
class Interface;
// int Camera::pcoGetError();
class DLL_EXPORT BufferCtrlObj : public SoftBufferCtrlObj
{
friend class Interface;
friend class Camera;
DEB_CLASS_NAMESPC(DebModCamera, "BufferCtrlObj", "Pco");
private:
Camera *m_cam;
struct stcPcoData *m_pcoData;
SoftBufferCtrlObj::Sync *m_bufferSync;
Cond cond;
struct stcAllocBuff m_allocBuff;
unsigned long m_frames_per_buffer;
//-------------------------------------------------------------
int m_frame[2];
SyncCtrlObj *m_sync;
int m_requestStop, m_requestStopRetry;
int m_ImageBufferSize;
public:
BufferCtrlObj(Camera *cam);
void prepareAcq();
void startAcq();
// void getStatus(int &err,bool& exposing) {err = m_status,exposing
// = m_exposing;}
void getStatus(int &err)
{
err = m_cam->pcoGetError();
}
// void setStatus(int status) {m_status = status;}
void _setNewFrameReady(int iLimaFrame);
int _xferImagMultDoubleImage();
int _xferImagDoubleImage();
int _xferImag();
int _xferImag_buff2lima(DWORD &dwFrameIdx, int &bufIdx);
int _xferImag_getImage();
int _xferImag_getImage_edge();
int _xferImagMult();
void *_getLimaBuffer(int lima_buffer_nb, Sync::Status &status);
void _pcoAllocBuffersFree();
void _pcoAllocBuffersInfo(int &nr, DWORD &size);
void *_getFrameBufferPtr(int nb_frame, int &nb_allocated_buffers);
private:
int _assignImage2Buffer(DWORD &dwFrameFirst, DWORD &dwFrameLast,
DWORD dwRequestedFrames, int bufIdx,
bool live_mode, WORD wDoubleImage = 0);
void _pcoAllocBuffers(bool max = false);
//-------------------------------------------------------------
};
} // namespace Pco
} // namespace lima
#endif
\ No newline at end of file
This diff is collapsed.
......@@ -26,14 +26,44 @@
#ifndef __linux
#define PCO_FN0(er,mg, fn) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( ), #fn ); }
#define PCO_FN1(er,mg, fn, x1) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( (x1) ), #fn ); }
#define PCO_FN2(er,mg, fn, x1, x2) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( (x1),(x2) ), #fn ) ; }
#define PCO_FN3(er,mg, fn, x1, x2, x3) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( (x1),(x2),(x3) ), #fn ) ; }
#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 ) ; }
#define PCO_FN6(er,mg, fn, x1, x2, x3, x4, x5, x6) {mg = #fn; er = PcoCheckError(__LINE__, __FILE__, fn ( (x1),(x2),(x3),(x4),(x5),(x6) ), #fn ) ; }
# define PCO_FN0(er, mg, fn) \
{ \
mg = #fn; \
er = PcoCheckError(__LINE__, __FILE__, fn(), #fn); \
}
# define PCO_FN1(er, mg, fn, x1) \
{ \
mg = #fn; \
er = PcoCheckError(__LINE__, __FILE__, fn((x1)), #fn); \
}
# define PCO_FN2(er, mg, fn, x1, x2) \
{ \