rohdeschwarz  0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
paths.hpp
Go to the documentation of this file.
1 #ifndef ROHDESCHWARZ_BUSSES_VISA_PATHS_HPP
2 #define ROHDESCHWARZ_BUSSES_VISA_PATHS_HPP
3 
4 
5 // std lib
6 #include <string>
7 #include <vector>
8 
9 
10 // boost
11 #include "boost/predef.h"
12 
13 
15 {
16 
17 
18 // define visa paths for current os
19 
20 
21 #if BOOST_OS_WINDOWS
22 
23 // notes:
24 // - On windows visa is in path and can be loaded by filename
25 // - try 64 bit dll first; if this fails, try 32 bit
26 const std::vector<std::string> VISA_PATHS
27 {
28  "visa64.dll",
29  "visa32.dll"
30 };
31 
32 
33 #elif BOOST_OS_MACOS
34 
35 const std::vector<std::string> VISA_PATHS
36 {
37  "/Library/Frameworks/RsVisa.framework/Versions/Current/RsVisa/librsvisa.dylib"
38 };
39 
40 
41 #elif BOOST_OS_LINUX
42 
43 const std::vector<std::string> VISA_PATHS
44 {
45  "/usr/local/bin/libvisa.so"
46 };
47 
48 
49 #else
50 
51 // operating system is not supported
52 # error operating system is not supported; only windows, macos, and linux are supported
53 
54 
55 #endif //
56 
57 
58 } // rohdeschwarz::busses::visa
59 #endif // ROHDESCHWARZ_BUSSES_VISA_PATHS_HPP