codes in progress
Dependents: RUCHE2-CODES RUCHE2-CODES_correctionpoids RUCHE2-CODES
message_1.h
- Committer:
- Sidibe
- Date:
- 2019-01-18
- Revision:
- 0:db9f881dd501
- Child:
- 2:330f063d8cfa
File content as of revision 0:db9f881dd501:
#ifndef MESSAGE_1_H #define MESSAGE_1_H #include "mbed.h" #include "message.h" class Message_1 : public Message { public: //Methodes: //constructeur Message_1(int messageType, int tempExt, int tempInt, int humidite, float masse):Message(messageType){ this->m_tempExt = this->parseToUint16_t(tempExt); this->m_tempInt = this->parseToUint16_t(tempInt); this->m_humidite = this->parseToUint16_t(humidite); this->m_masse = this->parseToUint16_t(masse); }; void send(){ char donnee[] = "AT$SF="; this->sigfox.printf(donnee); this->writeInSendBuffer(this->m_tempExt); this->writeInSendBuffer(this->m_tempInt); this->writeInSendBuffer(this->m_humidite); this->writeInSendBuffer(this->m_masse); this->sigfox.printf("\r"); }; //Accesseurs int getTempExt() const{ return this->m_tempExt; }; int getTempInt() const{ return this->m_tempInt; }; int getHumidite() const{ return this->m_humidite; }; float getMasse() const{ return this->m_masse; }; private: int16_t m_tempExt; int16_t m_tempInt; int16_t m_humidite; int16_t m_masse; }; #endif