Newer
Older

Graziano Scalamera
committed
/*
* update-thread.cpp
*
* $Author: claudio $
*
* $Revision: 1.2 $
*
* $Log: update-thread.cpp,v $
* Revision 1.2 2013-03-06 10:38:43 claudio
* commented out debug print statements
*
* Revision 1.1 2008-11-10 10:54:09 graziano
* thread for update of alarms with time threshold > 0
*
*
*
*
* copyleft: Sincrotrone Trieste S.C.p.A. di interesse nazionale
* Strada Statale 14 - km 163,5 in AREA Science Park
* 34012 Basovizza, Trieste ITALY
*/
#include "update-thread.h"
static const char __FILE__rev[] = __FILE__ " $Revision: 1.2 $";
/*
* alarm_thread::alarm_thread()
*/
update_thread::update_thread(AlarmHandler_ns::AlarmHandler *p) : p_Alarm(p)

Graziano Scalamera
committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
//cout << __FILE__rev << endl;
}
/*
* alarm_thread::~alarm_thread()
*/
update_thread::~update_thread()
{
p_Alarm = NULL;
}
/*
* alarm_thread::run()
*/
void update_thread::run(void *)
{
//printf("update_thread::run(): running...\n");
unsigned int pausasec, pausanano;
pausasec=1;
pausanano = 100000000; //0.1 sec
omni_thread::sleep(pausasec,pausanano);
while (!p_Alarm->abortflag) {
try
{
omni_thread::sleep(pausasec,pausanano);
p_Alarm->timer_update();
//printf("update_thread::run(): TIMER!!\n");
}
catch(...)
{
printf("update_thread::run(): catched unknown exception!!\n");
}
}
//cout << "update_thread::run(): exiting!" << endl;
} /* update_thread::run() */