Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed PID ADXL345 Camera_LS_Y201 ITG3200 RangeFinder mbos xbee_lib Motor Servo
Module_Communication/Module_Communication.h@31:ec7d635636bf, 2013-04-17 (annotated)
- Committer:
- IngesupMbed01
- Date:
- Wed Apr 17 15:52:51 2013 +0000
- Revision:
- 31:ec7d635636bf
- Parent:
- 29:a0800d3da787
- Child:
- 34:4466839f5bb7
Module communication modifi? et variables globales d?plac?es.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| IngesupMbed01 | 18:0bfd3ad421e5 | 1 | /* Copyright (c) 2012 - 2013 Yang Shi |
| 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 | #ifndef MODULE_COMMUNICATION_H |
| IngesupMbed01 | 18:0bfd3ad421e5 | 22 | #define MODULE_COMMUNICATION_H |
| IngesupMbed01 | 18:0bfd3ad421e5 | 23 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 24 | #include "mbos.h" |
| IngesupMbed01 | 18:0bfd3ad421e5 | 25 | #include "xbee.h" |
| IngesupMbed01 | 24:3462a304f9a0 | 26 | #include "Buffer_Trame.h" |
| IngesupMbed01 | 31:ec7d635636bf | 27 | #include "Service.h" |
| IngesupMbed01 | 24:3462a304f9a0 | 28 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 29 | class C_ModuleCommunication |
| IngesupMbed01 | 18:0bfd3ad421e5 | 30 | { |
| IngesupMbed01 | 18:0bfd3ad421e5 | 31 | private : |
| IngesupMbed01 | 18:0bfd3ad421e5 | 32 | /* ATTRIBUTS */ |
| IngesupMbed01 | 18:0bfd3ad421e5 | 33 | xbee * m_xbee; |
| IngesupMbed01 | 24:3462a304f9a0 | 34 | C_FrameBuffer m_trameRxBuffer; |
| IngesupMbed01 | 24:3462a304f9a0 | 35 | C_FrameBuffer m_trameTxBuffer; |
| IngesupMbed01 | 24:3462a304f9a0 | 36 | char * m_charRxBuffer; |
| IngesupMbed01 | 24:3462a304f9a0 | 37 | char * m_charTxBuffer; |
| IngesupMbed01 | 18:0bfd3ad421e5 | 38 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 39 | public : |
| IngesupMbed01 | 18:0bfd3ad421e5 | 40 | /* CONSTRUCTEUR(S) */ |
| IngesupMbed01 | 18:0bfd3ad421e5 | 41 | C_ModuleCommunication(); |
| IngesupMbed01 | 18:0bfd3ad421e5 | 42 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 43 | /* DESTRUCTEUR */ |
| IngesupMbed01 | 18:0bfd3ad421e5 | 44 | ~C_ModuleCommunication(); |
| IngesupMbed01 | 18:0bfd3ad421e5 | 45 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 46 | /* METHODES */ |
| IngesupMbed01 | 19:a05cd42f8e91 | 47 | void moduleCommunicationTask(void); |
| IngesupMbed01 | 28:8b5ccd2f837e | 48 | void traitementTrame(void); |
| IngesupMbed01 | 19:a05cd42f8e91 | 49 | void envoiDeTrame(void); |
| IngesupMbed01 | 19:a05cd42f8e91 | 50 | void receptionDeTrame(void); |
| IngesupMbed01 | 31:ec7d635636bf | 51 | void creerTrameModuleTrajectoire(unsigned char idMessage); |
| IngesupMbed01 | 31:ec7d635636bf | 52 | void creerTrameSpeciale(unsigned char idMessage); |
| IngesupMbed01 | 31:ec7d635636bf | 53 | void consigneModuleTrajectoire(frame newFrame); |
| IngesupMbed01 | 31:ec7d635636bf | 54 | void consigneModuleVideo(frame newFrame); |
| IngesupMbed01 | 18:0bfd3ad421e5 | 55 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 56 | /* FONCTIONS */ |
| IngesupMbed01 | 18:0bfd3ad421e5 | 57 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 58 | }; |
| IngesupMbed01 | 18:0bfd3ad421e5 | 59 | |
| IngesupMbed01 | 18:0bfd3ad421e5 | 60 | #endif |
