...
 
Commits (68)
......@@ -19,3 +19,5 @@ install
/test.sh
*_test.py
~*vcproj
*.tmp
......@@ -97,3 +97,6 @@
[submodule "camera/dexela"]
path = camera/dexela
url = git://github.com/esrf-bliss/Lima-camera-dexela.git
[submodule "third-party/gldisplay"]
path = third-party/gldisplay
url = git://github.com/esrf-bliss/gldisplay.git
......@@ -37,8 +37,9 @@ config.inc:
@false
config:
cd third-party/Processlib/sip; python configure.py
make -C third-party prelima.config
$(MAKE) -C sip config
make -C third-party postlima.config
include install.inc
......@@ -117,6 +117,7 @@ class Version:
mod_version_data = {
'core': 'common/VERSION',
'gldisplay': 'third-party/gldisplay/VERSION',
'espia': 'camera/common/espia/VERSION',
'frelon': 'camera/frelon/VERSION',
'maxipix': 'camera/maxipix/VERSION',
......@@ -142,6 +143,7 @@ mod_version_data = {
'tango/camera/pco': 'applications/tango/camera/Pco_VERSION',
'tango/camera/ueye': 'applications/tango/camera/Ueye_VERSION',
'tango/camera/simulator': 'applications/tango/camera/Simulator_VERSION',
'spec': 'applications/spec/VERSION',
}
windows_plugins = ['pco', 'perkinelmer']
......
Subproject commit bc533f2d099dabcdb54e736b1892e87dfb6e7a1b
Subproject commit 1945ffa4548faddbf1194a173f28a5fd134234b5
Subproject commit 393a29e45508ae39ac749351c374d1c39f94d162
Subproject commit 7b402d49c86939b5da621b3698747fc044a486ec
......@@ -431,6 +431,87 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_Win7_Sync|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\..\..\control\src;&quot;..\..\..\..\third-party\Processlib\tasks\include&quot;;&quot;..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;&quot;..\..\..\..\third-party\Processlib\core\include&quot;;..\..\..\..\control\software_operation\include;..\..\..\..\control\include;..\..\..\..\hardware\include;..\..\..\..\common\include;&quot;..\..\..\..\third-party\libconfig\lib&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIMACORE_EXPORTS;_WIN32_WINNT=0x0600;WITH_CONFIG;WITHOUT_GSL"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
ExpandAttributedSource="false"
AssemblerOutput="0"
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(InputDir)..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\$(IntDir)\libprocesslib.lib $(InputDir)..\..\..\..\third-party\libconfig\lib\x64\Release\libconfig++.lib"
OutputFile="$(InputDir)$(IntDir)\$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
GenerateMapFile="true"
MapExports="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
......
Subproject commit febef6829ce9858b0840da0d372ff9dcc6fcdb71
Subproject commit cff5f7f89f1c78993c0cbb0cfb7276115b248e47
Subproject commit 37c387806efd55bc7f5a1d68f4587b66c5604a15
Subproject commit 14fbf7535df2b0ce07baf46a218014018302098b
Subproject commit 2cd3ffb70674f8de8250daf4596106538e4bd42f
Subproject commit 9150b2fee2eaf14337ca364bd8e7bbdc1ed5efbb
Subproject commit 85fd38cc620752b46d4fe708a440c4ef0bb70098
Subproject commit 83cedd79fadc5e82e3b4ed62464aaecc2d5ca75a
Subproject commit 369b69461ae310c529ce93ba631ba6b0a9f8306f
Subproject commit 79890e8d2dca2a16921cdd11643ab93c9241bd22
Subproject commit d74140756ab5648c8ff63d6220c77b7e718a2659
Subproject commit 410738bad8a0a8795804974b84c8c2be7c2f003b
Subproject commit 730d40dd67c3b736583aef3bf1bfdfe290321682
Subproject commit 3771c85d52d142404a6b7008e7e85f9ede455593
Subproject commit 76d0dfffb078d7404c07d7f829ad0c8bf16b7c52
Subproject commit fba8424ae2bd3a3e6bed79babcc50275bfeed859
Subproject commit 083bbf56a305ab99aa11c695e720e4e5b5095ce3
Subproject commit e0a2dc2e6a1d9f6f2cfe347be2949810e536a27d
Debug
Release
Release*
*.vcproj.*
*.ncb
*.suo

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibSimulator", "LibSimulator.vcproj", "{3E1490E7-66C0-4E77-9746-0632466FF270}"
ProjectSection(ProjectDependencies) = postProject
{F6556656-D091-43AF-B46F-355F4ABA5DB6} = {F6556656-D091-43AF-B46F-355F4ABA5DB6}
......@@ -20,23 +20,31 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release_Win7_Sync|Win32 = Release_Win7_Sync|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3E1490E7-66C0-4E77-9746-0632466FF270}.Debug|Win32.ActiveCfg = Debug|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Debug|Win32.Build.0 = Debug|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release_Win7_Sync|Win32.ActiveCfg = Release_Win7_Sync|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release_Win7_Sync|Win32.Build.0 = Release_Win7_Sync|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release|Win32.ActiveCfg = Release|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release|Win32.Build.0 = Release|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|Win32.ActiveCfg = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|Win32.Build.0 = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release_Win7_Sync|Win32.ActiveCfg = Release_Win7_Sync|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release_Win7_Sync|Win32.Build.0 = Release_Win7_Sync|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|Win32.ActiveCfg = Release|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|Win32.Build.0 = Release|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|Win32.ActiveCfg = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|Win32.Build.0 = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.ActiveCfg = Release|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.Build.0 = Release|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release_Win7_Sync|Win32.ActiveCfg = Release_Win7_Sync|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release_Win7_Sync|Win32.Build.0 = Release_Win7_Sync|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.ActiveCfg = Release_Win7_Sync|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.Build.0 = Release_Win7_Sync|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.ActiveCfg = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.Build.0 = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release_Win7_Sync|Win32.ActiveCfg = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.ActiveCfg = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
......
......@@ -168,6 +168,82 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_Win7_Sync|Win32"
OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;..\..\..\..\..\..\third-party\Processlib\core\include&quot;;&quot;..\..\..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;..\..\..\..\..\..\hardware\include;..\..\..\..\..\..\common\include;..\..\..\..\..\..\camera\simulator\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSIMULATOR_EXPORTS;_WIN32_WINNT=0x0600"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\liblimasimulator.dll"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
......@@ -193,6 +269,10 @@
RelativePath="..\..\..\..\src\SimulatorInterface.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorShutterCtrlObj.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorSyncCtrlObj.cpp"
>
......
......@@ -25,7 +25,7 @@
#include "Debug.h"
#include "LimaCompatibility.h"
class Data;
struct Data;
namespace libconfig
{
......@@ -101,6 +101,7 @@ namespace lima
// --- settings
Type getType() const;
int getLength() const;
const char* getName() const;
bool isGroup() const;
......@@ -131,7 +132,7 @@ namespace lima
libconfig::Setting* m_setting;
};
class Setting::const_iterator
class LIMACORE_API Setting::const_iterator
{
friend bool operator!=(const Setting::const_iterator& a,
const Setting::const_iterator& b);
......
......@@ -269,9 +269,18 @@ void Setting::set(const char* alias,
CHECK_NULL(); \
try \
{ \
libconfig::Setting &alias_setting = \
m_setting->add(alias,type); \
return Setting(&alias_setting); \
if(alias) \
{ \
libconfig::Setting &alias_setting = \
m_setting->add(alias,type); \
return Setting(&alias_setting); \
} \
else \
{ \
libconfig::Setting &alias_setting = \
m_setting->add(type); \
return Setting(&alias_setting); \
} \
} \
catch(libconfig::SettingNameException& exp) \
{ \
......@@ -484,6 +493,11 @@ Setting::Type Setting::getType() const
return aReturnType;
}
int Setting::getLength() const
{
return m_setting->getLength();
}
const char* Setting::getName() const
{
CHECK_NULL();
......
......@@ -53,7 +53,7 @@ void lima::GetSystemMem(int& mem_unit, int& system_mem)
statex.dwLength = sizeof(statex);
GlobalMemoryStatusEx(&statex);
long long tot_mem = (long long) statex.ullTotalPhys;
long long tot_mem = (long long) statex.ullAvailPhys;
if (mem_unit == 0)
mem_unit = 1;
#endif
......@@ -89,7 +89,7 @@ int lima::GetDefMaxNbBuffers(const FrameDim& frame_dim, double sys_mem_factor)
throw LIMA_HW_EXC(InvalidValue, "Invalid FrameDim");
if (sys_mem_factor == 0)
sys_mem_factor = 0.8;
sys_mem_factor = 0.7; // pco.4000 - many buffers (fixed from 0.8 to 0.7)
int tot_buffers;
GetSystemMem(frame_size, tot_buffers);
......
......@@ -49,6 +49,7 @@ COMPILE_FITS_SAVING=0
COMPILE_EDFGZ_SAVING=0
COMPILE_TIFF_SAVING=0
COMPILE_CONFIG=1
COMPILE_GLDISPLAY=0
LINK_STRICT_VERSION=0
export COMPILE_CORE COMPILE_SPS_IMAGE COMPILE_SIMULATOR \
COMPILE_ESPIA COMPILE_FRELON COMPILE_MAXIPIX COMPILE_PILATUS \
......@@ -57,4 +58,5 @@ export COMPILE_CORE COMPILE_SPS_IMAGE COMPILE_SIMULATOR \
COMPILE_ANDOR COMPILE_PHOTONICSCIENCE COMPILE_PCO COMPILE_MARCCD COMPILE_DEXELA\
COMPILE_POINTGREY COMPILE_IMXPAD COMPILE_CBF_SAVING COMPILE_NXS_SAVING \
COMPILE_FITS_SAVING COMPILE_EDFGZ_SAVING COMPILE_TIFF_SAVING COMPILE_CONFIG\
COMPILE_GLDISPLAY \
LINK_STRICT_VERSION
......@@ -142,7 +142,7 @@ namespace lima
void _setDefaultPars(Parameters* pars);
void _apply();
void _hwRead();
void _check_timing_ranges();
#ifdef WITH_CONFIG
class _ConfigHandler;
CtConfig::ModuleTypeCallback* _getConfigHandler();
......
......@@ -266,7 +266,7 @@ namespace lima
#ifdef WITH_SPS_IMAGE
bool m_display_active_flag;
#endif
ImageStatusCallback *m_img_status_cb;
std::list<ImageStatusCallback*>* m_img_status_cbk_list;
SoftOpErrorHandler* m_soft_op_error_handler;
_ReconstructionChangeCallback* m_reconstruction_cbk;
......
......@@ -269,7 +269,8 @@ namespace lima {
void prepare();
void createSaveContainer();
void checkWriteAccess();
void checkDirectoryAccess(const std::string&);
bool needCompression()
{ return m_save_cnt->needParallelCompression(); }
......@@ -329,6 +330,9 @@ namespace lima {
typedef std::map<long, long> FrameCbkCountMap;
typedef std::map<long, HeaderMap> FrameHeaderMap;
void _validateFrameHeader(long frame_nr,
AutoMutex&);
CtControl& m_ctrl;
int m_nb_stream;
......
......@@ -46,6 +46,7 @@ class CtSpsImage
void setNames(const std::string& spec_name,
const std::string& array_name);
void getNames(std::string &spec_name, std::string &array_name) const;
void prepare(const FrameDim &frame_dim);
void frameReady(Data&);
void reset();
......
......@@ -45,10 +45,11 @@ namespace lima
Roi roi;
Bin bin;
};
class _InternalImageCBK;
class LIMACORE_API Image
{
friend class CtVideo;
friend class CtVideo::_InternalImageCBK;
friend class _Data2ImageTask;
friend std::ostream& operator<<(std::ostream &os,CtVideo::Image& im);
public:
......@@ -126,7 +127,6 @@ namespace lima
private:
class _Data2ImageCBK;
friend class _Data2ImageCBK;
class _InternalImageCBK;
friend class _InternalImageCBK;
class _videoBackgroundCallback;
......@@ -139,7 +139,7 @@ namespace lima
void _read_hw_params();
void _check_video_mode(VideoMode);
void _prepareAcq();
void _startAcqTime();
#ifdef WITH_CONFIG
class _ConfigHandler;
CtConfig::ModuleTypeCallback* _getConfigHandler();
......
......@@ -19,6 +19,7 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//###########################################################################
%If (WITH_CONFIG)
class Setting;
%ExportedHeaderCode
......@@ -33,8 +34,82 @@ class Setting;
#include <ConfigUtils.h>
#ifdef WIN32
#pragma warning( disable : 4290 )
#pragma warning( disable : 4800 )
#endif
inline long _from_python_long_2_c(PyObject* value,int& return_value)
{
#if PY_VERSION_HEX >= 0x02070000
int overflow;
long cValue = PyLong_AsLongAndOverflow(value,&overflow);
if(overflow == 1 || overflow == -1)
{
PyErr_SetString(PyExc_ValueError,
"don't manage big int (overflow)");
return_value = 1;
return -1;
}
#else
long cValue = PyLong_AsLong(value);
#endif
return cValue;
}
int _fill_setting_with_dict(Setting &setting,PyObject *dict);
inline int _fill_setting_with_list(Setting &setting,
PyObject *list)
{
int return_value = 0;
try
{
Py_ssize_t list_lenght = PyList_GET_SIZE(list);
for(Py_ssize_t index = 0;
!return_value && index < list_lenght;++index)
{
PyObject* value = PyList_GetItem(list,index);
if(PyString_Check(value))
setting.append(PyString_AS_STRING(value));
else if(PyFloat_Check(value))
setting.append(PyFloat_AS_DOUBLE(value));
else if(PyLong_Check(value))
{
long cValue = _from_python_long_2_c(value,return_value);
setting.append(cValue);
}
else if(PyInt_Check(value))
setting.append(int(PyInt_AsLong(value)));
else if(PyBool_Check(value))
setting.append(PyObject_IsTrue(value));
else if(PyDict_Check(value))
{
Setting child = setting.addChild(NULL);
return_value = _fill_setting_with_dict(child,value);
}
else if(PyList_Check(value))
{
Setting child = setting.addList(NULL);
return_value = _fill_setting_with_list(child,value);
}
else
{
PyErr_SetString(PyExc_ValueError,
"Type not yet managed");
return_value = 1;
break;
}
}
}
catch(...)
{
Py_BEGIN_ALLOW_THREADS;
throw;
Py_END_ALLOW_THREADS;
}
return return_value;
}
inline int _fill_setting_with_dict(Setting &setting,
PyObject *dict)
{
......@@ -61,19 +136,7 @@ inline int _fill_setting_with_dict(Setting &setting,
PyFloat_AS_DOUBLE(value));
else if(PyLong_Check(value))
{
#if PY_VERSION_HEX >= 0x02070000
int overflow;
long cValue = PyLong_AsLongAndOverflow(value,&overflow);
if(overflow == 1 || overflow == -1)
{
PyErr_SetString(PyExc_ValueError,
"don't manage big int (overflow)");
return_value = 1;
break;
}
#else
long cValue = PyLong_AsLong(value);
#endif
long cValue = _from_python_long_2_c(value,return_value);
setting.set(PyString_AS_STRING(key),
cValue);
}
......@@ -88,6 +151,11 @@ inline int _fill_setting_with_dict(Setting &setting,
Setting child = setting.addChild(PyString_AS_STRING(key));
return_value = _fill_setting_with_dict(child,value);
}
else if(PyList_Check(value))
{
Setting child = setting.addList(PyString_AS_STRING(key));
return_value = _fill_setting_with_list(child,value);
}
else if(sipCanConvertToType(value,sipType_Data,SIP_NOT_NONE))
{
int state;
......@@ -181,6 +249,12 @@ inline bool _build_dict_from_setting(const Setting &setting,
py_value);
break;
}
case Setting::List:
{
py_value = PyList_New(0);
return_value = _build_dict_from_setting(sub_setting,py_value);
break;
}
case Setting::DataType:
{
Data value;
......@@ -198,9 +272,14 @@ inline bool _build_dict_from_setting(const Setting &setting,
}
if(!return_value)
return_value = PyDict_SetItemString(dict,
sub_setting.getName(),
py_value);
{
if(PyDict_Check(dict))
return_value = PyDict_SetItemString(dict,
sub_setting.getName(),
py_value);
else
return_value = PyList_Append(dict,py_value);
}
if(py_value)
Py_DECREF(py_value);
......@@ -324,3 +403,4 @@ sipIsErr = 1; // should never happen
private:
CtConfig(const CtConfig &);
};
%End
......@@ -109,8 +109,9 @@ using namespace lima;
CtAccumulation* accumulation();
CtVideo* video();
CtEvent* event();
%If (WITH_CONFIG)
CtConfig* config();
%End
SoftOpExternalMgr* externalOperation();
HwInterface* hwInterface();
......
......@@ -32,10 +32,13 @@ using namespace lima;
void setNames(const std::string& spec_name,
const std::string& array_name);
void getNames(std::string& spec_name /Out/,
std::string& array_name /Out/);
void prepare(const FrameDim &frame_dim);
void frameReady(Data&);
void reset();
void setActive(bool aFlag);
bool isActive() const;
};
%End
\ No newline at end of file
%End
......@@ -144,7 +144,7 @@ namespace lima
SoftOpFlatfieldCorrection();
virtual ~SoftOpFlatfieldCorrection();
void setFlatFieldImage(Data &aData);
void setFlatFieldImage(Data &aData,bool normalize = true);
protected:
virtual bool addTo(TaskMgr&,int stage);
......
......@@ -544,7 +544,7 @@ public:
SoftOpFlatfieldCorrection();
virtual ~SoftOpFlatfieldCorrection();
void setFlatFieldImage(Data &aData);
void setFlatFieldImage(Data &aData,bool normalize = true);
};
class SoftOpFlip
......
......@@ -135,9 +135,9 @@ SoftOpFlatfieldCorrection::~SoftOpFlatfieldCorrection()
m_opt->unref();
}
void SoftOpFlatfieldCorrection::setFlatFieldImage(Data &aData)
void SoftOpFlatfieldCorrection::setFlatFieldImage(Data &aData,bool normalize)
{
m_opt->setFlatFieldImageData(aData);
m_opt->setFlatFieldImageData(aData,normalize);
}
bool SoftOpFlatfieldCorrection::addTo(TaskMgr &aMgr,int stage)
......
......@@ -22,19 +22,21 @@
#include "CtAcquisition.h"
#include "math.h"
#define CHECK_EXPOTIME(val) \
if (val < m_valid_ranges.min_exp_time) \
{ \
DEB_ERROR() << "Specified " << DEB_VAR1(val) << " too short: " \
<< DEB_VAR1(m_valid_ranges.min_exp_time); \
THROW_CTL_ERROR(InvalidValue) << "Exposure time too short"; \
} \
else if (val > m_valid_ranges.max_exp_time) \
{ \
DEB_ERROR() << "Specified " << DEB_VAR1(val) << " too long: " \
<< DEB_VAR1(m_valid_ranges.max_exp_time); \
THROW_CTL_ERROR(InvalidValue) << "Exposure time too long"; \
#include <algorithm>
using std::max;
#define CHECK_EXPOTIME(val) \
if (val < m_valid_ranges.min_exp_time) \
{ \
THROW_CTL_ERROR(InvalidValue) \
<< "Specified exposure time " << DEB_VAR1(val) << " too short: " \
<< DEB_VAR1(m_valid_ranges.min_exp_time); \
} \
else if (val > m_valid_ranges.max_exp_time) \
{ \
THROW_CTL_ERROR(InvalidValue) \
<< "Specified exposure time " << DEB_VAR1(val) << " too long: " \
<< DEB_VAR1(m_valid_ranges.max_exp_time); \
}
using namespace lima;
......@@ -55,6 +57,7 @@ public:
DEB_PARAM() << DEB_VAR1(ranges);
m_acq.m_valid_ranges = ranges;
m_acq._check_timing_ranges();
}
private:
CtAcquisition& m_acq;
......@@ -141,7 +144,6 @@ CtAcquisition::CtAcquisition(HwInterface *hw) :
CtAcquisition::~CtAcquisition()
{
DEB_DESTRUCTOR();
m_hw_sync->unregisterValidRangesCallback(m_valid_ranges_cb);
delete m_valid_ranges_cb;
}
......@@ -174,12 +176,28 @@ void CtAcquisition::reset()
DEB_MEMBER_FUNCT();
m_inpars.reset();
m_inpars.latencyTime = m_valid_ranges.min_lat_time;
m_inpars.latencyTime = 0;
m_applied_once= false;
//Check auto exposure capability
m_inpars.autoExpoMode =
m_hw_sync->checkAutoExposureMode(HwSyncCtrlObj::OFF) ? OFF : ON;
_check_timing_ranges();
}
void CtAcquisition::_check_timing_ranges()
{
//Set exposure time and accumulation time in valide ranges
if(m_inpars.acqExpoTime < m_valid_ranges.min_exp_time)
m_inpars.acqExpoTime = m_valid_ranges.min_exp_time;
else if(m_inpars.acqExpoTime > m_valid_ranges.max_exp_time)
m_inpars.acqExpoTime = m_valid_ranges.max_exp_time;
if(m_inpars.accMaxExpoTime < m_valid_ranges.min_exp_time)
m_inpars.accMaxExpoTime = m_valid_ranges.min_exp_time;
else if(m_inpars.accMaxExpoTime > m_valid_ranges.max_exp_time)
m_inpars.accMaxExpoTime = m_valid_ranges.max_exp_time;
}
void CtAcquisition::apply(CtControl::ApplyPolicy policy)
......@@ -232,6 +250,8 @@ void CtAcquisition::_hwRead()
m_hw_sync->getTrigMode(m_hwpars.triggerMode);
m_hw_sync->getExpTime(m_hwpars.acqExpoTime);
m_hw_sync->getLatTime(m_hwpars.latencyTime);
if (m_hwpars.latencyTime <= m_valid_ranges.min_lat_time)
m_hwpars.latencyTime = 0;
m_hw_sync->getNbFrames(m_hwpars.acqNbFrames);
switch (m_hwpars.acqMode) {
......@@ -259,7 +279,8 @@ void CtAcquisition::_apply()
m_hw_sync->setAcqMode(m_inpars.acqMode);
if (m_changes.triggerMode) m_hw_sync->setTrigMode(m_inpars.triggerMode);
if (m_changes.latencyTime) m_hw_sync->setLatTime(m_inpars.latencyTime);
double lat_time = max(m_inpars.latencyTime, m_valid_ranges.min_lat_time);
if (m_changes.latencyTime) m_hw_sync->setLatTime(lat_time);
if(m_changes.acqMode || m_changes.acqNbFrames)
{
......@@ -621,10 +642,12 @@ void CtAcquisition::setLatencyTime(double lat_time)
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(lat_time);
if (lat_time < m_valid_ranges.min_lat_time)
lat_time = m_valid_ranges.min_lat_time;
if (lat_time <= m_valid_ranges.min_lat_time)
lat_time = 0;
if (lat_time > m_valid_ranges.max_lat_time)
THROW_CTL_ERROR(InvalidValue) << "Latency time too long";
THROW_CTL_ERROR(InvalidValue)
<< "Specified latency time " << DEB_VAR1(lat_time) << " too long: "
<< DEB_VAR1(m_valid_ranges.max_lat_time);
m_inpars.latencyTime= lat_time;
}
......@@ -632,7 +655,7 @@ void CtAcquisition::getLatencyTime(double& time) const
{
DEB_MEMBER_FUNCT();
time= m_inpars.latencyTime;
time= max(m_inpars.latencyTime, m_valid_ranges.min_lat_time);
DEB_RETURN() << DEB_VAR1(time);
}
......
......@@ -157,7 +157,7 @@ CtControl::CtControl(HwInterface *hw) :
m_images_buffer_size(16),
m_policy(All), m_ready(false),
m_autosave(false), m_running(false),
m_img_status_cb(NULL),
m_img_status_cbk_list(new std::list<ImageStatusCallback*>),
m_reconstruction_cbk(NULL)
{
DEB_CONSTRUCTOR();
......@@ -226,9 +226,8 @@ CtControl::~CtControl()
PoolThreadMgr& pool_thread_mgr = PoolThreadMgr::get();
pool_thread_mgr.wait();
if (m_img_status_cb)
unregisterImageStatusCallback(*m_img_status_cb);
delete m_img_status_cbk_list;
if(m_reconstruction_cbk)
{
HwReconstructionCtrlObj* reconstruction_obj;
......@@ -386,7 +385,7 @@ void CtControl::startAcq()
DEB_MEMBER_FUNCT();
if (!m_ready)
THROW_CTL_ERROR(Error) << "Run prepareAcq before starting acquisition";
THROW_CTL_ERROR(Error) << "Run prepareAcq before starting acquisition";
m_running = true;
TrigMode trigMode;
m_ct_acq->getTriggerMode(trigMode);
......@@ -399,7 +398,7 @@ void CtControl::startAcq()
HwInterface::Status hwStatus;
m_hw->getStatus(hwStatus);
if(hwStatus.det != DetIdle)
THROW_CTL_ERROR(Error) << "Try to restart before detector is ready";
THROW_CTL_ERROR(Error) << "Try to restart before detector is ready";
//m_ready = false after the last image is triggerred
int nbFrames4Acq;
......@@ -410,6 +409,7 @@ void CtControl::startAcq()
AutoMutex aLock(m_cond.mutex());
m_ct_video->_startAcqTime();
m_hw->startAcq();
m_status.AcquisitionStatus = AcqRunning;
DEB_TRACE() << "Hardware Acquisition started";
......@@ -504,6 +504,14 @@ void CtControl::_calcAcqStatus()
m_status.AcquisitionStatus = AcqReady;
DEB_TRACE() << DEB_VAR1(m_status);
}
if (!m_img_status_cbk_list->empty() &&
(m_status.AcquisitionStatus != AcqRunning)) {
aLock.unlock();
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
(*i)->imageStatusChanged(m_status.ImageCounters);
return;
}
}
}
......@@ -585,9 +593,9 @@ void CtControl::ReadBaseImage(Data &aReturnData,long frameNumber,
if (frameNumber < 0) {
frameNumber = lastFrame - (readBlockLen - 1);
if (frameNumber < 0)
THROW_CTL_ERROR(Error) << "Frame(s) not available yet";
THROW_CTL_ERROR(Error) << "Frame(s) not available yet";
} else if (frameNumber + readBlockLen - 1 > lastFrame)
THROW_CTL_ERROR(Error) << "Frame(s) not available yet";
THROW_CTL_ERROR(Error) << "Frame(s) not available yet";
aLock.unlock();
m_ct_buffer->getFrame(aReturnData,frameNumber,readBlockLen);
......@@ -597,7 +605,7 @@ void CtControl::ReadBaseImage(Data &aReturnData,long frameNumber,
int roiHeight = img_dim.getSize().getHeight() * readBlockLen;
if((roiWidth * roiHeight) >
(aReturnData.dimensions[0] * aReturnData.dimensions[1]))
THROW_CTL_ERROR(Error) << "Roi dim > HwBuffer dim";
THROW_CTL_ERROR(Error) << "Roi dim > HwBuffer dim";
aReturnData.dimensions[0] = roiWidth;
aReturnData.dimensions[1] = roiHeight;
......@@ -655,6 +663,9 @@ void CtControl::resetStatus(bool only_acq_status)
m_status.AcquisitionStatus = AcqReady;
else
m_status.reset();
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
(*i)->imageStatusChanged(m_status.ImageCounters);
}
bool CtControl::newFrameReady(Data& fdata)
......@@ -691,8 +702,9 @@ bool CtControl::newFrameReady(Data& fdata)
if (!internal_stage)
newBaseImageReady(fdata);
if (m_img_status_cb)
m_img_status_cb->imageStatusChanged(m_status.ImageCounters);
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
(*i)->imageStatusChanged(m_status.ImageCounters);
_calcAcqStatus();
}
......@@ -743,8 +755,9 @@ void CtControl::newBaseImageReady(Data &aData)
m_ct_video->frameReady(aData);
if(m_op_ext_link_task_active && m_img_status_cb && img_status_changed)
m_img_status_cb->imageStatusChanged(m_status.ImageCounters);
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
(*i)->imageStatusChanged(m_status.ImageCounters);
_calcAcqStatus();
}
......@@ -788,8 +801,9 @@ void CtControl::newImageReady(Data &aData)
if(m_autosave)
newFrameToSave(aData);
if (m_img_status_cb && img_status_changed)
m_img_status_cb->imageStatusChanged(m_status.ImageCounters);
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
(*i)->imageStatusChanged(m_status.ImageCounters);
_calcAcqStatus();
}
......@@ -821,8 +835,9 @@ void CtControl::newImageSaved(Data&)
}
aLock.unlock();
if (m_img_status_cb)
m_img_status_cb->imageStatusChanged(m_status.ImageCounters);
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
(*i)->imageStatusChanged(m_status.ImageCounters);
_calcAcqStatus();
}
......@@ -836,32 +851,48 @@ void CtControl::newFrameToSave(Data& fdata)
m_ct_saving->frameReady(fdata);
}
/** registerImageStatusCallback is not thread safe!!!
*/
void CtControl::registerImageStatusCallback(ImageStatusCallback& cb)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR2(&cb, m_img_status_cb);
DEB_PARAM() << DEB_VAR1(&cb);
if (m_img_status_cb) {
DEB_ERROR() << "ImageStatusCallback already registered";
THROW_CTL_ERROR(InvalidValue) << "ImageStatusCallback already registered";
}
Status aStatus;
getStatus(aStatus);
if(aStatus.AcquisitionStatus != AcqReady)
THROW_CTL_ERROR(Error) << "Can't register callback if acquisition is not idle";
cb.setImageStatusCallbackGen(this);
m_img_status_cb = &cb;
AutoMutex aLock(m_cond.mutex());
m_img_status_cbk_list->push_back(&cb);
}
/** unregisterImageStatusCallback is not thread safe!!!
*/
void CtControl::unregisterImageStatusCallback(ImageStatusCallback& cb)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR2(&cb, m_img_status_cb);
DEB_PARAM() << DEB_VAR1(&cb);
if (m_img_status_cb != &cb) {
DEB_ERROR() << "ImageStatusCallback not registered";
THROW_CTL_ERROR(InvalidValue) << "ImageStatusCallback not registered";
}
Status aStatus;
getStatus(aStatus);
if(aStatus.AcquisitionStatus != AcqReady)
THROW_CTL_ERROR(Error) << "Can't unregister callback if acquisition is not idle";
AutoMutex aLock(m_cond.mutex());
bool found = false;
for(std::list<ImageStatusCallback*>::iterator i = m_img_status_cbk_list->begin();
i != m_img_status_cbk_list->end();++i)
{
if((*i) == &cb)
{
found = true;
m_img_status_cbk_list->erase(i);
break;
}
}
m_img_status_cb = NULL;
cb.setImageStatusCallbackGen(NULL);
if (!found)
THROW_CTL_ERROR(InvalidValue) << "ImageStatusCallback not registered";
}
/** @brief this methode check if an overrun
......
......@@ -771,8 +771,11 @@ void CtImage::_setHSRoi(const Roi &roi)
} else {
// Apply software flip to hardware roi
roi_set_hw = roi_set_hw.getFlipped(aSoftwareFlip,max_roi_size);
roi_by_hw = roi_by_hw.getFlipped(aSoftwareFlip,max_roi_size);
//Apply software rotation to hardware roi
roi_set_hw = roi_set_hw.getRotated(aSoftwareRotation,max_roi_size);
roi_by_hw = roi_by_hw.getRotated(aSoftwareRotation,max_roi_size);
//Calc the roi by soft needed
roi_by_sw= roi_set_hw.subRoiAbs2Rel(roi_by_hw);
roi_by_sw= roi_by_sw.getBinned(bin_by_sw);
m_sw->setRoi(roi_by_sw);
......
......@@ -599,6 +599,7 @@ void CtSaving::setDirectory(const std::string &directory, int stream_idx)
AutoMutex aLock(m_cond.mutex());
Stream& stream = getStream(stream_idx);
Parameters pars = stream.getParameters(Auto);
stream.checkDirectoryAccess(directory);
pars.directory = directory;
stream.setParameters(pars);
}
......@@ -1039,6 +1040,7 @@ void CtSaving::updateFrameHeader(long frame_nr,const HeaderMap &header)
if(!result.second)
result.first->second = i->second;
}
_validateFrameHeader(frame_nr,aLock);
}
/** @brief validate a header for a frame.
this mean that the header is ready and can now be save.
......@@ -1050,6 +1052,12 @@ void CtSaving::validateFrameHeader(long frame_nr)
DEB_PARAM() << DEB_VAR1(frame_nr);
AutoMutex aLock(m_cond.mutex());
_validateFrameHeader(frame_nr,aLock);
}
void CtSaving::_validateFrameHeader(long frame_nr,
AutoMutex& aLock)
{
SavingMode saving_mode = getAcqSavingMode();
if (saving_mode != CtSaving::AutoHeader)
return;
......@@ -1890,11 +1898,11 @@ void CtSaving::Stream::checkWriteAccess()
THROW_CTL_ERROR(Error) << output;
}
// check if it's writtable
DEB_TRACE() << "Check if directory is writtable";
// check if it's writable
DEB_TRACE() << "Check if directory is writable";
if(access(m_pars.directory.c_str(),W_OK))
{
output = "Directory : " + m_pars.directory + " is not writtable";
output = "Directory : " + m_pars.directory + " is not writable";
THROW_CTL_ERROR(Error) << output;
}
}
......@@ -1997,3 +2005,57 @@ void CtSaving::Stream::checkWriteAccess()
THROW_CTL_ERROR(Error) << output;
} // if(m_pars.overwritePolicy == Abort)
}
void CtSaving::Stream::checkDirectoryAccess(const std::string& directory)
{
DEB_MEMBER_FUNCT();
std::string local_directory = directory;
std::string output;
// check if directory exist
DEB_TRACE() << "Check if directory exist";
if(access(local_directory.c_str(),F_OK))
{
bool continue_flag;
do
{
#ifdef WIN32
size_t pos = local_directory.find_last_of("\\/");
#else
size_t pos = local_directory.find_last_of("/");
#endif
size_t string_length = local_directory.size() - 1;
continue_flag = pos == string_length;
if(pos != std::string::npos)
local_directory = local_directory.substr(0,pos);
}
while(continue_flag);
if(access(local_directory.c_str(),F_OK))
{
output = "Directory :" + local_directory + " doesn't exist";
THROW_CTL_ERROR(Error) << output;
}
}
// check if it's a directory
struct stat aDirectoryStat;
if(stat(local_directory.c_str(),&aDirectoryStat))
{
output = "Can stat directory : " + local_directory;
THROW_CTL_ERROR(Error) << output;
}
DEB_TRACE() << "Check if it's really a directory";
if(!S_ISDIR(aDirectoryStat.st_mode))
{
output = "Path : " + local_directory + " is not a directory";
THROW_CTL_ERROR(Error) << output;
}
// check if it's writable
DEB_TRACE() << "Check if directory is writable";
if(access(local_directory.c_str(),W_OK))
{
output = "Directory : " + local_directory + " is not writable";
THROW_CTL_ERROR(Error) << output;
}
}
......@@ -40,7 +40,9 @@ public:
void setNames(const std::string& spec_name,
const std::string& array_name);
void getNames(std::string &spec_name,
std::string &array_name) const;
void setFrameDim(const FrameDim& frame_dim);
void update(Data& data);
......@@ -170,6 +172,7 @@ void CtSpsImage::_update_finnished(Data &aData)
m_next_data = Data();
}
void CtSpsImage::setNames(const std::string& spec_name,
const std::string& array_name)
{
......@@ -178,6 +181,15 @@ void CtSpsImage::setNames(const std::string& spec_name,
m_sps_cnt->setNames(spec_name,array_name);
}
void CtSpsImage::getNames(std::string& spec_name,
std::string& array_name) const
{
DEB_MEMBER_FUNCT();
m_sps_cnt->getNames(spec_name, array_name);
}
void CtSpsImage::prepare(const FrameDim &frame_dim)
{
DEB_MEMBER_FUNCT();
......@@ -229,6 +241,17 @@ void _SpsImage::setNames(const std::string& spec_name,
m_array_name = array_name;
}
void _SpsImage::getNames(std::string &spec_name, std::string &array_name) const
{
DEB_MEMBER_FUNCT();
spec_name = m_spec_name;
array_name = m_array_name;
DEB_RETURN() << DEB_VAR2(spec_name, array_name);
}
void _SpsImage::setFrameDim(const FrameDim& frame_dim)
{
DEB_MEMBER_FUNCT();
......
......@@ -108,6 +108,7 @@ public:
m_video(video),m_buffer(video.m_video->getBuffer()) {}
virtual ~_InternalImageCBK() {}
Timestamp m_start_time;
protected:
virtual bool newImage(char * data,int width,int height,VideoMode mode);
private:
......@@ -120,10 +121,13 @@ bool CtVideo::_InternalImageCBK::newImage(char * data,int width,int height,Video
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR4((void*)data,width,height,mode);
bool liveFlag;
AutoMutex aLock(m_video.m_cond.mutex());
if(m_video.m_stopping_live) return false;
Timestamp now = Timestamp::now();
liveFlag = m_video.m_pars.live;
int image_counter = (int) m_video.m_image_counter + 1;
aLock.unlock();
......@@ -136,6 +140,7 @@ bool CtVideo::_InternalImageCBK::newImage(char * data,int width,int height,Video
lima::image2YUV((unsigned char*)data,width,height,mode,(unsigned char*)ptr);
HwFrameInfoType frame_info;
frame_info.acq_frame_nb = image_counter;
frame_info.frame_timestamp = now - m_start_time;
m_buffer.newFrameReady(frame_info);
}
// Should happen only when video format is not implemented (Debug mode)
......@@ -560,6 +565,12 @@ bool CtVideo::checkAutoGainMode(AutoGainMode mode) const
void CtVideo::getAutoGainModeList(AutoGainModeList& modes) const
{
DEB_MEMBER_FUNCT();
if(!m_has_video)
{
modes.push_back(OFF);
return;
}
int nb_modes = 0;
if(m_video->checkAutoGainMode(HwVideoCtrlObj::OFF))
modes.push_back(OFF),++nb_modes;
......@@ -655,10 +666,7 @@ void CtVideo::registerImageCallback(ImageCallback &cb)
DEB_PARAM() << DEB_VAR2(&cb, m_image_callback);
if(m_image_callback)
{
DEB_ERROR() << "ImageCallback already registered";
THROW_CTL_ERROR(InvalidValue) << "ImageCallback already registered";
}
THROW_CTL_ERROR(InvalidValue) << "ImageCallback already registered";
m_image_callback = &cb;
}
......@@ -670,10 +678,7 @@ void CtVideo::unregisterImageCallback(ImageCallback &cb)
AutoMutex aLock(m_cond.mutex());
DEB_PARAM() << DEB_VAR2(&cb, m_image_callback);
if(m_image_callback != &cb)
{
DEB_ERROR() << "ImageCallback not registered";
THROW_CTL_ERROR(InvalidValue) << "ImageCallback not registered";
}
THROW_CTL_ERROR(InvalidValue) << "ImageCallback not registered";
m_image_callback = NULL;
}
......@@ -919,6 +924,11 @@ void CtVideo::_prepareAcq()
m_write_image->frameNumber = -1;
}
void CtVideo::_startAcqTime()
{
if(m_internal_image_callback)
m_internal_image_callback->m_start_time = Timestamp::now();
}
#ifdef WITH_CONFIG
CtConfig::ModuleTypeCallback* CtVideo::_getConfigHandler()
{
......
......@@ -70,12 +70,14 @@ public:
class ValidRangesCallback
{
DEB_CLASS(DebModHardware,"HwSyncCtrlObj::ValidRangesCallback");
friend class HwSyncCtrlObj;
public:
virtual ~ValidRangesCallback() {};
ValidRangesCallback();
virtual ~ValidRangesCallback();
protected:
virtual void validRangesChanged(const HwSyncCtrlObj::ValidRangesType&) = 0;
private:
friend class HwSyncCtrlObj;
HwSyncCtrlObj* m_hw_sync;
};
HwSyncCtrlObj();
......
......@@ -54,6 +54,7 @@ sipRes = tmpString.c_str();
class ValidRangesCallback
{
public:
ValidRangesCallback();
virtual ~ValidRangesCallback();
protected:
virtual void validRangesChanged(const HwSyncCtrlObj::ValidRangesType&) = 0;
......
......@@ -24,16 +24,29 @@
using namespace lima;
HwSyncCtrlObj::ValidRangesCallback::ValidRangesCallback()
: m_hw_sync(NULL)
{
}
HwSyncCtrlObj::ValidRangesCallback::~ValidRangesCallback()
{
if (m_hw_sync)
m_hw_sync->unregisterValidRangesCallback(this);
}
HwSyncCtrlObj::HwSyncCtrlObj()
: m_acq_mode(Single),
m_valid_ranges_cb(NULL)
{
DEB_CONSTRUCTOR();
DEB_CONSTRUCTOR();
}
HwSyncCtrlObj::~HwSyncCtrlObj()
{
DEB_DESTRUCTOR();
DEB_DESTRUCTOR();
if (m_valid_ranges_cb)
unregisterValidRangesCallback(m_valid_ranges_cb);
}
bool HwSyncCtrlObj::checkAutoExposureMode(AutoExposureMode mode) const
......@@ -92,6 +105,7 @@ void HwSyncCtrlObj::registerValidRangesCallback(ValidRangesCallback *cb)
throw LIMA_CTL_EXC(InvalidValue,"ValidRangesCallback already registered");
}
cb->m_hw_sync = this;
m_valid_ranges_cb = cb;
}
......@@ -107,6 +121,7 @@ void HwSyncCtrlObj::unregisterValidRangesCallback(ValidRangesCallback *cb)
}
m_valid_ranges_cb = NULL;
cb->m_hw_sync = NULL;
}
std::ostream& lima::operator<<(std::ostream& os,const HwSyncCtrlObj::ValidRangesType &range)
......
......@@ -197,10 +197,17 @@ ifneq ($(COMPILE_TIFF_SAVING),0)
INSTALL_CONFIG_DEFINES += -DWITH_TIFF_SAVING
endif
ifneq ($(COMPILE_CONFIG_CONTEXT),0)
INSTALL_CONFIG_DEFINES += -DWITH_CONFIG_CONTEXT
ifneq ($(COMPILE_CONFIG),0)
INSTALL_CONFIG_DEFINES += -DWITH_CONFIG
INSTALL_DEPS += libconfig.install
endif
ifneq ($(COMPILE_GLDISPLAY), 0)
INSTALL_GLDISPLAY_DIR = $(INSTALL_PLAT_DIR)/GLDisplay
GLDISPLAY_FULL_VERSION = $(shell cat third-party/gldisplay/VERSION)