source: trunk/MagicSoft/Control/SubsystemIO/PeriodicSignal.hxx@ 7724

Last change on this file since 7724 was 1053, checked in by casaldaliga, 23 years ago
renamed files to conform MAGIC standard
File size: 482 bytes
Line 
1#ifndef PERIODICSIGNAL
2#define PERIODICSIGNAL
3//for signals
4#include <sigc++/signal_system.h>
5using namespace SigC;
6//for threads
7#include <pthread.h>
8
9class PeriodicSignal
10{
11private:
12 unsigned int period;//in usec
13public:
14 Signal0<void> signal;
15
16 PeriodicSignal(unsigned int period_);
17 void Start();
18 void Stop();
19
20private:
21 static void * SleepPeriodAndSignal( void* arg);
22 pthread_mutex_t mutex4stop;
23 bool stopped;
24 pthread_t thread;
25
26};
27#endif
Note: See TracBrowser for help on using the repository browser.