|
| ADXL345_SPI (SPI::Port port, Range range=kRange_2G) |
| Constructor. More...
|
|
| ADXL345_SPI (const ADXL345_SPI &)=delete |
|
ADXL345_SPI & | operator= (const ADXL345_SPI &)=delete |
|
virtual void | SetRange (Range range) override |
| {Common interface for setting the measuring range of an accelerometer.- Parameters
-
range | The maximum acceleration, positive or negative, that the accelerometer will measure. Not all accelerometers support all ranges. |
}
|
|
virtual double | GetX () override |
| {Common interface for getting the x axis acceleration.- Returns
- The acceleration along the x axis in g-forces
}
|
|
virtual double | GetY () override |
| {Common interface for getting the y axis acceleration.- Returns
- The acceleration along the y axis in g-forces
}
|
|
virtual double | GetZ () override |
| {Common interface for getting the z axis acceleration.- Returns
- The acceleration along the z axis in g-forces
}
|
|
virtual double | GetAcceleration (Axes axis) |
| Get the acceleration of one axis in Gs. More...
|
|
virtual AllAxes | GetAccelerations () |
| Get the acceleration of all axes in Gs. More...
|
|
virtual std::string | GetSmartDashboardType () const override |
|
virtual void | InitTable (std::shared_ptr< ITable > subtable) override |
| Initializes a table for this sendable object. More...
|
|
virtual void | UpdateTable () override |
| Update the table for this sendable object with the latest values.
|
|
virtual std::shared_ptr< ITable > | GetTable () const override |
|
virtual void | StartLiveWindowMode () override |
| Start having this sendable object automatically respond to value changes reflect the value on the table.
|
|
virtual void | StopLiveWindowMode () override |
| Stop having this sendable object automatically respond to value changes.
|
|
|
| SPI (Port SPIport) |
| Constructor. More...
|
|
virtual | ~SPI () |
| Destructor.
|
|
| SPI (const SPI &)=delete |
|
SPI & | operator= (const SPI &)=delete |
|
void | SetClockRate (double hz) |
| Configure the rate of the generated clock signal. More...
|
|
void | SetMSBFirst () |
| Configure the order that bits are sent and received on the wire to be most significant bit first.
|
|
void | SetLSBFirst () |
| Configure the order that bits are sent and received on the wire to be least significant bit first.
|
|
void | SetSampleDataOnFalling () |
| Configure that the data is stable on the falling edge and the data changes on the rising edge.
|
|
void | SetSampleDataOnRising () |
| Configure that the data is stable on the rising edge and the data changes on the falling edge.
|
|
void | SetClockActiveLow () |
| Configure the clock output line to be active low. More...
|
|
void | SetClockActiveHigh () |
| Configure the clock output line to be active high. More...
|
|
void | SetChipSelectActiveHigh () |
| Configure the chip select line to be active high.
|
|
void | SetChipSelectActiveLow () |
| Configure the chip select line to be active low.
|
|
virtual int32_t | Write (uint8_t *data, uint8_t size) |
| Write data to the slave device. More...
|
|
virtual int32_t | Read (bool initiate, uint8_t *dataReceived, uint8_t size) |
| Read a word from the receive FIFO. More...
|
|
virtual int32_t | Transaction (uint8_t *dataToSend, uint8_t *dataReceived, uint8_t size) |
| Perform a simultaneous read/write transaction with the device. More...
|
|
void | InitAccumulator (double period, uint32_t cmd, uint8_t xfer_size, uint32_t valid_mask, uint32_t valid_value, uint8_t data_shift, uint8_t data_size, bool is_signed, bool big_endian) |
| Initialize the accumulator. More...
|
|
void | FreeAccumulator () |
| Frees the accumulator.
|
|
void | ResetAccumulator () |
| Resets the accumulator to zero.
|
|
void | SetAccumulatorCenter (int32_t center) |
| Set the center value of the accumulator. More...
|
|
void | SetAccumulatorDeadband (int32_t deadband) |
| Set the accumulator's deadband.
|
|
int32_t | GetAccumulatorLastValue () const |
| Read the last value read by the accumulator engine.
|
|
int64_t | GetAccumulatorValue () const |
| Read the accumulated value. More...
|
|
uint32_t | GetAccumulatorCount () const |
| Read the number of accumulated values. More...
|
|
double | GetAccumulatorAverage () const |
| Read the average of the accumulated value. More...
|
|
void | GetAccumulatorOutput (int64_t &value, uint32_t &count) const |
| Read the accumulated value and the number of accumulated values atomically. More...
|
|
void | AddToSingletonList () |
| Add sensor to the singleton list. More...
|
|
| SensorBase () |
| Creates an instance of the sensor base and gets an FPGA handle.
|
|
| SensorBase (const SensorBase &)=delete |
|
SensorBase & | operator= (const SensorBase &)=delete |
|
| ErrorBase (const ErrorBase &)=delete |
|
ErrorBase & | operator= (const ErrorBase &)=delete |
|
virtual Error & | GetError () |
| Retrieve the current error. More...
|
|
virtual const Error & | GetError () const |
|
virtual void | SetErrnoError (llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. More...
|
|
virtual void | SetImaqError (int success, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const |
| Set the current error information associated from the nivision Imaq API. More...
|
|
virtual void | SetError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | SetWPIError (llvm::StringRef errorMessage, Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | CloneError (const ErrorBase &rhs) const |
|
virtual void | ClearError () const |
| Clear the current error information associated with this sensor.
|
|
virtual bool | StatusIsFatal () const |
| Check if the current error code represents a fatal error. More...
|
|
static void | DeleteSingletons () |
| Delete all the singleton classes on the list. More...
|
|
static uint32_t | GetDefaultSolenoidModule () |
|
static bool | CheckSolenoidModule (uint8_t moduleNumber) |
| Check that the solenoid module number is valid. More...
|
|
static bool | CheckDigitalChannel (uint32_t channel) |
| Check that the digital channel number is valid. More...
|
|
static bool | CheckRelayChannel (uint32_t channel) |
| Check that the digital channel number is valid. More...
|
|
static bool | CheckPWMChannel (uint32_t channel) |
| Check that the digital channel number is valid. More...
|
|
static bool | CheckAnalogInput (uint32_t channel) |
| Check that the analog input number is value. More...
|
|
static bool | CheckAnalogOutput (uint32_t channel) |
| Check that the analog output number is valid. More...
|
|
static bool | CheckSolenoidChannel (uint32_t channel) |
| Verify that the solenoid channel number is within limits. More...
|
|
static bool | CheckPDPChannel (uint32_t channel) |
| Verify that the power distribution channel number is within limits. More...
|
|
static void | SetGlobalError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) |
|
static void | SetGlobalWPIError (llvm::StringRef errorMessage, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) |
|
static Error & | GetGlobalError () |
| Retrieve the current global error.
|
|
uint8_t | m_port |
|
bool | m_msbFirst = false |
|
bool | m_sampleOnTrailing = false |
|
bool | m_clk_idle_high = false |
|
Error | m_error |
|
ADXL345 Accelerometer on SPI.
This class allows access to an Analog Devices ADXL345 3-axis accelerometer via SPI. This class assumes the sensor is wired in 4-wire SPI mode.