A common library used by Digi International Inc. mbed libraries to output debug information.
Dependents: XBeeLib XBeeLib_Test Chi-XBee-Actuator Chi-XBee-Sensor ... more
A common library used by Digi International Inc. mbed libraries to output debug information.
Used by XBeeLib
See Debugging the library chapter for more info.
DigiLoggerMbedSerial.h@4:b67d49554d8c, 2015-05-18 (annotated)
- Committer:
- spastor
- Date:
- Mon May 18 13:16:43 2015 +0200
- Revision:
- 4:b67d49554d8c
- Parent:
- 0:e83acb8d505c
Automatic upload
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spastor | 0:e83acb8d505c | 1 | /** |
spastor | 0:e83acb8d505c | 2 | * Copyright (c) 2015 Digi International Inc., |
spastor | 0:e83acb8d505c | 3 | * All rights not expressly granted are reserved. |
spastor | 0:e83acb8d505c | 4 | * |
spastor | 0:e83acb8d505c | 5 | * This Source Code Form is subject to the terms of the Mozilla Public |
spastor | 0:e83acb8d505c | 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
spastor | 0:e83acb8d505c | 7 | * You can obtain one at http://mozilla.org/MPL/2.0/. |
spastor | 0:e83acb8d505c | 8 | * |
spastor | 0:e83acb8d505c | 9 | * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343 |
spastor | 0:e83acb8d505c | 10 | * ======================================================================= |
spastor | 0:e83acb8d505c | 11 | */ |
spastor | 0:e83acb8d505c | 12 | |
spastor | 0:e83acb8d505c | 13 | #if !defined(__DIGI_LOGGER_MBED_SERIAL_H_) |
spastor | 0:e83acb8d505c | 14 | #define __DIGI_LOGGER_MBED_SERIAL_H_ |
spastor | 0:e83acb8d505c | 15 | |
spastor | 0:e83acb8d505c | 16 | #include "mbed.h" |
spastor | 0:e83acb8d505c | 17 | #include "DigiLogger.h" |
spastor | 0:e83acb8d505c | 18 | |
spastor | 0:e83acb8d505c | 19 | namespace DigiLog { |
spastor | 0:e83acb8d505c | 20 | |
spastor | 0:e83acb8d505c | 21 | class DigiLoggerMbedSerial : public DigiLogger |
spastor | 0:e83acb8d505c | 22 | { |
spastor | 0:e83acb8d505c | 23 | protected: |
spastor | 0:e83acb8d505c | 24 | |
spastor | 0:e83acb8d505c | 25 | /** serial port for debugging */ |
spastor | 0:e83acb8d505c | 26 | static Serial *_log_serial; |
spastor | 0:e83acb8d505c | 27 | |
spastor | 0:e83acb8d505c | 28 | /** log_buffer - logs a buffer through the configured serial port. |
spastor | 0:e83acb8d505c | 29 | * |
spastor | 0:e83acb8d505c | 30 | * @param buffer ... buffer to log |
spastor | 0:e83acb8d505c | 31 | */ |
spastor | 0:e83acb8d505c | 32 | virtual void log_buffer(char const * const buffer); |
spastor | 0:e83acb8d505c | 33 | |
spastor | 0:e83acb8d505c | 34 | public: |
spastor | 0:e83acb8d505c | 35 | |
spastor | 0:e83acb8d505c | 36 | /** Class constructor */ |
spastor | 0:e83acb8d505c | 37 | DigiLoggerMbedSerial(Serial * log_serial, LogLevel log_level = LogLevelInfo); |
spastor | 0:e83acb8d505c | 38 | |
spastor | 0:e83acb8d505c | 39 | /** Class destructor */ |
spastor | 4:b67d49554d8c | 40 | virtual ~DigiLoggerMbedSerial(); |
spastor | 0:e83acb8d505c | 41 | }; |
spastor | 0:e83acb8d505c | 42 | |
spastor | 0:e83acb8d505c | 43 | } /* namespace DigiLog */ |
spastor | 0:e83acb8d505c | 44 | |
spastor | 0:e83acb8d505c | 45 | #endif /* defined(__DIGI_LOGGER_MBED_SERIAL_H_) */ |
spastor | 0:e83acb8d505c | 46 | |
spastor | 0:e83acb8d505c | 47 | |
spastor | 0:e83acb8d505c | 48 |