ThingWorx C SDK
twTasker.h
Go to the documentation of this file.
1 /***************************************
2  * Copyright 2017, PTC, Inc.
3  ***************************************/
4 
10 #ifndef TASKER_H
11 #define TASKER_H
12 
13 #include "twDefaultSettings.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
32 typedef void (*twTaskFunction) (uint64_t sys_msecs, void * params);
33 
37 typedef struct twTask {
39  uint64_t nextRunTick;
41 } twTask;
42 
43 twTask* twTaskerGetTask(int i);
44 
53 void twTasker_Initialize();
54 
65 int twTasker_CreateTask(uint32_t runTimeIntervalMsec, twTaskFunction func);
66 
75 int twTasker_RemoveTask(int id);
76 
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif
int twTasker_RemoveTask(int id)
Removes a task from the tasker.
Definition: twTasker.c:72
Task structure definition.
Definition: twTasker.h:37
void twTasker_Initialize()
Initializes the tasker.
Definition: twTasker.c:31
void twTaskerRemoveAllTasks()
Removes all tasks from the tasker.
Definition: twTasker.c:24
uint32_t runTimeIntervalMsec
Definition: twTasker.h:38
Default settings for ThingWorx C SDK.
int twTasker_CreateTask(uint32_t runTimeIntervalMsec, twTaskFunction func)
Adds a new task to the tasker.
Definition: twTasker.c:57
void(* twTaskFunction)(uint64_t sys_msecs, void *params)
Function signature of a task called in round robin fashion.
Definition: twTasker.h:32
uint64_t nextRunTick
Definition: twTasker.h:39
twTaskFunction func
Definition: twTasker.h:40
struct twTask twTask
Task structure definition.