Changeset 443 in flair-src for trunk/tools/FlairGCS/src/ConnectionLayout.cpp
- Timestamp:
- Sep 9, 2021, 5:06:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/ConnectionLayout.cpp
r436 r443 48 48 } 49 49 case DATA_BIG_ENDIAN: { 50 // for(int i=0;i<size;i++) fprintf(stderr,"%x ",buf[i]);51 // fprintf(stderr,"\n");52 50 uint16_t period; 53 51 memcpy(&period, &buf[1], sizeof(uint16_t)); 54 52 period = qFromBigEndian(period); 55 drawDatas(&buf[3], size - 3, period, true);53 drawDatas(&buf[3], size - 3, period, 1,true); 56 54 break; 57 55 } 58 56 case DATA_LITTLE_ENDIAN: { 59 // for(int i=0;i<size;i++) fprintf(stderr,"%x ",buf[i]);60 // fprintf(stderr,"\n");61 57 uint16_t period; 62 58 memcpy(&period, &buf[1], sizeof(uint16_t)); 63 // fprintf(stderr,"recu %i period %i\n",size,period); 64 drawDatas(&buf[3], size - 3, period); 59 drawDatas(&buf[3], size - 3, period,1); 60 break; 61 } 62 case MULTIPLE_DATA_LITTLE_ENDIAN: { 63 uint16_t period; 64 uint16_t nb_buffering; 65 memcpy(&period, buf+sizeof(char), sizeof(uint16_t)); 66 memcpy(&nb_buffering,buf+sizeof(char)+sizeof(uint16_t), sizeof(uint16_t)); 67 fprintf(stderr,"recu %i, period %i, nb_buff %i\n",size,period,nb_buffering); 68 drawDatas(buf+sizeof(char)+sizeof(uint16_t)+sizeof(uint16_t), size - sizeof(char)+sizeof(uint16_t)+sizeof(uint16_t), period, nb_buffering); 65 69 break; 66 70 } … … 111 115 QString ConnectionLayout::getName() { return name; } 112 116 113 void ConnectionLayout::drawDatas(char *buf, int buf_size, uint16_t period, 114 bool big_endian) { 115 for (int i = 0; i < dataremotes.count(); i++) { 116 dataremotes.at(i)->BufEvent(&buf, &buf_size, period, big_endian); 117 } 117 void ConnectionLayout::drawDatas(char *buf, int buf_size, uint16_t period,uint16_t nb_buffering, bool big_endian) { 118 for (int i = 0; i < nb_buffering; i++) { 119 for (int j = 0; j < dataremotes.count(); j++) { 120 dataremotes.at(j)->BufEvent(&buf, &buf_size, period, nb_buffering, big_endian); 121 } 122 } 118 123 } 119 124
Note:
See TracChangeset
for help on using the changeset viewer.