Changeset 13844 for trunk/FACT++/src/ratecontrol.cc
- Timestamp:
- 05/23/12 19:32:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratecontrol.cc
r13838 r13844 51 51 vector<bool> fBlock; 52 52 53 DimServiceInfoListImp fNetwork;54 55 53 DimVersion fDim; 56 Dim StatefDimFTM;57 Dim StatefDimRS;54 DimDescribedState fDimFTM; 55 DimDescribedState fDimRS; 58 56 59 57 float fTargetRate; … … 431 429 return GetCurrentState(); 432 430 } 433 /*434 void PrintState(const pair<Time,int> &state, const char *server)435 {436 const State rc = fNetwork.GetState(server, state.second);437 438 Out() << state.first.GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";439 Out() << kBold << server << ": ";440 Out() << rc.name << "[" << rc.index << "]";441 Out() << kReset << " - " << kBlue << rc.comment << endl;442 }443 444 int Print()445 {446 Out() << fStatusDim.first.GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";447 Out() << kBold << "DIM_DNS: ";448 if (fStatusDim.second==0)449 Out() << "Offline" << endl;450 else451 Out() << "V" << fStatusDim.second/100 << 'r' << fStatusDim.second%100 << endl;452 453 PrintState(fStatusRS, "RATE_SCAN");454 PrintState(fStatusFTM, "FTM_CONTROL");455 456 return GetCurrentState();457 }458 */459 460 const State GetState(const DimState &s) const461 {462 return fNetwork.GetState(s.name(), s.state());463 }464 465 void PrintState(const DimState &state) const466 {467 const State rc = GetState(state);468 469 Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";470 Out() << kBold << state.name() << ": ";471 if (rc.index==-3)472 {473 Out() << kReset << "Offline" << endl;474 return;475 }476 if (rc.index==-2)477 Out() << state.state();478 else479 Out() << rc.name << "[" << rc.index << "]";480 Out() << kReset << " - " << kBlue << rc.comment << endl;481 }482 431 483 432 int Print() const 484 433 { 485 Out() << fDim.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - "; 486 Out() << kBold << "DIM_DNS: " << fDim.version() << endl; 487 488 PrintState(fDimFTM); 489 PrintState(fDimRS); 434 Out() << fDim << endl; 435 Out() << fDimFTM << endl; 436 Out() << fDimRS << endl; 490 437 491 438 return GetCurrentState();
Note:
See TracChangeset
for help on using the changeset viewer.