Projet Drone de surveillance du labo TRSE (INGESUP)
Dependencies: mbed PID ADXL345 Camera_LS_Y201 ITG3200 RangeFinder mbos xbee_lib Motor Servo
Service/Service.h@31:ec7d635636bf, 2013-04-17 (annotated)
- Committer:
- IngesupMbed01
- Date:
- Wed Apr 17 15:52:51 2013 +0000
- Revision:
- 31:ec7d635636bf
- Parent:
- 29:a0800d3da787
Module communication modifi? et variables globales d?plac?es.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Gaetan | 10:c8d73680b9fd | 1 | /* Copyright (c) 2012 - 2013 AUTHEUR |
Gaetan | 10:c8d73680b9fd | 2 | * |
Gaetan | 10:c8d73680b9fd | 3 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED |
Gaetan | 10:c8d73680b9fd | 4 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
Gaetan | 10:c8d73680b9fd | 5 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
Gaetan | 10:c8d73680b9fd | 6 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
Gaetan | 10:c8d73680b9fd | 7 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
Gaetan | 10:c8d73680b9fd | 8 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
Gaetan | 10:c8d73680b9fd | 9 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
Gaetan | 10:c8d73680b9fd | 10 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
Gaetan | 10:c8d73680b9fd | 11 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Gaetan | 10:c8d73680b9fd | 12 | */ |
Gaetan | 10:c8d73680b9fd | 13 | |
Gaetan | 10:c8d73680b9fd | 14 | /* |
IngesupMbed01 | 19:a05cd42f8e91 | 15 | * Description : Cette classe contient les fonctionnalités que pourraient exploiter plusieurs classes |
Gaetan | 10:c8d73680b9fd | 16 | * Input |
Gaetan | 10:c8d73680b9fd | 17 | * Output |
IngesupMbed01 | 19:a05cd42f8e91 | 18 | */ |
IngesupMbed01 | 19:a05cd42f8e91 | 19 | |
IngesupMbed01 | 19:a05cd42f8e91 | 20 | #ifndef SERVICE_H |
IngesupMbed01 | 19:a05cd42f8e91 | 21 | #define SERVICE_H |
IngesupMbed01 | 19:a05cd42f8e91 | 22 | |
IngesupMbed01 | 19:a05cd42f8e91 | 23 | #include "mbos.h" |
IngesupMbed01 | 19:a05cd42f8e91 | 24 | |
IngesupMbed01 | 29:a0800d3da787 | 25 | //Define de type de mouvement |
IngesupMbed01 | 29:a0800d3da787 | 26 | #define GAUCHE 1 |
IngesupMbed01 | 29:a0800d3da787 | 27 | #define DROITE 2 |
IngesupMbed01 | 29:a0800d3da787 | 28 | #define AVANT 3 |
IngesupMbed01 | 29:a0800d3da787 | 29 | #define ARRIERE 4 |
IngesupMbed01 | 29:a0800d3da787 | 30 | #define HAUT 5 |
IngesupMbed01 | 29:a0800d3da787 | 31 | #define BAS 6 |
IngesupMbed01 | 29:a0800d3da787 | 32 | #define LATERAL_GAUCHE 7 |
IngesupMbed01 | 29:a0800d3da787 | 33 | #define LATERAL_DROITE 8 |
IngesupMbed01 | 29:a0800d3da787 | 34 | |
IngesupMbed01 | 29:a0800d3da787 | 35 | //Define de type d'ordre spécifique |
IngesupMbed01 | 29:a0800d3da787 | 36 | #define ORDRE_RETOUR_BASE 1 |
IngesupMbed01 | 29:a0800d3da787 | 37 | #define ORDRE_POSER 2 |
IngesupMbed01 | 29:a0800d3da787 | 38 | |
IngesupMbed01 | 29:a0800d3da787 | 39 | union conversionCharFloat { |
IngesupMbed01 | 29:a0800d3da787 | 40 | float f; |
IngesupMbed01 | 29:a0800d3da787 | 41 | char ch[4]; |
IngesupMbed01 | 29:a0800d3da787 | 42 | }; |
IngesupMbed01 | 29:a0800d3da787 | 43 | |
IngesupMbed01 | 29:a0800d3da787 | 44 | typedef struct { |
IngesupMbed01 | 29:a0800d3da787 | 45 | float x; |
IngesupMbed01 | 29:a0800d3da787 | 46 | float y; |
IngesupMbed01 | 29:a0800d3da787 | 47 | float z; |
IngesupMbed01 | 29:a0800d3da787 | 48 | }position; |
IngesupMbed01 | 29:a0800d3da787 | 49 | |
IngesupMbed01 | 19:a05cd42f8e91 | 50 | class C_Service { |
IngesupMbed01 | 19:a05cd42f8e91 | 51 | private : |
IngesupMbed01 | 19:a05cd42f8e91 | 52 | /* ATTRIBUTS */ |
IngesupMbed01 | 19:a05cd42f8e91 | 53 | |
IngesupMbed01 | 19:a05cd42f8e91 | 54 | public : |
IngesupMbed01 | 19:a05cd42f8e91 | 55 | /* CONSTRUCTEUR(S) */ |
IngesupMbed01 | 21:58c7238af4d8 | 56 | C_Service(); |
IngesupMbed01 | 19:a05cd42f8e91 | 57 | |
IngesupMbed01 | 19:a05cd42f8e91 | 58 | /* DESTRUCTEUR */ |
IngesupMbed01 | 21:58c7238af4d8 | 59 | ~C_Service(); |
IngesupMbed01 | 19:a05cd42f8e91 | 60 | |
IngesupMbed01 | 19:a05cd42f8e91 | 61 | /* METHODES */ |
IngesupMbed01 | 19:a05cd42f8e91 | 62 | }; |
IngesupMbed01 | 19:a05cd42f8e91 | 63 | |
IngesupMbed01 | 19:a05cd42f8e91 | 64 | #endif |