Public Member Functions | Public Attributes | Private Attributes
um6::Accessor_ Class Reference

#include <registers.h>

Inheritance diagram for um6::Accessor_:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Accessor_ (Registers *registers, uint8_t register_index, uint8_t register_width, uint8_t array_length)
void * raw () const

Public Attributes

const uint8_t index
const uint16_t length
const uint8_t width

Private Attributes

Registersregisters_

Detailed Description

This class provides an accessor of fields contained in one or more consecutive UM6 registers. Each register is nominally a uint32_t, but XYZ vectors are stored as a pair of int16_t values in one register and one in the following register. Other values are stored as int32_t representation or float32s.

This class takes care of the necessary transformations to simplify the actual "business logic" of the driver.

Definition at line 93 of file registers.h.


Constructor & Destructor Documentation

um6::Accessor_::Accessor_ ( Registers registers,
uint8_t  register_index,
uint8_t  register_width,
uint8_t  array_length 
) [inline]

Definition at line 96 of file registers.h.


Member Function Documentation

void * um6::Accessor_::raw ( ) const

This is ridiculous to have a whole source file for this tiny implementation, but it's necessary to resolve the otherwise circular dependency between the Registers and Accessor classes, when Registers contains Accessor instances and Accessor is a template class.

Definition at line 39 of file registers.cpp.


Member Data Documentation

const uint8_t um6::Accessor_::index

Number/address of the register in the array of uint32s which is shared with the UM6 firmware.

Definition at line 107 of file registers.h.

const uint16_t um6::Accessor_::length

Length of how many sub-register fields comprise this accessor. Not required to stay within the bounds of a single register.

Definition at line 116 of file registers.h.

Definition at line 119 of file registers.h.

const uint8_t um6::Accessor_::width

Width of the sub-register field, in bytes, either 2 or 4.

Definition at line 111 of file registers.h.


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


um6
Author(s): Mike Purvis
autogenerated on Fri Feb 12 2016 00:25:31