Public Member Functions | Public Attributes
bosch_drivers_common::Parameters Class Reference

An abstract class for sensor and hardware interface parameters. More...

#include <bosch_drivers_parameters.hpp>

List of all members.

Public Member Functions

virtual int * getFlags ()=0
 Retreive the flags for communication between hardware interface and sensor.
virtual int getFrequency ()=0
 Retrieve the frequency at which the sensor data transmissions take place.
virtual int getPin ()=0
 Retrieve the hardware pin that the sensor's chip-select pin is connected to.
virtual interface_protocol getProtocol ()=0
 Retrieve the communication protocol.
 Parameters ()
virtual bool setFrequency (int frequency)=0
 Sets the frequency of the sensor data transmissions between the hardware interface and the sensor.
virtual bool setPin (uint8_t pin)=0
 Alert software driver to which pin the sensor's chip-select pin is connected to.
virtual bool setProtocol (interface_protocol protocol_name)=0
 Select the protocol that both the hardware interface and sensor use to communicate.
virtual ~Parameters ()

Public Attributes

int flags_
 An integer containing bit-order, mode, and the spi chip-select pin.
int frequency_
 The frequency at which data is being sent on the particular protocol.
int pin_
 the pin on the hardware interface which the sensor has connected it's chip-select line.
interface_protocol protocol_
 The protocol which the sensor is configured to transmit data.

Detailed Description

An abstract class for sensor and hardware interface parameters.

A specific parameters class for a particular sensor will inherit this class.

Definition at line 51 of file bosch_drivers_parameters.hpp.


Constructor & Destructor Documentation

Definition at line 54 of file bosch_drivers_parameters.hpp.

virtual bosch_drivers_common::Parameters::~Parameters ( ) [inline, virtual]

Definition at line 55 of file bosch_drivers_parameters.hpp.


Member Function Documentation

virtual int* bosch_drivers_common::Parameters::getFlags ( ) [pure virtual]

Retreive the flags for communication between hardware interface and sensor.

virtual int bosch_drivers_common::Parameters::getFrequency ( ) [pure virtual]

Retrieve the frequency at which the sensor data transmissions take place.

virtual int bosch_drivers_common::Parameters::getPin ( ) [pure virtual]

Retrieve the hardware pin that the sensor's chip-select pin is connected to.

Relevant to SPI mode only.

Retrieve the communication protocol.

virtual bool bosch_drivers_common::Parameters::setFrequency ( int  frequency) [pure virtual]

Sets the frequency of the sensor data transmissions between the hardware interface and the sensor.

virtual bool bosch_drivers_common::Parameters::setPin ( uint8_t  pin) [pure virtual]

Alert software driver to which pin the sensor's chip-select pin is connected to.

Relevant to SPI mode only.

virtual bool bosch_drivers_common::Parameters::setProtocol ( interface_protocol  protocol_name) [pure virtual]

Select the protocol that both the hardware interface and sensor use to communicate.

interface_protocol is an enumerated datatype from bosch_drivers_common.


Member Data Documentation

An integer containing bit-order, mode, and the spi chip-select pin.

Packing this information into an 8-bit set of flags minimizes the number of transmissions between the computer and the hardware interface.

Definition at line 82 of file bosch_drivers_parameters.hpp.

The frequency at which data is being sent on the particular protocol.

Definition at line 67 of file bosch_drivers_parameters.hpp.

the pin on the hardware interface which the sensor has connected it's chip-select line.

This parameter is only relevant for sensors that support the SPI protocol.

Definition at line 74 of file bosch_drivers_parameters.hpp.

The protocol which the sensor is configured to transmit data.

Some sensors support multiple protocols. See bma180.

Definition at line 55 of file bosch_drivers_parameters.hpp.


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


bosch_drivers_common
Author(s): Joshua Vasquez, Philip Roan. Maintained by Philip Roan
autogenerated on Sat Dec 28 2013 16:48:48