VR-Forces 4.2 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfobjcore
multiTaskControllerComponent.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2010 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
10
11
#pragma once
12
13
#include "
vrfobjcore/vrfobjcoreDefines.h
"
14
#include "
vrfobjcore/taskCtlrCmpnt.h
"
15
#include "
vrftasks/radioMsgTypes.h
"
16
21
class
DT_DLL_vrfobjcore
DtMultiTaskControllerComponent
:
public
DtTaskControllerComponent
22
{
23
24
public
:
25
31
DtMultiTaskControllerComponent
(
const
DtString
& name,
DtVrfObject
* owner,
32
DtSimManager
* simManager,
33
DtComponentDescriptor
* compDesc = 0,
34
DtReaderWriterRegistry
* parentRegistry = 0);
35
37
virtual
~
DtMultiTaskControllerComponent
();
38
39
virtual
bool
init
();
40
45
virtual
void
postTick
();
46
55
virtual
bool
beginProcessingTask
(
const
DtTaskMessage
&
task
,
56
DtSimTaskStatePtr
taskState);
57
63
virtual
void
taskComplete(
int
taskId,
bool
success);
64
66
virtual
void
clearTask
(
int
taskId);
67
70
virtual
void
suspendTask(
int
taskId);
71
73
virtual
DtTaskMessage
* currentTaskMessage(
int
taskId);
74
80
virtual
DtSimTaskStatePtr
currentTaskState(
int
taskId)
const
;
81
85
virtual
int
sendSubtask(
DtSimTask
& task,
int
taskId);
86
94
virtual
int
sendTask(
DtSimTask
& task,
const
DtString
& receiver,
int
taskId,
bool
actAsSubtask =
true
);
95
100
virtual
void
clearSubtask(
int
subtaskId,
int
taskId);
101
105
virtual
void
addPendingSubtaskId(
int
subtaskId,
int
taskId);
106
111
virtual
bool
findPendingSubtaskId(
int
subtaskId,
int
taskId);
112
117
virtual
void
removePendingSubtaskId(
int
subtaskId,
int
taskId);
118
121
virtual
DtSubtaskStatusEntry
* subtaskStatus(
int
subtaskId,
int
taskId);
122
127
virtual
void
removeAllPendingSubtaskIds(
int
taskId);
128
130
virtual
std::vector<int> currentPendingSubstaskIds(
int
taskId)
const
;
131
134
virtual
bool
decideToGiveUpTask()
const
;
135
139
virtual
void
giveUpTask();
140
142
virtual
bool
taskActive
(
int
taskId)
const
;
143
145
virtual
bool
clearTopLevelTasks
();
146
148
virtual
void
clearConflictingTopLevelTasks
(
const
DtSimTaskMessageType
& conflictType);
149
151
virtual
void
clearTasksByType
(
const
DtSimTaskMessageType
& taskType);
152
154
virtual
void
clearTaskById
(
int
taskId);
155
156
virtual
DtSuspendedTaskInfo
*
suspendTaskById
(
int
taskId);
157
159
virtual
std::list<DtTaskMessage*>
currentTaskMessages
()
const
;
160
162
virtual
DtTaskWithTaskStateListPtr
topLevelTasks
()
const
;
163
166
virtual
void
setScriptTickPeriod(
const
DtString
& scriptId,
double
period);
167
168
protected
:
170
virtual
void
addCurrentTaskMessage(
const
DtTaskMessage
* taskMessage);
173
virtual
void
clearCurrentTaskMessage(
int
taskId);
174
177
virtual
void
clearPendingSubtasks(
int
taskId);
178
182
virtual
void
clearSubtasksByType(
const
DtSimTaskMessageType
& taskType,
int
taskId);
183
186
virtual
int
taskIdWhichStartedSubtask(
int
subtaskId);
187
};
Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)