00001 /********************************************************************* 00002 * 00003 * Software License Agreement (BSD License) 00004 * 00005 * Copyright (c) 2012, Robert Bosch LLC. 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 00012 * * Redistributions of source code must retain the above copyright 00013 * notice, this list of conditions and the following disclaimer. 00014 * * Redistributions in binary form must reproduce the above 00015 * copyright notice, this list of conditions and the following 00016 * disclaimer in the documentation and/or other materials provided 00017 * with the distribution. 00018 * * Neither the name of the Robert Bosch nor the names of its 00019 * contributors may be used to endorse or promote products derived 00020 * from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00023 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00025 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00026 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00027 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00028 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00029 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00030 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00031 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00032 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00033 * POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 *********************************************************************/ 00036 00037 /********************************************************************* 00038 * 00039 * Disclaimer 00040 * 00041 * This source code is not officially released or supported by Bosch Sensortec. 00042 * Please contact the listed authors with bugs or other modifications. 00043 * If you would like the official Bosch Sensortec drivers, please contact: 00044 * contact@bosch-sensortec.com 00045 * 00046 *********************************************************************/ 00047 00048 //\Author Joshua Vasquez and Philip Roan, Robert Bosch LLC 00049 00050 /* 00051 * This class contains a set of parameters that are specific to the 00052 * BMP085 sensor. The class inherits from a generic parent class of 00053 * parameters. I have listed the inherited parameters as comments 00054 * below. 00055 * The sensor parameters are stored as members of the class and 00056 * accessible to other classes through methods such as 00057 * "getSamplingMode()." 00058 */ 00059 00060 #ifndef BMP085_PARAMETERS_H_ 00061 #define BMP085_PARAMETERS_H_ 00062 00063 // ROS header for debugging outputs 00064 #include <ros/console.h> 00065 00066 #include <bosch_drivers_common.hpp> 00067 #include <bosch_drivers_parameters.hpp> 00068 #include <bosch_drivers_hardware_interface.hpp> 00069 00070 00071 using namespace bosch_drivers_common; 00072 00073 class BMP085Parameters: public Parameters 00074 { 00075 public: 00082 enum sampling_mode 00083 { 00087 ULTRA_LOW_POWER = 0, 00091 STANDARD = 1, 00095 HIGH = 2, 00099 ULTRA_HIGH_RESOLUTION = 3 00100 }; 00101 00106 BMP085Parameters(); 00111 ~BMP085Parameters(); 00112 00113 00121 bool setSamplingMode(sampling_mode mode); 00122 00130 bool setProtocol(interface_protocol protocol); 00131 00140 bool setFrequency(int frequency); 00141 00151 bool setPin( uint8_t pin); 00159 interface_protocol getProtocol(); 00160 00167 int getFrequency(); 00168 00179 int* getFlags(); 00180 00190 int getPin(); 00191 00201 sampling_mode getSamplingMode(); 00202 00203 00204 // Hardware_Interface hardware_; //|--> we inherit these members from the parameters class! 00205 // interface_protocol protocol_; //| 00206 // int frequency_; //| 00207 // int pin_; //| 00208 // int flags_; //| 00209 00216 sampling_mode oss_; 00217 00218 }; 00219 00220 #endif // BMP085_PARAMETERS_H_