Classes | Enumerations | Variables
bosch_drivers_common Namespace Reference

Classes

class  bosch_hardware_interface
 Abstract base class for interfaces between sensors and computers. More...
class  Parameters
 An abstract class for sensor and hardware interface parameters. More...
class  sensor_driver
 An abstract class for all Bosch sensor drivers. More...

Enumerations

enum  encoder_control { CREATE, DESTROY, SET_POSITION }
 encoder Constants More...
enum  gpio_input_mode { FLOATING, PULLUP, PULLDOWN }
 GPIO Constants. More...
enum  Hardware_Interface { Sub20, Arduino, ArduinoROSSerial, Gumstix }
 the name of the compatible hardware devices that the sensors can implement as a generic hardware interface. More...
enum  interface_protocol {
  I2C, SPI, GPIO, RS232,
  RS485, ETHERNET, ETHERCAT, CAN,
  JTAG, PROFIBUS, MODBUS, USB,
  PWM, ENCODER, ADCONVERTER
}
 the name of the protocol that both the hardware interface and the sensor are using to transmit data. More...
enum  motor_drive_mode { DRIVE, FREE_RUNNING, BRAKE }
 Motor Constants. More...

Variables

static const uint8_t LSB_FIRST = 0
static const uint8_t MSB_FIRST = 1
static const uint8_t NULL_DEVICE = 0xFF
static const uint8_t SPI_CLOCK_DIV_128 = 0x03
static const uint8_t SPI_CLOCK_DIV_16 = 0x01
static const uint8_t SPI_CLOCK_DIV_2 = 0x04
static const uint8_t SPI_CLOCK_DIV_32 = 0x06
static const uint8_t SPI_CLOCK_DIV_4 = 0x00
static const uint8_t SPI_CLOCK_DIV_64 = 0x02
static const uint8_t SPI_CLOCK_DIV_8 = 0x05
static const uint8_t SPI_MODE_0 = 0x00
 SPI Constants.
static const uint8_t SPI_MODE_1 = 0x01
static const uint8_t SPI_MODE_2 = 0x02
static const uint8_t SPI_MODE_3 = 0x03
static const uint8_t SPI_READ_FLAG = 7
 The following members are the relevant bitflag offsets necessary for prompting the sensor for an SPI read or write.
static const uint8_t SPI_WRITE_FLAG = 7

Detailed Description

Namespace common to all Bosch drivers

These values are used repeatedly by multiple files, so I've encapsulated them into their own namespace. The sensor_driver class, parameters class, and bosch_hardware_interface class are in this namespace.


Enumeration Type Documentation

encoder Constants

Enumerator:
CREATE 
DESTROY 
SET_POSITION 

Definition at line 132 of file bosch_drivers_common.hpp.

GPIO Constants.

Enumerator:
FLOATING 
PULLUP 
PULLDOWN 

Definition at line 120 of file bosch_drivers_common.hpp.

the name of the compatible hardware devices that the sensors can implement as a generic hardware interface.

Enumerator:
Sub20 
Arduino 
ArduinoROSSerial 
Gumstix 

Definition at line 58 of file bosch_drivers_common.hpp.

the name of the protocol that both the hardware interface and the sensor are using to transmit data.

This enumeration is used on the Arduino and on the host PC. To optimize the arduino code, compile with the -fshort-enums flag.

Enumerator:
I2C 
SPI 
GPIO 
RS232 
RS485 
ETHERNET 
ETHERCAT 
CAN 
JTAG 
PROFIBUS 
MODBUS 
USB 
PWM 
ENCODER 
ADCONVERTER 

Definition at line 67 of file bosch_drivers_common.hpp.

Motor Constants.

Enumerator:
DRIVE 
FREE_RUNNING 
BRAKE 

Definition at line 126 of file bosch_drivers_common.hpp.


Variable Documentation

const uint8_t bosch_drivers_common::LSB_FIRST = 0 [static]

Definition at line 86 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::MSB_FIRST = 1 [static]

Definition at line 85 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::NULL_DEVICE = 0xFF [static]

Definition at line 114 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_128 = 0x03 [static]

Definition at line 94 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_16 = 0x01 [static]

Definition at line 91 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_2 = 0x04 [static]

Definition at line 88 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_32 = 0x06 [static]

Definition at line 92 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_4 = 0x00 [static]

Definition at line 89 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_64 = 0x02 [static]

Definition at line 93 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_CLOCK_DIV_8 = 0x05 [static]

Definition at line 90 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_MODE_0 = 0x00 [static]

SPI Constants.

These values are used to set the SPI mode and frequency. Information on SPI modes can be found on the wikipedia page for SPI. The SPI frequency is determined by the clock frequency of the hardware interface and the clock divider value. See the datasheet for the specific hardware interface for additional details. The values here are optimized for use with Arduinos.

Definition at line 80 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_MODE_1 = 0x01 [static]

Definition at line 81 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_MODE_2 = 0x02 [static]

Definition at line 82 of file bosch_drivers_common.hpp.

const uint8_t bosch_drivers_common::SPI_MODE_3 = 0x03 [static]

Definition at line 83 of file bosch_drivers_common.hpp.

static const uint8_t bosch_drivers_common::SPI_READ_FLAG = 7 [static]

The following members are the relevant bitflag offsets necessary for prompting the sensor for an SPI read or write.

SPI Read/Write Flags

Note:
These flags are prepended to the register address.
These flags are only relevant to sensors that implement SPI communication.

Definition at line 109 of file bosch_drivers_common.hpp.

static const uint8_t bosch_drivers_common::SPI_WRITE_FLAG = 7 [static]

Definition at line 110 of file bosch_drivers_common.hpp.



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