Public Types | Public Member Functions | Public Attributes
BMP085Parameters Class Reference

#include <bmp085_parameters.hpp>

Inheritance diagram for BMP085Parameters:
Inheritance graph
[legend]

List of all members.

Public Types

enum  sampling_mode {
  ULTRA_LOW_POWER = 0, ULTRA_LOW_POWER = 0, STANDARD = 1, STANDARD = 1,
  HIGH = 2, HIGH = 2, ULTRA_HIGH_RESOLUTION = 3, ULTRA_HIGH_RESOLUTION = 3
}
 configurable sampling mode. Higher resolution settings will result in a longer conversion time on the sensor before the value can be read. More...

Public Member Functions

 BMP085Parameters ()
 constructor
int * getFlags ()
 an unecessary method, since the I2C protocol does not need any additional information (passed down as flags) to be read by a generic hardware interface. However, this method must be implemented since it is inheritted from a generic parameters class.
int getFrequency ()
 returns the communication frequency that the sensor has been set to be read from the generic hardware interface.
int getPin ()
 an unecessary method, since the inheritted pin_ value is only relevant to SPI and GPIO. However, this method must be implemented since it is inheritted from a generic parameters class.
interface_protocol getProtocol ()
 returns the interface protocol that this sensor is using to transmit data.
sampling_mode getSamplingMode ()
 returns the sampling_mode specified with the setSamplingMode(mode) method (or the default, STANDARD, if the user did not specifiy a sampling mode). This value is needed to perform the correct calculation from the raw sensor values.
bool setFrequency (int frequency)
 set the frequency at which the I2C communication will take place on the hardware.
bool setPin (uint8_t pin)
 an unecessary method, since pin is an SPI parameter only, and the sensor only communicates via the I2C protocol. However, it must be implemented since it is inheritted from a generic parameters class.
bool setProtocol (interface_protocol protocol)
bool setSamplingMode (sampling_mode mode)
 set the sensor's sampling mode
 ~BMP085Parameters ()

Public Attributes

sampling_mode oss_
 a class member used to store the user-defined sampling mode so that it can be passed to the driver with the getSamplingMode() method.

Detailed Description

Definition at line 73 of file bmp085_parameters.hpp.


Member Enumeration Documentation

configurable sampling mode. Higher resolution settings will result in a longer conversion time on the sensor before the value can be read.

Enumerator:
ULTRA_LOW_POWER 
ULTRA_LOW_POWER 
STANDARD 
STANDARD 
HIGH 
HIGH 
ULTRA_HIGH_RESOLUTION 
ULTRA_HIGH_RESOLUTION 

Reimplemented in BMP085.

Definition at line 82 of file bmp085_parameters.hpp.


Constructor & Destructor Documentation

constructor

destructor

Definition at line 56 of file bmp085_parameters.cpp.

Definition at line 69 of file bmp085_parameters.cpp.


Member Function Documentation

int * BMP085Parameters::getFlags ( ) [virtual]

an unecessary method, since the I2C protocol does not need any additional information (passed down as flags) to be read by a generic hardware interface. However, this method must be implemented since it is inheritted from a generic parameters class.

Note:
user does not need to call this method. It is a dummy.
Returns:
the memory address of the class value: flags_

Implements bosch_drivers_common::Parameters.

Definition at line 144 of file bmp085_parameters.cpp.

int BMP085Parameters::getFrequency ( ) [virtual]

returns the communication frequency that the sensor has been set to be read from the generic hardware interface.

Returns:
an int, representing the frequency.

Implements bosch_drivers_common::Parameters.

Definition at line 119 of file bmp085_parameters.cpp.

int BMP085Parameters::getPin ( ) [virtual]

an unecessary method, since the inheritted pin_ value is only relevant to SPI and GPIO. However, this method must be implemented since it is inheritted from a generic parameters class.

Note:
user does not need to call this method. It is a dummy.
Returns:
pin_

Implements bosch_drivers_common::Parameters.

Definition at line 136 of file bmp085_parameters.cpp.

returns the interface protocol that this sensor is using to transmit data.

Returns:
an interface_protocol enumerated datatype from bosch_drivers_common.

Implements bosch_drivers_common::Parameters.

Definition at line 111 of file bmp085_parameters.cpp.

returns the sampling_mode specified with the setSamplingMode(mode) method (or the default, STANDARD, if the user did not specifiy a sampling mode). This value is needed to perform the correct calculation from the raw sensor values.

Returns:
a sampling_mode enumerated datatype.

Definition at line 152 of file bmp085_parameters.cpp.

bool BMP085Parameters::setFrequency ( int  frequency) [virtual]

set the frequency at which the I2C communication will take place on the hardware.

Parameters:
frequencycurrently only 100000 and 400000 are supported by all generic hardware interfaces.
Returns:
a boolean indicating success.

Implements bosch_drivers_common::Parameters.

Definition at line 102 of file bmp085_parameters.cpp.

bool BMP085Parameters::setPin ( uint8_t  pin) [virtual]

an unecessary method, since pin is an SPI parameter only, and the sensor only communicates via the I2C protocol. However, it must be implemented since it is inheritted from a generic parameters class.

Note:
user does not need to call this method. It is a dummy.
Returns:
always true

Implements bosch_drivers_common::Parameters.

Definition at line 127 of file bmp085_parameters.cpp.

Parameters:
protocolthe user-requested interface protocol.
Note:
this method must be implemeted since it is inheritted. The user does not need to call it, however.
Returns:
true if the user requests I2C.

Definition at line 85 of file bmp085_parameters.cpp.

set the sensor's sampling mode

Parameters:
modethe user-requested sampling mode, one of four choices given by the enumerated datatype sampling_mode.
Returns:
a boolean (always true because of the sampling_mode enum)

Definition at line 76 of file bmp085_parameters.cpp.


Member Data Documentation

a class member used to store the user-defined sampling mode so that it can be passed to the driver with the getSamplingMode() method.

Definition at line 216 of file bmp085_parameters.hpp.


The documentation for this class was generated from the following files:


bmp085_driver
Author(s): Joshua Vasquez, Philip Roan. Maintained by Philip Roan
autogenerated on Mon Oct 6 2014 10:10:03