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

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

#include <VMXResourceConfig.h>

Inheritance diagram for EncoderConfig:
VMXResourceConfig

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 Member Functions

 EncoderConfig ()
 EncoderConfig default constructor; sets all values to defaults.
 
 EncoderConfig (EncoderEdge edge)
 EncoderConfig constructor; initializes values with the provided input parameters *. More...
 
EncoderEdge GetEncoderEdge ()
 Returns the configured EncoderEdge.
 
void SetEncoderEdge (EncoderEdge edge)
 Sets the configured EncoderEdge.
 
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

EncoderEdge edge_count
 
- Public Attributes inherited from VMXResourceConfig
VMXResourceType res_type
 

Detailed Description

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

Constructor & Destructor Documentation

◆ EncoderConfig()

EncoderConfig::EncoderConfig ( EncoderEdge  edge)
inline

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

Parameters
edgeThe EncoderEdge configuration to be used

Member Function Documentation

◆ Copy()

virtual bool EncoderConfig::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* EncoderConfig::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.


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