#include "Urdata.h"

UrData::UrData() {
	this->data = 0;
	RTKSignal( this->sem );
}

unsigned int UrData::aflaes() {
	unsigned int tmp;
	RTKWait( this->sem );
	tmp = this->data;
	RTKSignal( this->sem );
	return tmp;
}

void UrData::set( unsigned int data ) {	
	RTKWait( this->sem );
	this->data = data;
	RTKSignal( this->sem );
}

void UrData::tick() {
	RTKWait( this->sem );
	this->data++;
	RTKSignal( this->sem );
}