Sara Ojeda / Mbed 2 deprecated prueba_hsens

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Log.h Source File

Log.h

00001 #pragma once
00002 
00003 #include "mbed.h"
00004 #include <string>
00005 
00006 class Log
00007 {
00008 private:
00009     Serial* serial;
00010     bool wasLineBreak;
00011 
00012     void printInfo();
00013 
00014 public:
00015     explicit Log(Serial* serial = NULL);
00016     ~Log();
00017 
00018     Serial* getSerial() const;
00019     void setSerial(Serial* serial);
00020 
00021     Log& print(const char*);
00022     Log& print(const string&);
00023     Log& print(bool value);
00024     Log& print(unsigned char num, uint8_t base = 10);
00025     Log& print(unsigned int num, uint8_t base = 10);
00026     Log& print(unsigned long num, uint8_t base = 10);
00027     Log& print(unsigned long long num, uint8_t base = 10);
00028     Log& print(char c);
00029     Log& print(int num);
00030     Log& print(long num);
00031     Log& print(long long num);
00032     Log& print(double num, uint8_t decimals = 2);
00033     Log& printf(const char* fmt, ...);
00034     Log& ln(uint8_t quantity = 1);
00035 
00036     Log& flush();
00037 };