Changeset 13844 for trunk/FACT++/src/mcp.cc
- Timestamp:
- 05/23/12 19:32:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/mcp.cc
r13838 r13844 50 50 }; 51 51 52 DimServiceInfoListImp fNetwork;53 54 52 DimVersion fDim; 55 Dim StatefDimFTM;56 Dim StatefDimFAD;57 Dim StatefDimLog;58 Dim StatefDimRC;53 DimDescribedState fDimFTM; 54 DimDescribedState fDimFAD; 55 DimDescribedState fDimLog; 56 DimDescribedState fDimRC; 59 57 60 58 DimDescribedService fService; 61 59 62 const State GetState(const DimState &s) const63 {64 return fNetwork.GetState(s.name(), s.state());65 }66 67 void PrintState(const DimState &state) const68 {69 const State rc = GetState(state);70 71 Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";72 Out() << kBold << state.name() << ": ";73 if (rc.index==-3)74 {75 Out() << kReset << "Offline" << endl;76 return;77 }78 if (rc.index==-2)79 Out() << state.state();80 else81 Out() << rc.name << "[" << rc.index << "]";82 Out() << kReset << " - " << kBlue << rc.comment << endl;83 }84 85 60 int Print() const 86 61 { 87 Out() << fDim.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - "; 88 Out() << kBold << "DIM_DNS: " << fDim.version() << endl; 89 90 PrintState(fDim); 91 PrintState(fDimFTM); 92 PrintState(fDimFAD); 93 PrintState(fDimLog); 94 PrintState(fDimRC); 62 Out() << fDim << endl; 63 Out() << fDimFTM << endl; 64 Out() << fDimFAD << endl; 65 Out() << fDimLog << endl; 66 Out() << fDimRC << endl; 95 67 96 68 return GetCurrentState();
Note:
See TracChangeset
for help on using the changeset viewer.