Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DAQ mbed-rtos mbed
Diff: DAQ/Measurement.cpp
- Revision:
- 0:6ee88b4152dc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DAQ/Measurement.cpp Wed Apr 23 11:10:26 2014 +0000 @@ -0,0 +1,60 @@ +#include "Measurement.h" + +Measurement::Measurement(void) +{ + this->punten = new int[16]; + this->puntEnabled = new bool[16]; + + for (int i = 0; i < 16; i++) + { + this->punten[i] = 0; + this->puntEnabled[i] = false; + } +} + +Measurement::~Measurement(void) +{ + delete [] punten; + delete [] puntEnabled; +} + +//GETTERS +int Measurement::getPunt(int channel) +{ + if(channel>=0 && channel<16) + { + return(this->punten[channel]); + } + return(-1); +} +bool Measurement::Enabled(int channel) +{ + if(channel>=0 && channel<16) + { + return(this->puntEnabled[channel]); + } + return(false); +} + +//SETTERS +void Measurement::setPunt(int channel,int punt) +{ + if(channel>=0 && channel<16) + { + this->punten[channel] = punt; + } +} +void Measurement::Enable(int channel) +{ + if(channel>=0 && channel<16) + { + this->puntEnabled[channel] = true; + } +} +void Measurement::Disable(int channel) +{ + if(channel>=0 && channel<16) + { + this->puntEnabled[channel] = false; + } +} \ No newline at end of file