Wasatch.VCPP 1.0.19
Visual C++ driver for Wasatch Photonics spectrometers
Driver.h
Go to the documentation of this file.
1
8#pragma once
9
10#ifdef USE_LIBUSB_WIN32
11#include "libusb.h"
12#else
13//#include <libusb-1_0.h> // some platforms may use this instead
14#include <libusb.h>
15#endif
16
17#include "Logger.h"
18
19#include <string>
20#include <mutex>
21#include <map>
22
25namespace WasatchVCPP
26{
27 class Spectrometer;
28
54 class Driver
55 {
56 public:
57
66 const std::string libraryVersion = "1.0.19";
67
68 static Driver* getInstance();
69 static void destroy();
70
71 int getNumberOfSpectrometers();
72 int openAllSpectrometers();
73 bool closeAllSpectrometers();
74
75 Spectrometer* getSpectrometer(int index);
76 bool removeSpectrometer(int index);
77
78 std::string getLibraryVersion();
79
80 Logger logger;
81
82 private:
83 static std::mutex mutDriver;
84 static std::mutex mutSpectrometers;
85 static Driver* instance;
86
87 Driver();
88
89 std::map<int, Spectrometer*> spectrometers;
90 };
91}
interface of WasatchVCPP::Logger
This is an internal class encapsulating state and control of all connected spectrometers.
Definition: Driver.h:55
const std::string libraryVersion
This is where the "master version number" is stored for the library.
Definition: Driver.h:66
Internal logger (outputs to textfile if configured).
Definition: Logger.h:18
Internal class encapsulating state and control of one spectrometer.
Definition: Spectrometer.h:37
Namespace encapsulating the internal implementation of WasatchVCPP; customers would not normally acce...
Definition: Driver.h:26