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 PowerControl
Fork of Projet_S5 by
trame.h
00001 /*! 00002 * \file trame.h 00003 * \brief Class that send command with the xbee 00004 * \author Equipe P02 00005 * \version 1 00006 * \date 02/04/2014 00007 */ 00008 00009 #ifndef TRAME_H 00010 #define TRAME_H 00011 00012 #include "mbed.h" 00013 00014 using namespace std; 00015 00016 /*! 00017 * \class Trame trame.h "trame.h" 00018 * \brief Class that send data with the xbee 00019 */ 00020 class Trame 00021 { 00022 public: 00023 00024 /*! 00025 * \brief Constructor 00026 * \param _tx PinName for tx 00027 * \param _rx PinName for rx 00028 */ 00029 Trame(PinName _tx, PinName _rx); 00030 00031 /*! 00032 * \brief Send a transmit request 00033 * \param destination Destination of the request 00034 * \param data Data to send 00035 * \param lenght Lenght of the data 00036 */ 00037 void sendTransmitRequest(const char* destination, const char* data, int length); 00038 00039 private: 00040 /*! 00041 * \brief Calculate checksum 8 00042 * \param data Data for checksum 00043 * \param lenght Lenght of the data 00044 */ 00045 unsigned char crc8(const char* data, int length); 00046 00047 PinName tx, rx; 00048 }; 00049 00050 #endif
Generated on Thu Jul 14 2022 10:43:20 by
