<commit_before> ///////////////////////////////////////////////////////////////////////////////
// FILE:          IDS_uEye.cpp
// PROJECT:       Micro-Manager
// SUBSYSTEM:     DeviceAdapters
//-----------------------------------------------------------------------------
// DESCRIPTION:   Driver for IDS uEye series of USB cameras
//                (also Thorlabs DCUxxxx USB, Edmund EO-xxxxM USB
//                 with IDS hardware)
//
//                based on IDS uEye SDK and Micromanager DemoCamera example
//                tested with SDK version 3.82, 4.02, 4.20 and 4.30
//                (3.82-specific functions are still present but not used)
//                
// AUTHOR:        <NAME>
//
// YEAR:          2012, 2013
//                
// VERSION:       1.1
//
// LICENSE:       This file is distributed under the BSD license.
//                License text is included with the source distribution.
//
//                This file is distributed in the hope that it will be useful,
//                but WITHOUT ANY WARRANTY; without even the implied warranty
//                of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
//                IN NO EVENT SHALL THE COPYRIGHT OWNER OR
//                CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//                INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
//
//LAST UPDATE:    22.12.2013 WR



#include <cstdio>
#include <string>
#include <math.h>
#include <sstream>
#include <iostream>

#include "../../MMDevice/ModuleInterface.h"

#include "IDS_uEye.h"




using namespace std;

double g_IntensityFactor_ = 1.0;

// External names used used by the rest of the system
// to load particular device from the "IDS_uEye.dll" library
const char* g_CameraDeviceName = "IDS uEye";

/*
// constants for naming pixel types (allowed values of the "PixelType" property)
const char* g_PixelType_8bit = "8bit";
const char* g_PixelType_16bit = "16bit";
const char* g_PixelType_32bitRGB = "32bitRGB";
const char* g_PixelType_64bitRGB = "64bitRGB";
const char* g_PixelType_32bit = "32bit";        // floating point greyscale
*/


// TODO: linux entry code

// windows DLL entry code
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE /*hModule*/, 
                      DWORD  ul_reason_for_call, 
                      LPVOID /*lpReserved*/
                      )
{
   switch (ul_reason_for_call)
   {
   case DLL_PROCESS_ATTACH:
   case DLL_THREAD_ATTACH:
   case DLL_THREAD_DETACH:
   case DLL_PROCESS_DETACH:
      break;
   }
   return TRUE;
}
#endif



//definitions
#define ACQ_TIMEOUT 1100                             //timeout for image acquisition (in 10ms)






///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////

/**
 * List all supported hardware devices here
 * Do not discover devices at runtime.  To avoid warnings about missing DLLs, Micro-Manager
 * maintains a list of supported device (MMDeviceList.txt).  This list is generated using 
 * information supplied by this function, so runtime discovery will create problems.
 */
MODULE_API void InitializeModuleData()
{
  AddAvailableDeviceName(g_CameraDeviceName, "uEye Camera");
  
}


MODULE_API MM::Device* CreateDevice(const char* deviceName)
{
  if (deviceName == 0)
    return 0;

  // decide which device class to create based on the deviceName parameter
  if (strcmp(deviceName, g_CameraDeviceName) == 0){

    // create camera
    return new CIDS_uEye();
  }
  

  // ...supplied name not recognized
  return 0;
}


MODULE_API void DeleteDevice(MM::Device* pDevice)
{<commit_msg>IDS_uEye: Reapply r12454 and r12458.<commit_after> ///////////////////////////////////////////////////////////////////////////////
// FILE:          IDS_uEye.cpp
// PROJECT:       Micro-Manager
// SUBSYSTEM:     DeviceAdapters
//-----------------------------------------------------------------------------
// DESCRIPTION:   Driver for IDS uEye series of USB cameras
//                (also Thorlabs DCUxxxx USB, Edmund EO-xxxxM USB
//                 with IDS hardware)
//
//                based on IDS uEye SDK and Micromanager DemoCamera example
//                tested with SDK version 3.82, 4.02, 4.20 and 4.30
//                (3.82-specific functions are still present but not used)
//                
// AUTHOR:        <NAME>
//
// YEAR:          2012, 2013
//                
// VERSION:       1.1
//
// LICENSE:       This file is distributed under the BSD license.
//                License text is included with the source distribution.
//
//                This file is distributed in the hope that it will be useful,
//                but WITHOUT ANY WARRANTY; without even the implied warranty
//                of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
//                IN NO EVENT SHALL THE COPYRIGHT OWNER OR
//                CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//                INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
//
//LAST UPDATE:    22.12.2013 WR



#include <cstdio>
#include <string>
#include <math.h>
#include <sstream>
#include <iostream>

#include "../../MMDevice/ModuleInterface.h"

#include "IDS_uEye.h"




using namespace std;

double g_IntensityFactor_ = 1.0;

// External names used used by the rest of the system
// to load particular device from the "IDS_uEye.dll" library
const char* g_CameraDeviceName = "IDS uEye";

/*
// constants for naming pixel types (allowed values of the "PixelType" property)
const char* g_PixelType_8bit = "8bit";
const char* g_PixelType_16bit = "16bit";
const char* g_PixelType_32bitRGB = "32bitRGB";
const char* g_PixelType_64bitRGB = "64bitRGB";
const char* g_PixelType_32bit = "32bit";        // floating point greyscale
*/


//definitions
#define ACQ_TIMEOUT 1100                             //timeout for image acquisition (in 10ms)






///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////

MODULE_API void InitializeModuleData()
{
  RegisterDevice(g_CameraDeviceName, MM::CameraDevice, "uEye Camera");
}


MODULE_API MM::Device* CreateDevice(const char* deviceName)
{
  if (deviceName == 0)
    return 0;

  // decide which device class to create based on the deviceName parameter
  if (strcmp(deviceName, g_CameraDeviceName) == 0){

    // create camera
    return new CIDS_uEye();
  }
  

  // ...supplied name not recognized
  return 0;
}


MODULE_API void DeleteDevice(MM::Device* pDevice)
{
{'fraction_non_alphanumeric': 0.17814009661835747, 'fraction_numerical': 0.020833333333333332, 'mean_word_length': 1.7196223316912973, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1991822', 'n_tokens_mistral': 1939, 'n_tokens_neox': 1726, 'n_words': 612}