vcdMaker demo signal library. See http://vcdmaker.org for details. vcdMaker demos: For Freescale FRDM-KL46Z: https://developer.mbed.org/users/ketjow/code/vcdMaker_Demo/ For ST Disco L476: https://developer.mbed.org/users/ketjow/code/vcdMaker_Demo_DISCO_L476/
Dependents: vcdMaker_Demo_DISCO_L476 vcdMaker_Demo
Diff: signal.hpp
- Revision:
- 0:abd95c8ed6c1
- Child:
- 1:5be5e7e966cd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/signal.hpp Fri May 27 10:30:00 2016 +0000 @@ -0,0 +1,48 @@ +/*! + @file signal.hpp + + The header of the signal base class. + + @par Full Description + The header of the signal base class. + + @if REVISION_HISTORY_INCLUDED + @par Edit History + @li [0] wojciech.rynczuk@wp.pl 20-JAN-2015 Initial file revision. + @endif + + @ingroup Signal + + The MIT License (MIT) + Copyright (c) 2016 Wojciech Rynczuk + +*/ + +#ifndef _SIGNAL_HPP_ +#define _SIGNAL_HPP_ + +#include <string> + +#include "mbed.h" +#include "logger.hpp" + +#define FILTER_VALUE ((uint32_t)50) + +class Signal +{ + public: + Signal(const string& name, uint32_t size, Logger& logger); + void PrintVector(uint32_t value, string& suffix, string& comment, int32_t& time_ref); + void PrintReal(float value, string& suffix, string& comment, int32_t& time_ref); + void TickFilter(); + void ResetFilter(); + uint32_t CheckFilter(); + + protected: + Logger* m_pLogger; + string m_Name; + uint32_t m_Size; + uint32_t m_Filter; +}; + +#endif \ No newline at end of file