An abstract class for sensor and hardware interface parameters. More...
#include <bosch_drivers_parameters.hpp>
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. |
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.
bosch_drivers_common::Parameters::Parameters | ( | ) | [inline] |
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.
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.
virtual interface_protocol bosch_drivers_common::Parameters::getProtocol | ( | ) | [pure virtual] |
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.
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.