Difference between revisions of "Category:Cognitao"
| Line 13: | Line 13: | ||
| * A real-time planner | * A real-time planner | ||
| − | === Simple task in  | + | === Simple task in CogniTAO === | 
| <source lang="C++"> | <source lang="C++"> | ||
| class TaskTrue: public Task{ | class TaskTrue: public Task{ | ||
| Line 25: | Line 25: | ||
| </source> | </source> | ||
| − | ===  | + | === Task preemption in CogniTAO === | 
| + | <source lang="C++"> | ||
| + | class TaskIdle: public TaskThread | ||
| + | { | ||
| + | public: | ||
| + | 	// Function to be executed by thread function | ||
| + | 	void run() | ||
| + | 	{ | ||
| + | 		// Check if thread is requested to stop ? | ||
| + | 		while (stopRequested == false) | ||
| + | 		{ | ||
| + | 			std::ostringstream strs; | ||
| + | 			strs << "*"; | ||
| + | 			std::this_thread::sleep_for(std::chrono::milliseconds(1000)); | ||
| + | 		} | ||
| + | 	} | ||
| + | }; | ||
| + | </source> | ||
| + | |||
| + | === Task preemption in CogniTAO === | ||
| <source lang="C++"> | <source lang="C++"> | ||
| class TaskIdle: public TaskThread | class TaskIdle: public TaskThread | ||
Revision as of 10:00, 19 September 2019
Contents
CogniTAO
CogniTAO is a collection of decision making tools that include
-  A pure C++ Cx11 executive for (Windows 10, Linux Debian, Intel / ARM support)
- Finite State Machines
- Hierarchical State Machines
- Behavior Trees
- BDI models
 
- A Web visualization pure Javascript tool for monitoring
- A teamwork controller
- A real-time planner
Simple task in CogniTAO
<source lang="C++"> class TaskTrue: public Task{ public: virtual void run() { std::cout << "." << std::flush; std::this_thread::sleep_for(std::chrono::milliseconds(1000)); setReturn(true); } }; </source>
Task preemption in CogniTAO
<source lang="C++"> class TaskIdle: public TaskThread { public: // Function to be executed by thread function void run() { // Check if thread is requested to stop ? while (stopRequested == false) { std::ostringstream strs; strs << "*"; std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } } }; </source>
Task preemption in CogniTAO
<source lang="C++"> class TaskIdle: public TaskThread { public: // Function to be executed by thread function void run() { // Check if thread is requested to stop ? while (stopRequested == false) { std::ostringstream strs; strs << "*"; std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } } }; </source>
This category currently contains no pages or media.
