cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How to pass params to task started with twTasker_CreateTask?

rvaaraniemi
1-Newbie

How to pass params to task started with twTasker_CreateTask?

Hi,

The C SDK API says that the function type given in twTasker_CreateTask is twTaskFunction. In twTaskFunction definition there is a void pointer called params that should contain "A pointer to the parameters of the function."

How can I pass some parameters to the function if twTasker_CreateTask only accepts two parameters: a wait time and a function pointer? Should there be a third parameter in the twTasker_CreateTask? It seems the params pointer is always NULL / 0 (I checked the places where tickTimerCallback is called).

BR,

Risto Vääräniemi

1 REPLY 1

Hi all,

I made some local changes to twTasker.c & twTasker.h so I can pass some parameters to the twTasker_CreateTask and subsequently to the function that is called by the twTasker.

Is anyone interested in checking the changes and possibly adding the fix to the TW repository or whatever place where the TW codes are stored?

BR,

Risto

Top Tags