| RTXI 2.4 The Real-Time eXperiment Interface Documentation |
Go to the documentation of this file. 26 #include <semaphore.h> 125 : current(static_cast<
Node *>(x)) {};
127 : current(x.current) {};
131 return current == x.current;
135 return current != x.current;
140 return *
static_cast<T *
>(current);
144 return static_cast<T *
>(current);
149 current = current->next;
155 current = current->next;
160 current = current->prev;
166 current = current->prev;
185 : current(static_cast<const
Node *>(x)) {};
187 : current(x.current) {};
191 return current == x.current;
195 return current != x.current;
200 return *
static_cast<const T *
>(current);
204 return static_cast<const T *
>(current);
209 current = current->next;
215 current = current->next;
220 current = current->prev;
226 current = current->prev;
247 : next(0), prev(0) {};
252 return next == x.next && prev == x.prev;
262 : count(0), head(&tail), tail() {};
267 ERROR_MSG(
"RT::List::~List : end of list overwritten\n");
282 return iterator(
static_cast<T *
>(head));
286 return iterator(
static_cast<T *
>(&tail));
291 return const_iterator(
static_cast<const T *
>(head));
293 const_iterator
end(
void)
const 295 return const_iterator(
static_cast<const T *
>(&tail));
298 void insert(iterator,T &);
301 Node *
object =
static_cast<Node *
>(&node);
303 object->next = &(*position);
304 object->prev =
object->next->prev;
305 if(object->next == head)
308 position->prev->next = object;
309 position->prev = object;
316 Node *
object =
static_cast<Node *
>(&node);
322 else if(object->prev)
323 object->prev->next =
object->next;
324 object->next->prev =
object->prev;
330 class InsertListNodeEvent :
public RT::Event 335 InsertListNodeEvent(
List<T> *l,iterator i,T *n)
336 : list(l), iter(i), node(n) {};
339 list->insertRT(iter,*node);
346 typename List<T>::iterator iter;
351 class RemoveListNodeEvent :
public RT::Event 356 RemoveListNodeEvent(List<T> *l,T *n)
357 : list(l), node(n) {};
360 list->removeRT(*node);
465 System &operator=(
const System &)
475 SetPeriodEvent(
long long);
476 ~SetPeriodEvent(
void);
487 static System *instance;
490 void insertDevice(
Device *);
491 void removeDevice(
Device *);
494 void insertThread(
Thread *);
495 void removeThread(
Thread *);
497 static void *bounce(
void *);
505 List<RT::Device> devices;
506 List<RT::Thread> threadList;
616 InsertListNodeEvent event(
this,position,&node);
623 RemoveListNodeEvent event(
this,&node);
const_iterator & operator--(void)
int createTask(Task *, void *(*)(void *), void *, int=0)
void ERROR_MSG(const std::string &errmsg,...)
const T * operator->(void) const
void insert(iterator, T &)
void foreachDevice(void(*callback)(Device *, void *), void *param)
int postEvent(Event *event, bool blocking=true)
iterator & operator++(void)
void foreachThread(void(*callback)(Thread *, void *), void *param)
const_iterator(const const_iterator &x)
const_iterator(const T *x)
Realtime Oriented Classes.
const_iterator operator--(int)
virtual int callback(void)=0
long long getPeriod(void) const
bool operator==(const Node &x) const
bool operator==(const iterator &x) const
static System * getInstance(void)
const T & operator*(void) const
bool getActive(void) const
T & operator*(void) const
const_iterator begin(void) const
static const Priority MinimumPriority
T * operator->(void) const
bool operator!=(const iterator &x) const
iterator & operator--(void)
int setPeriod(Task, long long)
bool operator==(const const_iterator &x) const
const_iterator & operator++(void)
bool operator!=(const const_iterator &x) const
static const Priority MaximumPriority
Priority getPriority(void) const
bool getActive(void) const
void insertRT(iterator position, T &node)
static const Priority DefaultPriority
int setPeriod(long long period)
const_iterator operator++(int)
const_iterator end(void) const
virtual void execute(void)
iterator(const iterator &x)
Thread(Priority p=DefaultPriority)