VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
Public Member Functions | Public Attributes | List of all members
AccumulatorConfig Struct Reference

Contains the configuration data for a VMXResource whose VMXResourceType is Accumulator. More...

#include <VMXResourceConfig.h>

Inheritance diagram for AccumulatorConfig:
VMXResourceConfig

Public Member Functions

 AccumulatorConfig ()
 AccumulatorConfig default constructor; sets all values to defaults.
 
 AccumulatorConfig (uint8_t num_oversample_bits, uint8_t num_average_bits)
 AccumulatorConfig constructor; initializes values with the provided input parameters *. More...
 
uint8_t GetNumAverageBits ()
 Returns the configured number of average bits. More...
 
uint8_t GetNumOversampleBits ()
 Returns the configured number of oversample bits. More...
 
void SetNumAverageBits (uint8_t num_average_bits)
 Sets the configured number of average bits. More...
 
void SetNumOversampleBits (uint8_t num_oversample_bits)
 Sets the configured number of oversample bits. More...
 
virtual VMXResourceConfigGetCopy () const
 Instantiates a copy of the configuration data. More...
 
virtual bool Copy (const VMXResourceConfig *p_config)
 Copies the contents of the source VMXResourceConfig object into this object. More...
 
- Public Member Functions inherited from VMXResourceConfig
 VMXResourceConfig (VMXResourceType res_type)
 
VMXResourceType GetResourceType () const
 VMXResourceType which this configuration applies to.
 

Public Attributes

uint8_t num_average_bits
 
uint8_t num_oversample_bits
 
- Public Attributes inherited from VMXResourceConfig
VMXResourceType res_type
 

Detailed Description

Contains the configuration data for a VMXResource whose VMXResourceType is Accumulator.

Constructor & Destructor Documentation

◆ AccumulatorConfig()

AccumulatorConfig::AccumulatorConfig ( uint8_t  num_oversample_bits,
uint8_t  num_average_bits 
)
inline

AccumulatorConfig constructor; initializes values with the provided input parameters *.

Parameters
num_oversample_bitsThe configured number of oversample bits
num_average_bitsThe configured number of average bits

Member Function Documentation

◆ Copy()

virtual bool AccumulatorConfig::Copy ( const VMXResourceConfig p_config)
inlinevirtual

Copies the contents of the source VMXResourceConfig object into this object.

NOTE: The source object's VMXResourceType must match this object's VMXResourceType.

Parameters
[in]p_configThe source VMXResourceConfig object from which to copy configuration data into this object.

Implements VMXResourceConfig.

◆ GetCopy()

virtual VMXResourceConfig* AccumulatorConfig::GetCopy ( ) const
inlinevirtual

Instantiates a copy of the configuration data.

NOTE: The caller is responsible to delete the object returned from this method.

Implements VMXResourceConfig.

◆ GetNumAverageBits()

uint8_t AccumulatorConfig::GetNumAverageBits ( )
inline

Returns the configured number of average bits.

Each averaged value is comprised of 2^num_average_bits samples.

◆ GetNumOversampleBits()

uint8_t AccumulatorConfig::GetNumOversampleBits ( )
inline

Returns the configured number of oversample bits.

◆ SetNumAverageBits()

void AccumulatorConfig::SetNumAverageBits ( uint8_t  num_average_bits)
inline

Sets the configured number of average bits.

◆ SetNumOversampleBits()

void AccumulatorConfig::SetNumOversampleBits ( uint8_t  num_oversample_bits)
inline

Sets the configured number of oversample bits.


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