本文整理汇总了C++中QSICamera::get_Description方法的典型用法代码示例。如果您正苦于以下问题:C++ QSICamera::get_Description方法的具体用法?C++ QSICamera::get_Description怎么用?C++ QSICamera::get_Description使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSICamera
的用法示例。
在下文中一共展示了QSICamera::get_Description方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
extern "C" int QSICamera_get_Description (char *pVal)
{
std::string ss;
QSI_func = __func__;
try {Q.get_Description (ss);}
catch (...) {return 0;}
strcpy (pVal, ss.c_str ());
return 1;
}
示例2: main
int main(int argc, char** argv)
{
int x,y,z;
std::string serial("");
std::string desc("");
std::string info = "";
std::string modelNumber("");
char filename[256];
const char *dir = "/tmp";
const char *extension = "tiff";
bool canSetTemp;
bool hasFilters;
short binX;
short binY;
long xsize;
long ysize;
long startX;
long startY;
int iNumFound;
bool tiffoutput = false;
bool fitsoutput = false;
int c;
while (EOF != (c = getopt(argc, argv, "tfd:")))
switch (c) {
case 't':
#if HAVE_TIFFIO_H
tiffoutput = true;
#else
std::cerr << "no TIFF support" << std::endl;
exit(EXIT_FAILURE);
#endif
break;
case 'f':
#if HAVE_FITSIO_H
fitsoutput = true;
#else
std::cerr << "no FITS support" << std::endl;
exit(EXIT_FAILURE);
#endif
break;
case 'd':
dir = optarg;
break;
}
// for compatibility, of no option was present, and we have TIFF
// support, then we use tiff output
#if HAVE_TIFFIO_H
if ((!tiffoutput) && (!fitsoutput)) {
tiffoutput = true;
}
#endif
if ((tiffoutput) && (fitsoutput)) {
std::cerr << "you cannot request both TIFF and FITS." << std::endl;
exit(EXIT_FAILURE);
}
if (fitsoutput) {
extension = "fits";
}
QSICamera cam;
cam.put_UseStructuredExceptions(true);
try
{
cam.get_DriverInfo(info);
std::cout << "qsiapi version: " << info << "\n";
//Discover the connected cameras
std::string camSerial[QSICamera::MAXCAMERAS];
std::string camDesc[QSICamera::MAXCAMERAS];
cam.get_AvailableCameras(camSerial, camDesc, iNumFound);
if (iNumFound < 1)
{
std::cout << "No cameras found\n";
exit(1);
}
for (int i = 0; i < iNumFound; i++)
{
std::cout << camSerial[i] << ":" << camDesc[i] << "\n";
}
cam.put_SelectCamera(camSerial[0]);
cam.put_IsMainCamera(true);
// Connect to the selected camera and retrieve camera parameters
cam.put_Connected(true);
std::cout << "Camera connected. \n";
// Get Model Number
cam.get_ModelNumber(modelNumber);
std::cout << modelNumber << "\n";
// Get Camera Description
cam.get_Description(desc);
std:: cout << desc << "\n";
// Enable the beeper
cam.put_SoundEnabled(true);
//.........这里部分代码省略.........