Allan Brignoli
/
Rome2_P6
gugus
Task.h@0:1a0321f1ffbc, 2018-05-18 (annotated)
- Committer:
- Brignall
- Date:
- Fri May 18 12:18:21 2018 +0000
- Revision:
- 0:1a0321f1ffbc
lala;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Brignall | 0:1a0321f1ffbc | 1 | /* |
Brignall | 0:1a0321f1ffbc | 2 | * Task.h |
Brignall | 0:1a0321f1ffbc | 3 | * Copyright (c) 2018, ZHAW |
Brignall | 0:1a0321f1ffbc | 4 | * All rights reserved. |
Brignall | 0:1a0321f1ffbc | 5 | */ |
Brignall | 0:1a0321f1ffbc | 6 | |
Brignall | 0:1a0321f1ffbc | 7 | #ifndef TASK_H_ |
Brignall | 0:1a0321f1ffbc | 8 | #define TASK_H_ |
Brignall | 0:1a0321f1ffbc | 9 | |
Brignall | 0:1a0321f1ffbc | 10 | #include <cstdlib> |
Brignall | 0:1a0321f1ffbc | 11 | |
Brignall | 0:1a0321f1ffbc | 12 | /** |
Brignall | 0:1a0321f1ffbc | 13 | * This is an abstract task class with a method that |
Brignall | 0:1a0321f1ffbc | 14 | * is called periodically by a task sequencer. |
Brignall | 0:1a0321f1ffbc | 15 | */ |
Brignall | 0:1a0321f1ffbc | 16 | class Task { |
Brignall | 0:1a0321f1ffbc | 17 | |
Brignall | 0:1a0321f1ffbc | 18 | public: |
Brignall | 0:1a0321f1ffbc | 19 | |
Brignall | 0:1a0321f1ffbc | 20 | static const int FAULT = -1; /**< Task return value. */ |
Brignall | 0:1a0321f1ffbc | 21 | static const int RUNNING = 0; /**< Task return value. */ |
Brignall | 0:1a0321f1ffbc | 22 | static const int DONE = 1; /**< Task return value. */ |
Brignall | 0:1a0321f1ffbc | 23 | |
Brignall | 0:1a0321f1ffbc | 24 | Task(); |
Brignall | 0:1a0321f1ffbc | 25 | virtual ~Task(); |
Brignall | 0:1a0321f1ffbc | 26 | virtual int run(float period); |
Brignall | 0:1a0321f1ffbc | 27 | }; |
Brignall | 0:1a0321f1ffbc | 28 | |
Brignall | 0:1a0321f1ffbc | 29 | #endif /* TASK_H_ */ |
Brignall | 0:1a0321f1ffbc | 30 |