VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
|
Contains the configuration data for a VMXResource whose VMXResourceType is Encoder. More...
#include <VMXResourceConfig.h>
Public Types | |
enum | EncoderEdge { x1, x2, x4 } |
Specifies whether the encoder counter is invoked on every edge, every other edge, or every fourth edge. | |
Public Types inherited from InputCaptureConfigBase | |
enum | CaptureChannel { CH1, CH2 } |
Public Member Functions | |
EncoderConfig () | |
EncoderConfig default constructor; sets all values to defaults. | |
EncoderConfig (EncoderEdge edge) | |
EncoderConfig constructor; initializes values with the provided input parameters *. More... | |
void | InternalInit (EncoderEdge edge) |
EncoderEdge | GetEncoderEdge () |
Returns the configured EncoderEdge. | |
void | SetEncoderEdge (EncoderEdge edge) |
Sets the configured EncoderEdge. | |
virtual size_t | GetSize () const |
virtual VMXResourceConfig * | GetCopy () 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 InputCaptureConfigBase | |
InputCaptureConfigBase (VMXResourceType resource_type) | |
void | SetStallTimeout20MsPeriods (uint8_t stall_timeout_20ms_periods) |
uint8_t | GetStallTimeout20MsPeriods () |
void | SetCaptureChannelFilter (CaptureChannel capture_channel, uint8_t filter) |
uint8_t | GetCaptureChannelFilter (CaptureChannel capture_channel) |
uint8_t | GetClosestCaptureChannelFilter (uint32_t period_nanoseconds) |
uint8_t | GetClosestCaptureCaptureFilterNumSamples (uint32_t num_samples) |
uint32_t | GetCaptureChannelFilterPeriodNanoseconds (uint8_t filter) |
uint32_t | GetCaptureChannelFilterNumSamples (uint8_t filter) |
Public Member Functions inherited from VMXResourceConfig | |
VMXResourceConfig (VMXResourceType res_type) | |
VMXResourceType | GetResourceType () const |
VMXResourceType which this configuration applies to. | |
Public Attributes | |
EncoderEdge | edge_count |
Public Attributes inherited from InputCaptureConfigBase | |
uint8_t | capture_channel_filter [2] |
uint8_t | stall_timeout_20ms_periods |
Public Attributes inherited from VMXResourceConfig | |
VMXResourceType | res_type |
Contains the configuration data for a VMXResource whose VMXResourceType is Encoder.
|
inline |
EncoderConfig constructor; initializes values with the provided input parameters *.
edge | The EncoderEdge configuration to be used |
|
inlinevirtual |
Copies the contents of the source VMXResourceConfig object into this object.
NOTE: The source object's VMXResourceType must match this object's VMXResourceType.
[in] | p_config | The source VMXResourceConfig object from which to copy configuration data into this object. |
Implements VMXResourceConfig.
|
inlinevirtual |
Instantiates a copy of the configuration data.
NOTE: The caller is responsible to delete the object returned from this method.
Implements VMXResourceConfig.