-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathconboardsdktask.cpp
84 lines (67 loc) · 2.13 KB
/
conboardsdktask.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include "conboardsdktask.h"
#include <iostream>
#include <sstream>
#include <fstream>
using namespace std;
TaskSetItem cmdTaskSet[] = {
TASK_ITEM(addTask, 0), ///
TASK_ITEM(waitInput, 0), ///
TASK_ITEM(help, 0), ///
TASK_ITEM(SS, 0), ///
TASK_ITEM(loadSS, 0), ///
TASK_ITEM(CA, 0), ///
TASK_ITEM(acCA, 0), ///
TASK_ITEM(vsCA, 0), ///
TASK_ITEM(bfCA, 0), ///
TASK_ITEM(bdCA, 0), ///
TASK_ITEM(ctCA, 0), ///
TASK_ITEM(syCA, 0), ///
TASK_ITEM(FC, 0), ///
TASK_ITEM(tkFC, 0), ///
TASK_ITEM(mcFC, 0), ///
TASK_ITEM(flFC, -1), ///
TASK_ITEM(FM, 0), ///
TASK_ITEM(startFM, 0), ///
TASK_ITEM(stopFM, 0), ///
TASK_ITEM(pauseFM, 0), ///
TASK_ITEM(restartFM, 0), ///
TASK_ITEM(updateFM, 0), //! @todo -1
TASK_ITEM(HP, 0), ///
TASK_ITEM(startHP, 0), ///
TASK_ITEM(stopHP, 0), ///
TASK_ITEM(pauseHP, 0), ///
TASK_ITEM(restartHP, 0), ///
TASK_ITEM(VC, 0), ///
TASK_ITEM(startVC, 0), //! @todo -1
TASK_ITEM(stopVC, 0), ///
TASK_ITEM(WP, 0), ///
TASK_ITEM(initWP, 0), ///
TASK_ITEM(startWP, 0), ///
TASK_ITEM(stopWP, 0), ///
TASK_ITEM(pauseWP, 0), ///
TASK_ITEM(restartWP, 0), ///
TASK_ITEM(apWP, 0), ///
TASK_ITEM(CC, 0), ///
TASK_ITEM(cmCC, 0), ///
TASK_ITEM(agCC, 0), ///
TASK_ITEM(sgCC, 0), ///
};
ConboardSDKScript::ConboardSDKScript(CoreAPI* api)
: Script(api, cmdTaskSet, sizeof(cmdTaskSet) / sizeof(TaskSetItem))
{
}
TaskSetItem ConboardSDKScript::match(const char* name) { return Script::match((UserData)name); }
void ConboardSDKScript::addTask(const char* Name, UserData Data, time_t Timeout)
{
Script::addTask((UserData)Name, Data, Timeout);
}
ScriptThread::ScriptThread(ConboardSDKScript* Script) { script = Script; }
void ScriptThread::run()
{
while (1)
{
script->addTask("addTask");
script->run();
//script->
}
}