HapticLib
0.7
Haptic Feedback Library for embedded systems
|
Generic Pattern generator function header [TEMPLATE] More...
Go to the source code of this file.
Data Structures | |
struct | genericUserParameters |
Pattern specific user parameters type definition. More... | |
struct | genericStatusParameters |
Pattern specific status parameters type definition. More... |
Typedefs | |
typedef enum genericIncrement | genericIncrement |
User Parameter Values for increment user parameter. | |
typedef enum genericCheckParam | genericCheckParam |
User Parameter Values for checkParam user parameter. | |
typedef struct genericUserParameters | genericUserParameters |
Pattern specific user parameters type definition. | |
typedef struct genericStatusParameters | genericStatusParameters |
Pattern specific status parameters type definition. |
Enumerations | |
enum | genericIncrement { smallIncrement = 0, bigIncrement = 1 } |
User Parameter Values for increment user parameter. More... | |
enum | genericCheckParam { rightValue = 300000 } |
User Parameter Values for checkParam user parameter. More... |
Generic Pattern generator function header [TEMPLATE]
[TEMPLATE]
This is a template file; copy and rename it as starting point for the implementation of a new Pattern Generator.
Follow the structure of this example pattern (code and documentation formats) while implementing a new pattern generator.
Pattern specific constant definitions can be inserted here.
The pattern specific status parameters typedef is defined here.
The pattern specific user parameters typedef is defined here.
Please use at least a status Parameter where the pattern progress is stored, to let the continuator keep track of itself and decide when to end the pattern and free the haptor(s).
mypattern.c
: Documentation, initiator and continuator.mypattern.h
: Pattern specific definitions, user and status parameters definitions[TEMPLATE]
Pattern specific constant definitions can be inserted here.
The pattern specific status parameters typedef is defined here.
The pattern specific user parameters typedef is defined here.
Definition in file generic.h.
typedef enum genericCheckParam genericCheckParam |
User Parameter Values for checkParam user parameter.
This example show how to define the valid values for a user parameter. The name convention is as follow:
<pattern_name><parameter_name>
For example, the checkParam parameter for the Generic pattern accepts only one value:
This is the enumeration used to hold this value.
typedef enum genericIncrement genericIncrement |
User Parameter Values for increment user parameter.
This example show how to define the valid values for a user parameter. The name convention is as follow:
<pattern_name><parameter_name>
For example, the increment parameter for the Generic pattern accepts only two values:
This is the enumeration used to hold these two values.
typedef struct genericStatusParameters genericStatusParameters |
Pattern specific status parameters type definition.
At least one parameter should be defined to help the continuator keep track of the pattern generation progress.
typedef struct genericUserParameters genericUserParameters |
Pattern specific user parameters type definition.
This structure MUST be clearly documented to avoid pitfalls on the generator's use by the application code.
The user provided values, must be validated by the (preferably) pattern initiator before using them in the pattern logic.
enum genericCheckParam |
User Parameter Values for checkParam user parameter.
This example show how to define the valid values for a user parameter. The name convention is as follow:
<pattern_name><parameter_name>
For example, the checkParam parameter for the Generic pattern accepts only one value:
This is the enumeration used to hold this value.
enum genericIncrement |
User Parameter Values for increment user parameter.
This example show how to define the valid values for a user parameter. The name convention is as follow:
<pattern_name><parameter_name>
For example, the increment parameter for the Generic pattern accepts only two values:
This is the enumeration used to hold these two values.