00001 /** 00002 * @file Platform/Aperios1.3.2/Receiver.cpp 00003 * This file implements classes related to receivers for Aperios. 00004 */ 00005 #include "ProcessFramework.h" 00006 00007 ReceiverList::ReceiverList(PlatformProcess* p,const char* receiverName,bool blocking) 00008 { 00009 process = p; 00010 // copy the receiver's name. The name of the process is still missing. 00011 strcpy(this->name,receiverName); 00012 if(getFirst()) 00013 { 00014 ReceiverList* p = getFirst(); 00015 while(p->next) 00016 p = p->next; 00017 p->next = this; 00018 } 00019 else 00020 getFirst() = this; 00021 next = 0; 00022 this->blocking = blocking; 00023 } 00024 00025 ReceiverList*& ReceiverList::getFirst() 00026 { 00027 return process->getFirstReceiver(); 00028 } 00029 00030 bool ReceiverList::receivedNew() const 00031 { 00032 return (ProcessBase::getEventMask() & 1 << eventId) != 0; 00033 } 00034 00035 void ReceiverList::finishFrame() 00036 { 00037 for(ReceiverList* p = getFirst(); p; p = p->getNext()) 00038 { 00039 ProcessBase::setBlockingId(p->eventId,p->blocking); 00040 if(p->receivedNew()) 00041 p->AssertReady(); 00042 } 00043 } 00044 00045 void ReceiverList::setBlockingId(int id,bool block) 00046 { 00047 ProcessBase::setBlockingId(id,block); 00048 } 00049 00050 void ReceiverList::setEventId(int id) 00051 { 00052 ProcessBase::setEventId(id); 00053 }
1.3.6