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:
- 2:7f7eb0cc78a4
- Parent:
- 1:fa51edf89e71
--- a/DAQ/Measurement.cpp Thu Apr 24 10:39:09 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -#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