Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2008, 5:14:58 PM (16 years ago)
Author:
scheusso
Message:

added a lot of debug output

Location:
code/branches/network/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/Synchronisable.cc

    r1047 r1082  
    2727    datasize=0;
    2828    objectID=idCounter++;
     29    syncList = new std::list<synchronisableVariable *>;
    2930    //registerAllVariables();
    3031  }
     
    4950    datasize+=sizeof(int)+size;
    5051    //std::cout << "push temp to syncList (at the bottom) " << datasize << std::endl;
    51     syncList.push_back(temp);
     52    COUT(5) << "objectID: " << objectID << " this: " << this << " name: " << this->getIdentifier()->getName() << " networkID: " << this->getIdentifier()->getNetworkID() << std::endl;
     53    syncList->push_back(temp);
    5254  }
    5355
     
    6567  //   int totalsize=0;
    6668  //   //figure out size of data to be allocated
    67   //   for(i=syncList.begin(); i!=syncList.end(); i++){
     69  //   for(i=syncList->begin(); i!=syncList->end(); i++){
    6870  //     // increase size (size of variable and size of size of variable ;)
    6971  //     if(i->type == STRING)
     
    8183  //   //CHANGED: REMOVED DECLARATION int n=0 FROM LOOP
    8284  //   int n=0;
    83   //   for(i=syncList.begin(); n<totalsize && i!=syncList.end(); i++){
     85  //   for(i=syncList->begin(); n<totalsize && i!=syncList->end(); i++){
    8486  //     std::memcpy(retVal.data+n, (const void*)(i->size), sizeof(int));
    8587  //     n+=sizeof(int);
     
    117119    // copy to location
    118120    int n=0;
    119     for(i=syncList.begin(); n<datasize && i!=syncList.end(); ++i){
     121    for(i=syncList->begin(); n<datasize && i!=syncList->end(); ++i){
    120122      //(std::memcpy(retVal.data+n, (const void*)(&(i->size)), sizeof(int));
    121123      memcpy( (void *)(retVal.data+n), (const void *)&((*i)->size), sizeof(int) );
     
    143145    unsigned char *data=vars.data;
    144146    std::list<synchronisableVariable *>::iterator i;
    145     if(syncList.empty()){
     147    if(syncList->empty()){
    146148      COUT(4) << "Synchronisable::updateData syncList is empty" << std::endl;
    147149      return false;
    148150    }
    149151    COUT(5) << "Synchronisable: synchronising data" << std::endl;
    150     i=syncList.begin();
    151     COUT(5) << "element size: " << (*syncList.begin())->size << std::endl;
     152    i=syncList->begin();
     153    COUT(5) << "element size: " << (*syncList->begin())->size << std::endl;
    152154    COUT(5) << "*i.size" << (*i)->size << std::endl;
    153     for(; i!=syncList.end(); i++){
     155    for(; i!=syncList->end(); i++){
    154156      if(*(int *)data==(*i)->size || (*i)->type==STRING){
    155157        switch((*i)->type){
     
    179181    int tsize=0;
    180182    std::list<synchronisableVariable *>::iterator i;
    181     for(i=syncList.begin(); i!=syncList.end(); i++){
     183    for(i=syncList->begin(); i!=syncList->end(); i++){
    182184      switch((*i)->type){
    183185      case DATA:
  • code/branches/network/src/network/Synchronisable.h

    r1047 r1082  
    6363    /*  bool removeObject(Iterator<Synchronisable> it);*/
    6464
    65     std::list<synchronisableVariable *> syncList;
     65    std::list<synchronisableVariable *> *syncList;
    6666    int datasize;
    6767  };
  • code/branches/network/src/orxonox/objects/Model.cc

    r974 r1082  
    9595
    9696    void Model::registerAllVariables(){
    97       WorldEntity::registerAllVariables();
     97//       WorldEntity::registerAllVariables();
     98      COUT(5) << "registering new meshsrc with size: " << meshSrc_.length()+1 << std::endl;
    9899      registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
    99100    }
Note: See TracChangeset for help on using the changeset viewer.