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
AnalogTriggerConfig Struct Reference

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

#include <VMXResourceConfig.h>

Inheritance diagram for AnalogTriggerConfig:
VMXResourceConfig

Public Types

enum  AnalogTriggerMode { STATE, RISING_EDGE_PULSE, FALLING_EDGE_PULSE }
 Specifies what conditions cause an AnalogTrigger event. More...
 

Public Member Functions

 AnalogTriggerConfig ()
 Default constructor; sets all values to defaults.
 
 AnalogTriggerConfig (uint16_t threshold_high, uint16_t threshold_low, AnalogTriggerMode mode)
 AccumulatorConfig constructor; initializes values with the provided input parameters. More...
 
uint16_t GetThresholdHigh ()
 Returns the high threshold, which is a 12-bit value (0-4095) representing the lowest-possible voltage of a high signal.
 
uint16_t GetThresholdLow ()
 Returns the low threshold, which is a 12-bit value (0-4095) representing the highest-possible voltage of a low signal.
 
AnalogTriggerMode GetMode ()
 Returns the configured AnalogTriggerMode.
 
void SetThresholdHigh (uint16_t threshold_high)
 Sets the configured high threshold.
 
void SetThresholdLow (uint16_t threshold_low)
 Sets the configured low threshold.
 
void SetMode (AnalogTriggerMode mode)
 Sets the configured AnalogTriggerMode.
 
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

uint16_t threshold_high
 
uint16_t threshold_low
 
AnalogTriggerMode mode
 
- Public Attributes inherited from VMXResourceConfig
VMXResourceType res_type
 

Detailed Description

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

Member Enumeration Documentation

◆ AnalogTriggerMode

Specifies what conditions cause an AnalogTrigger event.

Enumerator
STATE 

Analog Trigger Events are level-triggered (occurring as long as the signal is high)

RISING_EDGE_PULSE 

Analog Trigger Events occur when a low-to-high transition is detected.

FALLING_EDGE_PULSE 

Analog Trigger Events occur when a high-to-low transition is detected.

Constructor & Destructor Documentation

◆ AnalogTriggerConfig()

AnalogTriggerConfig::AnalogTriggerConfig ( uint16_t  threshold_high,
uint16_t  threshold_low,
AnalogTriggerMode  mode 
)
inline

AccumulatorConfig constructor; initializes values with the provided input parameters.

Parameters
threshold_highThe high threshold
threshold_lowThe low threshold
mode

Member Function Documentation

◆ Copy()

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