TOBI Interface A
0.1
|
00001 /* 00002 This file is part of the TOBI Interface A (TiA) library. 00003 00004 Commercial Usage 00005 Licensees holding valid Graz University of Technology Commercial 00006 licenses may use this file in accordance with the Graz University 00007 of Technology Commercial License Agreement provided with the 00008 Software or, alternatively, in accordance with the terms contained in 00009 a written agreement between you and Graz University of Technology. 00010 00011 -------------------------------------------------- 00012 00013 GNU Lesser General Public License Usage 00014 Alternatively, this file may be used under the terms of the GNU Lesser 00015 General Public License version 3.0 as published by the Free Software 00016 Foundation and appearing in the file lgpl.txt included in the 00017 packaging of this file. Please review the following information to 00018 ensure the GNU General Public License version 3.0 requirements will be 00019 met: http://www.gnu.org/copyleft/lgpl.html. 00020 00021 In case of GNU Lesser General Public License Usage ,the TiA library 00022 is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 GNU General Public License for more details. 00026 00027 You should have received a copy of the GNU Lesser General Public License 00028 along with the TiA library. If not, see <http://www.gnu.org/licenses/>. 00029 00030 Copyright 2010 Graz University of Technology 00031 Contact: TiA@tobi-project.org 00032 */ 00033 00045 #ifndef CONSTANTS_H 00046 #define CONSTANTS_H 00047 00048 #include <string> 00049 #include <map> 00050 00051 #include <boost/cstdint.hpp> 00052 00053 #include "defines.h" 00054 00055 namespace tia 00056 { 00071 class Constants 00072 { 00073 00074 public: 00083 Constants(); 00084 00089 virtual ~Constants() { } 00090 00091 // /** 00092 // * @brief Maps given strings "on" or "off" to boolean values 0 or 1. 00093 // * @param[in] s String to be checked. 00094 // * @return Bool 00095 // * @throw ticpp::Exception thrown if std::string neither on or off (or 0/1)! 00096 // * 00097 // */ 00098 // bool equalsOnOrOff(const std::string& s); 00099 // 00100 // /** 00101 // * @brief Maps given std::strings "yes" or "no" to boolean values 0 or 1. 00102 // * @param[in] s std::string to be checked. 00103 // * @return Bool 00104 // * @throw ticpp::Exception thrown if std::string neither yes or no (or 0/1)! 00105 // * 00106 // */ 00107 // bool equalsYesOrNo(const std::string& s); 00108 // 00109 // /** 00110 // * @brief Checks, if the given std::string equals "master". 00111 // * @param[in] s std::string to be checked. 00112 // * @return Bool 00113 // */ 00114 // bool equalsMaster(const std::string& s); 00115 // 00116 // /** 00117 // * @brief Checks, if the given std::string equals "slave". 00118 // * @param[in] s std::string to be checked. 00119 // * @return Bool 00120 // */ 00121 // bool equalsSlave(const std::string& s); 00122 // 00123 // /** 00124 // * @brief Checks, if the given std::string equals "aperiodic". 00125 // * @param[in] s std::string to be checked. 00126 // * @return Bool 00127 // */ 00128 // bool equalsAperiodic(const std::string& s); 00129 00130 // /** 00131 // * @brief Maps a given std::string to the specific code of this filter at the the g.USBamp. 00132 // * @param[in] s std::string to be checked. 00133 // * @return FilterID 00134 // * @throw ticpp::Exception thrown if filter name not found! 00135 // * 00136 // */ 00137 // int getUSBampFilterType(const std::string& s); 00138 // 00139 // /** 00140 // * @brief Maps a given std::string to the specific OP_MODE of the g.USBamp. 00141 // * @param[in] s std::string to be checked. 00142 // * @return OP_MODE std::string 00143 // * @throw ticpp::Exception thrown if OP_MODE name not found! 00144 // * 00145 // */ 00146 // std::string getUSBampOpMode(const std::string& s); 00147 // 00148 // /** 00149 // * @brief Maps a given std::string to the specific g.USBamp channels group (naming on the front of the g.USBamp). 00150 // * @param[in] s std::string to be checked. 00151 // * @return block_id 00152 // * @throw ticpp::Exception thrown if channel group naming not found! 00153 // * 00154 // */ 00155 // int getUSBampBlockNr(const std::string& s); 00156 00164 boost::uint32_t getSignalFlag(const std::string& s); 00165 00173 std::string getSignalName(const boost::uint32_t& flag); 00174 00175 //----------------------------------------------- 00176 00177 public: 00178 //xml tags 00179 static const std::string tobi; 00180 00181 static const std::string subject; 00182 static const std::string s_id; 00183 static const std::string s_first_name; 00184 static const std::string s_surname; 00185 static const std::string s_sex; 00186 static const std::string s_birthday; 00187 00188 static const std::string ss; 00189 static const std::string ss_ctl_port; 00190 static const std::string ss_udp_bc_addr; 00191 static const std::string ss_udp_port; 00192 00193 static const std::string ss_tid_port; 00194 00195 static const std::string ss_store_data; 00196 static const std::string ss_filename; 00197 static const std::string ss_filetype; 00198 static const std::string ss_filepath; 00199 static const std::string ss_filepath_default; 00200 static const std::string ss_file_overwrite; 00201 static const std::string ss_file_overwrite_default; 00202 00203 static const std::string file_reader; 00204 // filepath, name and type from store_data 00205 static const std::string fr_speedup; 00206 static const std::string fr_stop; 00207 00208 //Mouse specific start 00209 // static const std::string hw_vid; 00210 // static const std::string hw_pid; 00211 // static const std::string usb_port; 00212 //Mouse specific end 00213 00214 private: 00219 std::map<std::string, boost::uint32_t> signaltypes; 00220 }; 00221 00222 } // Namespace tobiss 00223 00224 00225 #endif // CONSTANTS_H 00226 00227 //-----------------------------------------------------------------------------