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

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

#include <VMXResourceConfig.h>

Inheritance diagram for PWMGeneratorConfig:
VMXResourceConfig

Public Member Functions

 PWMGeneratorConfig ()
 PWMGeneratorConfig default constructor; sets all values to defaults. More...
 
 PWMGeneratorConfig (uint32_t frequency_hz)
 PWMGeneratorConfig constructor; initializes values with the provided input parameters *. More...
 
uint32_t GetFrequencyHz ()
 Returns the PWM Generators's frequency in Hz. More...
 
void SetFrequencyHz (uint32_t frequency_hz)
 Sets the PWM Generator's frequency in Hz. 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

uint32_t frequency_hz
 
- Public Attributes inherited from VMXResourceConfig
VMXResourceType res_type
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PWMGeneratorConfig() [1/2]

PWMGeneratorConfig::PWMGeneratorConfig ( )
inline

PWMGeneratorConfig default constructor; sets all values to defaults.

◆ PWMGeneratorConfig() [2/2]

PWMGeneratorConfig::PWMGeneratorConfig ( uint32_t  frequency_hz)
inline

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

Parameters
frequency_hzThe PWM Generator's frequency

Member Function Documentation

◆ Copy()

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

◆ GetFrequencyHz()

uint32_t PWMGeneratorConfig::GetFrequencyHz ( )
inline

Returns the PWM Generators's frequency in Hz.

This frequency represents the number of full cycles per second.

◆ SetFrequencyHz()

void PWMGeneratorConfig::SetFrequencyHz ( uint32_t  frequency_hz)
inline

Sets the PWM Generator's frequency in Hz.


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