Changeset 1993 in Sophya for trunk/ArchTOIPipe/Kernel/toiseqbuff.cc
- Timestamp:
- May 9, 2002, 10:22:37 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/toiseqbuff.cc
r1992 r1993 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toiseqbuff.cc,v 1.1 2 2002-05-08 22:22:33ansari Exp $5 // $Id: toiseqbuff.cc,v 1.13 2002-05-09 20:22:37 ansari Exp $ 6 6 7 7 #include "toiprocessor.h" … … 125 125 126 126 void TOISeqBuffered::getData(int i, double & val, uint_8 & flg) { 127 lock(); 127 128 if (!started) { 128 129 cout << " TOISeqBuffered::getData() - waitGet() Waiting for start ... " << endl; … … 135 136 << " i=" << i << " next_in= " << next_in 136 137 << " next_out=" << next_out << endl; 138 unlock(); 137 139 throw RangeCheckError("TOISeqBuffered::getData(i) : data deleted"); 138 140 } … … 158 160 << " i=" << i << " next_in= " << next_in 159 161 << " next_out=" << next_out << endl; 160 signalPut(); broadcast(); 161 } 162 signalPut(); 163 } 164 unlock(); 165 if (fgsigput) signal(); 162 166 return; 163 167 } … … 166 170 void TOISeqBuffered::getData(int i, int n, double* data, uint_8* flg) 167 171 { 172 lock(); 168 173 if (!started) { 169 174 cout << " TOISeqBuffered::getData(i,n ...) - waitGet() Waiting for start ... " << endl; … … 176 181 << " i=" << i << " next_in= " << next_in 177 182 << " next_out=" << next_out << endl; 183 unlock(); 178 184 throw RangeCheckError("TOISeqBuffered::getData(i) : data deleted"); 179 185 } … … 200 206 << " i=" << i << " next_in= " << next_in 201 207 << " next_out=" << next_out << endl; 202 signalPut(); broadcast(); 203 } 204 } 205 return; 206 208 signalPut(); 209 } 210 } 211 unlock(); 212 if (fgsigput) signal(); 213 return; 207 214 } 208 215 … … 238 245 239 246 void TOISeqBuffered::putData(int i, double value, uint_8 flag) { 247 lock(); 240 248 if (!started) { 241 249 first_in = next_in = i; … … 250 258 << " next_out=" << next_out << endl; 251 259 string msg = "TOISeqBuffered::putData() : i!=next_in TOIname=" + getName(); 260 unlock(); 252 261 throw RangeCheckError(msg); 253 262 } … … 272 281 << " i=" << i << " next_in= " << next_in 273 282 << " next_out=" << next_out << endl; 274 signalGet(); broadcast(); 275 } 276 } 277 278 void TOISeqBuffered::putData(int i, int n, double const* val, uint_8 const* flg) { 283 signalGet(); 284 } 285 unlock(); 286 if (fgsigget) signal(); 287 return; 288 } 289 290 void TOISeqBuffered::putData(int i, int n, double const* val, uint_8 const* flg) 291 { 292 lock(); 279 293 if (!started) { 280 294 first_in = next_in = i; … … 289 303 << " next_out=" << next_out << endl; 290 304 string msg = "TOISeqBuffered::putData() : i!=next_in TOIname=" + getName(); 305 unlock(); 291 306 throw RangeCheckError(msg); 292 307 } … … 314 329 << " i=" << i << " next_in= " << next_in 315 330 << " next_out=" << next_out << endl; 316 signalGet(); broadcast(); 317 } 331 signalGet(); 332 } 333 unlock(); 334 if (fgsigget) signal(); 335 return; 318 336 } 319 337
Note:
See TracChangeset
for help on using the changeset viewer.