Fork of my original MQTTGateway

Dependencies:   mbed-http

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DigiLoggerMbedSerial.h Source File

DigiLoggerMbedSerial.h

00001 /**
00002  * Copyright (c) 2015 Digi International Inc.,
00003  * All rights not expressly granted are reserved.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
00007  * You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
00010  * =======================================================================
00011  */
00012 
00013 #if !defined(__DIGI_LOGGER_MBED_SERIAL_H_)
00014 #define __DIGI_LOGGER_MBED_SERIAL_H_
00015 
00016 #include "mbed.h"
00017 #include "DigiLogger.h"
00018 
00019 namespace DigiLog {
00020 
00021 class DigiLoggerMbedSerial : public DigiLogger
00022 {
00023     protected:
00024 
00025         /** serial port for debugging */
00026         static Serial *_log_serial;
00027 
00028         /** log_buffer - logs a buffer through the configured serial port.
00029          *
00030          *  @param buffer ... buffer to log
00031          */
00032         virtual void log_buffer(char const * const buffer);
00033 
00034     public:
00035 
00036         /** Class constructor */
00037         DigiLoggerMbedSerial(Serial * log_serial, LogLevel log_level = LogLevelInfo);
00038 
00039         /** Class destructor */
00040         virtual ~DigiLoggerMbedSerial();
00041 };
00042 
00043 }   /* namespace DigiLog */
00044 
00045 #endif /* defined(__DIGI_LOGGER_MBED_SERIAL_H_) */
00046 
00047 
00048