HapticLib  0.7
Haptic Feedback Library for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
user_param Union Reference

Pattern specific optional user parameters container. More...

#include <hl_patterns.h>

Data Fields

impactUserParameters impact
 Impact Pattern User Parameters.
genericUserParameters generic
 Generic Pattern User Parameters.
constantUserParameters constant
 Constant Pattern User Parameters.

Detailed Description

Pattern specific optional user parameters container.

This type definition is useful to increase the readability of the code and to enforce compiler type checking when passing parameters to patterns.

Usage example of the Impact Pattern:

                        ...
                        haptor_desc *myHaptor = hl_configure(24000000,10,1);

                        pattern_desc *myImpactPattern;

                        user_param myParams;

                        myParams.impact.velocity = Fast;
                        myParams.impact.material = Rubber;

                        myImpactPattern = hl_initPattern(Impact,&myParams);

                        hl_addHaptor(myHaptor,myImpactPattern);

                        hl_startPattern(myImpactPattern);
                        ...

Definition at line 170 of file hl_patterns.h.


Field Documentation

Constant Pattern User Parameters.

Definition at line 175 of file hl_patterns.h.

Generic Pattern User Parameters.

Definition at line 173 of file hl_patterns.h.

Impact Pattern User Parameters.

Definition at line 171 of file hl_patterns.h.


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