Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions DeviceAdapters/PVCAM/AcqConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ class AcqConfig
*/
bool CircBufSizeAuto{ true };
/**
* True if PVCAM callbacks are active, false to use polling
*/
bool CallbacksEnabled{ true };
/**
* Enables or disables custom streaming to disk.
* Please note that this streaming is enabled for continuous acquisition only.
* The streaming to disk is fully controlled by PVCAM adapter and should only
Expand Down
8 changes: 3 additions & 5 deletions DeviceAdapters/PVCAM/AcqThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int AcqThread::svc()
{
camera_->LogAdapterMessage("AcqThead loop started");
int nRet = DEVICE_OK;
while(!requestStop_)
while (!requestStop_)
{
resumeEvent_.Wait();
if (requestStop_)
Expand All @@ -57,10 +57,8 @@ int AcqThread::svc()
if (nRet != DEVICE_OK)
continue; // Error logged, ignore and try again

// Frame successfully arrived and ready in the buffer. If we are
// not using callbacks we need to manually push it to the core.
if (!camera_->acqCfgCur_.CallbacksEnabled)
camera_->FrameAcquired();
// Frame successfully arrived and ready in the buffer.
// Frame pushed to the MM core from PVCAM callback handler.
}
camera_->LogAdapterMessage("AcqThead loop exited");
return nRet;
Expand Down
2 changes: 0 additions & 2 deletions DeviceAdapters/PVCAM/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ libmmgr_dal_PVCAM_la_SOURCES = \
AcqThread.h \
Event.cpp \
Event.h \
PollingThread.cpp \
PollingThread.h \
PpParam.cpp \
PpParam.h \
PVCAMAdapter.cpp \
Expand Down
2 changes: 0 additions & 2 deletions DeviceAdapters/PVCAM/PVCAM.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<ClCompile Include="AcqConfig.cpp" />
<ClCompile Include="AcqThread.cpp" />
<ClCompile Include="Event.cpp" />
<ClCompile Include="PollingThread.cpp" />
<ClCompile Include="PpParam.cpp" />
<ClCompile Include="PvCircularBuffer.cpp" />
<ClCompile Include="PvDebayer.cpp" />
Expand All @@ -116,7 +115,6 @@
<ClInclude Include="AcqConfig.h" />
<ClInclude Include="AcqThread.h" />
<ClInclude Include="Event.h" />
<ClInclude Include="PollingThread.h" />
<ClInclude Include="PpParam.h" />
<ClInclude Include="PVCAMIncludes.h" />
<ClInclude Include="PvCircularBuffer.h" />
Expand Down
6 changes: 0 additions & 6 deletions DeviceAdapters/PVCAM/PVCAM.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
<ClCompile Include="PvFrameInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PollingThread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PpParam.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -89,9 +86,6 @@
<ClInclude Include="PVCAMIncludes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PollingThread.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PpParam.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
27 changes: 7 additions & 20 deletions DeviceAdapters/PVCAM/PVCAMAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ enum PvCameraModel
//=============================================================================
//======================================================== FORWARD DECLARATIONS

class PollingThread;
class AcqThread;
class StreamWriter;
template<class T> class PvParam;
Expand Down Expand Up @@ -501,11 +500,6 @@ class Universal : public CCameraBase<Universal>
*/
int OnDiskStreamingCoreSkipRatio(MM::PropertyBase* pProp, MM::ActionType eAct);

/**
* Switches between Callbacks or Polling acquisition type.
*/
int OnAcquisitionMethod(MM::PropertyBase* pProp, MM::ActionType eAct);

/**
* Post processing parameter handler. Post processing features and parameters are
* read out from the camera dynamically. Based on the camera provided information
Expand Down Expand Up @@ -621,19 +615,17 @@ class Universal : public CCameraBase<Universal>

protected:
/**
* This method is called from the static PVCAM callback or polling thread.
* The method should finish as fast as possible to avoid blocking the PVCAM.
* If the execution of this method takes longer than frame readout + exposure,
* the FrameAcquired for the next frame may not be called.
* This method is called from the static PVCAM callback.
*/
int FrameAcquired();
/**
* Called from FrameAcquired(), inserts the frame to the MMCore.
*/
int ProcessFrame(const void* pData, size_t dataSz, const PvFrameInfo& frameNfo);

int PollingThreadRun(void);
void PollingThreadExiting() throw();
int ProcessFrame(const void* pData, const PvFrameInfo& frameNfo);
/**
* Called from ProcessFrame(), composes metadata for the MMCore.
*/
void BuildMetadata(MM::CameraImageMetadata& md, const PvFrameInfo& frameNfo);

private:
// Make object non-copyable
Expand Down Expand Up @@ -691,9 +683,6 @@ class Universal : public CCameraBase<Universal>
* acquisition thread.
*/
int waitForFrameSeq();
int waitForFrameSeqPolling(const MM::MMTime& timeout);
int waitForFrameSeqCallbacks(const MM::MMTime& timeout);
int waitForFrameConPolling(const MM::MMTime& timeout);

int PrepareSeqAcq(); // Note: no longer a device interface function

Expand Down Expand Up @@ -849,10 +838,8 @@ class Universal : public CCameraBase<Universal>

std::map<int32, std::pair<uns32, uns32>> expTimeResLimits_{}; // [expTimeRes]={min,max}

friend class PollingThread;
std::unique_ptr<PollingThread> pollingThd_{}; // Pointer to the sequencing thread
friend class AcqThread;
std::unique_ptr<AcqThread> acqThd_{}; // Non-CB live thread
std::unique_ptr<AcqThread> acqThd_{}; // Non-circular buffer "live" acq. thread

std::unique_ptr<StreamWriter> customDiskWriter_{}; // Writer for custom disk streaming feature
bool customDiskWriterActive_{ false }; // Cached value updated after writer->Start
Expand Down
Loading
Loading