Changeset 10570
- Timestamp:
- 05/04/11 15:17:47 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DimDescriptionService.h
r10452 r10570 42 42 }; 43 43 44 45 44 #endif -
trunk/FACT++/src/DimNetwork.cc
r10509 r10570 14 14 void StateClient::infoHandler() 15 15 { 16 // Make sure getTimestamp is called _before_ getTimestampMillisecs17 getInfo()->getTimestamp();18 19 16 DimInfo *curr = getInfo(); // get current DimInfo address 20 17 if (!curr) … … 25 22 const bool disconnected = fInfoState.getSize()==0; 26 23 24 // Make sure getTimestamp is called _before_ getTimestampMillisecs 25 const int tsec = fInfoState.getTimestamp(); 26 const int tms = fInfoState.getTimestampMillisecs(); 27 27 28 fState = disconnected ? -2 : fInfoState.getQuality(); 28 fStateTime = Time(fInfoState.getTimestamp(), 29 fInfoState.getTimestampMillisecs()*1000); 29 fStateTime = Time(tsec, tms*1000); 30 30 31 31 const string name = fInfoState.getName(); -
trunk/FACT++/src/DimServerList.cc
r10513 r10570 47 47 void DimServerList::infoHandler() 48 48 { 49 // Make sure getTimestamp is called _before_ getTimestampMillisecs50 getInfo()->getTimestamp();51 52 49 if (getInfo()!=&fDimServers) 53 50 return; -
trunk/FACT++/src/DimServiceInfoList.cc
r10514 r10570 120 120 void DimServiceInfoList::RemoveServer(const string &s) 121 121 { 122 cout << "Check for: " << s << endl; 123 122 124 const ServiceInfoList::iterator v = fServiceInfoList.find(s); 123 125 if (v==fServiceInfoList.end()) … … 173 175 void DimServiceInfoList::infoHandler() 174 176 { 175 // Make sure getTimestamp is called _before_ getTimestampMillisecs176 getInfo()->getTimestamp();177 178 177 // Get the name of the service 179 178 const string svc = getInfo()->getName(); -
trunk/FACT++/src/EventDim.h
r10299 r10570 58 58 Time GetTime() const 59 59 { 60 return Time(const_cast<EventDim*>(this)->getTimestamp(), 61 const_cast<EventDim*>(this)->getTimestampMillisecs()); 60 // Must be in exactly this order! 61 const int tsec = const_cast<EventDim*>(this)->getTimestamp(); 62 const int tms = const_cast<EventDim*>(this)->getTimestampMillisecs(); 63 64 return Time(tsec, tms*1000); 62 65 } 63 66 }; -
trunk/FACT++/src/MessageDim.cc
r10519 r10570 126 126 void MessageDimRX::infoHandler() 127 127 { 128 // Make sure getTimestamp is called _before_ getTimestampMillisecs129 getInfo()->getTimestamp();130 131 128 if (getInfo()!=&fDimMessage) 132 129 return; 133 130 134 const string name = getInfo()->getName();131 const string name = fDimMessage.getName(); 135 132 const string server = name.substr(0, name.find_first_of('/')); 136 133 137 fConnected = getInfo()->getSize()!=0;134 fConnected = fDimMessage.getSize()!=0; 138 135 139 136 // The server is diconnected. Do nothing … … 147 144 148 145 // skip all messages with a severity smaller than the minimum log level 149 if ( getInfo()->getQuality()<fMinLogLevel)146 if (fDimMessage.getQuality()<fMinLogLevel) 150 147 return; 151 148 152 149 stringstream msg; 153 msg << server << ": " << getInfo()->getString(); 150 msg << server << ": " << fDimMessage.getString(); 151 152 // Make sure getTimestamp is called _before_ getTimestampMillisecs 153 // Must be in exactly this order! 154 const int tsec = fDimMessage.getTimestamp(); 155 const int tms = fDimMessage.getTimestampMillisecs(); 154 156 155 157 // Write the received message to the output 156 fMsg.Write(Time(getInfo()->getTimestamp(), getInfo()->getTimestampMillisecs()*1000), 157 msg.str().c_str(), getInfo()->getQuality()); 158 fMsg.Write(Time(tsec, tms*1000), msg.str().c_str(), fDimMessage.getQuality()); 158 159 } -
trunk/FACT++/src/dataLogger.cc
r10549 r10570 755 755 return; 756 756 757 getInfo()->getTimestamp();758 759 757 DimInfo* I = getInfo(); 760 758 SubscriptionsListType::iterator x; … … 799 797 if (I->getSize() <= 0) 800 798 return; 801 //check that the message has been updated by something, i.e. must be different from its initial value 799 800 // Make sure that getTimestampMillisecs is NEVER called before 801 // getTimestamp is properly called 802 // check that the message has been updated by something, i.e. must be different from its initial value 802 803 if (I->getTimestamp() == 0) 803 804 return;
Note:
See TracChangeset
for help on using the changeset viewer.