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

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

#include <VMXResourceConfig.h>

Inheritance diagram for InterruptConfig:
VMXResourceConfig

Public Types

enum  InterruptEdge { RISING, FALLING, BOTH }
 Specifies which signal edge will generate an interrupt.
 

Public Member Functions

 InterruptConfig ()
 InterruptConfig default constructor; sets all values to defaults. More...
 
 InterruptConfig (InterruptEdge edge, VMXIO_InterruptHandler p_handler, void *p_param)
 InterruptConfig constructor; initializes values with the provided input parameters *. More...
 
VMXIO_InterruptHandler GetHandler ()
 Retrieves the interrupt handler.
 
void * GetParam ()
 Retrieves the interrupt handler parameter.
 
InterruptEdge GetEdge ()
 Retrieves the signal edge which generates an interrupt.
 
void SetHandler (VMXIO_InterruptHandler p_handler)
 Sets the interrupt handler.
 
void SetParam (void *p_param)
 Sets the interrupt handler parameter.
 
void SetEdge (InterruptEdge edge)
 Sets the signal edge which generates the interrupt.
 
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

InterruptEdge edge
 
VMXIO_InterruptHandler p_handler
 
void * p_param
 
- Public Attributes inherited from VMXResourceConfig
VMXResourceType res_type
 

Detailed Description

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

Constructor & Destructor Documentation

◆ InterruptConfig() [1/2]

InterruptConfig::InterruptConfig ( )
inline

InterruptConfig default constructor; sets all values to defaults.

◆ InterruptConfig() [2/2]

InterruptConfig::InterruptConfig ( InterruptEdge  edge,
VMXIO_InterruptHandler  p_handler,
void *  p_param 
)
inline

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

Parameters
edgeThe signal edge which will generate an interrupt
p_handlerThe interrupt handler which will be invoked when an interrupt occurs
p_paramThe parameter to pass to the interrupt handler when an interrupt occurs; may be null

Member Function Documentation

◆ Copy()

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