Projet Drone de surveillance du labo TRSE (INGESUP)
Dependencies: mbed PID ADXL345 Camera_LS_Y201 ITG3200 RangeFinder mbos xbee_lib Motor Servo
Module_Communication/Module_Communication.cpp@18:0bfd3ad421e5, 2013-03-20 (annotated)
- Committer:
- IngesupMbed01
- Date:
- Wed Mar 20 16:52:53 2013 +0000
- Revision:
- 18:0bfd3ad421e5
- Parent:
- 11:fe26673dd947
- Child:
- 19:a05cd42f8e91
Module Communication modifi?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
IngesupMbed01 | 18:0bfd3ad421e5 | 1 | /* Copyright (c) 2012 - 2013 AUTHEUR |
IngesupMbed01 | 18:0bfd3ad421e5 | 2 | * |
IngesupMbed01 | 18:0bfd3ad421e5 | 3 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED |
IngesupMbed01 | 18:0bfd3ad421e5 | 4 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
IngesupMbed01 | 18:0bfd3ad421e5 | 5 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
IngesupMbed01 | 18:0bfd3ad421e5 | 6 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
IngesupMbed01 | 18:0bfd3ad421e5 | 7 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
IngesupMbed01 | 18:0bfd3ad421e5 | 8 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
IngesupMbed01 | 18:0bfd3ad421e5 | 9 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
IngesupMbed01 | 18:0bfd3ad421e5 | 10 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
IngesupMbed01 | 18:0bfd3ad421e5 | 11 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
IngesupMbed01 | 18:0bfd3ad421e5 | 12 | */ |
IngesupMbed01 | 18:0bfd3ad421e5 | 13 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 14 | /* |
IngesupMbed01 | 18:0bfd3ad421e5 | 15 | * Description : Cette classe contient les fonctionnalités du module communication. |
IngesupMbed01 | 18:0bfd3ad421e5 | 16 | Le module communication gère la communication entre les modules présents sur le drône et le PC. |
IngesupMbed01 | 18:0bfd3ad421e5 | 17 | * Input |
IngesupMbed01 | 18:0bfd3ad421e5 | 18 | * Output |
IngesupMbed01 | 18:0bfd3ad421e5 | 19 | */ |
IngesupMbed01 | 18:0bfd3ad421e5 | 20 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 21 | #include "Module_Communication.h" |
IngesupMbed01 | 18:0bfd3ad421e5 | 22 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 23 | // Pointeur sur la classe systeme d'exploitation instancié dans le main |
IngesupMbed01 | 18:0bfd3ad421e5 | 24 | extern mbos *os; |
IngesupMbed01 | 18:0bfd3ad421e5 | 25 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 26 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 27 | /* CONSRTRUCTEUR(S) */ |
IngesupMbed01 | 18:0bfd3ad421e5 | 28 | C_ModuleCommunication::C_ModuleCommunication() |
IngesupMbed01 | 18:0bfd3ad421e5 | 29 | { |
IngesupMbed01 | 18:0bfd3ad421e5 | 30 | m_xbee = new xbee(p9, p10, p11); |
IngesupMbed01 | 18:0bfd3ad421e5 | 31 | } |
IngesupMbed01 | 18:0bfd3ad421e5 | 32 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 33 | /* DESTRUCTEUR */ |
IngesupMbed01 | 18:0bfd3ad421e5 | 34 | C_ModuleCommunication::~C_ModuleCommunication() |
IngesupMbed01 | 18:0bfd3ad421e5 | 35 | { |
IngesupMbed01 | 18:0bfd3ad421e5 | 36 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 37 | } |
IngesupMbed01 | 18:0bfd3ad421e5 | 38 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 39 | /* Point d'entrée de la tache Module Video */ |
IngesupMbed01 | 18:0bfd3ad421e5 | 40 | void C_ModuleCommunication::C_ModuleCommunication_Task(void) |
IngesupMbed01 | 18:0bfd3ad421e5 | 41 | { |
IngesupMbed01 | 18:0bfd3ad421e5 | 42 | while(1){ |
IngesupMbed01 | 18:0bfd3ad421e5 | 43 | // Code |
IngesupMbed01 | 18:0bfd3ad421e5 | 44 | } |
IngesupMbed01 | 18:0bfd3ad421e5 | 45 | } |
IngesupMbed01 | 18:0bfd3ad421e5 | 46 | |
IngesupMbed01 | 18:0bfd3ad421e5 | 47 |