#include "lowreceiver.h" #include "messagecell_cb.h" void LowReceiver::manage_cbcast(Message * mesg) { static std::list fifo_undelivered; //static std::list fifo_send; std::list::iterator iter; printf("LowReceiver::manage_cbcast -- init\n"); // identifiant = horloge + id_site_emeteur bool iAmTheEmitter = false; bool firstSeenMessage = true; if (mesg->getStamp().getIndex() == _group.getIndex()){ iAmTheEmitter = true; } if (iAmTheEmitter){ printf("LowReceiver::manage_cbcast - Received my own message -- delivering automatically\n"); //on faire la gestion du cbcast/send ici, c'est plus simple que //de partager une variable+mutex avec le sender // _clock.adjust(mesg->getStamp()); } else { printf("LowReceiver::manage_cbcast - Received a message from a friend\n"); // FIXME: si l'horloge est ajustable // (donc les contraintes TS_m[j] = TS_m[j]+1 && ... ), // alors on délivre directement } }